Ultrasonic sensor circuit design


I´m trying to design a sensor circuit for this ultrasonic sensor:
my http://files.voelkner.de/500000-524999/505679-da-01-en-ULTRASCHALL_SENSOR_KPUS_40FS_18R_448.pdf

This is my current design:

I use an Arduino Mega 2560 with USB as power supply and serial connection.

I build a transmitter circuit with 24V supply for transmitter. I use the tone library to feed the gate of the mosfets with 40kHz.

My problem is that my sensor circuit only receives the signal within a 10cm distance. I want to get to 1m distance and since I try to use this circuit for trilateration I want the circuit to be as time invariant as possible.

I currently don´t have an oscilloscope. For example I have no idea what C2 does, but without it I receive random noise constantly.

You don't need R5/R6. Have you tried to google "HC-SR04 schematic" ? Don't invent a wheel, here is correct design: http://uglyduck.ath.cx/HC-SR04E/HC-SR04.svgz

Agreed about R5/R6. If the voltages there and at the junction of R1/R2 are even slightly different (I guarantee that they are), then the Op Amp is going to pull the output either really high or really low.

C2 is there to bypass noise at the non-inverting input. Without it, any noise there is amplified as if it were the signal.

I strongly recommend "Op Amps for Everyone". The fourth edition is out:


Earlier versions are available as free download.

Thanks guys! Removing R5/R6 will probalby result in a much higher SNR as well since I get rid of thermal noise of the resistors and less signal charge of the capacitative sensor will be drained through the resistors. I´ll try it tomorrow. I´d prefer to improve my circuit than copy a schematic if that is possible.

Don't expect big changes in SNR, compare to R10 (1M) R5 and R6 produced 100x times less noise. Other things if you still want to make your own circuits, not coping anything else design, I'd suggest to decrease a gain of 1-st stage, right now its close to 5000. If OPA is not oscillating, than its over limits of the OPA anyway , at 40 kHz it's probably 100-250 at max, don't have data sheet at hands, do your home work check it up

Yes, a lot of gain in a single stage is a bad idea. You lose frequency response as compared to spreading the gain over 2 or more stages.

GBW of an Op Amp is Gain-Bandwidth Product. Called that because if you multiply the gain times the bandwidth, it equals 1.

So a GBW of 1MHz means that if you wire up the Op Amp as a buffer with gain of 1, the -3dB bandwidth is 1MHz because 1 x 1MHz equals the GBW of 1MHz.

But if the gain is 100, the -3dB bandwidth is 1MHz / 100 = 10kHz. So the gain of 100 x 10kHz equals the GBW of 1MHz.

With a gain of 5000, 1MHz / 5000 = 200Hz. Ouch. That is in addition to the possibility of oscillation, continuous or intermittent, as Magician points out.

However, all this is a bit moot, as you are using a comparator, not an Op Amp. Or is U1 a different IC?

U1 is a real op amp: http://www.produktinfo.conrad.com/datenblaetter/150000-174999/151794-da-01-en-TSH22IN_STM.pdf

It is a dual op amp, so I will create two stages of amplification with it now.