Blog

All Sky Camera Initial Thoughts

I find I notice some interesting things on the All Sky Camera, which is a USB 3 ZWO ASI120MC-S CMOS camera inside a purpose built casing and clear dome. Firstly I land up with beautiful clouds rolling past. I also noticed the light pollution as I mentioned in a previous post from the bathroom window upstairs. This image is when I had the camera on the ground by the observatory as I was testing the maximum length of powered USB I could get away with before data loss caused issues.

Bathroom light on

When the light is turned off it is noticeably darker.

Bathroom light off

Sometimes I get visitors to the camera.

Daytime visitor

and sometimes I unexpectedly capture a meteor 🙂

Raindrop, Clouds and Meteor

So it transpires I can use a single 3m powered USB cable to the USB hub, I cannot use 2 x 3m powered USB as that causes data loss and hangs and I cannot use a single unpowered cable either.

Image processing notes for travel setup

So I managed to go out and quickly bag a few images of M13 to test the travel scope on the night of the 1st to the 2nd September. It was relatively cool and clear. The main aim was could I take images that were not overexposed on stars whilst capturing the fainter stars at the same time. Also I wanted to make sure I could process an image too.

So all in I took 10 x 5 minute exposures but unfortunately I had not read the Skywatcher manual and had not locked up the focus tube. This meant that the first 3 frames were out of focus so I tightened the locking latch and then took the other 7.

On processing the image I noted the black (white) band to the top and right of the image where I had not switched off the setting for Overscan. I could not PixInsight to recognise it properly so I simply pre-processed the image and then cropped it out before processing.

Overscan area present

I managed to get Photometric Colour Calibration working which helped get the colour just right. I then processed in my usual way using the following workflow.

Photometric Colour Calibration Results
Photometric Colour Calibration Settings
  1. Calibrate with Flats and Darks only no Bias as it is a CMOS camera
  2. Integrate the frames
  3. Align
  4. Perform Cosmetic Correction
  5. Debayer
  6. Crop
  7. ABE
  8. Background Neutralisation
  9. Platesolve
  10. Photometric Colour Calibration
  11. Histogram Stretch
  12. TGVDenoise
  13. ACDNR
  14. Curves
  15. Dark Structure Enhance
  16. Exponential Transformation
  17. 2nd set of Curves
  18. SCNR for green

The final image was ok for the short amount of data I obtained and proved my capture setting and workflow worked

M13

Viewing Report 8-9th September 2019 – Local Sky Quality

So recently the local Hampshire Council has been turning off local street lights at 1am and turning them back on at 4am. Now of course this was in a bid to reduce running costs but there is a positive to this change of heart.

Apart from the various benefits of darker nights such as better sleeping patterns for humans alongside a bat friendly environment then the benefits for astronomers cannot be understated.

We use a Sky Quality Meter from Unihedron in order to measure the seeing conditions and record it in the long exposure deep sky objects we try to image.

Below is the graph for the entire night of 8/9th September 2019 and the effect of bathroom light close by can be observed at around 21:20. This clearly demonstrates how bad local light pollution can be. By 4:30am the astronomical darkness window had passed and the SQM was dropping.

The effect of the new street light policy at 1am is obvious as an increase from a SQM reading from 20.4 to a maximum of 20.59 is observed until 4am when the street light came back on again and the sky quality immediately drops.

This places the local area as bortle class 4 ( 21.69–20.49) and a long way from a rural setting (21.69-21.89) or even Kielder Water (21.88) which can only get worse with more housing developments and unnecessary outdoor lighting.

So although we are grateful for improvement in the local dark skies it would be great to see the lights staying off for longer in winter so we can attempt to get better images. Hopefully we can start to come close to appreciate what people saw before the intrusion of unnecessary artificial lights in our life bloated out the wonders of the night sky without having to resort to traveling to the top of La Palma.

Viewing Report 7th/8th September 2019 – IMT3 12″

Viewing time period – 20:43 – 04:32

First thing to say is this is a very long blog, much went wrong tonight before it went right and thus I selected to record as much of the problems here as evidence later if I have the same problem or others indeed do. Tonight I am imaging M76 a planetary nebula in Perseus known as the Little Dumbbell. This is my first real object to image through the IMT3’s 12″ scope. The weather looked good and a quick look through the All Sky Camera showed a clear sky with Vega shining bright overhead and a slight glow with the Sun still setting to the West.

View through ASC

The first thing I needed to do was to slew to a bright mag +2 star, in this instance Caph in nearby Cassiopeia and centre and sync the scope which I did through TheSkyX (TSX). I then slewed to a magnitude +9 star (SAO 21164) nearby so that I could perform an autofocus through the OIII filter using SGPro. The best fit was 73,914.

Auto Focus Achieved

I then took a single 60s exposure just to make sure the focus was right, the stars coming in at around Half Flux Radius (HFR) 4. Meanwhile the camera cooler was running at -20℃ and 28% so I lowered to -28℃ at 60%. It should be noted that every time I perform a closed loop slew in TSX and the camera connects, the camera then looses the information of its status in SGPro and the only way to resolve to disconnect and reconnect. I again will note this is the TOSA User Guide.

Focus image on Mag +9 star

Then I slewed to M76, which on first inspection was still being my neighbours house. So I waited for a while longer and around 21:10 it appeared above the roof for its polar orbit around Polaris. I took a quick image with SGPro of 60 seconds through the OIII filer to see where I was pointing, given I only have a 60 point TPoint model (I need 300 for the best pointing accuracy).

M76 slightly off target

So given I was slightly out I selected the Luminance filter, went back to TSX and performed another Closed Loop Slew and then synced the scope for good measure. The resulting image through TSX and then through SGPro showed a perfect improvement.

On Target

Before imaging I went back to look at the PEC as Bob had mentioned not being able to image for very long on the Tak FS102 after we had taken it off, added the adjuster plate, reattached and added some weights. Not surprisingly the TPoint model will need redoing, however I noted the PEC was turned off, maybe I had not saved the last time I enabled. So I reenabled and saved.

PEC Now Re-enabled

I then went looking for a guide star with PHD2, however even with 10 seconds I could not see one. I looked at TSX and indeed the Field of View (FoV) indicator for the guider showed a fairly barren piece of sky with barely a magnitude +11 star visible.

I performed a quick check of the SQM and it was reading 19.37 and the Hitec Weather station had a reading of around 25 meaning between Haze and Clear. Another quick check of the ASC and that was showing clear. So either I had to move the scope to find a guide star or I could image without guiding……so the only way to tell was take a quick 5min image and see what it looked like.

As suspected the resulting 5min image showed trailing, not surprising given the TPoint model is out so I decided to guide. I slewed around trying to find a decent guide star but nothing came up, literally nothing, which then got me thinking this was not right. So I checked a bright star in the FoV for the guider, still nothing. So I then disconnected the camera and checked the settings and there it was, the setting was for the SX814 which was not powered on (aka GingerGeeks main camera on the Epsrit 120) so I changed this to the Lodestar and took another image, this came into view! Not sure the problem of why it keeps reverting to the SX814 but I will need to check each time and will add to the TOSA User Guide.

Wrong guide camera selected 🙁

So I moved back to M76 entering with TSX again and took an image for guiding through PHD2 and full of stars, well a handful at any rate, plus a load of hot pixels (I need to apply some darks).

I see guide stars and hot pixels 🙂

The resulting guider graph was smooth, too smooth, and the resulting 5 min image was trailed! Ok so something else not right, so after taking a look it turned out I had selected a hot pixel to guide on, so I exposed a little longer from 5s to 10s and selected what looked more like a star and this time tried to guide. The guiding went off the chart which proved this was a star and that I needed to calibrate the guider (seemingly every night I go out, I will need to see if that is right). So off I went to calibrate the guider.

In calibrating I realised the Darks were going to be needed, the first calibration run failed. I then went out to cover the scope using my trusty chair to help with the lift I needed to reach the end of the 12″ as it was point upwards. I then went back inside and took a set of darks ( I thought I had done this before), anyway with a new dark library in hand I recalibrated the guider.

Now suffice to say the problems did not stop there, I had guider calibration failed, star did not move enough and after 4 attempts I managed to calibrate the guider and the guiding then started at last! the main thing was to change the number of steps required to 6 and the pulse time changed then to 1500ms from 200ms. This was enough to resolve the problem.

For completeness here are the settings I am now using that work in PHD2

So after much time spent and it now being precisely 22:33 I realigned M76 in the centre as it had moved with all the calibration challenges (remembering to change the filter to Luminance during the Closed Loop Slew in TSX and then back to OIII to start my imaging run.

I tested at 2 minutes first, then 5 minutes, then 20 minutes before starting the final run to decide on the subs I would use. By 23:14 I had the 20 minutes sub and settled on 20 minute subs for the rest of the night.

Meanwhile the Summer Triangle of Deneb, Vega and Altair could be seen through the ASC and I noted that the star Tarazed in Aquila next to Altair at magnitude +2.7 could be seen also.

Summer Triangle through the ASC

I noticed the trellis lit up and had a quick word with my daughter to close the blind in the bathroom 🙁

Bathroom light on without blind down 🙁

Here is the temperature and pressure information from the dome internal sensors at around midnight.

Internal sensor readings around midnight

At 03:49 I decided to do a quick autofocus to see if the focus had changed during the night and given the temperature outside was now around 5℃. I paused the current sequence which gave me the option of cancelling or pausing at the end of the current image. I then ran autofocus but no stars were found. I went into the setting for autofocus within SGPro and changed the exposure time for the OIII filter from 1 to 20 seconds. This allowed the autofocus to see stars but the auto focus would not complete successfully and just kept creeping out. So instead I gave up, especially since astronomical darkness was finishing soon. Instead I slewed to my Flat position at Az 359, 21′ and Alt 00, 00′ to take the flats.

Co-ordinates for Flat Panel

I went out to the dome to manually turn on the light sheet which we need to automate and then turned it off after I took 10 flats through the OIII filter at 10 seconds each to get a good illumination. It would be 0.5 seconds through Luminance filter. I then packed up set the darks running and went to bed.

Lovely Flat

IMT3 Environmental Monitoring Pt.3

In this part we’ll look at the Node-RED flow that controls the Arduino with a 4-Relay Shield attached. As previously mentioned, these relays are used to allow us to remotely reset the All Sky Camera and HiTechAstro Wx STn, which we found had a tendency to hang and wouldn’t reset unless the USB connection was broken and remade. As we would not be in a position to unplug and re-plug the USB connections I came up with a solution. By modified some short USB extension cables and breaking into the +5v line I could then connect to the ‘Normally Closed’ contacts of one of the relays, picking the relay effectively turns off the USB device connected to that cable.

Relay Shield that attaches directly to an Arduino UNO

Modified USB extension cable
Snapshot of the flow to control the relays to reset ASC and Wx Stn

For this solution, we don’t write any code for the Arduino but do load it with Standard Firmata code that comes with the Arduino IDE.

Just open a new sketch, select the StandardFirmata from the Examples and upload to the Arduino.

Firmata is a generic protocol for communicating with microcontrollers from software on a host computer. It is intended to work with any host computer software package.

If not done already we need to go to npm and install the node-red-node-arduino nodes.

Originally I used a Dashboard Switch to select each relay, but it can get confusing when turning on the relay turns off the device attached, so I replaced the Switch with a Button node, pass the message to a Trigger node that will activate for 7 seconds (give the OS time to recognize the USB device has been disconnected), debounce the signal before passing onto the Arduino Output node which connects to the local Arduino and writes to the selected digital pin turning the relevant Relay On.

As there are only a few basic nodes in this flow, here are some snapshots of how each is set-up:

This button will appear on the Dashboard under the Reset Controls group

7 seconds seems long enough but can easily be changed.

Off Button

On Button

debounce the signal
debug options
Pin 7 drives the appropriate relay

So the above covers the two relays that are used to reset the All Sky Camera and HiTechAsto Wx Stn. The same building blocks are used to control a pair of battery power LED worklights to provide illumination for the Web Cameras we have dotted around the dome and on the mount. After inadvertently leaving the lights on, on one occasion, the batteries needed to be replaced after a single use. So now in addition to having switches control the lights, we also have Buttons to push for preset times on of 1, 3, 7 or 10 minutes, with an option to turn them off early.

LED lighting control

Unlit dome

Picture-in-Picture
Flip-Flat Closed
Just a couple of counter-weights
Will the last one out please turn off the lights

Wrapping up for today

Here’s the Node-RED flow for the Relay Shield

[{"id":"f126d47c.2ee7f8","type":"tab","label":"Keyestudio 4Relay Shield","disabled":false,"info":""},{"id":"56ffe7a5.6b85f8","type":"comment","z":"f126d47c.2ee7f8","name":"Arduino with keystudio 4 relay shield on /dev/tty.usbmodem144301","info":"Bob T - 28July2019\n\nKeyestudio 4 card shield to control LED lights, \nHiTechAstroDeluxe weather station and \nZWO ASI120MC All Sky Camera \n\nBosch BME280 and Dallas DS18B20 displays on the Dashboard","x":440,"y":60,"wires":[]},{"id":"2e774dcf.e58aa2","type":"inject","z":"f126d47c.2ee7f8","name":"Off","topic":"","payload":"false","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":125,"y":233,"wires":[["303f7492.3f85ec"]]},{"id":"303f7492.3f85ec","type":"delay","z":"f126d47c.2ee7f8","name":"de-bounce","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":310,"y":243,"wires":[["d50e09b8.fb1c18","2749f02d.7190b"]]},{"id":"84dc6735.a3c618","type":"inject","z":"f126d47c.2ee7f8","name":"On","topic":"","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":125,"y":263,"wires":[["303f7492.3f85ec"]]},{"id":"5c5f0bd2.1c2534","type":"inject","z":"f126d47c.2ee7f8","name":"Off","topic":"","payload":"false","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":130,"y":463,"wires":[["f88adc8a.2c784"]]},{"id":"d7751e20.14c83","type":"inject","z":"f126d47c.2ee7f8","name":"On","topic":"","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":130,"y":493,"wires":[["f88adc8a.2c784"]]},{"id":"d59eb4bd.942ae8","type":"inject","z":"f126d47c.2ee7f8","name":"Off","topic":"","payload":"false","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":110,"y":615,"wires":[["2743f87.650a908"]]},{"id":"c1c23f86.91668","type":"inject","z":"f126d47c.2ee7f8","name":"On","topic":"","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":110,"y":645,"wires":[["2743f87.650a908"]]},{"id":"84553f20.8f26c","type":"inject","z":"f126d47c.2ee7f8","name":"Off","topic":"","payload":"false","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":110,"y":840,"wires":[["35bc3b9f.4f8f94"]]},{"id":"39cd3cf9.7a7024","type":"inject","z":"f126d47c.2ee7f8","name":"On","topic":"","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":110,"y":870,"wires":[["35bc3b9f.4f8f94"]]},{"id":"f88adc8a.2c784","type":"delay","z":"f126d47c.2ee7f8","name":"de-bounce","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":315,"y":478,"wires":[["f55deca6.8236f","ec02039f.f8b64"]]},{"id":"2743f87.650a908","type":"delay","z":"f126d47c.2ee7f8","name":"de-bounce","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":520,"y":630,"wires":[["9f8d9580.1d3348"]]},{"id":"35bc3b9f.4f8f94","type":"delay","z":"f126d47c.2ee7f8","name":"de-bounce","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":520,"y":855,"wires":[["b44e31bd.88ac2"]]},{"id":"2749f02d.7190b","type":"debug","z":"f126d47c.2ee7f8","name":"","active":true,"tosidebar":true,"console":true,"tostatus":true,"complete":"payload","x":650,"y":218,"wires":[]},{"id":"ec02039f.f8b64","type":"debug","z":"f126d47c.2ee7f8","name":"","active":true,"tosidebar":true,"console":true,"tostatus":true,"complete":"payload","x":550,"y":428,"wires":[]},{"id":"a5a681c5.89e44","type":"trigger","z":"f126d47c.2ee7f8","op1":"1","op2":"0","op1type":"num","op2type":"str","duration":"7","extend":false,"units":"s","reset":"","bytopic":"all","name":"","x":345,"y":158,"wires":[["d0ab65b2.542c38","303f7492.3f85ec"]]},{"id":"d0ab65b2.542c38","type":"debug","z":"f126d47c.2ee7f8","name":"","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","x":640,"y":158,"wires":[]},{"id":"af46adb4.e7a03","type":"inject","z":"f126d47c.2ee7f8","name":"","topic":"","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":125,"y":158,"wires":[["a5a681c5.89e44"]]},{"id":"688bcc2f.63ec14","type":"trigger","z":"f126d47c.2ee7f8","op1":"1","op2":"0","op1type":"str","op2type":"str","duration":"7","extend":false,"units":"s","reset":"","bytopic":"all","name":"","x":315,"y":360,"wires":[["f88adc8a.2c784"]]},{"id":"ab716ad9.cd6008","type":"inject","z":"f126d47c.2ee7f8","name":"","topic":"","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":125,"y":390,"wires":[["688bcc2f.63ec14"]]},{"id":"5a6fb133.d07c7","type":"trigger","z":"f126d47c.2ee7f8","op1":"1","op2":"0","op1type":"str","op2type":"str","duration":"10","extend":false,"units":"min","reset":"false","bytopic":"all","name":"","x":415,"y":1035,"wires":[["35bc3b9f.4f8f94","2743f87.650a908"]]},{"id":"d50e09b8.fb1c18","type":"arduino out","z":"f126d47c.2ee7f8","name":"ZWO ASI120MC USB reset","pin":"7","state":"OUTPUT","arduino":"ae78048.c81a0f8","x":585,"y":285,"wires":[]},{"id":"f55deca6.8236f","type":"arduino out","z":"f126d47c.2ee7f8","name":"HiTechAstro Deluxe Wx Stn reset","pin":"6","state":"OUTPUT","arduino":"ae78048.c81a0f8","x":610,"y":478,"wires":[]},{"id":"9f8d9580.1d3348","type":"arduino out","z":"f126d47c.2ee7f8","name":"West LED lighting","pin":"5","state":"OUTPUT","arduino":"ae78048.c81a0f8","x":705,"y":630,"wires":[]},{"id":"b44e31bd.88ac2","type":"arduino out","z":"f126d47c.2ee7f8","name":"East LED lighting","pin":"4","state":"OUTPUT","arduino":"ae78048.c81a0f8","x":705,"y":855,"wires":[]},{"id":"d111e9f5.d3a008","type":"ui_switch","z":"f126d47c.2ee7f8","name":"Switch Relay4","label":"Switch East LED Lights on","tooltip":"","group":"4486153f.db803c","order":2,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":120,"y":930,"wires":[["35bc3b9f.4f8f94"]]},{"id":"1ed486f7.f803b9","type":"ui_switch","z":"f126d47c.2ee7f8","name":"Switch Relay3","label":"Switch West LED Lights on","tooltip":"","group":"4486153f.db803c","order":1,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":125,"y":690,"wires":[["2743f87.650a908"]]},{"id":"4cfa9507.32412c","type":"ui_button","z":"f126d47c.2ee7f8","name":"","group":"207b2faf.303c7","order":1,"width":0,"height":0,"passthru":false,"label":"Reset ZWO ASI120MC","tooltip":"Press to reset camera, power will be turned off for 7 seconds","color":"","bgcolor":"","icon":"","payload":"true","payloadType":"bool","topic":"","x":170,"y":113,"wires":[["a5a681c5.89e44"]]},{"id":"334aa4c3.95f1bc","type":"ui_button","z":"f126d47c.2ee7f8","name":"","group":"207b2faf.303c7","order":1,"width":0,"height":0,"passthru":false,"label":"Reset  Wx Stn","tooltip":"Press to reset Weather Station, power is removed for 7 seconds","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"","x":140,"y":338,"wires":[["688bcc2f.63ec14"]]},{"id":"dce61d46.cf408","type":"ui_button","z":"f126d47c.2ee7f8","name":"","group":"4486153f.db803c","order":6,"width":0,"height":0,"passthru":false,"label":"White LEDs on 10 min Timer","tooltip":"","color":"","bgcolor":"","icon":"","payload":"true","payloadType":"bool","topic":"","x":155,"y":987,"wires":[["5a6fb133.d07c7"]]},{"id":"1e8859e3.2aa6a6","type":"ui_button","z":"f126d47c.2ee7f8","name":"","group":"4486153f.db803c","order":4,"width":0,"height":0,"passthru":false,"label":"White LEDs on 3 min Timer","tooltip":"","color":"","bgcolor":"","icon":"","payload":"true","payloadType":"bool","topic":"","x":160,"y":780,"wires":[["88932bbe.119258"]]},{"id":"88932bbe.119258","type":"trigger","z":"f126d47c.2ee7f8","op1":"1","op2":"0","op1type":"str","op2type":"str","duration":"3","extend":false,"units":"min","reset":"false","bytopic":"all","name":"","x":415,"y":780,"wires":[["2743f87.650a908","35bc3b9f.4f8f94"]]},{"id":"ab204ac6.07c528","type":"ui_button","z":"f126d47c.2ee7f8","name":"","group":"4486153f.db803c","order":5,"width":0,"height":0,"passthru":false,"label":"White LEDs on 7 min Timer","tooltip":"","color":"","bgcolor":"","icon":"","payload":"true","payloadType":"bool","topic":"","x":150,"y":1035,"wires":[["d37c1fc3.44ece"]]},{"id":"d37c1fc3.44ece","type":"trigger","z":"f126d47c.2ee7f8","op1":"1","op2":"0","op1type":"str","op2type":"str","duration":"7","extend":true,"units":"min","reset":"false","bytopic":"all","name":"","x":415,"y":990,"wires":[["35bc3b9f.4f8f94","2743f87.650a908"]]},{"id":"9ec5abcd.94bff8","type":"ui_button","z":"f126d47c.2ee7f8","name":"","group":"4486153f.db803c","order":3,"width":0,"height":0,"passthru":false,"label":"White LEDs on 1 min Timer","tooltip":"","color":"","bgcolor":"","icon":"","payload":"true","payloadType":"bool","topic":"","x":160,"y":740,"wires":[["871ac8c.880b438"]]},{"id":"871ac8c.880b438","type":"trigger","z":"f126d47c.2ee7f8","op1":"1","op2":"0","op1type":"str","op2type":"str","duration":"1","extend":false,"units":"min","reset":"false","bytopic":"all","name":"","x":415,"y":735,"wires":[["35bc3b9f.4f8f94","2743f87.650a908"]]},{"id":"9b4c5ff.75b30a","type":"ui_button","z":"f126d47c.2ee7f8","name":"","group":"4486153f.db803c","order":6,"width":0,"height":0,"passthru":false,"label":"Turn Off All Lights","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"","x":120,"y":1080,"wires":[["eb116cf.e91769"]]},{"id":"eb116cf.e91769","type":"trigger","z":"f126d47c.2ee7f8","op1":"0","op2":"false","op1type":"str","op2type":"bool","duration":"250","extend":false,"units":"ms","reset":"","bytopic":"all","name":"Reset Lights","x":355,"y":1095,"wires":[["d37c1fc3.44ece","5a6fb133.d07c7","88932bbe.119258","871ac8c.880b438","35bc3b9f.4f8f94","2743f87.650a908"]]},{"id":"9fd74bd7.3fd648","type":"ui_button","z":"f126d47c.2ee7f8","name":"","group":"4486153f.db803c","order":7,"width":0,"height":0,"passthru":true,"label":"Don't Push this button","tooltip":"","color":"","bgcolor":"","icon":"","payload":"true","payloadType":"bool","topic":"","x":250,"y":1290,"wires":[["2ed3e3dc.0f6cac"]]},{"id":"2ed3e3dc.0f6cac","type":"trigger","z":"f126d47c.2ee7f8","op1":"true","op2":"false","op1type":"bool","op2type":"bool","duration":"1","extend":false,"units":"s","reset":"","bytopic":"all","name":"","x":435,"y":1290,"wires":[["8af19751.a0fec8"]]},{"id":"ffabd20f.040af","type":"inject","z":"f126d47c.2ee7f8","name":"","topic":"","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":80,"y":1290,"wires":[["9fd74bd7.3fd648"]]},{"id":"8af19751.a0fec8","type":"arduino out","z":"f126d47c.2ee7f8","name":"","pin":"13","state":"OUTPUT","arduino":"ae78048.c81a0f8","x":590,"y":1290,"wires":[]},{"id":"ae78048.c81a0f8","type":"arduino-board","z":"","device":"COM16"},{"id":"4486153f.db803c","type":"ui_group","z":"f126d47c.2ee7f8","name":"IMT3 - Lights","tab":"a9e9728d.77c83","order":6,"disp":true,"width":"6","collapse":true},{"id":"207b2faf.303c7","type":"ui_group","z":"","name":"Reset Controls","tab":"a9e9728d.77c83","order":7,"disp":true,"width":"6","collapse":true},{"id":"a9e9728d.77c83","type":"ui_tab","z":"f126d47c.2ee7f8","name":"IMT3","icon":"dashboard","order":2,"disabled":false,"hidden":false}]

IMT3 Environmental Monitoring Pt.2

Getting Started with Node-RED

https://nodered.org/docs/getting-started/ is as good as anywhere to get started. There are also plenty of YouTube clips to watch, so I won’t repeat too much here.

I chose to run Node-RED locally on my Windows 10 laptop so my first step was to download and install a supported prerequisite version of Node.js which will also include npm (Node Package Manager).

npm is the worlds largest Software Registry containing over 800,000 code packages. It is free to use and Open-source developers use npm to share their software.

npm includes a CLI (Command Line Client) that we will use to download and install software.

Having installed Node.js open Windows PowerShell to execute the npm cli command to install Node-RED

  npm install -g --unsafe-perm node-red

The command installs Node-RED as a global module along with its dependencies.

Once installed as a global module we can use the node-red command to start Node-RED in a terminal.  Ctrl-C or closing the terminal window will stop Node-RED.

You can then access the Node-RED editor by pointing your browser at http://localhost:1880/

To access the Node-RED Dashboard point your browser at http://localhost:1881/

By default, Projects are disabled 🙁 , so brush up on your Vi skills* as we need to go and edit settings.js file located in the .node-red directory. *other editors are available.

Just remember to press escape key, colon, w q bang when done!  … now where did I drag that up from, I hadn’t used Vi in years!

After an initial foray into Node-RED, I realised I would need to use Projects within Node-RED. A pre-req for this is Git. With that installed I was good to create my first Project.

I was surprised how quickly I was able get some meaningful results and was soon using npm to add nodes from the Node-RED library for the Dashboard, Arduino and much more. It wasn’t long before I had my first Dashboard displaying the output of the BME280 sensor which looked like the following:

My first Node-RED Dashboard display

An early comment from our dear friend Mil Dave asked “What’s the Dew Point“? … thanks Dave !

Google to the rescue, however the Dewpoint calculation formulae found on the web look pretty scary. Fortunately a search of the Node-RED library found a flow with a dewpoint function defined that I was able to adapt to my flow. A snapshot of the flow follows as it is now beginning to take shape and looks like this:

Node-RED Flow

The green debug nodes are useful to follow the message as they progress through the flow, the debug output can be displayed in the debug window, the system console or as node status appearing just below the debug node

The data from the Arduino arrives on the Serial node which is configured for the com port the Arduino is connected to. I’ve found it easier to determine the relevant com port from the Arduino IDE rather than via control panel and device manager. Also the ‘Get board info’ from the IDE has prove very useful when running Node-RED on MAC OS.

Double clicking any node will open up an Edit window to let you configure each node

Connected to the Serial node is a Split Node. This splits the incoming message into a sequence of messages and is setup to split the message when it finds a comma.

The message is passed to the next node which is a function node which contains some Javascript to give a variable name to each of the values received from the Arduino.

var newMsg = {};
var Sensor = {
    S1C: 0, 
    S1F: 0,
    S2C: 0,
    S2F: 0,
    BT: 0,
    BH: 0,
    BP: 0,

};

context.data = context.data || {};

switch(msg.parts.index){
    case 0:
        context.data.S1C = parseFloat(msg.payload);
        msg = null;
        break;
        
    case 1:
        context.data.S1F = parseFloat(msg.payload);
        msg = null;
        break;
        
    case 2:
        context.data.S2C = parseFloat(msg.payload);
        msg = null;
        break;
        
    case 3:
        context.data.S2F = parseFloat(msg.payload);
        msg = null;
        break;
    
   case 4:
        context.data.BT = parseFloat(msg.payload);
        msg = null;
        break;
     
    case 5:
        context.data.BH = parseFloat(msg.payload);
        msg = null;
        break;
       
    case 6:
        context.data.BP = parseFloat(msg.payload);
        msg = null;
        break;
}

AllData = context.data.S1C &&
          context.data.S1F &&
          context.data.S2C &&
          context.data.S2F &&
          context.data.BT &&
          context.data.BH &&
          context.data.BP;


if(AllData){

    Sensor = context.data;
    newMsg = { payload: context.data,
    topic: 'DS18B20' };
    context.data = null;
    return newMsg;
}
else
    return msg;

The next Function node Splits these seven values and presents them on a separate output of the node which can then be connected to individual Dashboard Gauges.

var msgS1C = {payload: (msg.payload.S1C).toFixed(2)};
var msgS1F = {payload: (msg.payload.S1F).toFixed(2)};
var msgS2C = {payload: (msg.payload.S2C).toFixed(2)};
var msgS2F = {payload: (msg.payload.S2F).toFixed(2)};
var msgBT = {payload: (msg.payload.BT-1.4).toFixed(1)};
var msgBH = {payload: (msg.payload.BH).toFixed(1)};
var msgBP = {payload: (msg.payload.BP).toFixed(0)};

return [msgS1C, msgS1F, msgS2C, msgS2F, msgBT, msgBH, msgBP];

Having split these values out, the Temperature and Humidity values need to be recombined by the Join node so they can be passed to the Dew Point function node.

var newMsg = {};
var parts = msg.payload.split(",");
var Th = parseFloat(parts[0]);
var Hu = parseFloat(parts[1]);

var temp = -1.0*Th; 
es = 6.112*Math.exp(-1.0*17.67*temp/(243.5 - temp)); 
ed = Hu/100.0*es; 
eln = Math.log(ed/6.112); 
td = -243.5*eln/(eln -17.67);

var Dp = td.toFixed(1);

newMsg = {payload: Dp,
     topic: "DewPoint"};

return newMsg;

The DewPoint is now passed to a Dashboard Gauge node and displayed. The Dashboard currently looks like this:

IMT3 Environmental Dashboard

In Pt.3 we’ll take a look at the flow that controls the Arduino with the 4-Relay Shield that allows us to remotely reset the All Sky Camera, HiTechAstro Wx Stn and control a pair of LED lights to illuminate the rig so we can use ManyCam to monitor the web cams installed in the observatory.

The following is the current Node-RED flow running on the IMT3 MAC Mini

[{"id":"485a96ea.056dd8","type":"tab","label":"Keyestudio 4Relay Shield","disabled":false,"info":""},{"id":"4d3e5207.bd89ec","type":"tab","label":"BME280+DS18B20 Sensing Temp Hum Pa","disabled":false,"info":""},{"id":"db09c4dd.5e1178","type":"ui_group","z":"485a96ea.056dd8","name":"IMT3 - Lights","tab":"ab95e945.1f76e8","disp":true,"width":"6","collapse":true},{"id":"516a9fe4.282a2","type":"ui_group","z":"485a96ea.056dd8","name":"IMT3 - All Sky Camera","tab":"ab95e945.1f76e8","disp":true,"width":"6","collapse":true},{"id":"eb5b4cc2.854a6","type":"ui_group","z":"485a96ea.056dd8","name":"IMT3 - Wx Stn","tab":"ab95e945.1f76e8","disp":true,"width":"6","collapse":true},{"id":"49f0ffe8.38f2c","type":"ui_tab","z":"485a96ea.056dd8","name":"IMT3","icon":"dashboard","order":2,"disabled":false,"hidden":false},{"id":"2acc722b.5e03fe","type":"arduino-board","z":0,"device":"COM3"},{"id":"fce2366f.4a0348","type":"arduino-board","z":0,"device":"COM16"},{"id":"db4cc1fa.86c96","type":"ui_base","theme":{"name":"theme-light","lightTheme":{"default":"#0094CE","baseColor":"#0094CE","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif","edited":true,"reset":false},"darkTheme":{"default":"#097479","baseColor":"#097479","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif","edited":false},"customTheme":{"name":"Untitled Theme 1","default":"#4B7930","baseColor":"#4B7930","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"},"themeState":{"base-color":{"default":"#0094CE","value":"#0094CE","edited":false},"page-titlebar-backgroundColor":{"value":"#0094CE","edited":false},"page-backgroundColor":{"value":"#fafafa","edited":false},"page-sidebar-backgroundColor":{"value":"#ffffff","edited":false},"group-textColor":{"value":"#1bbfff","edited":false},"group-borderColor":{"value":"#ffffff","edited":false},"group-backgroundColor":{"value":"#ffffff","edited":false},"widget-textColor":{"value":"#111111","edited":false},"widget-backgroundColor":{"value":"#0094ce","edited":false},"widget-borderColor":{"value":"#ffffff","edited":false},"base-font":{"value":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"}},"angularTheme":{"primary":"indigo","accents":"blue","warn":"red","background":"grey"}},"site":{"name":"Node-RED Dashboard","hideToolbar":"false","allowSwipe":"true","lockMenu":"false","allowTempTheme":"true","dateFormat":"DD/MM/YYYY","sizes":{"sx":32,"sy":32,"gx":6,"gy":6,"cx":6,"cy":6,"px":0,"py":0}}},{"id":"6954d733.e81b68","type":"ui_group","z":"","name":"Pressure","tab":"","order":1,"disp":true,"width":"6","collapse":true},{"id":"5d6c56a8.ca5f78","type":"ui_group","z":"","name":"Reset Controls","tab":"","order":1,"disp":true,"width":"6","collapse":false},{"id":"ee3a92d7.e92d7","type":"serial-port","z":"","serialport":"COM16","serialbaud":"9600","databits":"8","parity":"none","stopbits":"1","waitfor":"","newline":"\\n","bin":"false","out":"char","addchar":"","responsetimeout":"10000"},{"id":"d2404ee2.c4a07","type":"ui_group","z":"","name":"Humidity","tab":"","order":2,"disp":true,"width":"6","collapse":true},{"id":"7347531.83debac","type":"ui_group","z":"","name":"Pressure","tab":"","order":3,"disp":true,"width":"6","collapse":true},{"id":"afbeacf6.bf67f","type":"serial-port","z":"","serialport":"COM10","serialbaud":"9600","databits":"8","parity":"none","stopbits":"1","waitfor":"","newline":"\\n","bin":"false","out":"char","addchar":"false","responsetimeout":"10000"},{"id":"b645ca7c.5c5078","type":"ui_spacer","name":"spacer","group":"83c91351.079c7","order":7,"width":1,"height":1},{"id":"e04b5df3.8023f","type":"mqtt-broker","broker":"localhost","port":"1883"},{"id":"92218788.cc54e8","type":"serial-port","z":"","serialport":"COM5","serialbaud":"9600","databits":"8","parity":"none","stopbits":"1","waitfor":"","newline":"\\n","bin":"false","out":"char","addchar":"","responsetimeout":"10000"},{"id":"afd985bb.b6f418","type":"serial-port","z":"","serialport":"COM4","serialbaud":"9600","databits":"8","parity":"none","stopbits":"1","waitfor":"","newline":"\\n","bin":"false","out":"char","addchar":"","responsetimeout":"10000"},{"id":"93ad4e89.caa2f","type":"ui_group","z":"","name":"Pressure/Temperature","tab":"","disp":true,"width":"12","collapse":false},{"id":"cb031b5a.f51aa8","type":"ui_group","z":"","name":"IMT Monitoring","tab":"","disp":true,"width":"6","collapse":false},{"id":"b5dfb3de.d7e15","type":"ui_group","z":"","name":"Group 1","tab":"","order":4,"disp":true,"width":"6","collapse":false},{"id":"24e8044f.8b1a6c","type":"ui_spacer","name":"spacer","group":"5d6c56a8.ca5f78","order":1,"width":1,"height":1},{"id":"389727bb.3ad738","type":"ui_group","z":"","name":"Reset Controls","tab":"49f0ffe8.38f2c","order":5,"disp":true,"width":"6","collapse":true},{"id":"13d4a243.10dcde","type":"ui_group","z":"","name":"Lighting Controls","tab":"49f0ffe8.38f2c","order":4,"disp":true,"width":"6","collapse":true},{"id":"a776141c.b812f8","type":"ui_spacer","name":"spacer","group":"13d4a243.10dcde","order":3,"width":1,"height":1},{"id":"213ca1a5.2ba5de","type":"ui_group","z":"","name":"BME280 Sensor","tab":"49f0ffe8.38f2c","order":3,"disp":true,"width":"6","collapse":true},{"id":"6168a559.a55b3c","type":"ui_group","z":"","name":"BME280 Temp","tab":"","order":4,"disp":true,"width":"6","collapse":false},{"id":"6339fdd1.0da1c4","type":"ui_group","z":"","name":"BME280 - Temp","tab":"","order":4,"disp":true,"width":"6","collapse":true},{"id":"a0396508.e34c88","type":"ui_group","z":"","name":"Nuc Enclosure","tab":"49f0ffe8.38f2c","order":2,"disp":true,"width":"6","collapse":false},{"id":"7dd8b7bb.d7caf8","type":"ui_group","z":"","name":"MAC Mini","tab":"49f0ffe8.38f2c","order":1,"disp":true,"width":"6","collapse":true},{"id":"832ac20d.e8697","type":"comment","z":"485a96ea.056dd8","name":"Arduino with keystudio 4 relay shield on Com16","info":"Bob T - 15July2019\n\nKeyestudio 4 card shield to control LED lights, \nHiTechAstroDeluxe weather station and \nZWO ASI120MC All Sky Camera ","x":380,"y":60,"wires":[]},{"id":"32d3029b.04bf6e","type":"inject","z":"485a96ea.056dd8","name":"Off","topic":"","payload":"false","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":125,"y":233,"wires":[["dc4c22db.8f295"]]},{"id":"dc4c22db.8f295","type":"delay","z":"485a96ea.056dd8","name":"de-bounce","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":310,"y":243,"wires":[["a613d3b3.48ad","dacf1794.cdaf98"]]},{"id":"a328ae9b.ccca9","type":"inject","z":"485a96ea.056dd8","name":"On","topic":"","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":125,"y":263,"wires":[["dc4c22db.8f295"]]},{"id":"a613d3b3.48ad","type":"arduino out","z":"485a96ea.056dd8","name":"ZWO ASI120MC USB reset","pin":"7","state":"OUTPUT","arduino":"2acc722b.5e03fe","x":525,"y":278,"wires":[]},{"id":"a2f0bb4f.f498e8","type":"inject","z":"485a96ea.056dd8","name":"Off","topic":"","payload":"false","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":130,"y":463,"wires":[["5cf13b52.04e544"]]},{"id":"310eb06c.aaa6e","type":"inject","z":"485a96ea.056dd8","name":"On","topic":"","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":130,"y":493,"wires":[["5cf13b52.04e544"]]},{"id":"15c8ff0d.57b2b1","type":"inject","z":"485a96ea.056dd8","name":"Off","topic":"","payload":"false","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":125,"y":578,"wires":[["ec59f57e.ea8d18"]]},{"id":"e3cfa58e.302168","type":"inject","z":"485a96ea.056dd8","name":"On","topic":"","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":125,"y":608,"wires":[["ec59f57e.ea8d18"]]},{"id":"fb823e1b.0ebd","type":"inject","z":"485a96ea.056dd8","name":"Off","topic":"","payload":"false","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":110,"y":760,"wires":[["be20e01d.52cbd"]]},{"id":"fc39430.0c43ac","type":"inject","z":"485a96ea.056dd8","name":"On","topic":"","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":110,"y":790,"wires":[["be20e01d.52cbd"]]},{"id":"5cf13b52.04e544","type":"delay","z":"485a96ea.056dd8","name":"de-bounce","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":315,"y":478,"wires":[["98563994.c5b588","55b1d5a1.8c01bc"]]},{"id":"ec59f57e.ea8d18","type":"delay","z":"485a96ea.056dd8","name":"de-bounce","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":310,"y":593,"wires":[["ae521b10.9b50e8","8957d695.00a448"]]},{"id":"be20e01d.52cbd","type":"delay","z":"485a96ea.056dd8","name":"de-bounce","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":310,"y":790,"wires":[["d24c85c8.bf2c38","c2d7a57d.cf3388"]]},{"id":"98563994.c5b588","type":"arduino out","z":"485a96ea.056dd8","name":"reserved for Wx Stn reset","pin":"6","state":"OUTPUT","arduino":"2acc722b.5e03fe","x":580,"y":478,"wires":[]},{"id":"ae521b10.9b50e8","type":"arduino out","z":"485a96ea.056dd8","name":"reserved for RED LED lighting","pin":"5","state":"OUTPUT","arduino":"2acc722b.5e03fe","x":595,"y":593,"wires":[]},{"id":"d24c85c8.bf2c38","type":"arduino out","z":"485a96ea.056dd8","name":"White LED Lighting","pin":"4","state":"OUTPUT","arduino":"2acc722b.5e03fe","x":570,"y":790,"wires":[]},{"id":"c2d7a57d.cf3388","type":"debug","z":"485a96ea.056dd8","name":"","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","x":550,"y":845,"wires":[],"inputLabels":["LED"]},{"id":"dacf1794.cdaf98","type":"debug","z":"485a96ea.056dd8","name":"","active":true,"tosidebar":true,"console":true,"tostatus":true,"complete":"payload","x":650,"y":218,"wires":[]},{"id":"1363d217.e375ae","type":"ui_switch","z":"485a96ea.056dd8","name":"Switch Relay4","label":"Switch White LEDs on","tooltip":"","group":"13d4a243.10dcde","order":1,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":120,"y":850,"wires":[["be20e01d.52cbd"]]},{"id":"96a29cbe.85d93","type":"ui_switch","z":"485a96ea.056dd8","name":"Switch Relay3","label":"Switch RED LEDs on","tooltip":"","group":"13d4a243.10dcde","order":2,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":120,"y":658,"wires":[["ec59f57e.ea8d18"]]},{"id":"55b1d5a1.8c01bc","type":"debug","z":"485a96ea.056dd8","name":"","active":true,"tosidebar":true,"console":true,"tostatus":true,"complete":"payload","x":550,"y":428,"wires":[]},{"id":"8957d695.00a448","type":"debug","z":"485a96ea.056dd8","name":"","active":true,"tosidebar":true,"console":true,"tostatus":true,"complete":"payload","x":545,"y":658,"wires":[]},{"id":"4b9ea92f.a5e9e8","type":"ui_button","z":"485a96ea.056dd8","name":"","group":"389727bb.3ad738","order":1,"width":0,"height":0,"passthru":false,"label":"Reset ZWO ASI120MC","tooltip":"Press to reset camera, power will be turned off for 7 seconds","color":"","bgcolor":"","icon":"","payload":"true","payloadType":"bool","topic":"","x":170,"y":113,"wires":[["aaf4a028.f0347","54152099.11ec1"]]},{"id":"aaf4a028.f0347","type":"debug","z":"485a96ea.056dd8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","x":640,"y":113,"wires":[]},{"id":"54152099.11ec1","type":"trigger","z":"485a96ea.056dd8","op1":"1","op2":"0","op1type":"num","op2type":"str","duration":"7","extend":false,"units":"s","reset":"","bytopic":"all","name":"","x":345,"y":158,"wires":[["b47fba95.880ac8","dc4c22db.8f295"]]},{"id":"b47fba95.880ac8","type":"debug","z":"485a96ea.056dd8","name":"","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","x":640,"y":158,"wires":[]},{"id":"8c8ddd2.3ba6a2","type":"inject","z":"485a96ea.056dd8","name":"","topic":"","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":125,"y":158,"wires":[["54152099.11ec1"]]},{"id":"17a45757.0f3839","type":"ui_button","z":"485a96ea.056dd8","name":"","group":"389727bb.3ad738","order":1,"width":0,"height":0,"passthru":false,"label":"Reset  Wx Stn","tooltip":"Press to reset Weather Station, power is removed for 7 seconds","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"","x":140,"y":338,"wires":[["ae8f9b64.17ad08"]]},{"id":"ae8f9b64.17ad08","type":"trigger","z":"485a96ea.056dd8","op1":"1","op2":"0","op1type":"str","op2type":"str","duration":"7","extend":false,"units":"s","reset":"","bytopic":"all","name":"","x":465,"y":338,"wires":[["5cf13b52.04e544"]]},{"id":"35c5f11a.a6fd2e","type":"inject","z":"485a96ea.056dd8","name":"","topic":"","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":110,"y":383,"wires":[["ae8f9b64.17ad08"]]},{"id":"ce4ad2aa.33a02","type":"trigger","z":"485a96ea.056dd8","op1":"1","op2":"0","op1type":"str","op2type":"str","duration":"7","extend":false,"units":"min","reset":"","bytopic":"all","name":"","x":360,"y":907,"wires":[["be20e01d.52cbd"]]},{"id":"7bdfc101.255ec","type":"ui_button","z":"485a96ea.056dd8","name":"","group":"13d4a243.10dcde","order":5,"width":0,"height":0,"passthru":false,"label":"White LEDs on Timer","tooltip":"","color":"","bgcolor":"","icon":"","payload":"true","payloadType":"bool","topic":"","x":135,"y":907,"wires":[["ce4ad2aa.33a02"]]},{"id":"7432b57b.2b4fac","type":"serial in","z":"4d3e5207.bd89ec","name":"","serial":"afd985bb.b6f418","x":65,"y":255,"wires":[["fbe3b723.be8138","d6674162.0d89a"]]},{"id":"d968c054.e6532","type":"function","z":"4d3e5207.bd89ec","name":"","func":"var newMsg = {};\nvar Sensor = {\n //   NData: 0, \n    Temp: 0,\n    Humid: 0,\n    Pressure_BME280 : 0,\n\n//    Time: new Date().toString()\n};\n\ncontext.data = context.data || {};\n\nswitch(msg.parts.index){\n    case 0:\n        context.data.NData = parseFloat(msg.payload);\n        msg = null;\n        break;\n    case 1:\n        context.data.Temp = parseFloat(msg.payload);\n        msg = null;\n        break;\n    case 2:\n        context.data.Humid = parseFloat(msg.payload);\n        msg = null;\n        break;\n        \n    case 3:\n        context.data.Pressure_BME280 = parseFloat(msg.payload);\n        msg = null;\n        break;\n        \n\n}\n\n//AllData = context.data.NData &&\nAllData =   context.data.Temp &&\n          context.data.Humid &&\n          context.data.Pressure_BME280;\n       \n        \n         // context.data.Altitud_BMP;\n\nif(AllData){\n //   var time = Date();\n   // context.data.Time = time.toString();\n    Sensor = context.data;\n    newMsg = { payload: context.data,\n    topic: 'Frame Sensor' };\n    context.data = null;\n    return newMsg;\n}\nelse\n    return msg;\n","outputs":1,"noerr":0,"x":455,"y":255,"wires":[["e6be691e.67eed8","f1854d0d.daac6"]]},{"id":"bffe4a25.88d4d8","type":"debug","z":"4d3e5207.bd89ec","name":"","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","x":520,"y":120,"wires":[]},{"id":"d6674162.0d89a","type":"split","z":"4d3e5207.bd89ec","name":"","splt":" ","spltType":"str","arraySplt":"3","arraySpltType":"len","stream":false,"addname":"","x":320,"y":255,"wires":[["d968c054.e6532","bffe4a25.88d4d8"]]},{"id":"e6be691e.67eed8","type":"json","z":"4d3e5207.bd89ec","name":"","property":"payload","action":"str","pretty":true,"x":605,"y":255,"wires":[["8c80d979.2751c8"]]},{"id":"8c80d979.2751c8","type":"debug","z":"4d3e5207.bd89ec","name":"","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","x":670,"y":360,"wires":[]},{"id":"fbe3b723.be8138","type":"debug","z":"4d3e5207.bd89ec","name":"","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","x":195,"y":135,"wires":[]},{"id":"f1854d0d.daac6","type":"debug","z":"4d3e5207.bd89ec","name":"","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","x":565,"y":180,"wires":[]},{"id":"36f134f3.b00a8c","type":"debug","z":"4d3e5207.bd89ec","name":"","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","x":265,"y":345,"wires":[]},{"id":"44c5c387.ca6b1c","type":"serial in","z":"4d3e5207.bd89ec","name":"DS18B20","serial":"afd985bb.b6f418","x":75,"y":420,"wires":[["36f134f3.b00a8c","8e7bff44.7351a"]]},{"id":"8e7bff44.7351a","type":"split","z":"4d3e5207.bd89ec","name":"","splt":",","spltType":"str","arraySplt":"6","arraySpltType":"len","stream":false,"addname":"","x":260,"y":435,"wires":[["42fc1749.2fb2d8","a21c2add.952cd8"]],"inputLabels":["1"],"outputLabels":["3"]},{"id":"42fc1749.2fb2d8","type":"debug","z":"4d3e5207.bd89ec","name":"","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","x":630,"y":440,"wires":[]},{"id":"a21c2add.952cd8","type":"function","z":"4d3e5207.bd89ec","name":"Payload Object Sensor","func":"var newMsg = {};\nvar Sensor = {\n    S1C: 0, \n    S1F: 0,\n    S2C: 0,\n    S2F: 0,\n    BT: 0,\n    BH: 0,\n    BP: 0,\n\n//    Time: new Date().toString()\n};\n\ncontext.data = context.data || {};\n\nswitch(msg.parts.index){\n    case 0:\n        context.data.S1C = parseFloat(msg.payload);\n        msg = null;\n        break;\n    case 1:\n        context.data.S1F = parseFloat(msg.payload);\n        msg = null;\n        break;\n    case 2:\n        context.data.S2C = parseFloat(msg.payload);\n        msg = null;\n        break;\n        \n    case 3:\n        context.data.S2F = parseFloat(msg.payload);\n        msg = null;\n        break;\n    \n   case 4:\n      context.data.BT = parseFloat(msg.payload);\n      msg = null;\n      break;\n     \n    case 5:\n        context.data.BH = parseFloat(msg.payload);\n        msg = null;\n        break;\n       \n    case 6:\n        context.data.BP = parseFloat(msg.payload);\n        msg = null;\n        break;\n\n\n}\n\nAllData = context.data.S1C &&\n          context.data.S1F &&\n          context.data.S2C &&\n          context.data.S2F &&\n          context.data.BT &&\n          context.data.BH &&\n          context.data.BP;\n       \n        \n         // context.data.Altitud_BMP;\n\nif(AllData){\n    //var time = Date();\n   // context.data.Time = time.toString();\n    Sensor = context.data;\n    newMsg = { payload: context.data,\n    topic: 'DS18B20' };\n    context.data = null;\n    return newMsg;\n}\nelse\n    return msg;\n\n\n","outputs":1,"noerr":0,"x":400,"y":525,"wires":[["ea728815.3b1928","bf04c7ef.157d88"]]},{"id":"ea728815.3b1928","type":"debug","z":"4d3e5207.bd89ec","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","x":655,"y":525,"wires":[]},{"id":"bf04c7ef.157d88","type":"function","z":"4d3e5207.bd89ec","name":"Split Data","func":"var msgS1C = {payload: (msg.payload.S1C).toFixed(2)};\nvar msgS1F = {payload: (msg.payload.S1F).toFixed(2)};\nvar msgS2C = {payload: (msg.payload.S2C).toFixed(2)};\nvar msgS2F = {payload: (msg.payload.S2F).toFixed(2)};\nvar msgBT = {payload: (msg.payload.BT).toFixed(2)};\nvar msgBH = {payload: (msg.payload.BH).toFixed(2)};\nvar msgBP = {payload: (msg.payload.BP).toFixed(2)};\n\n//var msgS1C = {payload: (msg.payload.S1C).toFixed(2)};\n//var msgS1F = {payload: (msg.payload.S1F).toFixed(2)};\n//var msgS2C = {payload: (msg.payload.S2C).toFixed(2)};\n//var msgS2F = {payload: (msg.payload.S2F).toFixed(2)};\n//var msgBT = {payload: (msg.payload.BT).toFixed(2)};\n//var msgBH = {payload: (msg.payload.BH).toFixed(2)};\n\n\n//var msgbme280_h = {payload: (msg.payload.bme280_h).toFixed(1)};\n//var msgbme280_p = {payload: (msg.payload.bme280_p).toFixed(1)};\n\nreturn [msgS1C, msgS1F, msgS2C, msgS2F, msgBT, msgBH, msgBP];\n//return [msgS1C, msgS1F, msgS2C, msgS2F, msgbme280_t, msgbme280_h, msgbme280_p];\n\n\n\n\n\n//var msgTemp = {payload: msg.payload.Temp};\n//var msgTemp = {payload: (msg.payload.Temp).toFixed(1)};\n//var msgHumid = {payload: msg.payload.Humid};\n//var msgHumid = {payload: (msg.payload.Humid).toFixed(1)};\n//var msgTemp_DS = {payload: msg.payload.Temp_DS};\n//var msgTemp_BMP = {payload: msg.payload.Temp_BMP};\n//var msgPressure_BME = {payload: (msg.payload.Pressure_BME280).toFixed(0)};\n//var msgPressure_BME = {payload: (msg.payload.Pressure_BME280/100000).toFixed(2)};\n//var msgAltitud_BMP = {payload: msg.payload.Altitud_BMP};\n\n//return [msgTemp_DHT11];\n//return [msgTemp, msgHumid, msgPressure_BME];\n//return [msgTemp_DHT11, msgHumid_DHT, msgTemp_DS, msgTemp_BMP, msgPressure_BMP, msgAltitud_BMP ];","outputs":7,"noerr":0,"x":255,"y":750,"wires":[["5a7a2a2.9de7ed4","74244174.a7498"],["1df94d4f.96f153","bc09270c.1c3d38"],["83e8c937.e86d18","b9e2e2e3.e5de6"],["4dc159a8.536488","b3d40b.af729bf8"],["7bf4618d.9e1e2","edca722d.9bc12"],["24655be.0e446a4","76e9dff9.ffc88"],["5e28cc59.1975a4","214f5175.b812fe"]]},{"id":"5a7a2a2.9de7ed4","type":"debug","z":"4d3e5207.bd89ec","name":"","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","x":550,"y":615,"wires":[]},{"id":"1df94d4f.96f153","type":"debug","z":"4d3e5207.bd89ec","name":"","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","x":535,"y":720,"wires":[]},{"id":"83e8c937.e86d18","type":"debug","z":"4d3e5207.bd89ec","name":"","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","x":535,"y":810,"wires":[]},{"id":"4dc159a8.536488","type":"debug","z":"4d3e5207.bd89ec","name":"","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","x":480,"y":930,"wires":[]},{"id":"74244174.a7498","type":"ui_gauge","z":"4d3e5207.bd89ec","name":"Mac Mini Enclosure","group":"7dd8b7bb.d7caf8","order":1,"width":0,"height":0,"gtype":"gage","title":"MAC Mini Enclosure","label":"","format":"{{value}}°C","min":0,"max":"50","colors":["#008000","#ff8000","#ff0000"],"seg1":"","seg2":"","x":540,"y":675,"wires":[]},{"id":"bc09270c.1c3d38","type":"ui_gauge","z":"4d3e5207.bd89ec","name":"DS18B20","group":"7dd8b7bb.d7caf8","order":2,"width":0,"height":0,"gtype":"gage","title":"MAC Mini","label":"","format":"{{value}}°F","min":0,"max":"100","colors":["#008000","#ff8000","#ff0000"],"seg1":"","seg2":"","x":475,"y":768,"wires":[]},{"id":"b9e2e2e3.e5de6","type":"ui_gauge","z":"4d3e5207.bd89ec","name":"NUC Enclosure","group":"a0396508.e34c88","order":1,"width":0,"height":0,"gtype":"gage","title":"NUC Enclosure","label":"","format":"{{value}}°C","min":0,"max":"60","colors":["#008000","#ff8000","#ff0000"],"seg1":"","seg2":"","x":515,"y":870,"wires":[]},{"id":"b3d40b.af729bf8","type":"ui_gauge","z":"4d3e5207.bd89ec","name":"DS18B20","group":"a0396508.e34c88","order":1,"width":0,"height":0,"gtype":"gage","title":"NUC","label":"","format":"{{value}}°F","min":0,"max":"100","colors":["#008000","#ff8000","#ff0000"],"seg1":"","seg2":"","x":510,"y":990,"wires":[]},{"id":"7bf4618d.9e1e2","type":"debug","z":"4d3e5207.bd89ec","name":"","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","x":480,"y":1060,"wires":[]},{"id":"24655be.0e446a4","type":"debug","z":"4d3e5207.bd89ec","name":"","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","x":470,"y":1140,"wires":[]},{"id":"5e28cc59.1975a4","type":"debug","z":"4d3e5207.bd89ec","name":"","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","x":460,"y":1220,"wires":[]},{"id":"edca722d.9bc12","type":"ui_gauge","z":"4d3e5207.bd89ec","name":"bme280-t","group":"213ca1a5.2ba5de","order":1,"width":0,"height":0,"gtype":"gage","title":"Ambient Temperature","label":"Centigrade","format":"{{value}}°C","min":0,"max":"50","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":570,"y":1100,"wires":[]},{"id":"76e9dff9.ffc88","type":"ui_gauge","z":"4d3e5207.bd89ec","name":"bme280-rH","group":"213ca1a5.2ba5de","order":2,"width":0,"height":0,"gtype":"gage","title":"Relative Humdity","label":"rH","format":"{{value}}%","min":0,"max":"100","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":620,"y":1200,"wires":[]},{"id":"214f5175.b812fe","type":"ui_gauge","z":"4d3e5207.bd89ec","name":"bme280-p","group":"213ca1a5.2ba5de","order":3,"width":0,"height":0,"gtype":"gage","title":"Air Pressure","label":"mmHg","format":"{{value}}","min":0,"max":"1200","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":610,"y":1300,"wires":[]},{"id":"6b6b4cd9.5a4f54","type":"ui_button","z":"485a96ea.056dd8","name":"","group":"13d4a243.10dcde","order":4,"width":0,"height":0,"passthru":false,"label":"RED LEDs on Timer","tooltip":"","color":"","bgcolor":"","icon":"","payload":"true","payloadType":"bool","topic":"","x":140,"y":700,"wires":[["ec59f57e.ea8d18"]]}]

IMT3 Environmental Monitoring Pt.1

IMT3 Environmental Monitoring Pt.1
Bob Trevan – Aug2019

When Dave, Mark and I first started planning what equipment we were going to install in IMT3 we started with a block diagram of what we thought we were going to install so we could determine the number of USB ports we would need and the power requirements. This soon morphed into much more as we started adding kit to the project.

Although the Observatory is install in the UK and not Spain as was originally planned, we decided we would still need a fair bit of monitoring to allow remote sensing of the local conditions. In particular making sure it was safe to open the shutter for a remote observing session

During AstroFest in Feb 2019 we bought a HiTechAstro Deluxe Weather Station which can be used as an ASCOM safety device to autonomously close the Dome Shutter if rain or cloud is detected. Although we were lead to believe it would directly interface with the Pulsar Dome Controller, this was not the case and required a simple interface consisting of a SPST Relay to control the shutter. Once the Relay is picked the shutter closes and will stay closed until the operator manually resets the state of the relay via the weather station software. The software has a number of options to configure to determine when to close the shutter

Although the Shutter itself has a battery pack that has sufficient capacity to close the shutter in the event of a power outage we decided to add an APC UPS with PowerChute software so provide AC power resilience to critical components. The shutter battery is wirelessly charged when the dome is parked at the end of each observing session.

In addition to the Cloud and Rain sensor, we also have a Sky Quality Meter and All Sky camera mounted on the same pole. The cable run to the pole from the panel inside the dome to which we were mounting various components … MAC Mini, 10-port USB HUB, Power Bricks, etc … is about 10m. The cabling provided with the Weather Station was somewhat shorter than this which meant having to extend it with the challenges of making the external connections water tight.

The HiTechAstro Wx Stn is also a Cloud Sensor utilizing an IR sensor to measure the Sky Temperature and a Dallas DS18B20 to measure Ambient Temperature. The waterproof probe is attached to the underside of the mounting bracket.

For monitoring the Dome Internal conditions I started looking at what we could achieve using an Arduino (*1) with various sensors. Currently we have two Arduinos installed, the first utilizes an Arduino UNO R3 with a Bosch BME280 (*2) Temperature, Humidity and Pressure Sensor and a pair of Dallas DS18B20 (*3) temperature probes for monitoring the internal temperatures of the enclosures housing the MAC Mini and Intel NUC (*4) (more on the NUC later). The current version of code running on this Arduino is provided at the end of this part of the blog.

A second Arduino has a 4-relay shield attached. The relays are used to control two 380 lumens LED lights inside the dome and after modifying a couple of short USB extension leads, breaking into the +5v line, the remaining 2 relays are used to reset the All Sky Camera and HiTechAstro Deluxe Wx Stn, when the need arises (which is all too frequently). This Arduino is programmed to run Standard Firmata code allowing Node-RED to communicate via the serial port and control the relays.

*1   Arduino is an open-source electronics platform based on easy-to-use hardware and software. Arduino boards are able to read inputs – light on a sensor, a finger on a button, or a Twitter message – and turn it into an output – activating a motor, turning on an LED, publishing something online.

The Arduino integrated development environment (IDE) is a cross-platform application (for Windows, macOS, Linux) that is written in the programming language Java, C, C++. It is used to write and upload programs to Arduino compatible boards. User-written code only requires two basic functions, for starting the sketch and the main program loop. For more info see https://en.wikipedia.org/wiki/Arduino_IDE

*2   Bosch BME280
The BME280 is an integrated environmental sensor developed specifically for mobile applications where size and low power consumption are key design constraints. The unit combines individual high linearity, high accuracy sensors for pressure, humidity and temperature in an 8-pin metal-lid 2.5 x 2.5 x 0.93 mm³ LGA package, designed for low current consumption (3.6 μA @1Hz), long term stability and high EMC robustness.

*3   Dallas DS18B20
The DS18B20-PAR digital thermometer provides 9 to 12–bit centigrade temperature measurements and has an alarm function with nonvolatile user-programmable upper and lower trigger points. The DS18B20-PAR communicates over a 1-Wire bus, which by definition requires only one data line (and ground) for communication with a central microprocessor. It has an operating temperature range of –55°C to +100°C and is accurate to ±0.5°C over a range of –10°C to +85°C.

*4   Next Unit of Computing (NUC) is a line of small-form-factor barebone computer kits designed by Intel. The NUC motherboard measures 4 × 4 inches (10.16 × 10.16 cm)

The Bosch BME280 Sensor uses the I2C bus and the Dallas DS18B20 probes use a One-Wire interface. Each of the DS18B20 has a unique internal 64-bit address created during the manufacturing process, so you can just keep adding as many as you need with relative ease.

Currently, every 20 seconds, the Arduino spits out 7 values separated by commas and terminated with a line feed, these are:

  1. DS18B20 Ext sensor Temperatue in °C
  2. DS18B20 Ext sensor Temperature in °F
  3. DS18B20 Int sensor Temperature in °C
  4. DS18B20 Int sensor Temperature in °F
  5. BME280 sensor Temperature in °C
  6. BME280 sensor Humidity in %
  7. BME280 sensor Pressure in mPa

e.g. 27.0000,80.6000,26.0000,78.8000,28.53,43.53,1008.28

Mark also donated a HiTechAstro Hub to the project which is used to control DC power to the Cameras, Focuser, Filter Wheels and potentially Dew Heaters, but with three rigs mounted on the SB Paramount ME-II we were quickly using all available USB Ports and Switched DC power ports available.

After several ‘Hangs’ of the NUC due the to the software packages tested with the All Sky Camera, we added a MAC mini to run the environment applications, leaving the Intel NUC to run the Main Applications to control the mount and Cameras. The Sky X, Sequence Generator Pro etc…

So we now have a number of PC / MAC applications, controlling and displaying various functions of IMT3. But how do we display the Arduino data ?

Working for IBM, Dave had been exposed to Node-RED. Originally developed by IBM, Node-RED is a flow based development tool for visual programming for wiring together hardware devices, APIs and online services as part of the Internet of Things.

Node-RED provides a web browser-based flow editor, which can be used to create Javascript fuctions. The runtime is built on Node.js. The flows created in Node-RED are stored using JSON. Since version 0.14 MQTT nodes can make properly configured TLS connections.

In 2016, IBM contributed Node-RED as an open source JS Foundation project.

One of the Node-RED projects is a dashboard UI for Node-RED, and this is how the Arduino sensor data is displayed, along with the flow that controls the 4 relays on the Arduino Relay Shield.

We have a new vocabulary to learn; IoT, MQTT, node.js, Node-RED, JSON, Arduino, Sketch, Flow and new languages to learn C, C++, Javascript and we haven’t even mentioned the BBC MicroBit or Raspbery Pi and Python 🙂

I’ll describe the Node-RED flows I currently have working and the Dashboard in Pt. 2.

Arduino Code:

/********************************************************************
* Arduino code used for monitoring the Internal Ambient Temperature,
* Humidity and Air Pressure of IMT3 Observatory using a Bosch BME280 sensor
* and two Dallas DS18B20 temperature probes to measure the temperatures of
* the MAC Mini and Intel NUC enclosures.
*
* I have commented out alot of the lines used during development, but left
* them in to help comment the code.
*
* Currently, every 20 seconds, the Arduino spits out 7 values separated by
* commas and terminated with a line feed, these are:
*
* DS18B20 Ext sensor Temperatue in °C
* DS18B20 Ext sensor Temperature in °F
* DS18B20 Int sensor Temperature in °C
* DS18B20 Int sensor Temperature in °F
*
* BME280 sensor Temperature in °C
* BME280 sensor Humidity in %
* BME280 sensor Pressure in mPa
*
* e.g. 27.0000,80.6000,26.0000,78.8000,28.53,43.53,1008.28
*
* The above will be displayed as Gauges on a Node-RED Dashboard.
*
* Bob Trevan August 2019
*******************************************************************/
/******************************************************************
This is a library for the BME280 humidity, temperature & pressure sensor
Designed specifically to work with the Adafruit BME280 Breakout
----> http://www.adafruit.com/products/2650
 These sensors use I2C or SPI to communicate, 2 or 4 pins are required
to interface. The device's I2C address is either 0x76 or 0x77.
 Adafruit invests time and resources providing this open source code,
please support Adafruit and open-source hardware by purchasing products from Adafruit! 
Written by Limor Fried & Kevin Townsend for Adafruit Industries.
BSD license, all text above must be included in any redistribution
*******************************************************************/
#include <Wire.h>
#include <SPI.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BME280.h>
#include <OneWire.h>
#include <DallasTemperature.h>

#define BME_SCK 13
#define BME_MISO 12
#define BME_MOSI 11
#define BME_CS 10

Adafruit_BME280 bme; // I2C
char buffer[60];
// Onewire Reference and assign it to pin 5 on the Arduino
OneWire oneWire(5);
// declare as sensor reference by passing oneWire reference to Dallas Temperature.
DallasTemperature sensors(&oneWire);
// declare the device addresses
//Device 1: 0x28, 0x41, 0x0F, 0x84, 0x1F, 0x13, 0x01, 0x16
//Device 2: 0x28, 0x89, 0x25, 0x6E, 0x1F, 0x13, 0x01, 0x3F

//Device 3: 0x28, 0xAD, 0x43, 0xE2, 0x1B, 0x13, 0x01, 0x8D
//Device 4: 0x28, 0x0B, 0xA9, 0x63, 0x1F, 0x13, 0x01, 0xCC

//Device 5: 0x28, 0x52, 0xDA, 0x71, 0x1F, 0x13, 0x01, 0x68
//Device 6: 0x28, 0xAA, 0xBD, 0x68, 0x3C, 0x14, 0x01, 0x4E

// Select the pair of sensor used with this Arduino, these addresses have previously been read with a separate piece of Arduino code.
DeviceAddress ExtSensor = {0x28, 0xAA, 0xBD, 0x68, 0x3C, 0x14, 0x01, 0x4E};
DeviceAddress IntSensor = {0x28, 0x52, 0xDA, 0x71, 0x1F, 0x13, 0x01, 0x68};

// Variables to hold the temperatures
float ExtC; // originally had one sensor hanging out of my study window
float IntC; // and a second sensor by my desk.

void setup() {
Serial.begin(9600);

// Serial.println(F("BME280 test"));
bool status;
status = bme.begin(0x76); // I2C Address
if (!status) {
Serial.println("Could not find a valid BME280 sensor, check wiring!");
while (1);
}

// Serial.println("-- Default Test --");

Serial.println();

// set the resolution to 9 bit - Valid values are 9, 10, or 11 bit.
sensors.setResolution(ExtSensor, 9);

// confirm that we set that resolution by asking the DS18B20 to repeat it back
//Serial.print("Exterior Sensor Resolution: ");
//Serial.println(sensors.getResolution(ExtSensor), DEC);
//Serial.println();
// set the resolution to 9 bit - Valid values are 9, 10, or 11 bit.

sensors.setResolution(IntSensor, 9);

// confirm that we set that resolution by asking the DS18B20 to repeat it back
//Serial.print("Interior Sensor Resolution: ");
//Serial.println(sensors.getResolution(IntSensor), DEC);
//Serial.println();
}

void loop() {
// Tell the Ext sensor to Measure and Remember the Temperature it Measured
sensors.requestTemperaturesByAddress(ExtSensor); // Send the command to get temperatures
// Get the temperature that you told the sensor to measure

ExtC = sensors.getTempC(ExtSensor);

//Serial.print("Exterior Sensor: ");
//Serial.print("Temp C: ");

Serial.print(ExtC,4); // The four just increases the resolution that is printed
Serial.print(",");

//Serial.print(" Temp F: ");
// The Dallas Temperature Control Libray has a conversion function... we'll use it

Serial.print(DallasTemperature::toFahrenheit(ExtC),4);
Serial.print(",");

// Tell the INT sensor to Measure and Remember the Temperature it Measured sensors.requestTemperaturesByAddress(IntSensor); // Send the command to get temperatures
// Get the temperature that you told the sensor to measure

IntC = sensors.getTempC(IntSensor);

//Serial.print("Interior Sensor: ");
//Serial.print("Temp C: ");

Serial.print(IntC,4); // The four just increases the resolution that is printed
Serial.print(",");

//Serial.print(" Temp F: ");
// The Dallas Temperature Control Libray has a conversion function... we'll use it

Serial.print(DallasTemperature::toFahrenheit(IntC),4);
Serial.print(",");
//Serial.println("\n");
printTemp();
printHum();
printPa();
delay(20000);
}

void printTemp() {
dtostrf(getTemp(),1,2,buffer);

// Serial.print("Temperature = ");

Serial.print(buffer);
Serial.print(",");

// Serial.println(" *C");
}

void printHum() {
dtostrf(getHum(),1,2,buffer);

// Serial.print("Humidity = ");

Serial.print(buffer);
Serial.print(",");

// Serial.println(" %");
}

void printPa() {
dtostrf(getPa(),1,2,buffer);

// Serial.print("Pressure = ");

Serial.println(buffer);

// Serial.println(" hPa");
}

double getTemp(void) {
double t;
t = bme.readTemperature();
return (t);
}

double getHum(void) {
double h;
h = bme.readHumidity();
return (h);
}

double getPa(void) {
double p;
p = (bme.readPressure() / 100.0F);
return (p);
} 

Viewing Report 25th/26th August 2019 – Travel Scope

Viewing time period – 22:34 – 04:12

After a full day of all three geeks making more changes to the observatory, I setup my travel scope, Esprit 120 to get some more time logged before taking it on any serious holiday.

Before starting I thought I would record, compute and apply a Periodic Error Correction (PEC) model to the MyT mount similar to doing the one on the MEII earlier. Recording it was fairly straightforward using TheSkyX (TSX), connecting to my camera and then continuously recording the output to a log which you then read in and apply. Even though the log looked pretty terrible a periodic curve was able to be computed and looked a good fit and represented a peak to peak error of +/- 0.5 arcsecs.

Connecting the camera to PHD2 though was somewhat of a challenge, I managed to guide in DEC but the RA was wildly out even though I tried a few different settings for the aggressiveness and Hysteresis which is the previous adjustment percentage to apply as well.

When trying to image with this sort of guide graph from PHD2 the resulting image is trailed. Note the greenness of the image is due to the bayer matrix array of the camera being RGGB and thus 50% of the light is in the green and would be corrected later. The picture below is a zoomed in portion of that image.

So instead I moved to TSX to see if it would guide any better, knowing full well that PHD2 should be able to do this if I could get the right settings. In TSX I took the default values and then choose a guide star and started guiding. The output is fairly similar to PHD2 in the graph and immediately the RA error again could be seen and the resulting trailing of the image taken with EZCAP on the Mac apparent.

At this point I changed the settings for the guiding in TSX noting that the calibration was really quick, almost too quick, with a single move of the scope in either axis which is not enough. So I changed the calibration distance for both axis from 100 pixels to 200 pixels, I also changed the Minimum and Maximum move figures from 0.01 arcsecs and 10 arcsecs to 1 and 2 arcsecs respectively. Finally I added a delay after correct of 2 seconds.

I then started guiding again to look at the results. The new set of data was promising with the RA axis having a lot less correction needed and the scatter graph (to the right) being a tighter set of points which is good and requiring less correction.

Well that was enough tonight and I was pleased with a bit more work being completed on the scope so as the clouds rolled in I packed up and went to bed.

Viewing Report 23rd/24th August 2019 – IMT3 Observatory

Viewing time period – 22:34 – 0

Looking at Vega ready for setting up guide scope

GingerGeek round tonight to align his guide scope, focus it and make sure guiding works. The first thing we had to do though was unplug my camera and then plug his into the Mount Hub Pro due the fuse problem from the last session when it melted through the fuse holder, that will be fixed later this weekend.

Next we slewed to Vega as seen above and took a quick image to see how far out the Esprit 120 is compared to where the OS12″ is pointing so that we can adjust it later.

Espri 120 missalignment from OS12″

So it would seem focusing was a bit more of a challenge than we thought. The first thing is we bought an adapter for the guide scope (aka the finder that came with the Esprit 120) but it did not provide enough back focus for the camera. We had a look round the adapters in the dome and found a nose extension for the Lodestar, however it was not a c-mount end to it so we landed up duck taping it on tonight until GingerGeek can bring round his adapter.

The next challenge was not seeing any stars in the lodestar, after what seemed like a long while we came to the conclusion that the picture we were looking at on the screen in PHD2 was not the camera we thought, it was instead the one from the OS12″ which at this point was not pointing through the slit.

Wrong Lodestar selected

After looking through the settings on PHD2 we found a new setting we had not seen before, which seemed to be because we have multiple ASCOM cameras connected.

Selecting the right camera

The symbol is a double arrow and when clicked a drop down list of 4 Starlight Xpress cameras appeared, so we chose the 4th one which was one of the two Lodestars and that worked.

I then adjusted the guide scope in its two ring holders and aligned close to Vega which we had slewed to. Now the guide scope was spot on and the main scope ever so slightly off. This will be solved when we either shim the scope to align with the OS12″ or when we add/change the way in which it is connected to the losmandy mounting plate.

By 12:40am we had the focus sorted for the guide scope and we moved back in doors to connect back to the 2 cameras for this evening, lodestar and main imaging camera and then the Lakeside focuser to start an autofocus run on the main camera.

Finally starting auto focus

At 1:20am we were still trying to focus as we had not setup the autofocus routing for the Esprit 120 before, the OS12″ is now fine but this was a new challenge. GingerGeek spend an appreciable amount of time changing the step size and other settings in SGPro to effect the focus routine. Finally autofocus did a great job and we landed up at a focus point of 6225 for the Luminance filter. However there was an amount of backlash and this caused the focus point to not be the same in a one direction. GingerGeek needs to find out where he wrote down the figure we measured for backlash so we can add in.

Good auto focus achieved but with slight error
In focus Luminance Image

Next we slewed to the star near the Elephant Trunk, SAO 33570 and changed the filter to Ha. GingerGeek then started an auto focus run for this filter. As it was now late we were missing setting simple things such as the exposure time increase from 1s to 15s needed to actually register any stars to focus on.

Once focused (ish) as we are tired now, we started a short test image run of 10mins subs for the Ha. GingerGeek showed me the Big Status window which is a much nicer interface to your image progress.

Big Status window

We then had a problem with guiding, there were inconsistent rates between the RA and DEC axis. This caused trailing of stars so we stopped the guiding, however the next image although still out of focus showed promise especially given we were not guiding.

10min unguided Ha Esprit 120 (out of focus)

So 3:24am and time for bed.

Viewing Report 10th/11th August 2019 – IMT3 Observatory

Viewing time period – 21:04 – 04:28

So whilst the wind is blowing a gale and branches have come down off of 300 year old oaks where I live, the weather decided to ease as we went into the evening. There were still gusts of high wind but nothing really to be too concerned about for the dome.

Due to more changes on the mount and the polar alignment changes I needed to do a new TPoint run. I first tried to complete a recalibration run that would add additional data, however after a 30 point run the pointing got worse to the point where I was not landing up on the object but several fields of view. So I bit the bullet and deleted the recalibration data and the original model and started again.

60 point TPoint Run

It took me about 1.5 hours to run 30 points on the East side of the mount and another 1.5 hours to run the next 30 on the West. I was happy with the results and I turned on some new Terms as I went through. As you select the term you can see the resulting change to the position of the telescope. So rightly or wrongly I used this process a few times when the pointing was either not improving or it just needed to improve a little.

TPoint Terms

I also created a Supermodel of the data and once again enabled Protrack. I then went to my usual target of the Elephant Trunk to try and get use to pointing to the right object and then imaging it from SGPro. I decided the easiest thing was to use The SkyX to move to the object as I knew I wanted to be centred on SAO 33570 a star in the trunk. I did this and with my new pointing capability since this evenings TPointing, the scope landed up pointing at pretty much the right area. So instead of Sync and Solve I left it at this location for tonight.

Centred on SAO 33570

The Polar Alignment report produced by TPoint on this new 60 point model showed very little error in either RA or DEC which is a testament to the long hours I put in drift aligning the mount.

Polar Alignment Report

At 2:04 am I then tried to cool the camera but it was non responsive……..this threw me for a while then I remembered the other evening having this same problem which probably meant the camera power was not on.I went into the dome to find that was the case and the reason once again was the fuse on the Mount Hub Pro had melted. I cut this off and put a chocky block in for this evening to bypass the fuse, but I did unplug everything else from the mount hub pro whilst there was no fuse there.

Melted fuse and related spring

Whilst doing this I was reintroduced to nature with a Hornet the size of my thumb bouncing around in the dome. After quickly removing myself from the dome I cam back armed with an insecticide and sprayed the offending hornet. It kealed over and died quickly.

Hornet R.I.P

Next I focused and this worked very well, a nice V curve on the Luminance and then I switched to Ha for the imaging, This would be slightly out but I need to find a strong HA source of stars to be able to focus with Ha.

Nice V Curve

Once again I ran the Image Sequencer to see if this would work given I had made some changes suggested by my good friend Mil Dave to the guider settings in PHD2 and SGPro. However once again I was foiled with some new error messages, I am either getting use to this or possibly very fed up, SGPro may be a great piece of software from a functionality perspective, but it is complex, unintuitive and a pain. The error complained about the PHD2 profile ‘OS 12 Lodestar Guider’ is not valid.

Error PHD2 Profile

This is indeed my profile and is valid so not sure about this, another thing to investigate when I am not so tired. The follow on message was Could not start the autoguider and connect to the equipment so aborting. This is to be expected.

Error connecting to guider

So I went back to Frame and Focus and too a single 5min shot, guiding on a good star that was in the FoV of the Lodestar off-axis guider. I took a 10min image and then a 20min image.

Elephant Trunk Uncalibrated 20min image

Looking at the TPoint model there was a nice improvement for where I started with a with an RMS, Root Mean Square of 100 so when pointing the object I am targeting will be within 100 arc seconds of the centre of the CMOS chip, so 1.7 arc minutes, whereas now it is leas than 1 arc minutes out at 57.9.

I then went back to SGPro to try and fix this error as I don’t like giving up. I changed more settings within SGPRo and PHD2 around the error size for the guider to settle, however SGPro was still waiting for PHD to report it had settled even though it was now guiding.

Error message

I turned off both the Settle At and the Settle Auto Guider check boxes. This then allowed me to bypass the whole settling thing which wis is really not that important to me as I manually setup guiding first and now the sequence has started at last!

Turning off settling guider connection

Finally the guider looks very smooth and the only thing now stopping me from taking some more images is the fact it is 4:28am and I am very tired and it is getting light. So I will disconnect and shut down until the next clear night at a weekend. All in all a very productive night.

Viewing Report 5th/6th August 2019 – IMT3 Observatory

Viewing time period – 22:17 – 01:04

Configuring the guider to work with DirectGuide was tonights job, it was so important I have created a separate blog for it. That took the majority of this session before I really did need to go to bed for work tomorrow.

Once setup and now having the ability to reliably guide without the need for an ST-4 cable, I went to take a quick photo again to test the stability of the system. The importance of DirectGuide is worth labouring here as given we have 3 scopes to guide from, there is only 1 ST-4 port. We did not want to keep plugging in and unplugging the different cables, more did we want to build a bespoke connector for all 3, so DirectGuiding is really the only way this would work.

Once complete I once again tried to slew to the exact area for the Elephant Trunk, this has been problematic due to not quite getting sync and solve working, it works sometimes, and locating a star that I can reliably use. I have noted now that HD 205850 in Sky Safari and SAO 33570 in the SkyX represent the pair of stars in the main section of the trunk. I also took another frame nearby to label for future reference.

SAO 33570 centre of Elephant Trunk and SAO 33573 end of the Trunk
Nearby star pattern SAO 33626

Unfortunately Sync and solve failed and landed up moving the scope to the wrong area, hence I missed the object when trying a longer exposure with the Ha filter. I need to reliably get sync and solve working to be able to use SGPro else I will have to go back to The Sky X that I have used before for image capture which I would prefer not to do given the flexibility of SGPro.

So I landed up pointing at a star UCAC4 739:73701 which was an offset frame from where I needed to be, the purple oblong representing the FoV of where I should have been and the UCAC star showing where I landed up.

Pointing at the wrong object

SGPro did error as mentioned during Sync and Solve as can be seen in the screen grab below. I will talk with GingerGeek to resolve.

Sync and Solve SGPro Error

DirectGuide and the Paramount ME II

So I used to be able to guide on the Paramount ME without the need for an ST-4 guider cable. This is achieved through information being shared about the position of the star to PHD2 and it then sending commands to the relays on the Paramount ME, however I had yet to be able to get this working with the Paramount ME II and using SGPro as the host program.

So for a short period on the evening of 5th August 2019 I ventured out to complete the setup and get the guider working.

As information is key I had spent time re-reading pieces of the Paramount User Manual, The Sky X Manual and the PHD2 Manual, the later having partial information needed to setup, another piece of information was in The Sky X Manual.

So what did I do? Well DirectGuide is a bit like Pulse guiding that is supported on other mounts, however for the Paramount ME II pulse guiding is NOT supported. So you need to configure and setup for Direct Guide, but where?

Looking at the Connect Equipment window in PHD2 you are presented with 3 options, How to connect the camera, how to connect the mount and a 3rd option around how to connect an Aux mount. It is important to understand when to use that 3rd option around Aux mount as that is what can cause confusion when trying to get Direct Guiding to work.

Aux Mount should only be chosen if you are using an ST-4 cable, if you are not then this option should remain set to None. If you inadvertently select ASCOM Telescope Driver for The Sky within this box the mount will not behave correctly. So leave it set to None!

Configuring Camera and Mount ONLY

Camera needs to be set for the camera of choice, for me my trusty Starlight Xpress Lodestar is selected. For the Mount I selected ASCOM Telescope Driver for The Sky. Next you need to configure the Mount by clicking on the spanner and screwdriver icon next to the option.

Under here you can configure The Sky Controller Driver Setup, selecting The Sky version, X Pro for me and various options for the mount itself. The key checkbox is Use DirectGuide. This menu of options is from the ASCOM Chooser and you should select any settings you wish to enable. Mine can be seen below.

ASCOM Chooser for Mount and DirectGuide setting

I quickly configured the Camera also and below are the settings that work well.

SX Lodestar Camera Configuration

On connecting to both the camera and mount, selecting a guide star and calibrating the guider it is apparent that I have configured the setup correctly. All is now well with the guiding and it produces a smooth chart with tonights seeing as can be seen after several dips produced by cloud at the begging of the guider graph.

Smooth guiding after cloud disappears

Viewing Report 3rd/4th August 2019 – IMT3 Observatory

Viewing time period – 19:21 – 02:57

An unexpected clear spell this evening, I was sitting out on the patio looking at the clouds clearing and so setup the dome to perform the Periodic Error Correction (PEC) analysis for the mount.

To perform this I needed to unplug the hand controller for the MEII, unplug the ST4 guider cable, turn off a bunch of settings within the autoguider software with The SKY X (TSX) and also turn off TPoint.

I then connected the ZWO ASI1600MM to TSX rather than SGPro. This was so that I could record the log needed for the PEC through the autoguider add on software which records in a format that the PEC software requires. The challenge again was that I could not get the ZWO camera to connect in TSX. I just kept getting error 200. Searching TSX forum I finally found the issue and downloaded the latest driver from ZWO but through the link from Software Bisque. To install I needed to log in as Admin.

So I started to record the star movement without performing any guiding. Once done I imported the log file Autoguider.010.log into the PEC portion of TSX.

I then performed a fit so that you could see the sinusoidal waves before I then fitted the correction to it. A quick look using PHD2 Drift Alignment to see what the drift now was, was very promising with a sinusoidal wave over 10-15 minutes.

Final fitted curve
Modified Curve
Sinusoidal Drift Alignment check

I then went off and tried to image unguided to see if it made a difference, it had, I recorded a 10min unguided image through the 12″ 2.5m focal length scope with no trailing of Altair.

10min Unguided Altair exposure

I then attempted to slew and take an image of the Elephant Trunk in Ha again, however I was foiled by not only the cloud moving in but also not being able to get past the message Guider Settling. I need to talk through with GingerGeek to see why that is. Meanwhile bedtime for Mr Shave-Wall.

SGPro gets stuck here

Viewing Report 2nd/3rd August 2019 – IMT3 Observatory

Viewing time period – 22:07 – 04:23

Another evening commissioning the observatory, so tonight was about further refinement of the polar alignment. The main thing was to drift align with PHD again, but this time I would follow the instructions more carefully.

First I had to find a star near the celestial equator which was easier said than done. I little research showed me how to turn on the celestial equator line in The Sky X (TSX), which was essentially a database entry you enable that draws the line across the sphere of the sky using multiple points. The celestial equator is such a line running from East to West passing through the Meridian at an altitude of zero degrees. There were 3 databases to enable in TSX to create the visual effect.

Celestial Equator

I then selected a star on this imaginary line and near the Meridian, the reason for this is that it would display the most movement and thus magnify the error of miss polar alignment.

Star near celestial equator and meridian

Next I performed an autofocus using the Luminance filter this worked well.

Auto Focus

Rasalhauge was the star I choose for drift aligning the first part, a 5 second image within Frame and Focus in SGPro showed it spot on in the middle of the chip once I did a Slew and Solve.

Slew and Solved

Now I needed to find a guide star nearby and place in the Lodestar FoV. This is routinely easy to do with the FoV displays I have placed on TSX.

The first thing to measure was the azimuth polar error and ignoring the RA line ALWAYS, I followed the Dec line and saw it was out by -1.14 and 75px) I adjusted the thruster knobs on the MEII to move the star to the outset edge of the purple circle showing the error. It is a 50/50 guess if you go the right way with the thrusters.

Polar Error in Azimuth

I then drifted again and of course realised I had indeed gone the wrong way as can be seen by the steeper DEC red line and the much larger purple circle.

Larger circle larger error

The graph on PHD2 can start to look fairly flat, so if you want to review the finer data underlying the straight line you can adjust the scale on the axis.

Changing the scale

After getting the line fairly straight I then went on to drift align for the error in altitude. This time selecting a star in the West and near the celestial equator I chose Unukalhai in Serpens Caput.

Star location

Once again I watched the DEC line only and ignored the RA, the DEC line this time reflecting the error in altitude. I then adjusted the mount using the altitude adjustment spanner moving the star again to the outside of the purple circle and then retested, finally getting the error down to a suitably small number. It was now 3am some 5 hours after I started!

Much better DEC line

With now great polar alignment I thought I would attempt an image so wanted to slew to the Elephant Trunk again, IC1396. I performed a slew then plate solved. Of course the centre off the Elephant Trunk is actually the centre of the open cluster which IC1396 represents. I then moved manually to where I knew the nebula to be.

Elephant Trunk Location

Unfortunately at this point I found that guiding, as despite unguided exposures now being a very real possibility, was not working, I could guide East and West but not North and South. I tried multiple settings but by 4am gave up and called it a night. The following day I would test during daylight and realise there was a setting that needed changing in PHD within the profile itself and upon correcting this guiding would then work the following evening.

Viewing Report 20th/21st July 2019 – IMT3 Observatory & Travel Scope

Viewing time period – 21:15 – 02:15

There were two things I wanted to do tonight, one was to get first light with GingerGeek through the Skywatcher Esprit 120ED, the other was to setup my Esprit 120 on the MyT in the garden and grab a photo of the Moon to celebrate 50 years since Neil and Buzz stepped out onto the lunar surface. As a bonus I wanted to to get the guiding working on the MyT too.

As GingerGeek opened the dome on the IMT3 I setup the portable gear on the patio. I connected the setup to a 12V car battery to see how well it did at running the Mount and the camera. The initial voltage of the battery was 13.1v when I started. I connected the camera to EZCap and the Mount to TheSkyX (TSX).

Meanwhile GingerGeek opened the dome, connected the mount, opened the very geeky but cool Flip Flap covering the Esprit 120 and slewed to a bright star for deterring the focus and the position relative to the 12″ main scope.

Remarkably the focus was fairly near and after a few iterations GingerGeek managed to get the V curve sorted for good focus. Before this was done he setup the Luminance filter on the filter wheel control with SGPro that had not been configured. I then looked at the resulting image and determined the FoV within TSX. The field almost fits the 12″ and so the position is fairly close, close enough for solving and being in the right area for imaging. There was an error by SGPro complaining about 800px difference with what was to be expected, the problem being the difference in the angle of the Esprit 120 vs where the mount knows it is pointing as shown through the 12″.

Despite that we managed to take an image and then move on to see if we could guide with the 12″ off-axis guider for the Esprit. This worked a little but the guider graph was way off at various points, I believe this is potentially either a setup issue on the guider and/or the fact that we are too frequently taking too many images to correct and thus chasing the seeing. I will look at this next time are out.

Back on the portable setup, I managed to very quickly connect, perform polar alignment using the PoleMaster and the new bracket I fitted. I then slewed to a star which was not quite in the FoV so I need to spend more time on this next time I am out. No problems though, I nudged the scope and found the star. Performing a sync on this solved any further slewing problems.

I then waited for the Moon to come up over the roof tops which was unfortunately not until 2am of the 21st thus slightly missing the landing date of 20th by 2 hours (Eagle landed at 9:17pm BST) but non the less still obtaining an image of the Moon to celebrate the 50th anniversary of the first lunar landing at the time Neil put that famous foot on the Moon at 1:56am BST on the 21st July 1969 🙂

Apollo 11 50th Anniversary

GingerGeek managed to get a few images but nothing much was showing on them especially the Elephant Trunk nebula he was imaging, I suspect, but am not sure, the wrong filter was selected so probably OIII rather than Ha as a previous Frame and Focus command through SGPro for 15 seconds showed the Elephant Trunk, at this point we were taking 10 minute exposures so it should have easily been visible. Again another problem to sort next time we are out.

Viewing Report 15th July 2019 – IMT3 Observatory

Viewing time period – 21:32 – 23:48

Tonight was about taking 5 and 10min guided Ha exposures on the Elephant Trunk, IC1396. Even though the Moon is 99% full I wanted to see what the resulting star shape was now we have guiding in place.

As usual the first thing to do was open the dome, Find home on the mount and then slew to a nearby star, sync and then slew to the Elephant Trunk. The operators manual has been updated to the following but I noticed an error in that opening the dome profile disconnects the mount so I will modify the instructions. I also changed the setting for moving the telescope manually within TSX to swap the arrow keys around, this affords a much more natural experience when having to manually move the scope for one reason or another.

Telescope movement settings updated

I then checked through Sharpcap that the shutter was open and the scope pointing through it using 3 different cameras.

I then took a single frame through the Ha filter to see if I was in the right position.

1 second exposure

I measured this against the known star pattern in TSX and then using SkySafari on my iPhone I positioned the FoV to include the front of the trunk in the camera and then manually moved the equivalent FoV indicator in TSX to match the star pattern.

SkySafari iPhone, inner square FoV for 12″

Once they were matched I decided not to go through the whole refocus this evening as the Moon would ruin any image I took, instead I checked the star tightness of focus using the HFD function in SGPro. The resulting star sizes were fine for this evening even though I was focused through the luminance filter before at position 71290. Stars are always more bloated through narrow band filters anyway.

Half Flux Diameter measurements

I then moved to opening PHD2 within SGPro and selecting a guide star, although I did have to move the image slightly to find one tonight, again bright Moon.

PHD2

GingerGeek and Bob were online and GingerGeek offered advice around switching on the environmental monitor that I had forgot about. This would pull data in from the HiTech Weatherstation to add to each image.

Safety and Environment Connected

I then upped the exposure to 120 seconds, that worked well, nice round stars, then 300 seconds, again tight stars, then I took 3 images at 600 seconds. The background by this point was getting brighter due to the Moon. I had the camera (ASI1600MM) set to -20℃ below the ambient of 14℃ and it was running as can be seen below at 55%. All the images were take with Frame and Focus. GingerGeek then took over and showed me how to use Sequence and we ran into another problem. It would not let us run a sequence, it would error and complain about not being able to connect to the observatory.

SGPro 600s Image and Sequence Selected

A quick Google showed this to be a bug in SGPro, still not fixed and needing to be brought the their attention. We had originally setup the dome to rotate within SGPro, found it not very easy or very good, moved to TSX to control the dome which was easier and much better and unselected within SGPro, However because we had checkboxes ticked that the dome should be rotated in line with the mount pointing it was complaining, even though we explicitly said no dome attached. So unticking this setting worked, although we inadvertently then hung SGPro as it went to perform a focus run, I did not want it to do that, on hitting abort that hung SGPro. We needed to approach Taks Manager to resolve that.

So that was that and I then awoke this morning to pull the files down using the transfer function within Teamviewer. There are 2 was to do this, the other way , not documented here does not allow for field over 25MB to be sent, however selecting File Transfer from the pages icon at the top does.

Teamviewer File Transfer

So what does a single 10min uncalibrated frame with nearly a full Moon look like?

Single 10min Ha from ASI1600MM

And we have to remember this has not been calibrated, so not Darks, no Flats, for sure no Bias and no processing apart from a stretch to visualise the data. It is pretty smooth as a first light image! So what do 3 of these look like stacked?

30mins (3 x 10) Ha from ASI1600MM

Wow, I actually think this is going to be a cracking setup. Again no pre-processing, clearly there are doughnuts to be removed from a flat which is no big deal, well apart from I need to install the A2 flat sheet I have in the dome and in a position the scope can see. Also I will move the end of the nose of the trunk further toward the bottom to get more nebula in. So a good first light test. Now we can test the Esprit 120 ED with the SX814 on the next night. Goodnight zzzzz ……

Goodnight from IMT3 🙂

Viewing Report 14th July 2019 – IMT3 Observatory

Viewing time period – 20:29 – 23:13

This evening GingerGeek and I are going to try and get the guider in focus again. I hope we can do this so I can use the observatory remotely shortly.

On connecting to the observatory I noticed once again that after running the ZWO120MC for a while under ASICAP it went black. I have still not had a reply on the forum and it reminds me not to buy another ZWO as they are particularly bad at support.

That said there are a few things we need to try including taking the 10m USB extension out of the equation. Once I started TheSkyX and SGPro and PHD etc I could see Vega in the image for the 12″. Moving it to the centre and syncing for the moment manually until GingerGeek shows me how to sync and solve with SGPro. The final part here was moving the scope so that Vega was now in the centre of the FoV of the guider square on TheSkyX.

Vega nearly in the middle

So Mark arrived to help focus the guider whilst I looked at the screen on PHD. Before we started Bob remotely once again turned the USB power off to the All Sky Cam to reset it using Node Red. That worked so we had that camera working again.

PHD showed a very bright white screen, we had to wait over another hour for the sky to taken enough to be able to make anything out. Once we could, all we saw was the edge of the dome again.

Edge of dome through camera

It took GingerGeek a while fiddling with the focus to realise the camera on the screen was not the guider! It transpired PHD had for whatever reason picked up the other webcam mounted on one of the OTAs. No wonder we had problems.

Selecting the SX Lodestar guider from the down list in PHD brought up a picture with Vega in it! From there we had a flat topped star as Vega is too bright for the guider. So we slewed to another star nearby (mag +8) and then refined the focus on that. Next we calibrated the guider again as we had been removing and turning the guide camera.

Once done we then slewed to a star near the Meridian to test output of drift align to find that the mount is still reporting being out in dec which is possible for one of a couple of reasons, either the knobs were not tightened correctly or the mount has moved after being hit. Next weekend I will adjust if clear again, but this also means starting a whole new TPoint model.

When I drift align I will perform that on a star near the meridian and the celestial equator. I will then slew away then back and repeat. If all is well I will then test drift away from the equator to see if we have flex and if so if it is due to balance problems.

Viewing Report 12th July 2019 – IMT3 Observatory

Viewing time period – 20:32 – 22:56

After several reboots by GingerGeek who is looking after the observatory I am now logged in. I currently have the dome open and the 12″ centred on Deneb that can be clearly see whilst the Sun is still above the horizon and thus not dark yet.

The rebooting is due to hanging of the NUC. We have had various problems, the external ASI120MC with ASICAP/SharpCap and Firecap seem to cause an issue, we have a problem rebooting and the NUC just powering off and today trying to login through Windows and it was just hung. So lots of niggles.

Tonight I hope to test a single Ha guided exposure on the Elephant Trunk nebula in Cepheus to the North East as it rises and will look to image from 11pm for a few frames before closing the dome for the night. I have already noticed that Deneb is drifting in my FoV so something is still amiss with the polar alignment event though I thought I had it cracked. I will make a note to go back and check it. Currently Deneb is +42 Alt and 66 deg in Azimuth. I think the key will be looking at where I pick the star for polar alignment and making sure I have truly tightened.

So now it is nearly 10pm the sky is getting darker. The strangest thing happened, the dome closed. I only noticed as the image was blank. I checked and the Hitec Weather Station had tripped and closed the Dome. I toggled the Relay and then I could open the dome. Interestingly if you try to open the dome from TheSkyX it tries then stops and resets to closed. For the moment given the clear skies and forecast I have disconnected the Hitec Weather Station software but will reconnect later. Something else to debug.

HiTech Weather Station Software

It’s now 22:21 and dark enough to focus, I spent some time getting the auto focus routine working in SGPro. Interestingly I had to set the step size to 1000 given the 100k steps my FLI focuser is capable of. I also increased the data points to 10 and this gave me enough movement and data to get a good V curve.

I managed to get down to an HFR of on average 6 tonight at focus point 71290. It took me 3 runs to get the right figures. I then made the changes under the 12″ profile within Profile Manager and saved them for future use.

Auto Focus Run

Next I moved on to PHD2 and guiding. Once I got an image I then found I only had hot pixels and no stars. I also had a funny cone of light and something large out of focus and the edge of the tube. I then remembered GingerGeek had fitted a new guard ring to the guider camera and inadvertently moved the position due to a loose screw elsewhere on the fitting. Thus I need to go and focus that the next night out as because I am not there tonight I cannot do this. This also means I am stuck for testing a guided exposure.

Very out of focus Autoguider

So instead I tried a few different exposures with the Ha filter unguided even though I knew I had the problem with polar alignment. I took exposures at 120 seconds and 180 seconds by which time I had trailing, given as I said I had polar aligned and could image for 10 minute exposures in a different part of the sky I need to redo the aspect. Note I did not perform a second autofocus on the Ha filter. I will at some point calibrate the offsets of the filters once I have the auto guider working.

120s Ha Elephant Trunk area still not dark

So at least a useful night to try and get a few things working, a few things to add to the ToDo list but all in all a good evening.

IMT3 Build Update – V

As the first phase of the build completes for the IMT3 observatory but before the commissioning stage begins, a few other additions need to be completed. We started with adding a UPS for the Intel NUC. The dome itself for the shutter at least runs on a battery backup in case of power failure, the dome automatically shuts. What we wanted to avoid was loosing power to the house and not being able to shut the PC down gracefully until power returned. The UPS also comes with software so that we can sense the power going and then ask the PC to shutdown if needed.

UPS installed

Temporary LED lighting has been fitted but needs properly fixing and connecting into the master switch and the soft switch for turning on and off remotely. The cables meanwhile to the first of many USB hubs starts to fill up.

Rats nest of USB cables

An adapter station is fixed to the wall for the copious adapters one needs for astronomy

More adapters

Shortly followed by another due the copious adapters needed for astronomy……….

Adapter heaven

Hat hooks are added due to a few unfortunate instance with a head and the mount which concluded in a hospital trip and some superglue.

Hat hooks

Multiple weights can be seen supporting the large amount of the wieght at the business end of the mount

Weights

Whilst there is still much more to add including the imaging trains for the other OTAs and the focusers for each of them being added (Lakeside) I managed to go out one evening and get first light with the 12″ OTA on the Moon.

First light of the 12″ for focus

I started the first run of polar alignment with the PoleMaster for which I dedicated an entire blog entry to it here.

as it’s more complicated than one might think. This is the initial polar alignment through hard work and measuring twice always!

How close was our polar alignment?

Polaris is the bright star and needs to be in the white circle. Not bad for a rough alignment. I then proceeded to adjust the alignment based on this first result until the green and red square/crosses aligned. It should be noted that the accuracy for the Polemaster is ok for short focal length OTAs but for long focal length you need to use a combination of approaches which include on the Paramount using TPoint followed by drift aligning using PHD2.

Perfect polar alignment……..

So after many days building out the IMT3 the 3 geeks with their hard hats relax and have another beer.

TOSAs

And the business end of the scope starts to look more useful and beautiful to the trained eye.

IMT3

IMT3 Build Update – Part IV

So I left you with the weather station build out and will happily provide details of the software used and some of the challenges we had / have getting this working as out of the box most thing just don’t work, fortunately I have a Bob and a GingerGeek to assist 🙂

The outside takes shape with the patio being completed next to the french drain and a retaining wall being built, along with a small chimney of bricks to hold the master outside socket for the weather station.

Patio and retaining wall near French drain
Brick chimney for outside power

The last few touches have been done to the Orangery and building of a second utility room which helped as it gave me somewhere to run the Cat6 cable from the dome 🙂

Cat 6 cable

Although my cat Fluffy was curious about what it was.

Literally Cat 6 cable 🙂

The inside of the dome had the hole drilled and pipe and associated collet fitted for the dehumidifier

Dehumidifier inside connection

The dome controller fitted with the install from Pulsar sits above the electric supply as planned. The adjustment knobs for the dome rotation drive can also be seen. They did need adjusting and finally settled down after the dome slipped in various places. The only remaining issue that I may never fix is the gaps in-between the sections of the dome, when they go over the role they cause the dome to drop, judder and make a noise, really they should be tightly fitted, filled and taped.

Dome controller and rotation adjustment

During the night I rotated the dome to the various positions around the sky to map, North, East, South and West and included the offset to Polaris as can be seen below.

North and Polar North

With most of the ancillary work now done attention turned to installing the mount and the OTAs. First the Paramount ME II had to be fitted with three people in assistance to lifting. Once in place the placement and threading of cables through the mount had to take place, it always amazes me how many cables are needed to do astronomy!

MEII fitted with thru the mount cabling

The top end of the mount shows the Versa-Plate missing so that the cable can be pulled through. Several power cables and a master USB cable were fitted.

Top of ME II without Versa-Plate

Finally the first of the 3 OTAs are fitted, this is the Officinal Stellare 305mm RiDK that the other 2 OTAs would piggy-back on.

OS 12″ RiDK

Luckily we opted for a 2.7m dome else we would not have fitted this setup in here.

First scope on mount

Next came the fitting of the Takahashi FS102 refractor and the Sky-Watcher Esprit 120ED refractor. First the clamshell for the Tak is fitted, also the first dry fitting of the QHY1600MM camera and 7 position filter wheel, the adapters to connect it would cane later.

Tak Clamshell and QHY camera

Then the Tak is fitted. As can be seen from this image taken later, we had to make a new counterweight system to offset the slightly lighter Tak with the heavier Esprit 120. This novel system designed by Bob used standard astronomy weights and bars from skywatcher mounts.

Tak 102 and weights

Next the Skywatcher 120 is fitted carefully to the other side.

Skywatcher 120

Next some more ancillary work is needed before the final setup is shown…….