Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

op-amplifier and a comparator..100points if you needed it :D

Status
Not open for further replies.

leoren_tm

Advanced Member level 1
Joined
Dec 19, 2005
Messages
466
Helped
11
Reputation
22
Reaction score
7
Trophy points
1,298
Activity points
4,305
site:www.edaboard.com piezo

i have this circuit, the output should be on 5V or 0V, its a ultrasonic receiver..
on the amplifier, i think theres no problem, i had a signal, but then after that...its a plain DC or almost DC..pls take a look and have some suggestion on how to redesign it./.
thanks to all
 

lm358 piezo

Tell more about the Rx transducer. I am not sure about the comparator too.
 

I would put a capacitor in series with with the transducer, 10nF or 100nF will do just fine.
I can't really see the point of R3 and C4 but I guess there must be a good reason why they are there.
If that doesn't work then I guess you need to come up with a circuit (understanding the concept of what this circuit should do helps a lot :) )
If a new circuit is needed I think the gain of the second stage may be a bit too high, if you really need a gain of 1000 maybe you could try to split it between the two stages (unless the noise contribution of the first stage is a problem and it really needs to be that way, input impedance can also be a limiting factor there but in that case you could try using a non inverting schematic at both stages (very high input impedance)).
 

    leoren_tm

    Points: 2
    Helpful Answer Positive Rating
I would check the gain of the opamaps and make sure the comparator is operating within the range it is designed for here.
 

Re: op-amplifier and a comparator..100points if you needed i

I expect, you have a piezo transducer (they should use a circuit symbol with a capacitor inside the circle for clarity), then it's O.K. to omit a decoupling capacitor at the input.

U1B can't achieve the gain of 100 set by the resistors, cause it has about 1 MHz GBW, resulting in a gain of 25 a 40 kHz for example, but 25 may be sufficient as well.

There's only one serious fault in the circuit to my opinion, U2 (that has an open collector output) is missing a pullup resistor, thus the output voltage is always zero. Install an 10 k or 100k resistor (the value creates different time constants for the switch output) to +5V at the output, and the circuit is operational.
 

    leoren_tm

    Points: 2
    Helpful Answer Positive Rating
Re: op-amplifier and a comparator..100points if you needed i

R00KIE said:
I would put a capacitor in series with with the transducer, 10nF or 100nF will do just fine.
I can't really see the point of R3 and C4 but I guess there must be a good reason why they are there.
If that doesn't work then I guess you need to come up with a circuit (understanding the concept of what this circuit should do helps a lot :) )
If a new circuit is needed I think the gain of the second stage may be a bit too high, if you really need a gain of 1000 maybe you could try to split it between the two stages (unless the noise contribution of the first stage is a problem and it really needs to be that way, input impedance can also be a limiting factor there but in that case you could try using a non inverting schematic at both stages (very high input impedance)).
as it ws said...the transducer can act as a capacitor, therefore it doesnt need a capacitor...about what you said...can i have some illustration?

Added after 7 minutes:

FvM said:
I expect, you have a piezo transducer (they should use a circuit symbol with a capacitor inside the circle for clarity), then it's O.K. to omit a decoupling capacitor at the input.

U1B can't achieve the gain of 100 set by the resistors, cause it has about 1 MHz GBW, resulting in a gain of 25 a 40 kHz for example, but 25 may be sufficient as well.

There's only one serious fault in the circuit to my opinion, U2 (that has an open collector output) is missing a pullup resistor, thus the output voltage is always zero. Install an 10 k or 100k resistor (the value creates different time constants for the switch output) to +5V at the output, and the circuit is operational.
yha i have..ang it operate at 40khz...s

U1B can't achieve the gain of 100 set by the resistors, cause it has about 1 MHz GBW, resulting in a gain of 25 a 40 kHz for example, but 25 may be sufficient as well.
GBW =gain bandwidth? can you explain further? and about that 25?

nstall an 10 k or 100k resistor (the value creates different time constants for the switch output) to +5V at the output, and the circuit is operational
i read the datasheet..it really need a pull-up on the output for a comparator...ill try it...the output is always zero!

to explain futher the circuit. it will recieved a echo signal at 40khz..then that signal should be convereted to pulse that could be detected by the microcontroller, its diital but at this part...its analog
 

Re: op-amplifier and a comparator..100points if you needed i

GBW =gain bandwidth? can you explain further? and about that 25?
Somewhat simplified, the amplifier gain at a certain frequency can't be higher than GBW/f. You can see this from the open loop response diagram in datasheet.
 

    leoren_tm

    Points: 2
    Helpful Answer Positive Rating
Re: op-amplifier and a comparator..100points if you needed i

Ok the pull-up resistor was kind of basic, I don't know why i didn't see that :p (maybe because I didn't look at the datasheet ^^;;; ) but like FvM said and very well it is needed.
As for the schematic at the input connect the piezo and it should work just fine.
Just as a curiosity (and it seems there are more than one type of piezo transducers, this ones do need a capacitor in series, check the lower part of the schematic).
https://www.robot-electronics.co.uk/htm/srf04tech.htm
Anyway with the schematic I show you you will have a second order high-pass filter (as opposed to the first order one made by C1 and R4, if the piezo doesn't act as a capacitor) and the gain is split between the two amplifiers. Then connect that to the comparator as it is (and don't forget the pull-up resistor :p ).
Oh and by the way, at 40KHz the global gain is just 329 (simulated). I didn't try but I guess that if you want a gain of 1000 you need to add another stage and have a gain of 10 at each stage, as it is you may as well reduce the gain to 17 at the two stages and get the same output.
 

    leoren_tm

    Points: 2
    Helpful Answer Positive Rating
Re: op-amplifier and a comparator..100points if you needed i

Just as a curiosity (and it seems there are more than one type of piezo transducers, this ones do need a capacitor in series, check the lower part of the schematic).
Obviously, an existing application circuit can't answer the question if a decoupling capacitor is necessary. May be the author simply didn't understand the device.

The other question is, if the suggested change to a two stage non-inverted amplifier involves any improvements?

Unfortunately, with the piezo sensor in place of the voltage source, it won't operate at all. Cause the piezo sensor is a capacitor, the first OP misses an input bias. The only improvement is in balancing the gain, although a gain of 33 is still (slightly) above LM358 open loop gain at 1 MHz. But this way, an overall gain of about 25*25 is achieved compared to 10*25 in the original circuit. There are other issues too, as missing decoupling of the Vcc/2 virtual ground.

A gain balance can be achieved in the original circuit as well. To my opinion, it's a good example of a minimum part count design, very professional in so far.

The only purpose of high pass filtering is in handling the OP offsets, the sensor has a small band response anyway. If the sensor is exposed to strong low frequency vibrations, it may show an off-band sensitivity and require a stronger filtering.

P.S.: Just another remark regarding minimum part count. Even the questioned R3 load resistor has a purpose. It turns the bad performing class B output stage of LM358 into class A operation, removing nasty crossover distortions and necessary to guarantee the designed amplifier function with small signal.
 

    leoren_tm

    Points: 2
    Helpful Answer Positive Rating
Re: op-amplifier and a comparator..100points if you needed i

The decoupling capacitor should be there, yes and now I know what the resistor is for, very well thought :D , there's something new I've learned today.
As for the rest I had just a very rough idea of how piezo transducers worked (and still do now anyway and as it seems there is a lot to it), I have looked into this for a short while and didn't look at everything I should have.
I have tried connecting one transducer (one used in the srf04 actually) to an oscilloscope and then drive it with another transducer, the result was an ac voltage (lucky result I guess), I have also used another type of piezo as a beeper, driven by a PIC uC and I do need a series capacitor to make it work (single pin driving the beeper, not differential).
I have done some quick research (google is our friend :p ) and again FvM is right, one of the models includes a series capacitor already. What I don't understand then is why that capacitor didn't remove the dc value of the driving signal in my case.
From the little research I did here's what i found:
http://en.wikipedia.org/wiki/Piezoelectric_sensor
**broken link removed**
http://focus.ti.com/lit/an/sloa033a/sloa033a.pdf
Some information seems a bit contradicting, the model on wikipedia isn't exactly the same as the one on the app note from ti and as it seems there is more to it, there are two types of sensors, the ones without built-in signal conditioning and the ones with built-in signal conditioning. Judging from the examples and explanations I guess neither of the presented circuits is really the most adequate.
Now that I'm at it I might as well get the whole picture right and save me some trouble (and probably someone else that reads this thread) if I need to use this in the future.
 

    leoren_tm

    Points: 2
    Helpful Answer Positive Rating
Re: op-amplifier and a comparator..100points if you needed i

I can't exclude, that some transducer have different behaviour. Regarding the usual ultrasonic transducers (Murata or similar types, see ), they are pure capacitive for sure. The same with the piezo buzzers I recently used. But there are also magnetic buzzers, and may be some piezo buzzers have an integrated step up transformer? Designing with specified parts, you should be able to know this before.
 

    leoren_tm

    Points: 2
    Helpful Answer Positive Rating
Re: op-amplifier and a comparator..100points if you needed i

And again it seems you are right, I've done a very simple test with a piezo buzzer (one of those round flat ones, no case) here at home (buzzer and multimeter) and it behaves as a voltage source with a capacitor in series, apply force and get a peak voltage that decreases to zero and remove the force and get a peak voltage of opposite sign that also decreases to zero. I didn't test it as a buzzer as I don't have a signal generator. As for it working as a buzzer, in the document you refer they clearly state that it needs a capacitor in series or the buzzer might get damaged.
Well I've learned something new :D, thanks for the info and discussion.
In the end nothing can beat hands on experience :D :D
 

    leoren_tm

    Points: 2
    Helpful Answer Positive Rating
A piezo buzzer is completely different from a piezo transducer (speaker) that is used in this project.
The buzzer has a transistor oscillator circuit inside to make it buzz (beeeeep) when DC is applied.

A piezo transducer goes "tick" when DC is applied. It ticks again when DC is released. Its input is supposed to be an AC signal.

I wish the web would have an automatic warning: "This schematic is 40 years old. Better parts and circuits are available today".
 

Re: op-amplifier and a comparator..100points if you needed i

ok...im new to this design...i need some time to understand the discussion..the transducer act as a capacitor as it was said....thank you for all
for now when my hand get closer to the receiver pin, it outputed something..ITS VERY SENSITIVE...can you redesign it?? :D im trying to do it thou...
as for this
im making something like that...but i think it must be discuss on Microcontroller...
but i think digital is very easy...compare to this receiver circuit...
teach me and instruct me :D

Added after 1 minutes:

R00KIE said:
Ok the pull-up resistor was kind of basic, I don't know why i didn't see that :p (maybe because I didn't look at the datasheet ^^;;; ) but like FvM said and very well it is needed.
As for the schematic at the input connect the piezo and it should work just fine.
Just as a curiosity (and it seems there are more than one type of piezo transducers, this ones do need a capacitor in series, check the lower part of the schematic).
https://www.robot-electronics.co.uk/htm/srf04tech.htm
Anyway with the schematic I show you you will have a second order high-pass filter (as opposed to the first order one made by C1 and R4, if the piezo doesn't act as a capacitor) and the gain is split between the two amplifiers. Then connect that to the comparator as it is (and don't forget the pull-up resistor :p ).
Oh and by the way, at 40KHz the global gain is just 329 (simulated). I didn't try but I guess that if you want a gain of 1000 you need to add another stage and have a gain of 10 at each stage, as it is you may as well reduce the gain to 17 at the two stages and get the same output.
THE RESISTOR WAS VERY USEFUL! :D

Added after 6 minutes:

Audioguru said:
A piezo buzzer is completely different from a piezo transducer (speaker) that is used in this project.
The buzzer has a transistor oscillator circuit inside to make it buzz (beeeeep) when DC is applied.

A piezo transducer goes "tick" when DC is applied. It ticks again when DC is released. Its input is supposed to be an AC signal.

I wish the web would have an automatic warning: "This schematic is 40 years old. Better parts and circuits are available today".
maybe very old...40 years??wow..it still work!!!
can you suggest a better circuit? the circuit was very simple to construct.
 

Re: op-amplifier and a comparator..100points if you needed i

I don't know how old that circuit is but you can't change much, you need some amplification and then a comparator, you may be able to use different opamps (more GBW and maybe better output stage) and if the microcontroller you intend to use has a comparator maybe you can use it but the circuit remains very similar.

If what you are doing is similar to the srf04 I guess at least some of the concepts used in the srf04 are valid for you (but has we have seen the designer didn't know very well what he was doing at some points so beware of that).

Also my little experience with the srf04 tells me that it may "die" quite easily. I have participated in a project where we needed to use those sensors and a few died without any apparent reason (I have quickly inspected one and the cause of death seemed to be a dead comparator, I didn't inspect them all but the symptoms were similar), so I guess the ideas are good but the design is poor. You can however use the ideas and make a better circuit :D

If you are short on time and need a "black box" solution then there are other sensors on the srf family, the srf04 is old, there is a new srf pin compatible with the srf04 and its cheaper (you don't learn as much with a "black box" solution but if you need to get the job done there isn't much choice).

I mention the srf sensors because I have worked with them and I find it's quite easy to make them work and they are easy to find.
 

    leoren_tm

    Points: 2
    Helpful Answer Positive Rating
Rookie,
Your circuit won't work because the first opamp doesn't have a DC input bias voltage. The piezo receiver transducer is like a capacitor and does not pass a DC voltage through it.
 

Re: op-amplifier and a comparator..100points if you needed i

Yes you are correct, after all the discussion and some hands on testing I know that now (that's the problem of using an ideal voltage source emulating the voltage coming from the sensor, my mistake). A resistor large enough not to attenuate too much the output of the sensor say maybe 100k between the non inverting input of the ampop and the common mode voltage will solve that.

But as FvM said the first circuit will work just fine with a redistribution of gain between the two stages (and because its an inverting scheme biasing isn't a problem) and I guess that most probably the input impedance isn't going to be a problem anyway (I guess I was suggesting to kill a fly with a cannon).

I guess this image better illustrates how I should have done it the first time :oops: , the common mode voltage has a decoupling capacitor as well as a the supply. The bias of the first amplifier is guaranteed by R7. It should be ok now ^^;;
 

    leoren_tm

    Points: 2
    Helpful Answer Positive Rating
Re: op-amplifier and a comparator..100points if you needed i

anyway thanks alot for the discussion.. as FvM said...the circuit was a PRO :D
i just need to balance the gain, and also "R00KIE" as you said.. HANDS ON!!!

fortunately, im using A MCU with a comparator, but i think i will not use it, it will introduce another problem...i try not using Blackbox...:p this problem not yet solve thou...maybe ill try to design one from the discussion... analog gives me a :?::?::?::?: with nosebleed!!!
who need 100points? :D
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top