Pages: [1]   Go Down
Author Topic: Read force sensors of the keys an existing electronic keyboard  (Read 833 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello there!

An rookie in electronics could use some help here =).

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 analogRead the force sensor and display them in my serial monitor; 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...


* 2012-02-18 01.32.44.jpg (55.16 KB, 500x451 - viewed 5 times.)

* pianosensor.jpg (38.82 KB, 526x545 - viewed 5 times.)

* pianosensors.jpg (40.12 KB, 470x485 - viewed 5 times.)
Logged

Dubuque, Iowa, USA
Offline Offline
Edison Member
*
Karma: 33
Posts: 2280
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Performing an analogRead() on multiple pins in succession can sometimes cause leftover charge from one pin to be read by the other. Try doing an analogRead() twice on a given pin and use just the second result.
Logged

Pages: [1]   Go Up
Jump to: