Ultimate goal is to power a (fairly large) 12V DC motor (in a vehicle) with a automotive rocker switch. I've had some decent success but have learned a lot of lessons the hard way.
Discovered that the Arduino relays can't handle the high amps for the motor. So someone suggested that I use the Arduino relay to trigger an automotive relay. Which seems to make sense to me.
So I currently have an Arduino Mega.
Wired to am 8 channel relay board.
Wired to an Automotive Relay (through a 9V battery for power as a test setup).
Wired to the small DC motor that came with my Arduino starter kit as a test motor. (through a 9V battery for power as a test setup).
In general, my switch - to Arduino - to small relay - to big relay - all worked fine. Until I added the motor. The motor spins, but all of a sudden, my relays are rapid flickering. Including the small non-automotive relays.
My assumption is that some of the power or draw from the motor is finding it's way back through the wiring to affect the relays? But I'm super confused, because I thought the high-power side of the relay would be protected from the low power triggering side of the relay? Am I wrong about this?
Any other possible causes? Any ideas on how to resolve this?
You don’t need a relay to control a relay. You just need the right relay and then basic components to allow the logic level signal from the arduino to control the powering of the coil through an isolated supply. You should look up mosfets, optoisolators and fly back diodes.
In general you should do your planning on paper by creating a detailed schematic taking note of each components requirements. For example your relay should be specified for the load that it controls with an eye to the power requirements of the coil. Your coil activation circuit should be designed to meet the relay coil requirements and with an eye on the conversion from logic signal to the coil power. A power supply needs specified and any need to split to voltages requirements for motor and coil. Isolation should be between the coil power and the logic signal. Fly back may be required for the coil and for the motor
My guess is that arduino cannot drive automotive relay. Therefore a smaller relay is used here to drive the automotive relay.
Maybe not best solution but should work...
Here is the problem! An automotive type relay is designed to be powered from the automobile battery. As such, it may draw an ampere or more of current in order to really and truly bring the contacts together with force so there is very little resistance between the contacts.
Try a real 12 volt battery that can supply enough current.
See project photos above. I know that my temporary connections are a bad idea... I'm just trying to figure out what works.
Something else I noticed this morning. The relays marked A and B on my diagram are both wired to the Arduino, but only relay A is connected to an automotive relay and motor. (Eventually will incorporate relay B, but just trying to get one working first). When the motor spins and the relay flickers, they BOTH flicker. Again, that seems to indicate to me that power/draw is somehow flowing back to the Arduino and causing issues... but I can't figure out how anything is flowing back through the relays. There's an independant power supply at each stage.
To the comments about a 9V not being enough voltage to close the 12V relay... Super interesting... hadn't thought of that. But still can't figure out how that would cause my current issue. Because the 9V would be sufficient to close the relays A and B. But I will attempt to try with a 12V this afternoon.
You need kickback suppression diodes in parallel with auto relay coil and motor. Also, a 10 to 50pF ceramic capacitor across motor terminals would help with brush spark noise. Is that the "fairly large" motor?
When you say “You need kickback suppression diodes in parallel with auto relay coil and motor”, do you mean one diode on each of the wires leading to the motor?
I don’t know anything about kickback suppression diodes, but am about to start reading.
google flyback diode. as I pointed out earlier a collapsing coil field will release significant voltage spikes which require the diode across the positive and negative terminals to allow dissipation.
In general, it seems like the feedback from other users was split into 2 camps:
1 - Needs to be a 12V power supply to trigger the automotive resistor.
2 - Add a flyback diode.
In the end, I believe that both pieces of advise are correct.
As another test, I replaced the DC Motor with an LED and identified that the LED was not shutting off with the 9V power supply triggering the automotive relay. So... that seemed to confirm that a 12V battery might solve the problem. Tried the 12V and the LED toggles on/off with the switch - exactly as I hoped. And the relays are no longer flickering.
Then I put the DC motor back into the circuit. Unfortunately, the flickering still happens, but much slower than before.
So I think that the 12V battery has resolved the switching of the automotive relay, but that I'm still getting some power fluctuations returning through the relays.
After reading about flyback diodes, I don't know if I can make them work in my application because ultimately I need the motor to be activated in both directions (and it sounds like flyback diodes can only be used in a single-direction setup). So I'm still trying to figure out a perfect solution.
Next step, I will try this setup with the big motor and see if the relays flicker the same as with the small motor.
Hi. Thanks again for getting me onto the fly back diode.
I’m struggling because it looks like the fly backs are unidirectional. But I need to reverse the motor.
So it looks like a zener diode might work. But I’m struggling to spec one.
Seems like the zener calculators are based on V and W. If I have a 12v power supply and a 30 Amp circuit, then I’m 360W(?). But when I look on Amazon, zener diodes all seem to be 5W or less.
Am I heading in the wrong direction? Thanks in advance for your help.
How will you reverse the motor? You can put the flyback suppression across the 12V supply provided you dont try to reverse the motor whiler its running.
You would need back to back zeners with a higher voltage than the MAXIMUM of the supply so they dont conduct until the flyback voltage exceeds that value.