microcontroller that controls at least 20 relays?

This is a group to discuss all details on home automation, home security technology and related technologies.

microcontroller that controls at least 20 relays?

Postby sham85 on Thu Jun 02, 2005 4:11 am

:twisted:

Hi, im looking for a microcontroller/IC that can control at least 20 relays, i wonder if it even exists? im planning to control 20over appliances like TVs from those relays. Any ideas anyone?
sham85
 

Controls at least 20 relays

Postby Tomi Engdahl on Thu Jun 02, 2005 5:52 am

One idea would be to look for a microcontroller that has at least 20 I/O pins that you can set as output. No specific model comes to my mind, but I am pretty sure that some "bigger" microcontrollers with cases that have many pins have quite many I/O pins.

Other option is to use some external I/O IC or several ICs to implement the number of outputs you need. One IC that can used to implement 24 output pins is 8255 Programmable Peripheral Interface (PPI). It was traditionally the IC that the industrial PC IO cards were based years ago (when ISA bus was popular). One tutorial on this IC can be found at
http://www.boondog.com/%5Ctutorials%5C8255%5C8255.htm

There are also many other ICs that can implement I/O capabilitities with different kind of interfaces to microcontroller. When you don't need very high speeds (timings needs in milliseconds or slower) then the various ICs that connect to different serial buses sound promising. There are I/O ICs that connect to I2C bus, it is pretty easy to connect things to SPI bus, etc...

And there is always the traditional approach to use shift registers clocked with few signals... this is a popular way to contruct industrial electronics where you need many I/O pins. Just clock in the right data states to outptu controlling ICs and then latch the wanted state to output. For example 4094 IC souts for this, but there are many possibilities. With this kind of system, you can have almost any number of output pins by just adding more control ICs and updatign your software to handle more ICs.. For example with 4094 you get 8 outouts per IC.
Here is one example that uses this method to have many outputs (and also several inputs with other ICs):
DCIPLC(free) a virtual PLC.
http://home.scarlet.be/~dc11cd/dciplc.html
http://home.scarlet.be/~dc11cd/plc_sch.html

Image
Tomi Engdahl
Site Admin
 
Posts: 1839
Joined: Mon Oct 20, 2003 6:15 pm
Location: Espoo, Finland

Postby pebe on Thu Jun 02, 2005 6:42 pm

Another way would be to use three 8bit latches and a chip to select which latch was to be addressed. The uC would then only need an 8bit port and a 4bit port.
pebe
 
Posts: 94
Joined: Wed Oct 08, 2003 9:06 pm

Postby ebo_bro on Wed Jun 08, 2005 5:01 am

Here's my suggestion. you can place a uC in each appliances. Each uC have a specific address. In your program you can send a series of bits. This series of bits should contain a start bit, address byte/bits, command byte and an end bit. The number of appliance/remote place will depend on how long your address byte/bits is

You can set your uC to sleep until they receive a start bit. Each uC will confirm the address byte if it is for them. If programmed it right, only one uC will confirm and after it confirms it will execute the command you send. The end bit will turn back yur uC to sleep.

You can also do this wireless. You can use a cheap wireless mike. and set them to one freq.

Hope this help. I had done something similar to this (wireless)
ebo_bro
 
Posts: 13
Joined: Tue Dec 14, 2004 9:30 am


Return to Home Automation

Who is online

Users browsing this forum: No registered users and 6 guests

cron