Author Topic: Using piezo elements for a synthesizer pressure sensor  (Read 15681 times)

0 Members and 1 Guest are viewing this topic.

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 16152
  • Country: fr
Re: Using piezo elements for a synthesizer pressure sensor
« Reply #25 on: June 20, 2022, 10:45:02 pm »
My answer was not detailed, but I did mention that you'd need two sensors if those were only on/off sensors. And that's the most common implementation (because cheaper and more accurate) I've seen on keyboards.

You could do as you suggest but it would be less accurate IMO and probably more expensive if you manage to design something accurate and not requring any calibration.
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 6498
  • Country: de
Re: Using piezo elements for a synthesizer pressure sensor
« Reply #26 on: June 20, 2022, 10:57:15 pm »
Why do you go off on a tangent like this?

The OP wanted to use an existing piano keyboard.
Using its existing mechanism.

The option of designing an own keyboard or how a cheap Farfisa one is made is not even in the discussion.
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 16152
  • Country: fr
Re: Using piezo elements for a synthesizer pressure sensor
« Reply #27 on: June 20, 2022, 11:18:07 pm »
There's no tangent. I'm just saying how this is usually done, and measuring time between two on/off sensors at a fixed distance is much easier and accurate (and likely cheaper.) And equipping existing pianos with such detectors for "midifying" them is actually a thing. While I haven't looked at the existing kits for this, I'm pretty sure most of them work as I suggest.

Point is again, IMHO the kind of single-sensor solution you suggested will probably require calibration if you want something similar from key to key, while timing doesn't require any.

Now feel free to prototype anything else, to me the "tangent" would be to suggest something to the OP that would be trickier to get to work than what is usually done.
 

Offline Marco

  • Super Contributor
  • ***
  • Posts: 7115
  • Country: nl
Re: Using piezo elements for a synthesizer pressure sensor
« Reply #28 on: June 21, 2022, 12:06:41 am »
There's not a lot of room in between the hammer mechanisms to put sensors.
 

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 4889
  • Country: nl
Re: Using piezo elements for a synthesizer pressure sensor
« Reply #29 on: June 21, 2022, 04:33:57 am »
Mechanics aside the analog/linear hall effect sensor solution where it is placed underneath the key is capable of doing both velocity and pressure. But SiliconWizard is right that it needs calibration.

The way to do it is to determine voltage levels on which to switch state giving it three states. Assuming voltage reading is low when key is up
  • Level < x, key is off
  • Level > x and level < y, key is on the move so measure the time until on
  • Level > y, key is on and pressure reading becomes active

I have done this in the late eighties when I worked at STEIM in Amsterdam. See: https://www.recorderhomepage.net/history/innovations-in-recorder-design/ and search for Michael Barker. I still have "analog" pictures of this project somewhere, but would need to dig them up.

I don't know what the relation is in an actual piano key between the velocity of the hammer and the down ward motion of the key and if it makes a lot of difference in sensing the motion of either the hammer or the key to determine velocity, but I would use the underneath the key option. Feels simpler to implement.

For pressure Yamaha used to use a single bar of material where the resistance changes with pressure. It was placed underneath the keys and resulted in channel pressure and not after-touch. Meaning a single reading for the whole keyboard versus a reading per key. How modern day keyboards do this I don't know. When it is done with some pressure sensor this would most likely also need calibration of some sort.
« Last Edit: June 21, 2022, 04:37:07 am by pcprogrammer »
 

Offline jonpaul

  • Super Contributor
  • ***
  • Posts: 3711
  • Country: fr
  • Analog, magnetics, Power, HV, Audio, Cinema
    • IEEE Spectrum
Re: Using piezo elements for a synthesizer pressure sensor
« Reply #30 on: June 21, 2022, 06:59:19 am »
Cher Monsieur bonjour (tp Silicon Wizard in France)

Yes existing keyboards can be retrofitted with various pressure sensitive material, and avoiding the cost, complexity and extra space needed if separate switches or other Sensors were fitted.


One can imagine a long sheet of sensitive material printed so each paino key is checked for pressures, duration time of strike, etc. with a multiplexing controller.

This would seem to be a practical solution for a production keyboard.  Perhaps someone in our clever group can DIY  a similar keyboard.

Cordialement


Jon




The Internet Dinosaur..
passionate about analog electronics since 1950s
 

Offline BrianHG

  • Super Contributor
  • ***
  • Posts: 8352
  • Country: ca
    • LinkedIn
Re: Using piezo elements for a synthesizer pressure sensor
« Reply #31 on: June 21, 2022, 07:11:35 am »
Laser scanner trigger system on the hammers?
Something like 1 scanning laser & MCU for every 8-16 hammers with velocity and sustain reading.
I heard of such scanners for MIDI harp interfaces.
__________
Follow me for 3 Classic Fitness Playlist Songs from the '70s to 2010s, Delivered Every Other Day!
www.linkedin.com/in/brianhg-ocean-fitness www.facebook.com/profile.php?id=61573174078303
 

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 4889
  • Country: nl
Re: Using piezo elements for a synthesizer pressure sensor
« Reply #32 on: June 21, 2022, 07:56:16 am »
Sure buying a normal synth is easier and maybe cheaper but where is the fun in that :)

An option for working with the piezo element is to not use the peak detector but read the levels with an ADC on a MCU. ARM-Cortex devices are fast enough to handle multiple channels and in the code you can derive both velocity and on state of the key. The off state can't be determined because the hammer bounces back after the strike, so you still need another way to detect the release of the key.

Online RoGeorge

  • Super Contributor
  • ***
  • Posts: 7172
  • Country: ro
Re: Using piezo elements for a synthesizer pressure sensor
« Reply #33 on: June 21, 2022, 07:56:36 am »
idk I'm still kinda into the piezo idea, although after thinking up of a circuit that would make multiplexing the keys possible with such a setup... I'm starting to think it's just easier to buy a normal synth... and more reliable probably

It would be cheaper anyway, and also more reliable, to buy a MIDI keyboard or a full synth than to convert the mechanical piano keys, no matter what sensors you'll use.

The main advantage of the piano would have been to preserve the feeling of pressing a piano key, which feels different to the touch than when pressing a MIDI/synth key. 

If you buy a new keyboard, preferably choose one with velocity and after touch capability, the cheapest ones only have on/off.  Unless you want to make a carrier out of this, for a beginner on/off keys are usually enough.
« Last Edit: June 21, 2022, 08:02:26 am by RoGeorge »
 

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 4889
  • Country: nl
Re: Using piezo elements for a synthesizer pressure sensor
« Reply #34 on: June 21, 2022, 09:44:39 am »
There are a couple of ways to approach the multiplexing to reduce the needed number of I/O pins.

Get a bunch of 74HC4051 or CD4051 and make an analog multiplexer to bring down the number of piezo lines connected to the MCU. The problem here might be the scan speed becoming to low, because you have to sample more separate signals with few ADC's

Get a bunch of cheap MCU's with multiple ADC's and analog input channels and connect the MCU's in a serial chain. The last MCU can spit out the MIDI and the others generate and pass through the data on a higher speed.

Offline tooki

  • Super Contributor
  • ***
  • Posts: 13393
  • Country: ch
Re: Using piezo elements for a synthesizer pressure sensor
« Reply #35 on: July 12, 2022, 11:02:30 pm »
There's not a lot of room in between the hammer mechanisms to put sensors.
Indeed. That’s why the best digital pianos (the kind where the entire key and hammer mechanism is present, just without any strings to hit) use fiber optic optocouplers to detect speed. Yamaha’s uses 4 per key IIRC.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf