[Solved] Where should I put the flyback diode?

Hi,
This setup use a dual channel relay to forward and reverse a 12 volts DC motor (air pump). When both relay are low, both DC motor pin are at ground level and the motor is idle. When channel 1 is high and channel 2 is low, the motor pump forward while when channel 1 is low and channel 2 is high, the pump work backward. If both channel are high.... It move into trouble zone (so better not going there)!
It work for months but I do not have flyback diode and one of my system failed on the long run. The relay leak current on the signal pin. Instead of reading 0 volt and 5 volt on low and high state, I read 2.6 volt when nothing is connected on both signal pins. Because of this, both channel read a High state and my battery (and fuse) short to ground. I assume the spike current without the flyback diode did this?
Since power is reverse from time to time in my setup, where should I put the flyback diode and what orientation will it require?

This is the relay I use. There is 2 diodes on the board but I don't know if it is for protection?

RElay.gif

RElay.gif

Motors.jpg

Motors.jpg

The relay leak current on the signal pin. Instead of reading 0 volt and 5 volt on low and high state, I read 2.6 volt when nothing is connected on both signal pins.

Uhm, this sounds normal. The control circuit has a current limiting resistor, a visible red LED and an IRLED connected in series, so with nothing connected, 2.6V sounds correct. Did you know that as a test (with Arduino control outputs disconnected), you could just short any relay input to GND to activate it?

cdb101:
If both channel are high.... It move into trouble zone (so better not going there)!

What trouble? It should be OK writing both HIGH.

dlloyd:
Uhm, this sounds normal. The control circuit has a current limiting resistor, a visible red LED and an IRLED connected in series, so with nothing connected, 2.6V sounds correct. Did you know that as a test (with Arduino control outputs disconnected), you could just short any relay input to GND to activate it?

Yes and no. While troubleshooting I just encounter this "feature". On my setup, the trigger pin are connected to 0volt for most of the time and in this state the relays are not activated unless I turn the control pin high (+5volts). So for me this is new because the relay was not activating when connected to a low state or ground before. I have 3 identical systems and they are working well for over 3 months now. Out of 3, only one failed not long ago. I really want to understand what happened to correct the other system at the same time.
It's like the fail relay have invert is reaction to my high and low controller state.
When connected to a low state (common Gnd or low state pin), the relay activate (the led turn on and the spst switch). When my controller go in the high state (+ 5Volt), the relay deactivate (the led turn off and the spst switch back) while I expect it to activate! I suspect the flyback diode but it can be something else? Your answer make my doubt.

Smajdalf:
What trouble? It should be OK writing both HIGH.

yes you are right. my mistake.

Smajdalf:
What trouble? It should be OK writing both HIGH.

You are right and this mean that my two blowned fuse blows for another reason! Somehow, my dual channel relay shorted my 12 volts to ground twice in a row. But my wiring (and the schematic) normally cannot result in shorthing 12 volt to ground. It is somewhere else.
Now that I have dismounted the relay and test it separetly, the output do not short again. I mounted it back and it work. aarghhhh! Nevertheless, the relay behave the opposite I expect. It is activated when connected to low state and deactivate when turn to high state. The opposite of the other relays I have in my setup.

Contacts ‘can’ weld momentarily (then open); if this occurs you have a short between 12v and GND.

You do have a fuse ;).

larryd:
Motors.jpg

And a common bridge rectifier fills the bill admirably.

But this is on the motor side, and there seems to be some significant confusion about the operation of the control side of the relay module which is "active low". In any case, no malfunction of the control circuit can cause the motor side to short out if correctly wired as described; it would have to be a contact problem in the actual relays.

Yes "active low" is the part I missed out! And I still don't figure out how I miss this one.
Probably because my system behave has expected when I test it.

I will go the common bridge rectifier for sure. Any general diode such has 1N4148 will do the job?
It is only a 12 watts pump.

thank you

1N4000 - 1N4007 would probably work.

I tried the common bridge rectifier with a W10M with no success. There is 4 pins on the W10M.
I figured out the pinout with a multimeter + google + datasheet.

In my initial setup, I use the 2 channel relay to invert the power supply. 1 state = +12 volt , GND the other state = GND , + 12volts. If I do this with the W10M, the output voltage don't change direction. It is always 12volt. Not what I want.

In the schematic with the common bridge, It seem that the switch don't invert the voltage anymore but act by bypassing some diode thus applying 12 volts and GND at different point on the W10M. Is this a correct understanding? Can someone help with this?

thank you

I tried with stand alone diode and it work. I rewired the W10M like this:

W10M + to 12 volts
W10M D to GND
W10M B to + Motor
W10M C to - Motor

Now since my switch relay apply 12 volts on B pin of W10M while C pin is grounded
OR
apply 12 volts on the C pin while B pin is grounded.
Do I really need to connect thje W10M + pin to 12 volts and D pin to ground?

Precison:

The switching still work when I disconnect the + pin and the GND pin but will the Flyback protection will be active?

thank you

cdb101:
The switching still work when I disconnect the + pin and the GND pin but will the Flyback protection will be active?

Of course not!

The "+" on the bridge goes to your positive supply, the "-" to your negative. The two "~" go to the motor. Connecting the bridge to the circuit should not cause any discernible difference; it is there for protection only.

Note that the common W04/ W10 or 1N400x diodes are not appropriate for use with PWM.

Then I don't understand. Based on this 4 scenarios, I tried to understand where the flyback diode actually help and could'nt. What I miss?

Top left, both relay and motor pin are grounded.
Top rigth, 1 relay activate and the motor run forward.
Second left, the expected flyback current when the switch is turn off. At this point (and this is not the case with the typical scenario on internet) the + and - side of the motor are both connected to ground. If the flyback current want to flow. It should.
Third left. I don't understand the top diode. For me the only thing it do is to allow high voltage to flyback in my power supply.

The freewheeling diodes come into play when the switches go off. They are the only possible routes
then for any current that's flowing in the inductive load, and steer that current to the supply & ground.

The switches always have to turn off before others turn on, else there is a direct short to ground
from the supply. Thus you have to deal with the current during that short bit of "deadtime". If
you don't deal with it, the inductance will instantly jump the voltage to whatever level is necessary
to force the current through the circuit, damaging semiconductors.

Ok,

in the middle left schematic, you say that the relay (for millisecond) will not have reached ground yet. During that small period, the current will flow through the diode and go back in the motor.
The bottom left diode will be passing current when turning off the forward motor state while the bottom rigth diode will do the same for backward motor state.

At what point the two top diode do something?

Thank you

cdb101:
At what point the two top diode do something?

That would be relevant if both relays were actuated together - which has the same effect as both released.

Karma thanks to all of you for the explanations.

Since I don't plan to use both relay on high position, I will only use the to diode tied to ground.
The final diagram for those of you who want to do it is the following:

Typical flyback diodes would protect the transistor or mosfet that was switching the power. Relays are less sensitive to the flyback voltages but they could still use some protection.

When the relay switches from closed to open, there is current flowing through the inductance of the motor and the inductance will increase the voltage to try to keep the current constant. That will cause sparks across the opening relay contacts. Over time that will tend to burn the contacts. A diode will divert that current away from the contacts. The diodes to both ground and battery are useful during that short interval when the contacts are transitioning between high and low.

More to the point without the diode there's a massive pulse of EMI from the sparking contacts, this often
plays havoc with nearby circuitry and AM radios. You never want this, whether or not the relay contacts
last a reasonable time (and generally they dont).

A common issue that crops up in these forums is un-snubbed relay contacts freezing a nearby Arduino...