ATmega328 resets occasionally when a linear actuator is activated

Hello,

I built an incubator a while ago https://www.youtube.com/watch?v=CjXmUjoWvG4 and i already used it for several times successfully but i have an issue with it.

This is the scheme: http://i.imgur.com/y5W3Moj.jpg

Occasionally the processor resets or even freezes (happened a few times even tho i activated the watchdog that works, i checked it) when the 12V linear actuator is activated, it can happen on the activation, in the middle or at the termination.

The 5V for the processor and the 5V for the relays and the 12V for the actuator coming from a CPU Power supply from different power cables although i guess that they are connected together inside.

So to eliminate the probability that the current spikes may cause the problem i connected the actuator to external 12V supply and even the relays to 5V external supply but it didn't solved the problem.

I disconnected the actuator's power supply and only activated the relays to see if there any problem with them but as i thought everything worked fine.

Maybe there is an issue with the EMF from the relays when the actuator activated (the processor and the relays are few cm apart), but it's beyond my knowledge.

I would be glad to get some help,

Thank you very much.

a) Try adding a 0.1 uf Ceramic Capacitor across the motor terminals. b) Can a couple of twists be added to the wires to the motor? c) Decoupling Cap for 12 Volts near the Relay

MotorNoise

The Power and Ground wires for the motors and fans should go directly to the Power Supply terminal strip

The Power and Ground wires for the CPU should go directly to the Power Supply terminal strip.

Do not "share" power and ground wires between motor and CPU.

mrsummitville: Try adding a 0.1 uf Ceramic Capacitor across the motor terminals. See what happens.

Can a couple of twists be added to the wires to the motor?

MotorNoise .

The problem with the wires that they are isolated, so it is one solid wire.

I would need to strip the solid wire near the actuator to add to the capacitor and still it won't be the motor its self because the motor is inside.

From the link you gave me i may see 2 issues: 1) i didn't shortened the wire and i just rolled it above the processor 2) the cable touches in some points other cables/data cable

I will try to handle this things first, otherwise i probably would need to open the actuator to add the capacitor directly to the motor.

Zen-: The problem with the wires that they are isolated, so it is one solid wire.

I would need to strip the solid wire near the actuator to add to the capacitor and still it won't be the motor its self because the motor is inside.

From the link you gave me i may see 2 issues: 1) i didn't shortened the wire and i just rolled it above the processor 2) the cable touches in some points other cables/data cable

I will try to handle this things first, otherwise i probably would need to open the actuator to add the capacitor directly to the motor.

Try adding the 0.1uf cap at the COM1 & COM2 terminals on the "2 Relays Module"? Not the optimal location but better than nothing.

mrsummitville: Try adding the 0.1uf cap at the COM1 & COM2 terminals on the "2 Relays Module"? Not the optimal location but better than nothing.

Adding the 0.1uf cap. solved the problem (no resetting as i activated tens of times the actuator) but after i activated the actuator for lots of times in a short time it caused the cap to burn.

I guess the cap (i think it's rated 50V) is not suitable.

The linear actuator is 12VDC and 0.8-5A depends on the load, which capacitor i should use?

Thank you for your help.

So you have the 2-relay to control the direction of the linear actuator, correct? When you switch it off, the induced EMF creates a high voltage enough to spark at the relay and may couple into the arduino and freeze it. I think you need a transient voltage suppressor (TVS) across your actuator. It should have a rating of 12V or slightly more and being bipolar (two diodes opposing each other).

Zen-: Adding the 0.1uf cap. solved the problem (no resetting as i activated tens of times the actuator) but after i activated the actuator for lots of times in a short time it caused the cap to burn.

I guess the cap (i think it's rated 50V) is not suitable.

The linear actuator is 12VDC and 0.8-5A depends on the load, which capacitor i should use?

Thank you for your help.

You burn't a 0.1uf ceramic disc cap?

OK, try this ...

TVS 20 Volt Breakdown, 30 Volt Clamp, 100 Amp = $1.72 TVS

I prefer 18 Volt Breakdown but I could not find in-stock. Must stay above 12 Volts, so we don't accidentally clamp the Power Supply. Put TVS across Motor COM1 & COM2 Terminals at Turner Relay

Then add a 0.1uf 50V Ceramic Disc Cap AND a 10uf Electrolytic 50V Cap across the +12V (N.O.) and Ground (N.C.) terminals of Turner Motor relay.

Technically, all of the motors should be on a Power Supply #1 and the Arduino should be on it own +5V Clean Power Supply #2.

But we really do need to suppress this motor noise, regardless.

liudr: So you have the 2-relay to control the direction of the linear actuator, correct? When you switch it off, the induced EMF creates a high voltage enough to spark at the relay and may couple into the arduino and freeze it. I think you need a transient voltage suppressor (TVS) across your actuator. It should have a rating of 12V or slightly more and being bipolar (two diodes opposing each other).

Correct.

mrsummitville: You burn't a 0.1uf ceramic disc cap?

OK, try this ...

TVS 20 Volt Breakdown, 30 Volt Clamp, 100 Amp = $1.72 TVS

I prefer 18 Volt Breakdown but I could not find in-stock. Must stay above 12 Volts, so we don't accidentally clamp the Power Supply. Put TVS across Motor COM1 & COM2 Terminals at Turner Relay

Then add a 0.1uf 50V Ceramic Disc Cap AND a 10uf Electrolytic 50V Cap across the +12V (N.O.) and Ground (N.C.) terminals of Turner Motor relay.

Technically, all of the motors should be on a Power Supply #1 and the Arduino should be on it own +5V Clean Power Supply #2.

But we really do need to suppress this motor noise, regardless.

Yes, the cap turned black and the actuator worked something like in pulses, after i removed the cap the actuator went back to normal.

I will get that TVS (it will take some time because of the shipment abroad) and update you in this thread. I guess i will connect the arduino to a separate source.

Thanks to both of you very much :)

FYI, I have a few of the same type of TVS at different voltages. Should work nicely. I use them to protect 12V batteries from lightning.

liudr: FYI, I have a few of the same type of TVS at different voltages. Should work nicely. I use them to protect 12V batteries from lightning.

Hi, thank you for your post.

Purchasing the TVS from Mouser site is problematic cause the shipment will cost me $75, I'v tried to search on Ebay but couldn't find the exact part.

I would be glad if you will give me a link on Ebay for a similar TVS that would be suitable for my case.

Thanks.

Zen-: Hi, thank you for your post.

Purchasing the TVS from Mouser site is problematic cause the shipment will cost me $75, I'v tried to search on Ebay but couldn't find the exact part.

I would be glad if you will give me a link on Ebay for a similar TVS that would be suitable for my case.

Thanks.

Yikes, $75.00 ? OK, searching ...

Zen-: Hi, thank you for your post.

Purchasing the TVS from Mouser site is problematic cause the shipment will cost me $75, I'v tried to search on Ebay but couldn't find the exact part.

I would be glad if you will give me a link on Ebay for a similar TVS that would be suitable for my case.

Thanks.

Can you purchase from Canada ?

Bidirectional TVS SA15CA DO15 21 Amp 500 Watt 15.0 Volts = Operating 17.6 Volts = Breakdown 24.4 Volts = Clamp $1.00 + $5.00 S&H

TVS

mrsummitville: Can you purchase from Canada ?

Bidirectional TVS SA15CA DO15 21 Amp 500 Watt 15.0 Volts = Operating 17.6 Volts = Breakdown 24.4 Volts = Clamp $1.00 + $5.00 S&H

TVS

Shipment for me will be $8.00 but it's ok, i will purchase it.

Thank you very much!!!

Where are you located Zen- ?

CrossRoads: Where are you located Zen- ?

In Israel.

Have you tried RS Components as a source? http://il.rsdelivers.com/

CrossRoads: Have you tried RS Components as a source? http://il.rsdelivers.com/

I checked now a similar item there and as i saw it will cost me more (almost twice), so i guess i will go with the previous suggestion.

Thank you!

Zen-: In Israel.

Ebay is ok sometimes but you always wonder what you will receive. So first, don't just purchase off this link I found yet:

http://www.ebay.com/itm/10pcs-DIODE-TVS-15V-600W-Bidirectional-P6KE15CA-/400985379290?hash=item5d5c9751da:g:6ZQAAOSw7I5TvltM

The title says bidirectional, which is what you need, but then the picture indicates one-way. Several other sellers/items are having the same issues. Maybe asking seller to clarify.

liudr:
Ebay is ok sometimes but you always wonder what you will receive. So first, don’t just purchase off this link I found yet:

http://www.ebay.com/itm/10pcs-DIODE-TVS-15V-600W-Bidirectional-P6KE15CA-/400985379290?hash=item5d5c9751da:g:6ZQAAOSw7I5TvltM

The title says bidirectional, which is what you need, but then the picture indicates one-way. Several other sellers/items are having the same issues. Maybe asking seller to clarify.

I’ve already purchased it…

I guess that they just use the picture, when i will receive it i will see if its not the item that is described i will talk with the seller to solve it.

If you have a variable power supply, you can measure the I-V curve of the TVS to see if it is indeed bidirectional. I guess it is. A lot of times the sellers don't know what they are selling. They just sell whatever sells.