Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Microcontroller interfacing multiple Relays

Status
Not open for further replies.

prevravanth

New Member
Hi,

I am using 89S51 and RS 232 for serial communication.

I drived relays using ULN2003 . I am using Embedded C

Now i want switch multiple relays and how to connect these multiple relays
using limited I/O pins.

Kindly help me ..

Thanks
 
Use a shift register with a built in latch. Something like the 74HC595 will work and you can cascade as many as you want.
 
kchriste said:
Use a shift register with a built in latch. Something like the 74HC595 will work and you can cascade as many as you want.
This is a simple solution as you only need 2 i/o lines. One for the data and one for the clock signal.

The data should be clocked into the SR as quickly as possible so that the relays don't chatter. The time to clock in all the data should be less than say one tenth of the relay operate time - or faster.
 
The 74HC595 that kchriste mentioned is a latching shift register, it has a built in storage register that holds the contents of the shifted data until a third line is toggled then the output latch is updated. It requires one extra I/O line for operation but the latch updates all the lines at the same time. Perfect for driving relays such as this to avoid any possibility of triggering the relay accidentally. You could operate it as a standard shift register by tieing the update to the clock line if needed.
 
Sceadwian said:
The 74HC595 that kchriste mentioned is a latching shift register, it has a built in storage register that holds the contents of the shifted data until a third line is toggled then the output latch is updated. It requires one extra I/O line for operation but the latch updates all the lines at the same time. Perfect for driving relays such as this to avoid any possibility of triggering the relay accidentally. You could operate it as a standard shift register by tieing the update to the clock line if needed.
Or he could use a non latching SR such as the 4014 or the 74HC164.

Another possibility would be to programme another PIC, such as a 16F84 or 16F628, etc. to receive data sent on one line and output it in parallel to drive the relays.
 
to reduce cost, and use a minimum number of I/o lines, using a 89S51 at 24 Mhz and a 74164 SR will work perfectly, the relays wont notice anything until the voltages are seteled down..

In your case send the data as fast as you can do it, the 74164 response will allways be much higher than the maximum output frequency of the uC at 24 Mhz.

good luck
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top