Go Down

Topic: Arduino freezes completely (Read 1 time) previous topic - next topic

alexaustria

Hi,
i have been working on a project, where i read Temperatures and switch relays depending on the temperatures. The relays are switched via a Darlington Array(ULN2003, i also tried normal relay drivers before). I use 12V/10A relays. The 12Volt are fed to the circuit board via an extra plug and the arduino uses it via the Vin Pin( i have a jumper to disconnect it though).
I get random freezes, when i switch a relay that is turning on a 230Volt pump. The Watchdog timer realizes the freeze and restarts the sketch,but i have to unplug it from the power source and USB to get it working again( i guess the FTDI Chip hangs too?!).
In the Serial Monitor i get following output(each Line is a response to a ON/OFF command):
100 OK No Timeout
100 OK No Timeout
100 OK No Timeout
100 OK No Tim

So the serial communication suddenly stops...

I tried these things:
-Disconnected Arduino from 12Volt Power supply => no supply voltage noise problem(i am not sure about this one)
-switching another relay (that is further away) which switches the 230Volt => no EMF noise problem

I use the String library,but this would only hang the Arduino and not the FTDI chip i think?
I have no decoupling capacitors...could that be the reason for the freezes?

Any Idea is appreciated.
Thanks for your help,
Alex

AWOL

Do you have snubber diodes across the relay coils?
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

alexaustria

#2
Dec 17, 2012, 01:53 pm Last Edit: Dec 17, 2012, 11:29 pm by alexaustria Reason: 1
Hi,
i had them in my first design with the transistor relay driver but forgot them in the new design with the ULN 2003. I will add them but since the error also appeared in the first design, i dont think this is the problem, but i will doublecheck, maybe i soldered them the wrong way.
thanks

edit: diodes  didnt change anything, still random freezes

James C4S


I have no decoupling capacitors...could that be the reason for the freezes?

Certainly doesn't help the situation to not have them.
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

be80be

#4
Dec 18, 2012, 03:02 am Last Edit: Dec 18, 2012, 03:03 am by be80be Reason: 1
I have had freezes like that the ADC and the serial use interrupts and both where happening at same time I guess  because I added a small delay between them and it fixed it  
But always use a cap on the uc power rails 

Go Up