Relay back feed resetting my Arduino

Hi guys and gals
So I've recently made a battery charging project that is controlled by my .NET software.
Basically I have two sets of relays, one is a 5v relay board with 4 relays on, the other is more heavy duty requiring 12v and can handle up to 70A
I am using the 5v relay board to switch my bigger relay using a 12v power supply as the supply and the smaller 5v supply is connected to my Arduino mega with 5v and ground
My Arduino is powered by the same 12v power supply via a DC voltage regulator at about 9v.

The problem is when I remove a battery from charge (switching my 5v relay to switch my 12v relay, my Arduino resets.
I have read up about this problem quite a bit and found that a flyback diode can be used between the coil positive and ground
However this is not working for me, my mega still will reset after I switch my relays off
Am I connecting my diode wrong?
I have it connected from ground to the coil input (switching input)
Please, any help will be appreciated

The reversed biased diode should be across the coil.

When the coil is released, the diode forward biases and absorbs the kickback current.

You may need to add snubbing on both the 5v and 12v contacts.

Watch out for power wires being too close to Arduino wiring.

@mr_tropica

Your topic was Moved to it’s current location / section as it is more suitable.

Could you also take a few moments to Learn How To Use The Forum.

Other general help and troubleshooting advice can be found here.
It will help you get the best out of the forum in the future.

Have you monitored the 5V to the to the Mega while the circuit operates?

A schematic of the wiring is always better than a written description.

I am using the 5v relay board to switch my bigger relay using a 12v power supply as the supply and the smaller 5v supply is connected to my Arduino mega with 5v and ground

Loose the ground → gain opto isolation (if your 4-relay board has opto isolators).

The problem is when I remove a battery from charge (switching my 5v relay to switch my 12v relay, my Arduino resets.

Yeah, that’s normal … if a problem is to happen, it always occurs when relay contacts open.

I have it connected from ground to the coil input (switching input)

Facing which direction? Which relay? Circuit diagram?

mr_tropica:
Am I connecting my diode wrong?
I have it connected from ground to the coil input (switching input)
Please, any help will be appreciated

If you connected the diode backwards, then it was instantly destroyed as soon as the relay coil was energized. At that point it is useless, but visually identical to a properly functioning flyback diode. Make sure the end of the diode with the band is connected to the positive supply side of the relay coil, and the other end of the diode goes to the other side of the coil.
S.

mr_tropica:
My Arduino is powered by the same 12v power supply via a DC voltage regulator at about 9v.

Why are you doing that?

An Arduino (Mega) operates on 5 V. It makes more sense to have a 5 V regulator feeding it via the "5V" pin. You do have to disconnect it however when connecting to the PC via USB.

mr_tropica:
I have read up about this problem quite a bit and found that a flyback diode can be used between the coil positive and ground

Are you sure that is what you read? :roll_eyes:

mr_tropica:
Am I connecting my diode wrong?
I have it connected from ground to the coil input (switching input)

It sounds wrong.

The diode goes across the relay coil.

Hi,
Welcome to the forum.

Please read the post at the start of any forum , entitled "How to use this Forum".
OR
http://forum.arduino.cc/index.php/topic,148850.0.html.

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Thanks.. Tom... :slight_smile:

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.