Driving large numbers of relays

R

rei

Guest
I am a microprocessor programmer specializing in the Zilog Z8 family.
In the past I have done several boards for controlling high speed
processes. I like the Z8 because of its large number of registers and
on chip features. My current project will use the Z8F6421.

I am working on a board that will control greenhouses. I have no
training in electronics but over the years have learned all I needed
to know from app notes.

However, all my previous projects were completely digital. I now need
to control a large number of relays. I have no experience or
education in this area, and am having trouble understanding the
information I am finding.

I originally planned to control the relays directly with GPIO pins,
but now am leaning toward 74HCT574's and a 74HCT138 to multiplex the
pins, since the number of needed relays grows daily.

I am looking at darlington arrays such as the ULN2803 but don't know
how to determine the added resistors and diodes.

I also want the driver to drive a led which will turn on when the
relay is activated, and want to use a zener to sense the presence of
24v AC voltage at the output of each relay. There will be a fuse at
each relay and I see the zener at the relay end of the fuse. I plan
to run the zener output into a 74HCT251 and sense AC activity with a
GPIO pin.

I came to this board in the hopes of getting some detailed advice on
the exact resistors and diodes needed with the ULN2803. I originally
chose the ULN2803 because I planned to drive the relay directly from
the GPIO pins of a 3.3v microprocessor, and purchased 3.3v coil relays
for the prototype for the same reason. Advice on the best devices and
best way would be appreciated now that they will be driven by the
output of an HCT574.

Thanks in advance to anyone who can provide some advice.
 
On Fri, 29 Jan 2010 13:09:58 -0600, "rei" <dickillyes@gmail.com>
wrote:

I am a microprocessor programmer specializing in the Zilog Z8 family.
In the past I have done several boards for controlling high speed
processes. I like the Z8 because of its large number of registers and
on chip features. My current project will use the Z8F6421.

I am working on a board that will control greenhouses. I have no
training in electronics but over the years have learned all I needed
to know from app notes.

However, all my previous projects were completely digital. I now need
to control a large number of relays. I have no experience or
education in this area, and am having trouble understanding the
information I am finding.

I originally planned to control the relays directly with GPIO pins,
but now am leaning toward 74HCT574's and a 74HCT138 to multiplex the
pins, since the number of needed relays grows daily.

I am looking at darlington arrays such as the ULN2803 but don't know
how to determine the added resistors and diodes.

I also want the driver to drive a led which will turn on when the
relay is activated, and want to use a zener to sense the presence of
24v AC voltage at the output of each relay. There will be a fuse at
each relay and I see the zener at the relay end of the fuse. I plan
to run the zener output into a 74HCT251 and sense AC activity with a
GPIO pin.

I came to this board in the hopes of getting some detailed advice on
the exact resistors and diodes needed with the ULN2803. I originally
chose the ULN2803 because I planned to drive the relay directly from
the GPIO pins of a 3.3v microprocessor, and purchased 3.3v coil relays
for the prototype for the same reason. Advice on the best devices and
best way would be appreciated now that they will be driven by the
output of an HCT574.

Thanks in advance to anyone who can provide some advice.
Nice part:

focus.ti.com/lit/ds/symlink/tpic6c595.pdf

John
 
On Fri, 29 Jan 2010 13:09:58 -0600, "rei" <dickillyes@gmail.com>
wrote:


I came to this board in the hopes of getting some detailed advice on
the exact resistors and diodes needed with the ULN2803. I originally
chose the ULN2803 because I planned to drive the relay directly from
the GPIO pins of a 3.3v microprocessor, and purchased 3.3v coil relays
for the prototype for the same reason. Advice on the best devices and
best way would be appreciated now that they will be driven by the
output of an HCT574.

Thanks in advance to anyone who can provide some advice.
YOu shouldn't need any extra resistors or diodes. The ULN2803 should
accept the outputs from the microprocessor or HCT574 directly, and
includes the "catch diodes" you should have across the relay coils.
Connect pin 10 to the relay supply to use the internal diodes.


--
Peter Bennett, VE7CEI
peterbb4 (at) interchange.ubc.ca
GPS and NMEA info: http://vancouver-webpages.com/peter
Vancouver Power Squadron: http://vancouver.powersquadron.ca
 
rei wrote:
I am a microprocessor programmer specializing in the Zilog Z8
family.
In the past I have done several boards for controlling high
speed
processes. I like the Z8 because of its large number of
registers and
on chip features. My current project will use the Z8F6421.

I am working on a board that will control greenhouses. I have
no
training in electronics but over the years have learned all I
needed
to know from app notes.

However, all my previous projects were completely digital. I
now need
to control a large number of relays. I have no experience or
education in this area, and am having trouble understanding the
information I am finding.

I originally planned to control the relays directly with GPIO
pins,
but now am leaning toward 74HCT574's and a 74HCT138 to
multiplex the
pins, since the number of needed relays grows daily.

I am looking at darlington arrays such as the ULN2803 but don't
know
how to determine the added resistors and diodes.

Like Peter said, the ULN2803 already has the input resistors and
protection diodes built in.

I also want the driver to drive a led which will turn on when
the
relay is activated,
Place an LED in series with a resistor across the relay coil. The
resistor value depends on how bright you want the LED to be, what
color (since LEDs of different colors have different voltage
drops) and also on the voltage across the relay when it's
activated. Assuming that the relay coil will actually have 3.3V
across it, a red LED will use 1.8-2V out of that 3.3V. The
remaining 1.3-1.5V is to be absorbed by the resistor. So, a
resistor of 220 ohms to 1k.

If you're thinking of driving the relays with the ULN2803 from
3.3V supply, remember that the ULN2803's output transistor uses
up around 1V of the 3.3V, leaving about 2.3V for the relay
(depending on the current drawn by the relay coil), and that may
cause unreliable relay operation.

It looks like you're going to have to provide a 5V supply for the
HCT574 anyway, so it's probably better to power the relays from
that too. The relay coil plus the ULN2803's output transistor
together need 4.3V. You can drop the 5V to 4.3V with a resistor
in series with each relay coil.

The correct resistor value for that depends on the current drawn
by the relay, and that depends on the coil resistance. Do you
know what the coil resistance is?
 
"rei" <dickillyes@gmail.com> wrote in message
news:edSdnWFmKNgbr_7WRVn_vwA@giganews.com...
I am a microprocessor programmer specializing in the Zilog Z8 family.
In the past I have done several boards for controlling high speed
processes. I like the Z8 because of its large number of registers and
on chip features. My current project will use the Z8F6421.

I am working on a board that will control greenhouses. I have no
training in electronics but over the years have learned all I needed
to know from app notes.

However, all my previous projects were completely digital. I now need
to control a large number of relays. I have no experience or
education in this area, and am having trouble understanding the
information I am finding.

I originally planned to control the relays directly with GPIO pins,
but now am leaning toward 74HCT574's and a 74HCT138 to multiplex the
pins, since the number of needed relays grows daily.

I am looking at darlington arrays such as the ULN2803 but don't know
how to determine the added resistors and diodes.

I also want the driver to drive a led which will turn on when the
relay is activated, and want to use a zener to sense the presence of
24v AC voltage at the output of each relay. There will be a fuse at
each relay and I see the zener at the relay end of the fuse. I plan
to run the zener output into a 74HCT251 and sense AC activity with a
GPIO pin.

I came to this board in the hopes of getting some detailed advice on
the exact resistors and diodes needed with the ULN2803. I originally
chose the ULN2803 because I planned to drive the relay directly from
the GPIO pins of a 3.3v microprocessor, and purchased 3.3v coil relays
for the prototype for the same reason. Advice on the best devices and
best way would be appreciated now that they will be driven by the
output of an HCT574.

Thanks in advance to anyone who can provide some advice.
Here is an interesting part that uses an SPI four wire interface to the uP
and it has 8 MOSFET outputs each capable of 350 mA or more, and RdsOn of
about 1.5 ohm. Each additional bank of 8 outputs requires only one
additional IO pin.

http://www.st.com/stonline/products/literature/ds/9659/l9848.htm

Paul
 
On 2010-01-29, rei <dickillyes@gmail.com> wrote:
I am a microprocessor programmer specializing in the Zilog Z8 family.
In the past I have done several boards for controlling high speed
processes. I like the Z8 because of its large number of registers and
on chip features. My current project will use the Z8F6421.

I am working on a board that will control greenhouses. I have no
training in electronics but over the years have learned all I needed
to know from app notes.

However, all my previous projects were completely digital. I now need
to control a large number of relays. I have no experience or
education in this area, and am having trouble understanding the
information I am finding.

I originally planned to control the relays directly with GPIO pins,
but now am leaning toward 74HCT574's and a 74HCT138 to multiplex the
pins, since the number of needed relays grows daily.
sort of a build-your-own bit array.

haw about using one or several chained 74HCT595 to multiplex the pins
and just load the data in serial, especially if you don't need
sub-millisecond response times.

only takes three microcontroller pins.

if you've got an unused USART or SPI you can use that, else bit-bang
works fine.

I am looking at darlington arrays such as the ULN2803 but don't know
how to determine the added resistors and diodes.
the ULN2803 seems to be designed for 5V cmos it has the resistors and
diodes internally, however from the datasheet it should wok OK on 3.3V
CMOS as long as there are no other loads on each pin.

I also want the driver to drive a led which will turn on when the
relay is activated,
wire it parallel with a suitable series resistor parallel to the relay coil

and want to use a zener to sense the presence of
24v AC voltage at the output of each relay. There will be a fuse at
each relay and I see the zener at the relay end of the fuse. I plan
to run the zener output into a 74HCT251 and sense AC activity with a
GPIO pin.
you could use a blue LED with a regular diode (eg 1n914) anti-parallel
instead of the zener and get a visual indicator for free.

I came to this board in the hopes of getting some detailed advice on
the exact resistors and diodes needed with the ULN2803. I originally
chose the ULN2803 because I planned to drive the relay directly from
the GPIO pins of a 3.3v microprocessor, and purchased 3.3v coil relays
for the prototype for the same reason. Advice on the best devices and
best way would be appreciated now that they will be driven by the
output of an HCT574.
the ULN2803 output, being a darlington doesn't go all the way to ground
(goes to about 0.7V), but your relays should still function with 2.7V on
the coil.

I'd consider using a shift register instead here too, pulse the latch
pin during the peak of the AC and then read off the results, possibly
using the same clock the 74HCT595 uses.

--- news://freenews.netfront.net/ - complaints: news@netfront.net ---
 
On Fri, 29 Jan 2010 13:09:58 -0600, "rei" <dickillyes@gmail.com> wrote:

I am a microprocessor programmer specializing in the Zilog Z8 family.
In the past I have done several boards for controlling high speed
processes. I like the Z8 because of its large number of registers and
on chip features. My current project will use the Z8F6421.

I am working on a board that will control greenhouses. I have no
training in electronics but over the years have learned all I needed
to know from app notes.

However, all my previous projects were completely digital. I now need
to control a large number of relays. I have no experience or
education in this area, and am having trouble understanding the
information I am finding.

I originally planned to control the relays directly with GPIO pins,
but now am leaning toward 74HCT574's and a 74HCT138 to multiplex the
pins, since the number of needed relays grows daily.

I am looking at darlington arrays such as the ULN2803 but don't know
how to determine the added resistors and diodes.

I also want the driver to drive a led which will turn on when the
relay is activated, and want to use a zener to sense the presence of
24v AC voltage at the output of each relay. There will be a fuse at
each relay and I see the zener at the relay end of the fuse. I plan
to run the zener output into a 74HCT251 and sense AC activity with a
GPIO pin.

I came to this board in the hopes of getting some detailed advice on
the exact resistors and diodes needed with the ULN2803. I originally
chose the ULN2803 because I planned to drive the relay directly from
the GPIO pins of a 3.3v microprocessor, and purchased 3.3v coil relays
for the prototype for the same reason. Advice on the best devices and
best way would be appreciated now that they will be driven by the
output of an HCT574.

Thanks in advance to anyone who can provide some advice.
---
View in Courier:


+5V
|
+------+-----+ 24VAC
| | | |
ALLEGRO | [R] | O
A6276 | | | |
+-------+ [DIODE] [LED] [COIL]- - -|
| _ | |A |K | O--> |
SIN>--------------|SDI Q0|----+------+-----+ |
| _ | +--------->24OUT
HFCK>-+-----------|> Q1| |
| | | [R]
LE>---|-+---------|LE Q2| |
| | |__ | [DIODE]
GND>--|-|-+-------|OE Q3| |
| | | | | +----+-----+---+
| | +--[R]--|REXT Q4| | |K |+ |
| | | | | | [ZENER][CAP][R]
| | | | Q5| | | | |
| | | | | | +-----+---+
| | | | Q6| | |
| | | | | | GND
| | | | Q7| |
| | | | | | HC165
| | | | SDO|-+ | +-------+
| | | +-------+ | +---|DO |
. . . . . .
. . . . . .
. . . . . .
| | | | FROM ZENER>-----|D7 |
| | | +-----------+ | |
| | | | A6276 ľC I/O>----|> |
| | | | +-------+ |_ |
| | | | | _ | ľC I/O>----|L/S |
| | | +-|SDI Q0| |__ |
| | | | _ | GND>---O|CE |
HFCK>-+-|-|-------|> Q1| | Q7|-->ľC I/O
| | | _ | +-------+
LE>-----+-|-------|LE Q2|
| |__ _ |
+-------|OE Q3|
| | _ |
+--[R]--|REXT Q4|
| _ |
| Q5|
| _ |
| Q6|
| _ |
| Q7|
| |
| SDO|
+-------+

I'm a little pressed for time, so I didn't show the 24V detect as well
as I could have, sorry.

Basically, assuming you've got a ground referenced 24V, the state the 5V
Zeners will be broadside loaded into a shift register and serial shifted
out, so mapping the Zeners to clocks will tell which Zeners are hot and
which aren't.

On the front end, the 6276's are serial-in parallel out shift registers
with outputs that can sink up to 90 ma each. Their REXT's are connected
to resistors chosen to supply the current needed by the relay and the
LED.

High efficiency LED, BTW so the bulk of the current can be used to drive
the relay.

Here's the data sheet:

http://www.allegromicro.com/en/Products/Part_Numbers/6276/6276.pdf

JF
 

Welcome to EDABoard.com

Sponsor

Back
Top