arduino resets with relayboard, snubber calculation

Happy Hollydays…

I have a modelrailroad track with 2 turnouts that are switched with 2 pairs of relays.
As soon as i connect the wiring for the turnouts, the arduino starts resetting at random, the spread is about 9 to 25 min.

When I leave the power for the turnouts disconnected the arduino runs without any resets for hours.
I use the onboard led to show a reset. In setup() it is turned ON, then i use a pushbutton to turn it OFF.
So after a reset the Led is on.

note: the relayboard is opticly decoupled from the arduino. It is wired accordingly.

the powersupplys have been replaced by others. Did not help.

Research showed i need a snubber over the contacts of each relays (not the coil).

I do not know how to calculate the values of the capacitor and resistor to put in series over the contacts.

The power that gets switched is about 14V-DC

Could somebody help me with this? Thanks

John…

Hi, Do these turnouts have two electromagnets; one for each direction of throw?? If so the current flows only one direction in each magnet and you can use a reverse silicon diode to absorb the transient voltages when they are switched OFF.

Hi,
From what I can see you need one of these on top of you UNO.


And SOLDER your wires to it, and plug it into the UNO, the leads and connectors you are using are good for prototyping but not for final use.
Laying your wiring out will help as well.

What is the current rating of both of your 5V power supplies.

Terry's suggestion will certainly help.
You circuit diagram needs to include the point solenoid coils.

With wires that long I would be bypassing all the digital inputs that you are using, with 0.1uF capacitors.

Tom... :slight_smile:

Thanks guys,

The Arduino was powered by 9 Volts 300mA.
And now by 5 Volts 1A.

The 5 Volts in the drawing on top is from the rectifier on-board the UNO.

The Relay-board is powered by 5 Volts 2A. separately

The relays are switching 14V delivered by a standard model-train power-supply.

All the Commons of the relays are tied together to 14V+.
each relays-pair drives 2 electromagnets per turnout.

Each relay is driven for 0.5 sec. at the time.

bypassing all the digital inputs that you are using, with 0.1uF capacitors.

Does this mean hooking it up from input to GND?

I am going to order the diodes and capacitors :slight_smile: :slight_smile:

Indeed the breadboard and wiring is going to be replaced by a more permanent setup. :slight_smile:

John

Hi,

Does this mean hooking it up from input to GND?

Yes.

As soon as i connect the wiring for the turnouts, the arduino starts resetting at random, the spread is about 9 to 25 min.

Does that mean even before you activate any point solenoids?

Tom... :slight_smile:

Hey Tom,

No i can switch the turnouts automatic once every minute for about 9 to 25 minutes. Then it resets.
Then then it takes again 9 to 25 minutes before it resets again....and so on.

John

Tell me more about that 3 terminal reed switch. :slight_smile:

note: the relayboard is opticly decoupled from the arduino. It is wired accordingly.

Make sure there's no GND connection from the relay board to the Arduino or to the GND of Arduino's supply. The GNDs of both 5V power supplies should not be connected together at any point. The 14V power supply ground should not be connected to any other supply GND.

Research showed i need a snubber over the contacts of each relays (not the coil).

I wouldn't worry about arc suppression across the relay contacts at this point. Should have flyback diodes installed across the electromagnets.

All the Commons of the relays are tied together to 14V+.
each relays-pair drives 2 electromagnets per turnout.

Like this? (1 relay - electromagnet pair and flyback diodes shown)

Hi,

The Arduino was powered by 9 Volts 300mA.
And now by 5 Volts 1A.

The 9V was plugged into the DC socket, where have you connected the 5V 1A supply?

Tom..... :slight_smile:

Tell me more about that 3 terminal reed switch. :slight_smile:

This is the reed-switch

where have you connected the 5V 1A supply?

In the USB-connector (Phonecharger)

Like this?

No like this below :slight_smile: ,
Oh yes I still need to install those diodes… waiting for them to be delivered.

Each relay drives one coil of the turnout. Otherwise the one coil is powered continually releasing the magic smoke eventually :slight_smile:

John…

The diodes will help with the resetting problem.
The magic smoke problem ... need more info on the coil.

The magic smoke was just a little joke :slight_smile: :slight_smile:

No further problems with the coils.

As soon is i receive the diodes i will post the results

John.... :slight_smile: :slight_smile: :slight_smile:

Hi,
Have you rerouted and tidied up your wiring?
ec2efff09f4d49bdf9900f741fde0a8d5d37478d.jpg
The bundle on the right hand side is worrying.
All your relay output wiring should go STRAIGHT out from the relay terminals.
All your relay input wiring should go STRAIGHT into the relay terminals.

  • What do the two relays on the right do.
  • What does the multicore cable do that is in the bottom left hand corner, what signals go through that?
  • What is your Points Power Supply, AC or DC? Edit, re-read post #1
  • When activating a point, do you just pulse the coil, or does it need constant operation to stay in position?
  • If you leave points power connected, but point coils disconnected what happens?

Can you please post a copy of your complete circuit, in CAD or a picture of a hand drawn circuit in jpg, png?
(Please include all gnds and power supplies, I know its a pain, but we need to see how that whole system is connected)

Thanks… Tom… :slight_smile:

Do the switch coils need to be powered continuously or just a short pulse to switch position?

Hi

Have you rerouted and tidied up your wiring?

I have torn down the whole setup for now :slight_smile:
I am waiting for diodes and a shield like in post#3.
Then the setup is rebuild to a higher standard. 8)

  1. The 2 relays on the right: 1 is switching track-power ON and OFF, 2 is not used.
    During the testing, track-power was NOT connected to the relay.

  2. The multicore cable is used for 1 switch (P2), 1 button(P4), reed relay signal (P7),
    5V, GND (Both arduino)

  3. The coil is pulsed for 0.5 sec. Then the coil on the other turnout is pulsed for 0.5 sec.

  4. Not tested that :confused:

The drawing below is complete. However the flyback-diodes over the coils of the turnouts, are not yet installed. (ordered them)

As soon as i receive the parts, i will rebuild the setup, using the parts and guidelines above :wink:

Thank you guys, i will report back i hope in a couple of days.

John :slight_smile:

johnrevier:
I do not know how to calculate the values of the capacitor and resistor to put in series over the contacts.

The power that gets switched is about 14V-DC

RC snubber is for AC inductive loads and you have to know the inductance of the load and frequency of
the AC to figure out appropriate values.

What kind of DC load are you switching from that 14V DC? If its not inductive no problem. If its inductive
a free-wheel diode may be all you need, and it goes across the load, not across the relay.

If you cannot get to add a diode across the load a snubber is the next best approach, but you still want to know the inductance being switched.

Hi Mark,

The 14V-DC that gets switched are coils for "turnouts" or "points" -motors for a model railroad.
So there is a inductive load. Diodes are already ordered :slight_smile: :slight_smile:

John....

I'm having the same problem switching a water pump. The arduino mega only resets when the relay is connected to the pump. Doesn't do it when it is connected to other devices (like a light) or when disconnected completely. Only when connected to the pump. It's an AC pump and I don't understand enough about SNUBBING to start changing what I already have. Help would be very, very much appreciated.