Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Delay on Comparator output

Status
Not open for further replies.

prprog

Member
On the attach circuit when the piezo disc is hit the LED lights immediately. Ok. How do I make the LED to light but with a delay based on how much voltage the piezo generates? If I hit it hard I need a short delay, if hit softer the delay will be longer. I though a capacitor/resistor will get this behavior but so far it is not working at all. I prefer not to used a 555 IC , but just comparators.

It is ok if I need to use 2 comparators. Actually this is what I want.

Thanks,
 

Attachments

  • comparator1.GIF
    comparator1.GIF
    8.8 KB · Views: 302
On the attach circuit when the piezo disc is hit the LED lights immediately. Ok. How do I make the LED to light but with a delay based on how much voltage the piezo generates? If I hit it hard I need a short delay, if hit softer the delay will be longer. I though a capacitor/resistor will get this behavior but so far it is not working at all. I prefer not to used a 555 IC , but just comparators.

It is ok if I need to use 2 comparators. Actually this is what I want.

Thanks,
What delay range do you want?
 
Delay time

At this point is only experimental. I really don't have a delay range. When the piezo is hit hard it must be instantaneous, but if hit soft the delay can be less than a second (but I can not said how precise).

Thanks,
 
a peak detector into an integrator into the comparator.

The peak detector "stores" the strike force which controls the integrator ramp to give you a variable delay, all in analog. You could do it all with a single quad opamp.
 
Last edited:
Delay on comparator

a peak detector into an integrator into the comparator.

The peak detector "stores" the strike force which controls the integrator ramp to give you a variable delay, all in analog. You could do it all with a single quad opamp.

Can you show me how to build (circuit) the peak detector and integrator ramp ? Can I do this only using a comparator (LM339N)?

Roff -> I will turn on 2 analog switches (4066) , with a delay.

Thanks a lot to ALL.
 
Can you show me how to build (circuit) the peak detector and integrator ramp ? Can I do this only using a comparator (LM339N)?

Roff -> I will turn on 2 analog switches (4066) , with a delay.

Thanks a lot to ALL.
But how long do you want the switches to remain on? With the circuit described by ubergeek63, they will stay on forever, theoretically.
 
But how long do you want the switches to remain on? With the circuit described by ubergeek63, they will stay on forever, theoretically.

They must just turn on and turn off almost immediately. Hit the piezo and turn switch one them turn switch two (with the delay determine by how hard the piezo was hit) and both switches turn off.

Thanks
 
They must just turn on and turn off almost immediately. Hit the piezo and turn switch one them turn switch two (with the delay determine by how hard the piezo was hit) and both switches turn off.

Thanks
So does switch one stay on until switch two turns on?
You also need to realize that, once switch two turns on, it is possible to turn it off in less than a microsecond. A microsecond is one millionth of a second. I have a feeling you don't want it to be that short.
Instead of having to drag this out of you, one excruciating detail at a time, why don't you tell us what you are really trying to do. Give us the big picture, not just your idea of how you think it should be implemented. We might actually be able to design a circuit for you if we knew what you were trying to do.
Look over this web site. There are some valuable ideas there.
 
Last edited:
So does switch one stay on until switch two turns on?
You also need to realize that, once switch two turns on, it is possible to turn it off in less than a microsecond. A microsecond is one millionth of a second. I have a feeling you don't want it to be that short......

Thank a lot for your interest and patient. What I am trying to do is this: I have the inwards of a MIDI keyboard. It is based on 2 switches per key-> the volume is determine by the velocity (time) it takes from 1 switch to the other. So, what I want is to simulate the same behavior using a piezo disc - 2comparators and 2 analog switches (4066). If possible I prefer to use just these 2 IC's.

Thanks,
 
OK. Unfortunately, I know nothing about MIDI. Can you post a link to a document which explains the function of these two switches, along with the voltage levels that will be applied to the 4066? It's impossible to correctly guess what you need.
 
OK. Unfortunately, I know nothing about MIDI. Can you post a link to a document which explains the function of these two switches, along with the voltage levels that will be applied to the 4066? It's impossible to correctly guess what you need.

Hi Ron,

Sounds like he's trying to emulate a velocity sensitive keyboard - these have two switch contacts under each key, and how hard you hit a key is measured by the time taken between the two closures. The harder you hit a key, the shorter the closure time between the two.

So I imagine he's wanting to use a piezo sounder as a sensor to connect to a keyboard IC - presumably as a drum type sensor?.

Assuming he's trying to make electronic drums?, there are loads of examples about that use peizo sensors are output MIDI via a PIC.
 
But how long do you want the switches to remain on? With the circuit described by ubergeek63, they will stay on forever, theoretically.
Not really... the "on time" would depend on the "leakage" resister across the peak detecting cap. It obviously has to be significantly longer than the longest delay.

It could easily be made to "flash" by feeding back the comparator output through a diode.
 
Not really... the "on time" would depend on the "leakage" resister across the peak detecting cap. It obviously has to be significantly longer than the longest delay.

It could easily be made to "flash" by feeding back the comparator output through a diode.

Can you expand on the "made to flash by feeding back the comparator output through a diode" idea.? Can you explain it further?


Thanks
 
Not really... the "on time" would depend on the "leakage" resister across the peak detecting cap. It obviously has to be significantly longer than the longest delay.
That's why I said "theoretically". Perhaps i should have said "ideally".

It could easily be made to "flash" by feeding back the comparator output through a diode.
We need to get some idea of how long he wants each pulse to be. I'm assuming that the first one is just the duration of the pulse from the piezo transducer, and the delayed pulse should be of similar duration.
 
Last edited:
That's why I said "theoretically". Perhaps i should have said "ideally".

We need to get some idea of how long he wants each pulse to be. I'm assuming that the first one is just the duration of the pulse from the piezo transducer, and the delayed pulse should be of similar duration.

That is a correct asumption on how long the pulse to be. The first and the delayed pulse should be of similar duration.

Thanks,
 
Do you know what voltage levels the CD4066 switch pins will be connected to?

No I don't know the voltage levels but...we can assume it will work since the 4066 will be a substitute to what normally is a switch. Also I breadboard the attach circuit and it work fine at activating the first switch (and the second switch if the piezo is hit hard), but if hit softly the second switch is not activated at all. This is what I trying to solve. Any suggestions?


Thanks a lot,
 

Attachments

  • Piezo_touch_sens2.GIF
    Piezo_touch_sens2.GIF
    10 KB · Views: 174
The 4066 only acts as a switch over a certain voltage range. You should check the data sheet, but it's probably only from Vss to Vdd.
 
Status
Not open for further replies.

Latest threads

Back
Top