Arduino Forum

Using Arduino => General Electronics => Topic started by: Yarash on Jun 25, 2013, 10:30 pm

Title: Relays constantly on using a multiplexer.
Post by: Yarash on Jun 25, 2013, 10:30 pm
Hi

I am working on a project consisting of 8 relays.

Is it possible to use a multiplexer to control the relays

By cycling thru the channels and providing the power
Needed for a relay thru the multiplexer's common.

As far as i know it wouldnt be a problem to turn
Only one relay on, but if i use a multiplexer

Only one channel can output the voltage at a time.

I am pretty sure the relays respond much slower than
The Arduino's clock.

So i wonder if looping thru the 8 channels very fast
Could keep the relays on constantly?

If it would, should it damage the relays?

Is there a better yet simple way to do this?

Thanks.
Title: Re: Relays constantly on using a multiplexer.
Post by: johnwasser on Jun 25, 2013, 10:57 pm
The simple way is a serial-in/parallel-out shift register.  That gives you 8 separate outputs that can be individually controlled.

See: http://arduino.cc/en/Tutorial/ShiftOut
Title: Re: Relays constantly on using a multiplexer.
Post by: Grumpy_Mike on Jun 25, 2013, 11:03 pm
Quote
Is it possible to use a multiplexer to control the relays

By cycling thru the channels and providing the power
Needed for a relay thru the multiplexer's common.

It would be possible but absolutely stupid to use single dimension multiplexing to control any output. You get all the hassle of refreshing with absolutely zero advantage.

Quote
Is there a better yet simple way to do this?

There are lot and lots of better ways. Shift registers, latches, port expanders.
Title: Re: Relays constantly on using a multiplexer.
Post by: Yarash on Jun 25, 2013, 11:11 pm

Quote
Is it possible to use a multiplexer to control the relays

By cycling thru the channels and providing the power
Needed for a relay thru the multiplexer's common.

It would be possible but absolutely stupid to use single dimension multiplexing to control any output. You get all the hassle of refreshing with absolutely zero advantage.

Quote
Is there a better yet simple way to do this?

There are lot and lots of better ways. Shift registers, latches, port expanders.



Wouldn't it save power usage?

Using A shift register i must provide the power
To all relays combined, in my case i may multiply the relays to 64 in the future.
Title: Re: Relays constantly on using a multiplexer.
Post by: Grumpy_Mike on Jun 25, 2013, 11:17 pm
Quote
Wouldn't it save power usage?

No.
True holding current is less than pull in current, but you are using a relay so if power is a main concern then don't use a relay.

Quote
Using A shift register i must provide the power

Yes and so you must using a multiplexer unless your multiplexer can pass enough current which I think you will find it won't.
Title: Re: Relays constantly on using a multiplexer.
Post by: zoomkat on Jun 26, 2013, 05:02 am
Quote
Only one channel can output the voltage at a time.


You could use a latching multiplex chip like a 74HC259.
Title: Re: Relays constantly on using a multiplexer.
Post by: MarkT on Jun 26, 2013, 11:41 am


So i wonder if looping thru the 8 channels very fast
Could keep the relays on constantly?



Relays may  not tolerate high frequency AC drive, you'll get significant iron losses
(relay cores are soft iron rather than silicon steel laminate).

Furthermore you'd have to drive them at much higher voltage to get the right
average current, and your multiplexer wouldn't take that.

The correct approach is to use something like a 74HC595 shift register (which latches
output states) and have a drive circuit for each relay (presumably NPN transistor
and flyback diode.  ULN2803 provides 8-channels of such drive, so a 595 and 2803
together would be a common choice.  Check the voltage and current specs of your
relays of course.
Title: Re: Relays constantly on using a multiplexer.
Post by: Yarash on Jun 26, 2013, 12:12 pm



So i wonder if looping thru the 8 channels very fast
Could keep the relays on constantly?



Relays may  not tolerate high frequency AC drive, you'll get significant iron losses
(relay cores are soft iron rather than silicon steel laminate).

Furthermore you'd have to drive them at much higher voltage to get the right
average current, and your multiplexer wouldn't take that.

The correct approach is to use something like a 74HC595 shift register (which latches
output states) and have a drive circuit for each relay (presumably NPN transistor
and flyback diode.  ULN2803 provides 8-channels of such drive, so a 595 and 2803
together would be a common choice.  Check the voltage and current specs of your
relays of course.



Your reply is much appreciated.

Thanks.