Go Down

Topic: 230V AC controll with arduino and relays (now dead arduino) (Read 5889 times) previous topic - next topic

dc42


when i disconect /connect the ups to the mains by closeing or opening th relay sometimes the arduino stop responding...
now i see that its not the arduino that crashes/reset as all only the "serial part" i mean the arduino keep runing and doing what it should be..
Only the seria/usb part get broken the tx led stays on and i lost comunication the pcside to arduino...
i can only have connection back after taking the usb cable out and in again ....  (strange)...


Looks like either the USB port on the Arduino or the USB port on the PC is locking up because of a transient.

another strange issue, when i measure voltage divider when the bat is at ~26v gives 2,364v, and this happens when arduino have power...
When i disconnect arduino from power i read on the voltage divider output something like 1.3v....
why ? something to do with analog pin ??


There is a protection diode in the mcu between the analog pin and Vcc. This diode will clamp the analog input at about Vcc + 0.65. You'll probably find that Vcc measures about 0.65v in this condition (power removed). The current flowing into the analog pin won't do any harm as long as this current is small - another reason for using higher value resistors in your voltage divider.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

fca

#16
Sep 15, 2011, 07:36 pm Last Edit: Sep 15, 2011, 07:44 pm by fca Reason: 1
Quote
"Looks like either the USB port on the Arduino or the USB port on the PC is locking up because of a transient." ??

What do you mean ^? what is a transient, how to solve it ?

Regards

fca

Will it help connecting arduino ground to mains earth ?

MarkT

Sounds like a snubber network is needed across the relay contacts - large inductive spikes could be causing the problem at switching times.  Perhaps you run low-voltage wiring alongside the mains wiring?
[ I won't respond to messages, use the forum please ]

fca

#19
Sep 16, 2011, 09:27 pm Last Edit: Sep 17, 2011, 01:59 am by fca Reason: 1
You mean mains wire near the dc cables ?

No the mains is on 2 iec13 sockets and the live is passing by the relay.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Small correction the ac cable from the ups to the pc run on the same pipe as the usb cable (4m) long from the ups to the pc.
but both cables usb and power have their own pvc isolation and the usb cable is shielded..
can this be a problem ?


i will try with another computer (laptop) near the ups.
Regards


Fuge

Most of the arduino circuitry I've seen that interfaces with relays include some protection circuit that includes transistors (to help limit the current requirement at the arduino pins and still let it talk to the relay) and diodes for back EMF current protection. One of the first results that just showed up in my google search is this http://arduino.cc/playground/Main/ArduinoPinCurrentLimitations

You should check to make sure that something in your system is not pushing the current above that specified for the pins - check this http://arduino.cc/playground/Main/ArduinoPinCurrentLimitations

dc42


Sounds like a snubber network is needed across the relay contacts - large inductive spikes could be causing the problem at switching times.


I think he needs to determine whether the problem ocurs when switching the relay on or when switching it off. If it occurs when switching the relay off, then i think your suggestion of a snubber network is a good one. If it occurs when switching the relay on, then the problem is more likely to be inrush current due to capacitors in the load charging. In this case, the solution would be to add inductance in series with the relay contacts, or (preferably) replace the relay with a zero-crossing SSR.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

terryking228

Hi,
Many modern power devices like the charger have switch mode power supplies and big input power filters with large capacitors across the line.  Inrush current can be really high and cause transients that lock things up..

Plugging my laptop power supply in often makes a loud POP and sometimes a spark. Some BIG capacitor across the line.

See if the problem is the same with relay on-off and the units "power switch" on-off. Some units have their own on-off switch located AFTER the line filter capacitors so less inrush current (for THEM..).. You might dig inside and put you relay across their existing on-off switch.

Might be good here to use opto-isolated relays like these: http://goo.gl/Hu1I5

DISCLAIMER: Mentioned stuff from my own shop...
Regards, Terry King terry@yourduino.com  - Check great prices, devices and Arduino-related boards at http://YourDuino.com
HOW-TO: http://ArduinoInfo.Info

fca

5 Months later and another arduino gets "crazy"  switching on/off my ups grrrrrrrrrr i will have to check what went bad this time....
it seems that was the pin the the controlled the relay...
Im changing the relay with optoisolated with optocoupler 817c ...
what else can i do protect the arduino ?

thanks

Go Up