Hi all, I am looking for a part which can connect one of at least four pins to another pin, like a high tech switch. I have this Ipod controler which has four wires on it and when you connect certain wires it controls volume, play/ pause, next track, last track etc. I have a few 4051 multiplexers but as far as I can tell they can't function as a switch without, say, a transistor. Is there a part out there that I am overlooking or am I missing something? Thanks for your time.
I have a few 4051 multiplexers but as far as I can tell they can't function as a switch without, say, a transistor.
Sure they can, for sufficiently small currents. The 4051 connects at most 1 of the 8 input/output "channel" pins to the "common" input/output pin. A transistor would ruin the bi-directional nature of the transmission gates; with a 4051 you can have (small) currents flowing from either the common to the selected channel, or from the channel to the common (NOT true of a transistor!)
The typical ON resistance is about 250 ohms, but that should be OK for simulating button presses on anything moderately modern...
Thanks for the replies but I didn't explain it well enough for which I am sorry. If I have wires 1-4 that control the iPod, I need to be able to connect wires, for example, 1 and 2 or 1 and 3 or 2 and 4 or 3 and 4 etc. Thanks
Ok... how about 2 multiplexers?
Have the common pin of the multiplexers connected to eachother, and each of the 4 wires connected to both multiplexers.
The resulting control method would become 'select FROM wire and select the TO wire'.
You could try something like this.
Every ipod pin is connected to the inputs of four 4051's.
Then each 4051 is commanded to have one of the 4 pins connected to its designated pin 1-4.
(you would of course have to connect power, ground, enable lines low, unused Sel C lines line)
Not knowing anything about pins 1-4, its hard say if pullups or pulldowns might be needed.
for example, 1 and 2 or 1 and 3 or 2 and 4 or 3 and 4 etc.
If you need to connect any wire to any other wire, you can use two 4051-style chips with their common i/o pins connected together. one one you'd connect (for example) 1 to common and the other you'd select 2 to common, and 1&2 would be connected. (you can't use the 4052 dual 4:1 multiplexor, since the "select" lines are the same for each half; you need fully separate multiplexors.) (@crossroads: why did you need 4?)
if you need to connect any one wire to any SET of output wires, you need a "crosspoint switch" instead of a simple multiplexor.
I used 4 because the OP said he needed the pins to be able to connect to multiple places.
If we had more details the design could certainly be trimmed down.
This way, 1 can connect to 1,2,3,4.
2 can connect to 1,2,3,4.
3 can connect to 1,2,3,4.
4 can connect to 1,2,3,4.
Something I designed a while ago:
BTW, "Crosspoint switch" may sound exotic and expensive, which is true for chips that support large numbers of IOs at video bandwidth, but "simple" 4x4 switches like the ST M22100 are less than a buck from digikey and look pretty convenient to use...
Here's the thing: Using transmission gates directly controlled by an Arduino, whether individual gates in a '4066 package or arrays of transmission gates as in a crosspoint switch or a multiplexer like the '4051, requires the following:
You have to be able to establish a common ground between the Arduino and the target device.
If you are working with a 5V Arduino, the transmission gates must operate from +5 Volts. (Maybe a little more; maybe a little less.)
The signals on the pins that you want to connect must be between 0 volts and the operating voltage of the transmission gates.
You have to have a mindset that if, by some miscalculation in determining the previous three conditions, you end up damaging the Arduino or the target device, it's just another "learning experience," and not a major disaster. Note that unfortunate connections between an Arduino-controlled device and the Arduino can even damage the PC that the Arduino is connected to, as has been reported on this Forum from time to time.
Bottom line: To connect two pins on a device for which you don't absolutely know that you can establish all of the above conditions, a "metal-to-metal" solution may be what you want.
Simple combinatorial mathematics tells us that there are six possible ways to connect four pins, two at a time. Here they are:
This can be accomplished with six relays controlled by Arduino outputs. You won't be connecting any outside voltages to the target device, and the target will be electrically isolated from the Arduino circuitry and whatever else the Arduino is connected to (your PC, for example).
Footnote: To use transmission gates for making "contact" between pins on the target device, you still have to know the signal levels on the pins, and you have to supply the transmission gates with appropriate voltages.
You can use optical isolation between the Arduino outputs and the transmission gate control inputs. This is a little more involved than direct connections, but is safer, I'm thinking.
Ok, now that I am actually awake and thinking clearly here is what I made Control an iPod with the Arduino. The controller is using the basic iPod 0x0 serial protocol which only controls the basic features like play/pause. I am not sure how it works but there is not a microcontroler on the control board which makes me think that this shouldn't be too difficult to wire up. Maybe I am making this hader than it is but I am limited on arduino pins so I want to keep the pin usage down. Thank you all for being so helpful and for replying so quickly.