Comparator - percussive switch

Status
Not open for further replies.

prprog

Member
Hi - first I will like to thanks all for such a wonderful forums. I got up to this point on this circuit thanks to many of you.

At this point the attach circuit behavior is almost what I need. The idea is to hit the piezo sensor, a soft hit will make the electronic switches in turn with a long delay. A hard hit will turn the electronic switches at the same time. This is connected to the inwards of a MIDI keyboard , it generate MIDI noted with a "velocity" value based on how hard I hit the piezo.

My next step, this is where I need some help, is to calibrate the circuit to operate better. I mark the areas of the circuit were I had find that changes (in the resistance) change the behavior of the circuit. Any suggestion on how to improve the circuit? (I need it to have more sensitivity to the hit of the piezo - It is right now mounted under a piece of wood "like a xylophone bar")

Thanks
 

Attachments

  • Piezo_touch_sens2.GIF
    10 KB · Views: 167
Comparator

Hi prprog,

I guess your sensitivity is set far too high. The piezo output signal must be more than 454mV to change the output high, which is already high by the 1K resistor you tied to VCC.

First: omit the 1K resistor from pin 2 to VCC. Second: change the value of the voltage divider at pin 4 (inverting input) To increase the sensitivity decrease the value of the 10K resistor (now between the 100K resistor and pin 4)

I don't have any experience with piezo devices, but my guess is just a few millivolts output when touching them.

To switch immediately when the piezo is hit hard you must not forget a rectifier diode between the output of the first comparator and the input of the second one. Otherwise the cap will discharge into the first stage comparator during the pause caused by AC of the piezo.

Attached is a small schematic for further experiments. Note the 1M resistor parallel with the 1µ electrolytic cap. It will discharge the cap slowly. Change to a smaller value to increase discharge rate.

Boncuk
 
Last edited:
Thanks Nigel, great web site.

Boncuk thanks a lot - I will like to follow your recomendations. Sorry to ask , can you clarify the values for the resistors: the pot of 2k5 means? R5 (9K1 = ???) . R6 = 900 ohms right ???.

Thanks a lot.
 
Thanks Nigel, great web site.

Boncuk thanks a lot - I will like to follow your recomendations. Sorry to ask , can you clarify the values for the resistors: the pot of 2k5 means? R5 (9K1 = ???) . R6 = 900 ohms right ???.

Thanks a lot.

The pot is 2500R,, 9K1 =9100R,, 900R= 900R
 
Comparator

Hi prprog,

first an edit: The data sheet uses a pullup resistor in all applications of the comparator circuit, but never below 3K. Some of them use 3K and some use 10K. Just take an average and use 6.8K (nearest to average standard value)

The voltage divider can be composed of any value resistors. They shouldn't be of very high value though and cause a voltage drop of 400 to 500mV at pin6 of the LM339. It would be a good idea to make the setpoint variable as shown for the first part. (e.g. replace R5 (9K1) by 8K2 and for R6 use a combination of a fixed value resistor of 470R and a trimpot of 1K.)

BTW, clicking on the opened picture once more will magnify it and all values will be clearly readable.

Boncuk
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…