Oops! Multiplexing relay board

I've got a 16 channel relay board that I was hoping to drive with a 74HC4067 multiplexer board. I only need one relay activated at a time. I've got the Mux working with a few LED's, but I've realized the relay board requires grounding each pin to activate the corresponding relay, vs. pulling each high (I'd assumed this). I don't think I can do that with the Mux board... but maybe I'm missing something? What's the best way to do this? Thanks!

I've got a 16 channel relay board

What board, do you have a link?

AFAIK, that IC is just a 16-pole selector switch.
Connect the “common” pin (pin 1) to +5, and the selected input/output will be connected to +5
Connect the “common” pin to ground, and the selected input/output will be grounded.
Leo…

edit
Beware. Although a 16-channel relay board has optos, it could be that it is NOT opto isolated.

Get an optically isolated relay board like below which should work easily with the mux.

http://yourduino.com/sunshop2/index.php?l=product_detail&p=156

zoomkat: Get an optically isolated relay board like below which should work easily with the mux.

http://yourduino.com/sunshop2/index.php?l=product_detail&p=156

Same difference. The optos on that board also have to be pulled low.

Those relay boards that require inputs to be puled low are in fact, opto-isolated.

Either way, they only require about 5 mA or less, and a HCMOS multiplexer with an “on” resistance of less than 100 ohms should be able to cope with that.

Except for the 16-channel boards. Both sides of the opto are connected to the same +5volt supply. The designer must have had a brain fart there.

Most boards have a 1k resistors, 1.2volt IR diode, and sometimes a 1.8v LED in series. 2mA is common. Leo..

Wawa: Same difference. The optos on that board also have to be pulled low.

Hmmm..., don't think so. I'd connect the mux common pin to the arduino 5v, connect the mux multi outputs to the optical isolator VCC inputs, connect the isolator outputs to ground, then let the mux switch the ~5ma current.

zoomkat:
Get an optically isolated relay board like below which should work easily with the mux.

http://yourduino.com/sunshop2/index.php?l=product_detail&p=156

Yes, that’s exactly the board I have. But 16 ch.

Wawa: Except for the 16-channel boards. Both sides of the opto are connected to the same +5volt supply. The designer must have had a brain fart there.

Most boards have a 1k resistors, 1.2volt IR diode, and sometimes a 1.8v LED in series. 2mA is common. Leo..

Is there any way (easy, obvious...) for me to know if this is the case? i.e. check for continuity between two pins of the opto-isolators? If not yet obvious, I'm sort of hanging on by a thread here, though I'm beginning to play with the Mux & a bunch of LED's, so at least I'll get more familiar with it. Only a little bit of time each evening, so this will likely be slow going. Thanks a bunch for help everyone.

zoomkat: Hmmm..., don't think so. I'd connect the mux common pin to the arduino 5v, connect the mux multi outputs to the optical isolator VCC inputs, connect the isolator outputs to ground, then let the mux switch the ~5ma current.

I think you're saying: mux "common" is what my board calls the "signal" pin. I understand the outputs & inputs, except not the isolator outputs: are you saying I need to reconfigure my board? Rewire the opto-isolators?

I also now see there's a Multiplexing forum, perhaps I should have put this thread there, though you are all being quite helpful.

Whoa, I actually have 2 16-relay boards, which I bought from 2 different vendors, and I see now that one has 12V DC relays and the other 5VDC. That’s maybe a little bit of a drag. I have a cheap “12V” wall wart I was using that I actually measured at 17V the other day: how worried should I be about my 5V relays? I happened to have connected that board first…

I think you're saying: mux "common" is what my board calls the "signal" pin. I understand the outputs & inputs, except not the isolator outputs: are you saying I need to reconfigure my board? Rewire the opto-isolators?

I think you are getting your 74HC4067 multiplexer board and relay board mixed up. Below is the mux and pin1 marked COM is the common pin. I don't think you need to reconfigure any thing on your boards, you just need to understand them. As to using your 5v board with 12v, just use a 7805 regulator chip to reduce the voltage from 12v to 5v.

http://cdn.sparkfun.com/datasheets/BreakoutBoards/Analog-Digital-Mux-Breakout-v11.pdf

zoomkat: Hmmm..., don't think so. I'd connect the mux common pin to the arduino 5v, connect the mux multi outputs to the optical isolator VCC inputs, connect the isolator outputs to ground, then let the mux switch the ~5ma current.

Please explain howto with the 16-channel Sainsmart relay board on this page. http://www.sainsmart.com/16-channel-12v-relay-module-for-pic-arm-avr-dsp-arduino-msp430-ttl-logic.html All opto LEDs have a common VCC. The 16 inputs of the board are the cathodes of the opto LEDs.

Why would there be a problem connecting the MUX common to ground. Leo..

edit The 16-channel board has an onboard 12volt/5volt switchmode supply that is [u]also[/u] connected to the opto LED VCCs.

zoomkat: I think you are getting your 74HC4067 multiplexer board and relay board mixed up. Below is the mux and pin1 marked COM is the common pin. I don't think you need to reconfigure any thing on your boards, you just need to understand them. As to using your 5v board with 12v, just use a 7805 regulator chip to reduce the voltage from 12v to 5v.

http://cdn.sparkfun.com/datasheets/BreakoutBoards/Analog-Digital-Mux-Breakout-v11.pdf

I don't think so, but... after referencing your datasheet, I see that what it marks "Common" my board marks "Signal"

Wawa: Please explain howto with the 16-channel Sainsmart relay board on this page. http://www.sainsmart.com/16-channel-12v-relay-module-for-pic-arm-avr-dsp-arduino-msp430-ttl-logic.html

For the record, that's pretty much my 16ch board, exc. that my 5VDC board has the "Low Level Input mark that one has, and the socketed Darlingtons. My other one has no such marking, soldered Darlingtons, and 12VDC relays.

Please explain how to with the 16-channel Sainsmart relay board on this page.

I can't see the manual as it is in a rar file. How about decompressing the manual and attaching it to a post. If all their isolator inputs are hard wired to a common VCC, then sinking the current is the only way to go.

I don't think so, but... after referencing your datasheet, I see that what it marks "Common" my board marks "Signal"

If the below is the mux you have, the the SIG appears to be the common (COM) indicated on the schematic and the Ti data sheet. The S0, S1.S2, and S3 would be what would usually consider signal pins.

https://www.sparkfun.com/products/9056

NOTE: The digital inputs from Arduino are Active LOW: The relay actuates and an LED lights whe the input pin is LOW, and turns off on HIGH. See the Wiki article for how-to assure relays do not activate at power-on time.

That may be a problem with active low setups. Not a fan of loss of signal/power causing a possible runaway situation on the relay side

I only know the 12volt-relay model. The one in the link. That one has a design fault. The optos are just ornaments. They do nothing. The only isolation you have (e.g. when switching mains power) is from the relays.

The inputs on that board have to be pulled low to activate the relays, because the positive side of all optos is connected to a common internal 5volt rail. I hope zoomkat will reply after looking at the schematic diagram, so we can confirm this.

To use [u]that[/u] 16-ch board, connect the MUX outputs to the relevant 16 relay inputs. The MUXs "COM" to relay board's ground. And the MUXs "VCC" and ground to Arduino's +5volt and ground.

Arduino ground also to relay board ground, and five output pins to the four MUX data pins and the "EN" pin.

Best to use a [u]regulated[/u] 12volt/1A supply for the relay board. You might find that all relays come on when you turn your Arduino off before you turn the relay board off (design fault).

If you want to use the board with the 5volt relays, post a link or a detailed picture. Leo..