I have an YwRobot 4 relay module. On the Arduino I have one pin that drives the relay. No problem for one. But I want it to drive two relays. On top of that I want an manual override on relay 2. For this question I will break it up in two parts.
Can I drive two relays with one pin? In other words can I connect one OUT pin on the Ardiuno to two IN pins on the relay module for it to work? (pin 8 is not the pin per se)
I want an override on relay two. Because sometimes I want to use it without the Arduino running or the program.
Would my drawing work? I've added an diode between the pin out and the switch.
Think so, the diode protects the Arduino pin if the Arduino's unpowered so that's good. The relay
module input is typically a transistor or opto isolator input, one pin should be able to drive two, but
you can measure the input current to the relay board and check its not going to be too much.
[ Correction, I forgot that most of these relay boards use active low inputs to
opto-isolators, and may require inverted logic - check this ]
I don't see any problems. I assume you haven't tried it?
Can I drive two relays with one pin? In other words can I connect one OUT pin on the Ardiuno to two IN pins on the relay module for it to work?
Probably. Do you have link to the relay board specs (or schematic)?
There's also a very-slight chance that the ~0.7V diode drop will be a problem. (It wouldn't harm anything, but relay operation from the Arduino through the diode may be fail or be unreliable).
Thanks all for your feedback!
yes, you're right. I haven't tried it out yet I'm still pretty new with this all and was afraid I would damage the arduino.
I've given it all a good thought and decided I'll go for a different approach, which even gives me more options.
I will still use one arduino pin out to drive both relays
And put a point switch (hope that's a good translation) in the 230v line, before the relay.
The switch will have 3 states. 1. On, connect to relay 2. Off. 3. On, direct connect to machine
This way I can choose to use the machine on relay 2 to (1) be on while the arduino is running. (2) be off when the arduino is running. (3) use the machine even when the arduino is not running/powered on.
Caution: you mentioned 230V, Is that AC or DC. Exactly what are you trying to do with 230V and this relay board. We need to know what relay bored you are using, and what kind of current/voltage you're going to use. a schematic is preferable. In many cases These relay Boards are not designed for that kind of voltage. Just because the relay will handle that kind of voltage/current, does not mean the board will handle it. these boards are for hobby use, not for industrial use. Please be more specific about your application.
Your schematic is okay, but I cannot say the same about the relay board. The pictures just do not show enough detail. if possible you need to measure the spacing between the circuit traces of the relay. It should be approximately 2.5 mm.
at this point, I have two concerns.
1, what is the current that you intend to pull from each relay. Bear in mind that the connectors on most of these relays will only carry approximately 7 to 8 A.
2, if this is an inductive load. Once you turn the relay off, and the field collapses, it can induce a higher voltage than the relay board can handle. this can produce arcing between the terminals. I have had this happen on commercially made equipment. The trace spacing was adequate for non-inductive loads but because there is an inductive load used, the voltage was double, Making the spacing inadequate for safety. Fortunately I caught the problem before it caused too much damage.
note: relays design for electric AC motors, are normally rated in horsepower. Their design for the higher starting current, and the inductive voltage when the relay is turned off.