Pages: [1]   Go Down
Author Topic: Arduino freezes completely  (Read 963 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 302
Posts: 26332
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Do you have snubber diodes across the relay coils?
Logged

"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.

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
« Last Edit: December 17, 2012, 05:29:19 pm by alexaustria » Logged

Fort Lauderdale, FL
Offline Offline
Faraday Member
**
Karma: 71
Posts: 6144
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I have no decoupling capacitors...could that be the reason for the freezes?
Certainly doesn't help the situation to not have them.
Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.c

Offline Offline
Sr. Member
****
Karma: 3
Posts: 253
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 
« Last Edit: December 17, 2012, 09:03:49 pm by be80be » Logged

Offline Offline
Sr. Member
****
Karma: 9
Posts: 296
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Just to add to what others said.

1. lot of decoupling caps. on the chips, on the relays, power entry points on the PCB.
2. don't forget snubber diodes on the relays (and decoupling caps)
3. Use a regulated power supply.
4. Is your project in a case? Is the case grounded?  I had a project randomly freezing usually after being left alone, and then I go fiddle with the rotary encoder. Grounding the case fixed the random lockups.

Quote
I get random freezes, when i switch a relay that is turning on a 230Volt pump.
Crash could be caused voltage spikes, ESD, and the like.

I would look into adding power line suppression capacitors, I think your pump is generating lots of spikes/noise during turn on.
http://www.okaya.com/products/noise-surge/capacitors/capacitors-faq
Quote
What are the common uses for these capacitors?

The most common use for X & Y capacitors is in EMI/RFI filtering applications where they are directly connected to the AC Power line. These types of capacitors may also be used to suppress electrical noise generated by motors, inverters and electronic ballasts. They are also used in solid state relay snubbers and spark quenchers for suppression of inductive transients.
Logged

Pages: [1]   Go Up
Jump to: