Go Down

Topic: OptoCoupler as a switch (or other options?) (Read 90 times) previous topic - next topic



I'm looking for some help and guidance. I'm new to the Arduino world and to the Z-wave / Home Automation world. I have a project that I'm looking to do... It's essentially to trigger the manual switch on my fireplace to light it and to turn it off.

I have a Z-Uno board and a Smartthings hub... I was assuming that arduino would allow me perform the equivalent of a momentary press using some of the output pins, but apparently it's not that simple. I've attached an image to show what I want to achieve, essentially short pins 1 & 3 (with ZERO Voltage going across it, a Dry connection) and secondary to that, short Pins 1, 2 & 3 (again, with ZERO Voltage going across it).

I'm working on the assumption that an Opto-Coupler (which I've never used before) would resolve this but can't get the sketch or hardware layout straight in my head.

If anyone could give some help and guidance I'd really appreciate it.

Thanks for your time!



Optocouplers sound like a good solution but you have to know the way the current flows. Also by nature they will cause a voltage drop across them (about 0.3-0.5V typically) and they're directional so won't switch an AC signal. Another option is a set of small relays.
Optocouplers will usually work, whether they do depends on the rest of the circuit.
Mechanical relays will always work but are bigger/costlier.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.


Apr 19, 2018, 06:51 pm Last Edit: Apr 19, 2018, 06:52 pm by DVDdoug
Your user manual says you can use an opto-coupler but they don't really give you enough information...   I'd go-ahead and five it a try and worst case it won't work and maybe you fry an opto-coupler.

This page shows an opto-coupler driving an LED. 

This is a bit of a guess but in your circuit you'd connect the emitter (pin-4) to the common connection and the collector (pin-5) to the switched connections.  (I'm assuming there is already a pull-up resistor.)

And of course, you need the resistor on the input (in series with the internal LED).

Since you need 3 "switches".    You'd need 3 opto-couplers or a quad opto-coupler.   (Of course the pin numbers will be different with a quad opto.)

The most foolproof solution would be 3 relays because a regular 'ol electro-mechanical relay* is an electrically operated and electrically-isolated switch.    (You need a driver circuit to drive a relay coil from the Arduino or you can get a relay board with a built-in driver.)

* I would NOT use a solid state relay in an unknown circuit.   Solid state relays are finicky about AC or DC, DC polarity, and voltage.   


There are even triple optocoupler ICs out there, such as the PC837.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

Coding Badly

@bosulli, do not cross-post.  Other thread removed.

Go Up