Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Motor Flyback issue

Status
Not open for further replies.

rups22

New Member
Hi all

I'm currently building a boom gate powered by a 12V winch motor that draws about 20A.
I am using Raspberry Pi GPIOs to turn on two 3.3v relays (https://core-electronics.com.au/gra...dule-arduino-and-raspberry-pi-compatible.html)

These relays then in turn control the winch motor relays for forward and reverse.
The winch motor is powered by a 12v lead acid battery on a trickle charger, and the Raspberry Pi is powered by the official 240v usb charger


The problem is when the motor stops the Raspberry Pi switches off & reboots.
I assume I am having a flyback issue.

Could someone please recommend the best way to stop this interference?

I am in possession of 2 x MBR1645 Schottky diodes if they can be put to any good use?


Thanks in advance
 

Attachments

  • Flyback issue_schem.png
    Flyback issue_schem.png
    112.7 KB · Views: 265
Either 1 flyback - in that case - Connect a didoe to each relay. From relay pin numbers Pin 1 (anode) to pin 5 (cathode). This is a reverse bias to prevent current spikes.

Or, option 2, your relay coil is drawing more current than the RPi can supply on the I/O pins. If this is the case, you need to add a transistor to use as a switching device to increase current handling. If you get a reasonably sizes transistor (actually a MOSFET), then you can directly drive the big relays and get rid of the intermediate relays.

Make sure you select a MOSFET that can be driven with 3.3v logic from your pi, and handle the current and voltage of your 12v wench relays.
 
Either 1 flyback - in that case - Connect a didoe to each relay. From relay pin numbers Pin 1 (anode) to pin 5 (cathode). This is a reverse bias to prevent current spikes.

Or, option 2, your relay coil is drawing more current than the RPi can supply on the I/O pins. If this is the case, you need to add a transistor to use as a switching device to increase current handling. If you get a reasonably sizes transistor (actually a MOSFET), then you can directly drive the big relays and get rid of the intermediate relays.

Make sure you select a MOSFET that can be driven with 3.3v logic from your pi, and handle the current and voltage of your 12v wench relays.

The low voltage relays are especially designed for Raspberry Pi's and operate at 3.3v.


Their schematic also appears to show a flyback diode and transistor built in

Is there any chance the 12v motor relays or the motor itself could be causing the spike? Or are they (as I understood) isolated from Raspberry Pi
 
The low voltage relays are especially designed for Raspberry Pi's and operate at 3.3v.

So what are you using? - those are relay 'modules' - you said you were just using relays, and showed just relays on the circuit you posted, and never made any suggestion that you were using something completely different to what you said, and what you showed.

When you post completely misleading details you're not going to get very helpful answers!.
 
So what are you using? - those are relay 'modules' - you said you were just using relays, and showed just relays on the circuit you posted, and never made any suggestion that you were using something completely different to what you said, and what you showed.

When you post completely misleading details you're not going to get very helpful answers!.
I absolutely agree I overlooked this completely in error, however in my original post I did link the modules in question so I apologise for any confusion

To clarify the Raspberry is connected to the two modules and the modules connect to the forward/reverse relay setup
 
Just because an eBay or AliExpress says it is "built for Raspberry Pi" or "for use with Raspberry Pi" doesn't mean it actually works with Raspberry pi.

obviously, the relay module doesn't work with Raspberry pi. The coils are likely drawing too much current. You can try adding some capacitors across your Pi power supply rails.

You can also measure the coil resistance On your module to make sure they are not going to draw too much current.

do not simply measure the current draw unless you know the value of the burden resistoror your meter - some meters have burden resistors that can have a significant impact in the reading at 3v.
 
The relay module uses a mosfet to switch the coil current, so it will be drawing very little current from the Pi to activate the relay.
 
The relay module you show has a separate pin to provide operating power for the relay coil. This needs to be connected directly to a 3-5 Volt power rail. Not the GPIO pin.
That way only the trigger current comes from the GPIO pin of the Pi.
 
The relay module you show has a separate pin to provide operating power for the relay coil. This needs to be connected directly to a 3-5 Volt power rail. Not the GPIO pin.
That way only the trigger current comes from the GPIO pin of the Pi.

I suspect the schematic he posted is in no related to how he might have it connected?, like everything he has posted so far?.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top