Using optocoupler as actuator in node
-
Hi.
I've tried to do exactly the same thing with the remotes for my roller blinds, I also started with relays (as they are the most obvious solution), but I found something that works just fine, no noise and low power:
http://www.ti.com/lit/ds/symlink/cd4066b.pdf
Just power it with 5V (I think it works from 3 to 18 V) and you have 4 "switches" using pairs from the IC and send a "high" state using a control Output from the arduino to the control pin on the IC, it doesn't really "connect" the two contacts, there is still an small resistance between them (about 500 ohms) but it works just fine with my remotes, they think the button has been pressed.
And, as a bonus, they only are about 1.50 euros for 10 PCs, that is 40 switches for 1.50... try to do that with conventional relays and you are looking at about 45 euros at least.Regards.
PS: Also, they work with the Relay example from the libraries, just changing the default value from #define RELAY_ON 0 and #define RELAY_OFF 1 to make they active HIGH, (#define RELAY_ON 1 #define RELAY_OFF 0)
-
Hi.
I've tried to do exactly the same thing with the remotes for my roller blinds, I also started with relays (as they are the most obvious solution), but I found something that works just fine, no noise and low power:
http://www.ti.com/lit/ds/symlink/cd4066b.pdf
Just power it with 5V (I think it works from 3 to 18 V) and you have 4 "switches" using pairs from the IC and send a "high" state using a control Output from the arduino to the control pin on the IC, it doesn't really "connect" the two contacts, there is still an small resistance between them (about 500 ohms) but it works just fine with my remotes, they think the button has been pressed.
And, as a bonus, they only are about 1.50 euros for 10 PCs, that is 40 switches for 1.50... try to do that with conventional relays and you are looking at about 45 euros at least.Regards.
PS: Also, they work with the Relay example from the libraries, just changing the default value from #define RELAY_ON 0 and #define RELAY_OFF 1 to make they active HIGH, (#define RELAY_ON 1 #define RELAY_OFF 0)
-
@DNKROZ said:
Thank you.
I finally made it work.
I changes the 330 Ohms resistor I was using for the optocoupler for a 220 Ohms and it started to work.
Anyway your approach is really nice and more compact. -
This is what I have been using TLP222.
TOSHIBA Photocoupler Photorelay
The Toshiba TLP222G TLP222G-2 consist of a gallium arsenide infrared Emitting Diode optically coupled to a photo-MOSFET in a DIP package The TLP222G series are a bi-directional Switch which CAN replace mechanical relays in many applications. By Toshiba Semiconductor. -
Hi,
If I use some optocoupler like the 4N35, will the actuator sketch work as if it was a relay?
Thanks in advanceI have now the hardware part working with 9 optocuoplers driven by an Arduino micro, using a couple shift registers.
The problem now is from the software point of view.
How to address the optos.
When using relays or opts directly, the sketch uses digitalWrite to have the pin HIGH or LOW.
When I set the number of relays, VERA creates that number of light switches.Now with the shit registers, I use only pins 4, 6 and 7 of the arduino.
I don't know if this will work just by telling the sketch I have now 9 relays, and then change a bit the program to address the shift register correctly.
Will the pins I use (4,6,7) conflict with the ones used by the sketch for the relays? (3, 4, 5, 6, 7, 8,.... 9,10,11 for the 9 relays) The mini only has 3-8 free pins.
I don't know how to start with this. -
I have now the hardware part working with 9 optocuoplers driven by an Arduino micro, using a couple shift registers.
The problem now is from the software point of view.
How to address the optos.
When using relays or opts directly, the sketch uses digitalWrite to have the pin HIGH or LOW.
When I set the number of relays, VERA creates that number of light switches.Now with the shit registers, I use only pins 4, 6 and 7 of the arduino.
I don't know if this will work just by telling the sketch I have now 9 relays, and then change a bit the program to address the shift register correctly.
Will the pins I use (4,6,7) conflict with the ones used by the sketch for the relays? (3, 4, 5, 6, 7, 8,.... 9,10,11 for the 9 relays) The mini only has 3-8 free pins.
I don't know how to start with this.the key is mapping the bit in your register to a device you create.
you can use your bitwise operators to determine if you should toggle a device's status.
which shift register are u using?
-
the key is mapping the bit in your register to a device you create.
you can use your bitwise operators to determine if you should toggle a device's status.
which shift register are u using?
@BulldogLowell
I'm using 74HC595.
I solved it changing the sketch from relay to servo, and them making some modifications to it.
It works very nice now. -
@BulldogLowell
I'm using 74HC595.
I solved it changing the sketch from relay to servo, and them making some modifications to it.
It works very nice now.@ferpando said:
@BulldogLowell
I'm using 74HC595.
I solved it changing the sketch from relay to servo, and them making some modifications to it.
It works very nice now.so, pulsing the optocoupler with 'pushbutton' front end on vera's UI, good idea.
-
@ferpando said:
@BulldogLowell
I'm using 74HC595.
I solved it changing the sketch from relay to servo, and them making some modifications to it.
It works very nice now.so, pulsing the optocoupler with 'pushbutton' front end on vera's UI, good idea.
@BulldogLowell
Works pretty well.
The servo sketch installs a blind control device on vera with allows me to control stop, up and down buttons with one device per blind. -
Had this problem myself, controlling Somfy blinds using my computer/smartphone.
Did read in a forum on a Somfy RS-485 solution (way to expensive) and about somebody that took his remote control and replaced the buttons by relays and had those relays controlled by a zWave (dual) binary switch. Also quite expensive solution to my opinion and not that supported.
Recently, but before I knew mysensors, RFXCOM came with the RFXtrx433E so I went for that. Quite nice, you can pair the Somfy blinds with the RFXtrx433E and control everything.
Knowing mysensors, taking the remote control and replacing the buttons using relays controlled by an Arduino Pro Mini would also be a good option.
-
Had this problem myself, controlling Somfy blinds using my computer/smartphone.
Did read in a forum on a Somfy RS-485 solution (way to expensive) and about somebody that took his remote control and replaced the buttons by relays and had those relays controlled by a zWave (dual) binary switch. Also quite expensive solution to my opinion and not that supported.
Recently, but before I knew mysensors, RFXCOM came with the RFXtrx433E so I went for that. Quite nice, you can pair the Somfy blinds with the RFXtrx433E and control everything.
Knowing mysensors, taking the remote control and replacing the buttons using relays controlled by an Arduino Pro Mini would also be a good option.
@daulagari said:
Knowing mysensors, taking the remote control and replacing the buttons using relays controlled by an Arduino Pro Mini would also be a good option.
Or better still, optocouplers or an analog switch as described above...
-
@daulagari said:
Knowing mysensors, taking the remote control and replacing the buttons using relays controlled by an Arduino Pro Mini would also be a good option.
Or better still, optocouplers or an analog switch as described above...