Small, cheap actuators for keyboard

WARNING: extreme noobness below

I want to make an old keyboard i have play by itself. It doesn’t have midi or CV, so the only way i can use it is actually play it. I really suck at playing. So, instead of going for a special kit that costs ~250 euros to add midi to it, i thought that maybe it would be cheaper / more fun to but actuators under the keys.

The keyboard is a very simple one, it has no velocity sensitivity (so it’s either note on or off) and the keys work as simple switches. I don’t want the keys to actually move, i can remove them altogether, i just want to be able to control the synth with a sequencer. I have no idea about actuator specs, but here are some of the specs i (don’t) need:

  • no need for lots of power: i just want it to close a switch
  • no need for big range: even 3mm would be ok
  • small size: anything less than 7cm
  • a response time smaller than ~20ms
  • price: somewhere in the $1 range

when i googled to find actuator models, they all seemed to outperform the above specs and of course were more expensive than what i’m looking for.

thanks in advance.

I ran into a similar problem trying to interface a computer chess board with a robot arm, since to register moves you have to press down on the board squares to close switches under them.

If you want to go the mechanical route, the best actuators for you would probably be simple relays, which would replace the key switches. A relay is essentially a mechanical switch pulled closed by an electromagnet when you supply it with power. Radio Shack has some small relays for about $3 each, but since you need so little power you can probably find smaller cheaper ones on places like Digikey.

If you’re so inclined, a cheaper (and arguably better) way to go would be to control all of the keys digitally with a microcontroller. To do this you’ll need to figure out what actually happens when you close each switch.

If this sounds good to you, you could start just by looking at the wires or circuit-board traces connecting to each key switch. Do they all come together on one side? What is that one side connected to (i.e. battery ground, a resistor, etc.)? You could also take a volt-meter to the sides of the switch and compare them to each other and to ground when the button is and isn’t pressed.

My guess is that all of the key switches will connect together on one side, and that side will either be connected to power or ground, possibly through a single resistor. The other sides of the switches should feed individually into a control chip, and might be pulled high or low by a long bussed resistor, that looks like this:

This is just a guess however, your keyboard might operate on some completely different principle. Worse yet, it might multiplex signals from the different keys, making it difficult to press just one digitally. In that case, relays would be a MUCH easier way to go.

Of course, you’ll need to figure out either how you want to communicate with the microcontroller (probably over a serial connection to a computer), or how you’re going to provide current to the relays. In the end, I think interfacing with your MIDI sequencer might be the hardest part to work out!



Thanks for the reply. I want the keyboard to work without a computer. What i’m planning to do is make a small MIDI device using an Atmel microcontroller. What it will do is trigger the right actuator when it receives a MIDI note. I have that part kind of figured out (a friend of mine has lots of experience on making MIDI devices). Regarding current to the relays, i know how to produce a steady 5V DC for digital circuits from a wall wart, is this case similar? What kind of current are we talking about? Can you post a link to the relays you were describing?

Thanks again

This is the relay I was thinking of from Radio Shack. It’s still total overkill for keyboard buttons, but you can probably pick one up locally to play with.

Looking at the datasheet, you should be able to drive these directly from the I/O pins of an AVR microcontroller. The Datasheet says 24mA nominal current, but it also says 250 ohms coil resistance, which would draw 20mA at 5V, and the (less reliable) Digikey product page says 11.4mA coil current. Who knows. In any case, it should work. I have one of these SOMEWHERE around my office, but I can’t seem to locate it right now.

So, controlling these or similar relays with an AVR microcontroller should be super-easy, but they’re still going to add over $2 to the cost of every key you want to press. If you’re already using an AVR, and you already have one I/O pin per key to spare anyway (some AVR models come with huge numbers of I/O pins), I would recommend looking more into digitally faking out the key presses. You can probably do it with a 1-cent resistor for each key instead.


at first i thought i’d find some way to fake the key presses as well, but i think it’s more complicated than that. the keyboard is digital (actually it has digitally controlled analog oscillators) and the only thing going out of the keyboard PCB is an ancient ribbon cable (looks more like a computer power supply cable with more wires). also, i followed the PCB lines and noticed that all the same keys on different octaves lead to the same place on the PCB, so there must be some kind of circuit that decides about the octave. this is probably a proprietary way to handle key presses and there’s little chance i can mess with it. anyway, thanks for the advice and links. i’ll look into both possibilities, 2$ isn’t too much and i’d be fun to try it out.

Aah! Sounds like the lines are multiplexed. This makes sense of course from a manufacturing point of view, why use extra pins if you don’t need to. I didn’t want to mention this at first, but the chess-board square switches were multiplexed, and it was a HUGE PAIN to figure out how and fake it with an extra circuit and lots of logic chips. Of course, the board is one large membrane switch array, so I didn’t have room to squeeze in relays. If you don’t mind the expense, it’s going to save you a LOT OF EFFORT!

These same relays you can get at Radio Shack go for $2.21 on Digikey if you buy 25 (or $2.00 if you buy 50), but you can probably find lighter-weight ones that are even cheaper.


Here’s one that should do the job for $1.50 each, with quantity discounts for orders of 10 or more (and again for 50 or more, not sure how many octaves your keyboard has). If you’re running it at 5V, You can definitely drive these straight off of your AVR I/O pins too.


that looks great! i’ll need about 60 of them so it’s in my initial price range. thanks a lot!