I am getting "noise" from a 12V DC relay, even though I have a snubber diode across the coil (see circuit diagram). The 5v relay has an optocoupler. My test code simply activates/deactivates the 5v relay and posts the value of the function millis() to the LCD. If the 12v relay is not energized (disconnect the GND) the LCD functions normally, even when the 5v relay is cycled. With the 12v relay enabled, however, the LCD text is garbled most of the time. This happens whether or not the 120v is connected to the contacts.
I scrounged up a different 12v relay -- its contacts are rated at 10A, as opposed to the 30A for the problematic relay -- and had no interference.
The 30A relay draws about 230 mA when it is activated. The 12v power supply is rated at 2A, and the 5v linear regulator is rated at 3A. Using a DMM to check, I could not see any voltage drop when the relays were activated so I am thinking the problem isn't just a lack of energy.
Could the cheap 12v relay be causing that much noise? I have no spec sheet on it -- I bought the relays on eBay and they have no documentation whatsoever, other than a graphic showing pin functions, and the notation that it's a 12v relay.
I have ordered some 12v relays with built-in diodes and hope the problem goes away. On the other hand, I'm not sure how the cheap relay could be causing the problem. I checked the diode with my DMM and it appears to be functional -- voltage drop and resistance are the same as the values for the other identical diodes I have not used. Also, the diode is soldered into the quick connect terminals that supply (+) and (-), so it is used when I connect either of the 12v relays.
Here is an updated image with parts identified. Is the 3.3v regulator possibly causing the problem? How should the 5v relay be connected in order to benefit from the optocoupler?
Not sure if the note "why the cross-post" was something you want me to address, but I'll go ahead. I was asked to designate whether the issue had been resolved and I did -- I noted the advice to use a diode as a safety measure and said I would go that route. Which I did. And now I have a problem I didn't have before. It seems it has nothing to do with that diode, since the problem arises even with that relay disconnected. Should my latest post have been appended to the earlier one?
Yes. Multiple threads for the same project is against forum rules (for a reason).
A moderator will likely merge them now.
In the other thread I think you were advised to use a solid state relay to replace the two common relays. Then you could have powered the lot with a 5volt cellphone supply connected to the USB socket. Did you try that?
Leo..
Arduino takes in 12V and puts out 5V what happens to the 12V minus 5V's?
The 5V relay looks like it is just a coil and not an opto driven or silicon driven module. The Uno's GPIO pins have a current limit of how many amps? How many amps does the 5V relay want?
That is what I understood -- don't attempt to sink more than 40mA from one of the digital pins. The relay I am using draws 5 mA. The power for the coils comes from the 5v regulator. Did I draw that correctly?
If I understand you correctly, that is the arrangement on the 5v relay -- it uses a 5mA signal from the Arduino to activate the coil, but the power for the coil comes from the regulator (as per my diagram).