Go Down

Topic: Arduino freezes up when a electrical equipment is switched on (Read 6362 times) previous topic - next topic

dlloyd

Quote
The 12V SMPS power supply is not truly fully isolated. There is some capacitance to the Neutral and Hot lines of your AC power.
+1

polymorph

I used to manage an arcade. I discovered that a few games had broken ground prongs when I touched two games at once. Even though the SMPS in them was isolated, there is enough capacitance to incoming AC power that the chassis then floated at about 60Vac (half of the incoming 120Vac) due to that parasitic capacitance in the transformer.

It loaded down to a lower voltage when I was touching it, but it was still enough current to tingle.
Steve Greenfield AE7HD
Drawing Schematics: tinyurl.com/23mo9pf - tinyurl.com/o97ysyx - https://tinyurl.com/Technote8
Multitasking: forum.arduino.cc/index.php?topic=223286.0
gammon.com.au/blink - gammon.com.au/serial - gammon.com.au/interrupts


Sankalp

Precisely. The tank is likely already grounded. By connecting the 5V supply to the tank's contents, you are probably setting up a current loop through the ground. Things work on the battery because the battery is isolated from earth ground. But once you use the power supply, now you have a direct or capacitive connection to ground, and the 5V connection causes problems.

Simple test: simply disconnect any 5V supply leading to any tank probes, and see how it runs. Of course, the tank level measurement won't work, but does it still exhibit the reset/freeze issues?
Tried disconnecting the 5V supply to tank. And the circuit still freezes up. So seems the way i am measuring the water level isn't the issue.

 
Sankalp, See my very first comment in reply#4. Did you try this?
Yes tried this as well....

There is one more thing that I tried. tried running the arduino with everything else disconnected except the lcd. And guess what it still freezes up.

dlloyd

Your narrowing it down.
Now to find out if it's a faulty Arduino, LCD, Power Supply, wiring, or code.

LStar

Sounds like this may be the dreaded cmos 'latch-up'. Happens when a voltage spike coming in on any of the leads exceeds VCC or GND voltages, jamming current into the chip's die.  A good sign of this is the chip seems dead, it may get warm or the power supply voltage is now too low. Capacitive coupling from long wires, inductive loads and ground bounce are prime causes.

For inductive loads like relay coils, a diode only clamps the voltage, it doesn't limit how fast the voltage changes. On some projects I have had to put a series 47 ohm resistor/.1 uF cap network across the coil terminals to suppress the kick back spike's slope so it wouldn't couple so strongly into the other input wires, triggering a latch-up.

A way I've used to desensitize the input input pins is to put 10k resistors in series with the pins, as close to the micro-controller as possible. This limits how much current a spike can dump into the chip, thus preventing the latch-up.

polymorph

You can't -just- disconnect 5V from the tank, you must also ground the tank. Otherwise, you've got a huge partly conductive thing connected to some high impedance wires going to the Arduino.

Ever touched the center conductor on a guitar cord with the amp turned on? That's what is probably happening here.
Steve Greenfield AE7HD
Drawing Schematics: tinyurl.com/23mo9pf - tinyurl.com/o97ysyx - https://tinyurl.com/Technote8
Multitasking: forum.arduino.cc/index.php?topic=223286.0
gammon.com.au/blink - gammon.com.au/serial - gammon.com.au/interrupts

Sankalp

Finally was able to fix the issue.

Added 0.1uF Caps on all the analog inputs and a TVS diode across the power supply. The circuit has been stable since the past 3 days. :)

BTW can anybody help me out with the schematics and PCB layout. Have been trying for quite sometime now but haven't made any progress. Any help is greatly appreciated.

polymorph

You should start a separate thread for that.

Thank you for letting us know what fixed it.
Steve Greenfield AE7HD
Drawing Schematics: tinyurl.com/23mo9pf - tinyurl.com/o97ysyx - https://tinyurl.com/Technote8
Multitasking: forum.arduino.cc/index.php?topic=223286.0
gammon.com.au/blink - gammon.com.au/serial - gammon.com.au/interrupts

TomGeorge

Hi,
try.

www.expresspcb.com

Its a very simple CAD that does schematics and PCB.
and its free..
If you are only going to make one, then use this,
http://www.veroboard.com/
You can buy all sorts of types on ebay. Stripboard is the most convenient.
Tom.... :)

Everything runs on smoke, let the smoke out, it stops running....

Go Up