I need to use an arduino to control a bank of switches that will connect and disconnect a series of low voltage contacts together for a circuit bending project. This wouldn't be the sort of large relay that you would use to turn on and off appliances or devices that use mains power.
It's probably not important, but I'll be controlling the switches with input from a wii nunchuck. I'm hoping I can tweak existing code I've found online for that side of the project.
Very basic, older childrens musical toys can often be cross circuited to make very strange and interesting sounds.
Specifically, the Casio Sk-1, an 8-bit sampling keyboard from the 80's makes incredibly bizarre sounds when you connect the pins on two of it's ic chips. Many people have made experimental instruments by connecting patchbays to the pins on these chips, and then making connections by plugging wires into the patchbays.
A few people have used old atari- style joysticks to randomly connect the pins on the chips. you can do this directly since the old atari joysticks worked by connecting its pins together depending on which direction you push it.
To use a more interesting controller, like a wiimote, which sends out data, I'll need a microcontroller to switch on and off the connections inside the Casio.
I’ll follow on with another message, but in short, I would try to use an opto-isolator.
If I understand correctly, you want to turn switches on and off with the Arduino's digital outputs. If so, you could use an opto-isolator like this one:
It's available from Mouser, though it's a pretty generic component and could be found many places.
The way it works is that you would connect a digital output to pin 1 of the opto and connect pin 2 to ground. When the the digital output of the Arduino goes HIGH, current flows through the LED (pins 1 & 2). The light closes the transistor switch, connecting pins 4 & 5. It's very similar to an opto relay.
PS, I'm new to Arduino and the above was my first post, so I wasn't allowed to insert the web pages as hyperlinks.
Excellent, that sound like exactly what I need.. ;D
would I need one opto-isolator for each switch?
I think you may be able to buy multi-channel ones, but the single channel modules are pretty cheap. Here's another one:
I've used this Digi-Key part # 306-1135-ND, for low voltage switching where I couldn't tolerate any voltage drop at the switch. It has a 5 V @ 10 mA coil and is very compact. The down side is that it costs $6.50 in singles.
If you can tolerate ~10 ohms of contact resistance and if the voltage levels you are switching are not too high, any number of CMOS analog switches will do the job well and are pretty inexpensive.
Maybe you can measure some voltages for us?
It doesn’t really matter, to be honest, since what I am doing is short circuiting the chips. Resistance in the connections does give you interesting variations, but there’s not an exact target I am going for in any of the connections.
In that case, an analog switch is the way to go. The optoisolators are not “switches” in the sense that you want.
so how would the arduino trigger a switch... a magnetic reed? and what kind of a component am I looking for... something that will do what was described above, let me do a digital write and then cause two other contacts to be connected?
Sounds like a small 5vdc reed relay is what you are looking for. Arduino I/O pin powers the rely coil and the relay's contacts are wired to perform the task. There are small 5vdc relays that can be directly driven from an Arduino output pin but you should wire a reversed biased diode across the relay coil for transient protection.
I looked around a little for articles on circuit bending with the SK-1. The ones I found used mechanical switches but that doesn't mean you can't use electronic ones.
If you use relays like I mentioned earlier, your application will work just like the ones with mechanical switches except you will be controlling them with your Arduino.
There's probably no reason why it won't work with analog switches, though. I would try a CD4016, Digi-Key part #CD4016BCN-ND, quad analog switch. They only cost $0.50 and you get 4 switches in the package.
To control the relay, you would connect one side of its coil to a digital pin and the other side of the coil to Gnd. Write a HIGH to turn it on and a LOW to turn it off. Put a 1N4148 diode with its cathode to the digital pin and the anode to Gnd to protect the Arduino pin. If you use the relay I listed, it has the diode already built in.
To control the 4016, you would connect one of its control inputs to the digital pin and in your program, treat it like the relay. Its in/outs are symetrical, so hook them to your SK-1 pins however you want.
Thank you! I’ll try that.
No problem. Let us know how you make out.
Wiley, when you get a chance, check out this:
and similar analog switches. Frankly, I'm not sure if something like this would work for circuit bending, but from what I've seen so far online, it looks worth considering anyway.
You could start here, http://www.maxim-ic.com/products/switches/, and take a look at several types of switches that are easy to control with an Arduino.
While from what I can make of that chip makes it look suited to the job because of all the connections it could handle, I'm a little worried that working with it would be beyond my skill level. I'll try and read a little further.
That crosspoint switch makes my eyes cross too.It'll probably seem a lot less mysterious as you work with the Arduino and simple switches. In the meantime it's normal to be a little dazed and confused. :)
I went ahead and ordered some of the CD4016BCN-ND chips, I'll let you know when they come. I can tell I am going to need help.
I am also thinking of ordering a smaller arduino to control the switcher. It seems like a waste of space and processor power to put my duemillanove inside a casio.
Maybe I can prototype it with the duemillanove and my protoboard and then use the arduino pro mini inside the keyboard?
I’m curious to see how the analog switches work in this application. Definitely keep us posted.
I think the Pro Mini is a good idea unless you think you’ll need a shield and then I would go with the Pro. There is no cost difference. In either case, don’t forget the USB programming interface if you don’t already have one: