Jump to content

SkySurveyBanner.jpg.21855908fce40597655603b6c9af720d.jpg

Remote Control of physical switches - solved for £12.50; Plans and files available.


FrenchyArnaud

Recommended Posts

Hi guys! 
Since I built the pier I am going full on with total automation 🤪

My main problem was that my camera, a modded canon 450D,  randomly "hangs" in NINA. (not when used standalone) It will say "downloading...." forever but is in fact stuck. It will not disconnect or reboot, I need to physically pull the cable. Not a big deal, two or three times a night I need to pull the USB cable that supplies the power to the dummy battery - and we are back in business. 

Except that it means staying up and monitoring the connexions... Staying awake is not a problem but being at the computer just waiting and looking at the guiding graph - that's dull. 

So I thought, why not put a relay on the power supply of the camera? There are relays that are powered by usb and can therefore be piloted directly from the computer, which means, with the remote desktop aps, from anywhere - INCLUDING MY BED!

I tried but because of the length of the USB (10m) the relay will trigger to the data input but the coil would not physically activate. Disappointing. 

WhatsAppImage2023-03-07at16_53_07.jpg.121e709232583eba8004291855eed8c2.jpg

Long story short.... I ended up DIYing a completely remote system to bypass all the switches, based on an arduino board and a 4channel relay board. I have created my owm firmware taylor made to my needs and while I was at it, a nice little desktop app that both monitors the state of the relays and allows me to start, stop, or reboot any of the piece of gear, one by one or all at once. Thanks to Google Remote Desktop app, I can also command that (and Nina) from any of my computers or phone and from anywhere in the world. The only thing that is not automated now is the removal of the BBQ cover from the pier!

Untitled.png.2e3ccd40402d8c42e0598c3be05e26cf.png

One channel turns the telescope mount on/off, one turns the dslr on/off, one turns the dew heater of the guidescop on/off - one relay is still free. 

The total cost is : arduino UNO, £18 for 3 = £6, a 12v>5V2A converter, £2.5, and the relay board £4.  If someone is interested, I can supply the exact list of parts, schematics, firmware and desktop app. Demo in the video. Prerequisite : Python3, a remote desktop app of some sort, an the arduino IDE (free and easy to use)  

EDIT : the video does not play on my PC from this page but it does on my phone. Not sure what's up with that. 

 

Edited by FrenchyArnaud
  • Like 5
Link to comment
Share on other sites

A quick video of the actual box completed. The red wires are the 12V input that powers the coils via a tiny 12v>5V transformer, the arduino is powered by the USB and the two circuits are totally distinct with no possibility of electrical leak. The 4 cables are 4 junctions from the relays, meant to interrupt the ground of the gear, and of course the USB is supposed to be connected to the laptop via the hub on the pier. 

The box is 100% sealed with hot glue and I am confident it can take a storm without letting a drop of water in. 

Link to comment
Share on other sites

Any reason why the GND of the relay board inputs is not connected with the GND on the Arduino, especially as it looks like the board has opto isolation to keep the control side of things isolated from the switching side

  • Like 1
Link to comment
Share on other sites

14 minutes ago, malc-c said:

Any reason why the GND of the relay board inputs is not connected with the GND on the Arduino, especially as it looks like the board has opto isolation to keep the control side of things isolated from the switching side

That's actually precisely the reason : if the GND of the relay board is connected to the arduino, you lose the benefit of the octo. It becomes conceivable that in case of catastrophic failure of a relay, this GND becomes live, fries the board and even the laptop on the other side (the relays are good for up to 10A)

With the jumper removed , the coils are energized through a the VCC-JD and the arduino uses the IN pins to sink the current as grounds. Which is why the board is low-triggered (LOW pin means active coil here) and the only connexion between the arduino and the coils is the light of the LED in the octo - it becomes physically impossible for the current to leak anywhere. Connecting the GND arduino anywhere would defeat the purpose of octo isolation... Only the tiny 5v PSU grounds there. Even if it failed, there is no way it can damage anything - at worse, the UNO would fry but the gear on one side and the laptop on the other side are absolutely safe. 

EDIT - That's also the reason why the relays are interrupting the negative of the different elements : so that the relay board cannot, ever, become live, it's absolutely impossible. 

Edited by FrenchyArnaud
Link to comment
Share on other sites

4 minutes ago, FrenchyArnaud said:

That's actually precisely the reason : if the GND of the relay board is connected to the arduino, you lose the benefit of the octo. It becomes conceivable that in case of catastrophic failure of a relay, this GND becomes live, fries the board and even the laptop on the other side (the relays are good for up to 10A)

With the jumper removed , the coils are energized through a the VCC-JD and the arduino uses the IN pins to sink the current as grounds. Which is why the board is low-triggered (LOW pin means active coil here) and the only connexion between the arduino and the coils is the light of the LED in the octo - it becomes physically impossible for the current to leak anywhere. Connecting the GND arduino anywhere would defeat the purpose of octo isolation... Only the tiny 5v PSU grounds there. Even if it failed, there is no way it can damage anything - at worse, the UNO would fry but the gear on one side and the laptop on the other side are absolutely safe. 

I see your logic, but I was under the impression that the OPTO isolator inputs would be isolated from the board LV supply used to energise the relays.   So all you do is drive the LED in the OPTO device to activate the relay coil, which could be supplied by its own 9v or 12v depending on the voltage rating of the relays.  In my projects I've used logic high to drive the OPTO isolators using GND and GPIO at 5v, with the OPTO isolators output switching a separate DC supply for the  relay coil, (or more directly the base of a transistor / FET which then passes current through the relay coil when energised.  )

  • Like 2
Link to comment
Share on other sites

20 minutes ago, malc-c said:

 So all you do is drive the LED in the OPTO device to activate the relay coil, which could be supplied by its own 9v or 12v depending on the voltage rating of the relays.

Yes, exactly. From the arduino perspective, it's only turning leds on or off, totally oblivious to the relays themselves (these happen to be rated for 5V)  This specific relay board has a native LOW logic though. Of course, there is always the possibility of connecting "normally on" rather than "normally off" but in some cases I might need to be able to turn the mount itself on without the laptop connected to it to command the relay HIGH (coil off, therefore circuit closed therefore mount powered)

It follows that it is just simpler and safer to have the arduino ungrounded, to keep the total isolation and the LOW logic with Normally Off electric connexions. And I know what you think at that point: "lazy idiot, what prevents you from having some coils Normally On and others Normally Off?"  Well, the answer is NOTHING 🤪 but I just did not see any downside to energising the coils separately and coding to initiate HIGH or LOW depending on the gear :)  Besides, I know the risk of failure is low, especially with 12V 2A grounded in the relay while they are rated for 2500W, but it occured to me, should there be a failure, I prefer to increase the chances that the coils fail open rather than closed for obvious reasons. So... yes, that's why the jumper went off and the relay board is not grounded to the UNO. 

Also, remember - my first failure was due to too low current in the USB relay. I did the whole thing especially to be able to drive the coils on their own power, so psychologically, powering through the 5v pin was no satisfying. I might have over-engineered the thing a bit... But in that case I don't see a downside. 🤭

Edited by FrenchyArnaud
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.