Community Question

There has been much confusion on how to add a relay to an Ezb. There are three style relays, relay only, relay with a built in transistor circuit, and a relay with an opto-couple circuit. I have the relay with an opto-couple circuit. (817C) ?

This relay requires a 10 K resistor placed in series with the digital output. It is programmed by using a digital output, and "Set Digital". The issue is when the signal sent is "On" the relay is turned off. When the signal is sent "Off" the relay turns on.

This operation needs to be accounted for in your design so relay do not come on during a start up.


User-inserted image
Andy Roid
Commented March 2016
Hi Jeremie,

I have gotten the relay working as discussed. I have an issue where the indicator on the relay board stays on. It is bright when the relay is energized and dim when the relay is de-energized. I checked the voltages on the relay board side of the resistor. When Set Digital is Off, the voltage is 3.3 volts (relay on). When Set Digital is On, the voltage is 4.66 (relay off). The relay does operate correctly. If I add a diode will that fix my problem? I ask first because I do not want any "magic smoke.
Andy Roid
Commented March 2016
@ptp
Have
you used this style relay? How did you wire it ?

I hope Jeremie can respond when he finishes with @Tech.

Thanks,

Ron
ptp
Commented March 2016
1) if you disconnect/brake the optocoupler pin from the VCC

2) if you connect the EZB pin before the R2

3) VCC=5V

4) Common Ground

you have a NPN transistor circuit relay without a optocoupler.

High = On
Low = Off
Andy Roid
Commented March 2016
Thanks for the answer. LOL . This is what I wanted the whole time. I will give it a try next week.
ptp
Commented March 2016
@Andy,

Sorry
i did not understood you wanted to "change" the behavior, like i said in another thread i avoid hacking circuits.

I can't rationalize why your pcb relay does not work as expected. Gordon's diagram is very clear. It's a mystery :) better call Fox Mulder.
Andy Roid
Commented March 2016
No LOL .....It is a learning question. I was curious about the circuit. I now know what a NPN transistor circuit (also a PNP circuit) is and how to use it. Also how the optical isolator works.
Next time I order relays I will know what I need and what to look for, "not just a relay on a board".
I ordered a converter like you mentioned and will experiment with that. (Was cheap).
Thanks,
Andy Roid
Commented March 2016
Thanks to all that helped with this and @MazeHorizonTech 's thread on relays also.
I think it is a lot clearer now on what relay boards to buy and how to make them work.

Ron
Question
Avatarby Andy Roid
Published Thursday, March 17, 2016