Relay Control

Started by Joe February 10, 2004
I am using a Atmega16 running at 7.37Mhz.

I am also using a LCDPlus. I talk to it with the Rs232 Hardware UART.
It has a ULN2803A with 8 relay Darlington Drivers. This also includes
blocking diodes. I am using 5v Relays with contacts rated at 250v 10a.

The setup uses a momentary button to interrupt on Int0. The relays
energise Mains contactors 120v 1a and ring a bell 120v .6a.
The system works fine with no load on the relay contacts.

When I connect the contactor and bell I get false interrupts. I can
software out the problem by disable/enable Int0 before and after the
relay call. But I would like to fix it.

What I have done:
Use 1 supply for relays and 1 for the AVR.
Adding a power line filter before the power supplies.
I used a car battery and a dc to ac inverter to Isolate the unit from
the contactor power.

So far no real fix.
Any Ideas??

JoeT


I posted the schematic in the files section.

http://groups.yahoo.com/group/avrclub/files/relaycontrol.pdf

I did not mention this before but there is a Manual overide switch.
And when it is switched from ON to Off I get a interrupt every time.
From Off to On sometimes. This is what really needs to be fixed. I
can not code it out.

For now I am going to add a reset button to reset the device when
this happens.

Thanx
JoeT
--- In avrclub@avrc..., "Joe" <joet@a...> wrote:
> I am using a Atmega16 running at 7.37Mhz.
>
> I am also using a LCDPlus. I talk to it with the Rs232 Hardware
UART.
> It has a ULN2803A with 8 relay Darlington Drivers. This also
includes
> blocking diodes. I am using 5v Relays with contacts rated at 250v
10a.
>
> The setup uses a momentary button to interrupt on Int0. The relays
> energise Mains contactors 120v 1a and ring a bell 120v .6a.
> The system works fine with no load on the relay contacts.
>
> When I connect the contactor and bell I get false interrupts. I can
> software out the problem by disable/enable Int0 before and after
the
> relay call. But I would like to fix it.
>
> What I have done:
> Use 1 supply for relays and 1 for the AVR.
> Adding a power line filter before the power supplies.
> I used a car battery and a dc to ac inverter to Isolate the unit
from
> the contactor power.
>
> So far no real fix.
> Any Ideas??
>
> JoeT





From Garyj: an older troubleshooter of computer
problems in industrial equipment

This looks like a transient voltage problem. If the
bell is a solenoid type ( a solenoid bangs against a
bell to make noise) these are electricaly very
noisy.Try a seperate power line to power the bell and
contactor using parellel varactors or line filters in
series on the source of the noise (ie. bell and
contactor). I have worked on industrial controls for
many years and have found that just wires running in
the same parallel path with control and power wireing
cause interference with the inputs to any type of
computer controls, currents in the powered circuits
induce currents in the input circuits because of their
high impedence, turning inputs on when they are not
really activated. Use inputs that require at least 10
MA of current to activate.
--- Joe <joet@joet...> wrote:
> I am using a Atmega16 running at 7.37Mhz.
>
> I am also using a LCDPlus. I talk to it with the
> Rs232 Hardware UART.
> It has a ULN2803A with 8 relay Darlington Drivers.
> This also includes
> blocking diodes. I am using 5v Relays with contacts
> rated at 250v 10a.
>
> The setup uses a momentary button to interrupt on
> Int0. The relays
> energise Mains contactors 120v 1a and ring a bell
> 120v .6a.
> The system works fine with no load on the relay
> contacts.
>
> When I connect the contactor and bell I get false
> interrupts. I can
> software out the problem by disable/enable Int0
> before and after the
> relay call. But I would like to fix it.
>
> What I have done:
> Use 1 supply for relays and 1 for the AVR.
> Adding a power line filter before the power
> supplies.
> I used a car battery and a dc to ac inverter to
> Isolate the unit from
> the contactor power.
>
> So far no real fix.
> Any Ideas??
>
> JoeT


__________________________________




Thanx to everybody that contributed to the Thread.
> I got good ideas and the problem is solved.
>
I think the main fixes were:
1) MOV's across the relay contacts
2) 6.2v zeiner across VCC to ground
3) .01uf caps at the LCD+, AVR power pins

I also changed:
1) Removed the cap across the switch - no difference
2) Added diodes across the relay coils - no
difference
3) I also left in the Int0 interrupt disable before
switching the
relays on.

I tried changing the resistor on the Int0 but a
lower value did not
pull the VCC down far enough. I will try to post an
updated schematic.

JoeT

--- In avrclub@avrc..., gary bennett <garyj52761@y...> wrote:
>
> From Garyj: an older troubleshooter of computer
> problems in industrial equipment
>
> This looks like a transient voltage problem. If the
> bell is a solenoid type ( a solenoid bangs against a
> bell to make noise) these are electricaly very
> noisy.Try a seperate power line to power the bell and
> contactor using parellel varactors or line filters in
> series on the source of the noise (ie. bell and
> contactor). I have worked on industrial controls for
> many years and have found that just wires running in
> the same parallel path with control and power wireing
> cause interference with the inputs to any type of
> computer controls, currents in the powered circuits
> induce currents in the input circuits because of their
> high impedence, turning inputs on when they are not
> really activated. Use inputs that require at least 10
> MA of current to activate.
> --- Joe <joet@a...> wrote: