John
08-25-2010, 09:53 PM
Each MIDI CPU control terminal can accept input from a piezo trigger. Several wiring methods can be used.
The easiest method involves a simple NPN transistor circuit:
http://highlyliquid.com/support/img/midi-cpu/midi-cpu-piezo-npn.png
Here are the specific parts I have used:
Piezo Element: http://search.digikey.com/scripts/DkSearch/dksus.dll?lang=en&site=US&KeyWords=102-1127-nd&x=0&y=0
Rb = 220kohm
Q1 = KSP13 (Darlington)
The above circuit works pretty well. However, there are some drawbacks. Sometimes, a gentle strike to the piezo element generates a pulse which is too short to be detected by the MIDI CPU.
Also, if the piezo element is subject to a different kind of pressure--say, a slow, gentle finger press instead of a "staccato" strike, multiple on/off pulses can be generated, with corresponding MIDI messages.
To avoid "missed hits" and "double hits", we can groom the trigger signal with a 555 timer circuit as shown below:
http://highlyliquid.com/support/img/midi-cpu/midi-cpu-piezo-npn-555.png
The 555 timer is operating in "monostable" mode, which means that it generates a fixed-length pulse whenever the trigger input goes from high to low. The values of C1 and R1 determine the pulse length. There is tons of 555 timer info on the web if you want more information about how that works.
I used the values C1 = 2.2uF and R1 = 220kohm for a pulse length of roughly half a second.
This means any strike, even a soft one, will result in a 0.5s pulse from the 555 timer (and to the MIDI CPU control terminal). If the piezo generates "multple hits" within 0.5s, they will not result in additional MIDI messages.
Adjustment of R1 (say, by replacing it with a potentiometer) will allow us to adjust the pulse length.
Any pulse longer than a few ms should give the MIDI CPU plenty of time to "notice" the input activity. The triggering works very well with a ~4ms pulse from the 555 timer. (C1 = 2.2uF; R1 = 1.5kohm)
The easiest method involves a simple NPN transistor circuit:
http://highlyliquid.com/support/img/midi-cpu/midi-cpu-piezo-npn.png
Here are the specific parts I have used:
Piezo Element: http://search.digikey.com/scripts/DkSearch/dksus.dll?lang=en&site=US&KeyWords=102-1127-nd&x=0&y=0
Rb = 220kohm
Q1 = KSP13 (Darlington)
The above circuit works pretty well. However, there are some drawbacks. Sometimes, a gentle strike to the piezo element generates a pulse which is too short to be detected by the MIDI CPU.
Also, if the piezo element is subject to a different kind of pressure--say, a slow, gentle finger press instead of a "staccato" strike, multiple on/off pulses can be generated, with corresponding MIDI messages.
To avoid "missed hits" and "double hits", we can groom the trigger signal with a 555 timer circuit as shown below:
http://highlyliquid.com/support/img/midi-cpu/midi-cpu-piezo-npn-555.png
The 555 timer is operating in "monostable" mode, which means that it generates a fixed-length pulse whenever the trigger input goes from high to low. The values of C1 and R1 determine the pulse length. There is tons of 555 timer info on the web if you want more information about how that works.
I used the values C1 = 2.2uF and R1 = 220kohm for a pulse length of roughly half a second.
This means any strike, even a soft one, will result in a 0.5s pulse from the 555 timer (and to the MIDI CPU control terminal). If the piezo generates "multple hits" within 0.5s, they will not result in additional MIDI messages.
Adjustment of R1 (say, by replacing it with a potentiometer) will allow us to adjust the pulse length.
Any pulse longer than a few ms should give the MIDI CPU plenty of time to "notice" the input activity. The triggering works very well with a ~4ms pulse from the 555 timer. (C1 = 2.2uF; R1 = 1.5kohm)