Go Down

Topic: Relay switching 12v erratically  (Read 1 time) previous topic - next topic


Jan 05, 2021, 07:26 pm Last Edit: Jan 07, 2021, 06:47 am by Southpark
Sorry, but that diagram is still rubbish!  The rectifier bridge will cause the motor to run in one direction whatever the reversing switch does!  :smiley-roll:
Good catch with the polarity that I had overlooked.

If you want to add "kickback" diodes, the easiest is a rectifier bridge at the relay with "+" and "-" connected to the 12 V supply and the "~" terminals to the actuator connections.
Not sure what the intention of that diagram is, but it has nothing whatsoever to do with what I was explaining about using a bridge rectifier as a convenient form of voltage limiting for the relay switching.

It is in fact, nonsensical!
It appears that my diagram actually has absolutely everything to do with what you had in mind.

Now let's head back to your diagram ------ where you mentioned 'kickback' diodes. Your configuration does not provide 'kickback' diode functions. Simply mentioning it while keeping all this nice and civilised  

The polarity changer in my diagram (seen below) is now sorted.

When a change of direction is needed ------ we just temporarily remove power (via the on/off switch) from the motor for a suitable amount of time ...... followed by switching/changing the polarity with the relays ...... followed by powering on the motor again (via the on/off switch) ----- (although ..... I would just go with flyback diode H-bridge networks ..... which doesn't require these control sequences and doesn't have the diode voltage drops).


The two SPDT relay control approach is extremely elegant as it uses only single pole relays and one per direction.  It does however cause full dynamic braking.  If you wish to avoid this, you can add diodes to the NC of each relay (and then implement dynamic braking by actuating both relays together).  :smiley-lol:
Paul--B, In the case of controlling a linear actuator, is there any reason why full dynamic braking is undesirable?  If so, would I need to add diodes to the NC of each relay in addition to the bridge rectifier?


Joat ------ there is a heap of circuits and information out there - involving DC motors - particularly brushed DC motors, with driver circuits all involving features such as flyback diodes. Just check out this one of many links on the internet ---- (click here) ..... that could help point out the benefit of flyback diodes for this sort of DC motor driving application involving switching.
Southpark - thank you for your patience and link to tutorial.  I read the article and others and have a better appreciation of EMF and flyback diodes.   I've ordered boxes of caps and diodes and some bridge rectifiers, and hopefully I'll figure out where to place them on my circuit!  


That actuator should not need protection diodes as it is loaded, so the load is absorbing energy.
I'd go for about 1000uF 12V on the 5V side at the relay board.
John, Thank you for your reply and suggestions.  However,  I am confused why you suggest that the cap should be on the control side of the relay and not on the 12v supply to the actuator.    The relay is opto-isolated from the 12v motor, so how can the cap on the control side make any impact?  What am I missing?


Jan 06, 2021, 10:03 pm Last Edit: Jan 07, 2021, 12:43 am by Southpark
Paul--B, In the case of controlling a linear actuator, is there any reason why full dynamic braking is undesirable?  If so, would I need to add diodes to the NC of each relay in addition to the bridge rectifier?
Hi Joat. You're most welcome. Just adding a short note here.

Paul__B overlooked something with his circuit. He originally thought that the configuration he presented (provided) has flyback-diode (kickback diode) functionality. But it doesn't. So for the moment ----- please hold-off on what he mentioned about those extra diodes to be added.

Also - for linear actuator applications ----- the motor is going to be loaded-down (with a load). One wouldn't expect 'full dynamic braking' to lead to anything bad ----- as in operating out of electrical specifications limits. And the motor's rotor probably wouldn't be initially rotating at relatively super fast speeds anyway - I think.

And - just to confirm ------- for those LM2596 buck converter modules, there's mention that the In- pin is already electrically connected (in the board design) to the Out- pin (mentioned here). So all ok there


Paul__B overlooked something with his circuit. He originally thought that the configuration he presented (provided) has flyback-diode (kickback diode) functionality. But it doesn't.
Care to explain that assertion?  :smiley-roll:


Jan 07, 2021, 10:16 pm Last Edit: Jan 08, 2021, 12:05 am by cdb101
You migth read this Topics here were I encounter mostly the same issu and ask similar questions.
The solution describe at the end is working fine and without issu since then.
I also concluded that a full bridge rectifier was not required and only 2 diodes did the job since voltage never get negative. This should also be your case.




And you are right - that topic covered the issue well.

Just by the way, when you post links, please do not click the "Prevent this page from creating additional dialogs" checkbox; this is just a significant nuisance for people trying to follow the links.  The fact that you are actually offered this option does tend to mislead and imply that there is some sort of benefit to it; there is not,


Jan 07, 2021, 11:44 pm Last Edit: Jan 08, 2021, 04:53 pm by Southpark
Hi Joat! It looks like that circuit does have an alternative path for current flow after-all ...... after looking more into it.

I'll attach pics.

The first pic just shows a DC current established in the 'coil'.

For the second pic, if temporarily 'ignoring' the diodes, and making it as if the developed 'reverse' voltage of the 'coil' (for this particular circuit model) were a momentary/temporary kind of power supply ..... then in any case, the current through the coil can still be maintained by moving through that marked 'alternative' path, which can help stop contactor arcing of relay contactors

An equivalent circuit for the above diagram during switch-off is shown below



Take a look at the edited post. The very last diagram will help nicely.


The H Bridge motor drives have arrived.. I read from the tech sheet that it has in built protection diodes.  "This board equipped with power LED indicators, on-board +5V regulator and protection diodes."  Does this mean I can connect it safely to my linear actuator, without further flyback diodes?


Jan 09, 2021, 12:00 am Last Edit: Jan 09, 2021, 12:05 am by Southpark
joat ------- the L298N h-bridge is an older style module ----- but they can work nicely anyway. That module you ordered won't require you to do anything else in terms of adding flyback diodes. So good to go.

Just to help out a bit ------ read this thread (link here) ------ as the L298N modules have features that the instructions don't tell people about ----- or are just not made clear to users. These modules are actually easy to use if the basic details are properly included in the instructions ----- but the life story of lots of instructions/manuals is ..... they leave out bits, or make certain things unclear/vague ----- resulting in time-wasting and head scratching for users.

Also - the circuit shown by Paul__B is expected to work ----- and does have flyback diode functionality ----- now that I've taken another look at it. So feel free and confident to try the circuit provided by Paul__B too ........ just a matter of configuring or reconfiguration your two relay devices. It is expected to work nicely for you too. I'm satisfied with the workings of that bridge rectifier configuration after having taking a look at it more


Thank you all for your assistance. It's been a great education!

I decided against using the H Bridge as it required using an additional pin on the ESP 8266.  So I wired in 4 diodes, as per Paul_B diagram into a new dual channel relay and it seems to work fine.  Hopefully it will continue to run.  I think we can mark this as solved.


Jan 11, 2021, 01:48 am Last Edit: Jan 11, 2021, 01:52 am by MarkT
This is how I draw a relay H-bridge so its clear (and looks similar to the common way bridges
are laid out, beit H-bridge, 3-phase, or whatever):

For instance you can see some 3-phase bridges in this article: https://www.digikey.com/en/articles/how-to-power-and-control-brushless-dc-motors
[ I DO NOT respond to personal messages, I WILL delete them unread, use the forum please ]

Go Up