2
\$\begingroup\$

I have a rookie question concerning making an electronic circuit.

I'm attempting to hack an electronic piano to read the keystrokes into an arduino and do stuff with it. On opening the piano I found two pins per key that, when I put my multimeter to them, generate around 2 volt when the key is pressed. So I soldered wire to these to connect to a breadboard (see picture 1).

The second picture shows the circuit I made for one sensor. This works perfectly, I can "analog read" the force sensor; I get values of around 900 when a key is pressed, and values less than 70 when the key is not pressed.

However, when I connect a second force sensor (third picture), I'm getting the following problem: When I press either of both keys, they both sound. When I disconnect their GND's, it's not the case anymore. So apparently a shared ground makes that generating current on one force sensor-circuit, also puts current on the second one, making it sound?

Pressing one key also makes the second sensor read 250 even though it's not pressed.

I guesss I have to separate some things somewhere, but I have no idea what. Or should I put a diode somewhere in there?

I hope I'm making this clear. Thanks in advance for any help!

PS. I don't need the velocity of the note, just whether or not it's pressed. If all else fails I'm gonna try and connect push buttons to the keys but I'm sure there's a way to hack into the existing circuit...

Figures

enter image description here

enter image description here

enter image description here

\$\endgroup\$
  • \$\begingroup\$ Pictures (links) are missing! \$\endgroup\$ – clabacchio Feb 18 '12 at 18:21
  • \$\begingroup\$ I'm sorry, I realized right after I posted it, I included them just now :) \$\endgroup\$ – Dyte Feb 18 '12 at 18:24
  • \$\begingroup\$ Apparently I can't post more than 1 hyperlink. Pictures: artistieknest.com/1.jpg artistieknest.com/2.jpg artistieknest.com/3.jpg \$\endgroup\$ – Dyte Feb 18 '12 at 18:31
  • \$\begingroup\$ Hmm, I'm afraid I'm not quite following.. Closing at a shallower angle? So I should be measuring the impact in a different way than I am now...? All I did now was putting a multimeter to the two pins of each key and discover there was around 2V when I press the key, if not, 0V. So I figure I should close the circuit with a resistor in between, and draw off a current check signal leading to my arduino (before the resistor). But as I mentioned, trouble starts when I connect more than 1 sensor... \$\endgroup\$ – Dyte Feb 18 '12 at 23:06
1
\$\begingroup\$

If your keyboard has MIDI output, you could just read that directly with your Arduino I think. See http://arduino.cc/en/Tutorial/Midi and http://arduino.cc/playground/Main/MIDILibrary. Might be a more straightforward / non-invasive approach.

\$\endgroup\$
  • \$\begingroup\$ It does have midi, but I remember I couldn't get a signal last time I tried connecting it to my pc... (it's a pretty crappy keyboard) Could have had many other causes though, so this is definitely worth a shot! Thanks! \$\endgroup\$ – Dyte Feb 18 '12 at 23:13
  • 1
    \$\begingroup\$ Keybaird is very likely row & column scanned. Neither side of a switch is ground connected. Say you have an 8x8 matrix - All high may be put out on the 8 rows and a high on a column shows which column a closed switch is in. Then all highs are put out on columns a a high on the 8 rows show which row a closed switch is in . Now you have row and column. OR you enliven a row at a time and look at the columns to see where the pressed switch is. \$\endgroup\$ – Russell McMahon Feb 18 '12 at 23:56
  • 1
    \$\begingroup\$ @Dyte see arduino.cc/playground/Main/KeypadTutorial for what Russell is talking about \$\endgroup\$ – vicatcu Feb 19 '12 at 1:10
  • \$\begingroup\$ Interesting. I discovered there are actually two series of 6 wires leaving the keyboard to the control panel (see: www.artistieknest.com/4.jpg and www.artistieknest.com/5.jpg). This could make sense since a full scale consists of 12 notes... (but there are 5 in total) The connection of these wires on the control board looks like: www.artistieknest.com/6.jpg But I have no idea how to start testing them. For example, I know I need two poles to test stuff with a multimeter, but where do I put the second multimeter probe when I test one of these connections? This is all very new to me :) \$\endgroup\$ – Dyte Feb 19 '12 at 13:31
  • \$\begingroup\$ @Dyte well if indeed it is matrixed, pressing a given key would result in continuity (as measured with no power applied) between exactly two pins. You would have to hold down a key and check for continuity between every pair of wires, and the results of that data would reveal how your matrix is wired. \$\endgroup\$ – vicatcu Feb 20 '12 at 15:38
1
\$\begingroup\$

Okay, it turns out I was wiring the force sensors as piezo elements. They should be wired as resistors instead (they're "force sensing resistors" after all). So more like this:

http://www.artistieknest.com/images/forcesensorsnopiezos.jpg

But... even though I get a nice reading in the arduino now, I still have the problem that, when I connect 3 piano keys like this, pressing one of them makes the other keys sound also! Trying to figure out the reason for that, it must be through the 5V or the GND because I see no other possible connection between them. Maybe diodes at some point are needed here?

\$\endgroup\$
  • \$\begingroup\$ you should accept your own answer for completeness \$\endgroup\$ – vicatcu Mar 26 '12 at 16:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.