Jump to content

Banner.jpg.b89429c566825f6ab32bcafbada449c9.jpg

8 Channel Relay and Light Box Windows Controller


Plodder

Recommended Posts

One of the frustrations in trying to remotely operate the Observatory at the bottom of the garden is turning things on and off and trying to adjust the brightness of the Light Box for flat fields. A couple of years ago I decided to knock up an Arduino based relay controller using a Arduino Mega 2560 and one of those cheap  8 channel relay module boards from Ebay.  The windows user interface is coded from Virtual Studio 2017 would run on the Observatory PC and TeamViewer used to control things from the house. Illuminated On & Off buttons controlled the 8 relays and a sliding Track Bar adjusted the 12v light box via a Mosfet. The  Arduino unit had it's own power supply and the USB +5v to the unit was cut. One big problem with this type of setup is if the PC has to be rebooted is that we lose the interface, however in this unit  there is a Recovery Button {Bottom Right} that restores the status quo once the PC has been rebooted and the interface re-acquired. If the power to the controller is lost the greyed out the Kill and Exit button illuminates which has not happened yet. I have an Activity Log window to show what's happening  and the image below shows the recovery of channels 1,3,5 & 6 after a PC reboot. Note: because the Arduino Unit stays powered during the reboot the relays remain operated so it's just the interface lamps and button status that need restoring which the recovery button does. The trackbar shows 0->100 in a window above the Trackbar which is 0-5v in real terms so a multiplication constant is need in the Arduino code. That voltage is shown as PWM volts in the bottom corner. The Trackbar and voltage setting I record to get the right Adu's for my Flat Frames. When a command is sent, the Arduino must respond with the correct code to change the status. The Trackbar is grabbed with the mouse and dragged to the desired position. It has made my life so much easier and I now wonder how I managed without it.

OOps ... can someone move this to the DIY section

 

Graham.

 

 

8ChCntr_LBox.JPG

Edited by Plodder
  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. By using this site, you agree to our Terms of Use.