Pages: [1]   Go Down
Author Topic: Controlling an 8ch IC switch  (Read 757 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 10
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

I'm trying to determine if it is possible to control an 8 channel switching IC (or 2 quad channel switching IC, etc) using 8 momentary switches controlling an arduino duemilanove. I understand what is happening in the example code where a switch is being to pin 2 is being used to control an LED on pin 13, but I am a bit concerned as there is only 6 analog input pins.

Would it be easier to use a different way to control the switch?

Thanks
Logged

Greenwood, Indiana
Offline Offline
God Member
*****
Karma: 0
Posts: 508
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


You have limited I/O on the Arduino but if you don't need to do much else 8 in and 8 out are possible.  Analog I/O is even more limited but to control switches or read buttons it's not needed and can act as digital I/O

http://www.nxp.com/pip/74HC_HCT4316_CNV.html

You can use 8 of the Arduino digital outputs to control 8 channels on two chips. If you're feeling frisky you can use a serial in parallel out IC and get less I/O pins to control 8 OR MORE digital  outputs which will control 2 OR MORE quad bilateral switches. You do have to match the signal you want switched to the quad bilateral switches.

If this is for analog this will work well. If it's for something simple like 'on/off' then you can use the Arduino pins or the pins driving a transistor or the pins driving a transistor driving a relay.

When switching some signals with relays  you will need to do a bit of research as switching high power audio tends to cause blown amps.

Messing with household AC can be lethal.

Button inputs are easy and documented. There are examples built in to the development environment.
Logged

If it was designed by man it can be repaired by man.

0
Offline Offline
Newbie
*
Karma: 0
Posts: 10
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks, Mr. Meval. What I had in mind was to route audio signals with the switches using momentary contact switches and the arduino duemilanove. You say that 8 in and 8 out is possible, and since there are 6 analog and 11 digital, would it be wise to set 6 analog and 2 digital pins as inputs, then other 8 pins for the outputs.

Using two sets of switching IC's you showed would work well, however I'm a little confused how to set them up. It looks like all 4 switches would be thrown when the voltage is high; I need to be able to control all 8 switches independently.

Something else I though of was would it be possible, instead of setting up 8 different inputs, hook up in input voltage to pin, then have a resistance applied when each button is pushed, a different resistance for each button (maybe two sets of four buttons). Then have the arduino read that voltage and do something with it. Say, 5 volts going in and have resistances set up to drop it to 4, 3, 2 or 1 volts. Depending on the volts read by the chip, it will output the voltage to a determined switching chip and change it. Repeat the same voltage for another set of 4 switches then only two inputs would be used...

Finally, the last thing I didn't think of before was that each switch will need to have an LED lighted when the switch is activated (and stay on until pushed again).

I feel like doing this for 8 switches is making it seem more complicated than it really is...
Logged

Pages: [1]   Go Up
Jump to: