2
\$\begingroup\$

I need to design wake up system for microcontroller based on ultrasound. I have no documentation and two sensors, marked as T and R, they look exactly like those in hc-sr04.

I have transmitter circuit like this:

schematic

simulate this circuit – Schematic created using CircuitLab

And receiver like this:

schematic

simulate this circuit

The problem is that I got output from lm393p only when sensors are couple of centimeters apart (where I need couple of meters), so really small range, and output is 40kHz pwm signal, but I really would prefer to have high when pwm is detected and low when no signal is present. Also, I need to use as few components as I can. I don't have access to an osciloscope, just simple multimeter. I would appreciate any sugestions how I can make this system better.

\$\endgroup\$
3
  • \$\begingroup\$ You say that what you have is similar to a HC-SR04, why not use a HC-SR04? It has more sophisticated electronics than what you posted. But realize that it is only specified to 0.5 meter. \$\endgroup\$
    – Mattman944
    Commented Oct 27, 2023 at 23:30
  • \$\begingroup\$ Dear Mattman944, I don't need to measure distance, just to send signal via ultrasound to wake up device that is located somewhere in given room. \$\endgroup\$
    – Konrad
    Commented Oct 27, 2023 at 23:32
  • \$\begingroup\$ Tx: spkr1 should be driven with a transformer. Rx: LM393 is not "well" designed. \$\endgroup\$
    – Antonio51
    Commented Oct 28, 2023 at 8:06

1 Answer 1

5
\$\begingroup\$

That simple transmitter circuit seems OK. You might reduce R1's value a tad.

Receiver circuit has problems.
A variable threshold level might be in order via R5 (1k trimpot) below. It is easiest to arrange the comparator so output pin goes low when input is excited with 40 kHz. Output is at +12V when idle: R1 (10k) is absolutely necessary as a pull-up to +12V.

A 1nf input capacitor high-pass input filter helps to keep audio from triggering...these ultrasonic transducers still have some response below 20kHz.

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
5
  • \$\begingroup\$ Dear glen_geek, thank you for the time you spent on answering. I will try your schematic for sure, but now I'm missing some of the components :D \$\endgroup\$
    – Konrad
    Commented Oct 29, 2023 at 13:51
  • \$\begingroup\$ "A couple of meters" range likely requires a transistor preamp between transducer and comparator...an added component count of about 4. \$\endgroup\$
    – glen_geek
    Commented Oct 29, 2023 at 17:30
  • \$\begingroup\$ Dear glen_geek, I built circuit according to your schematic. It works very nice, i reduced R1 in transmitter circuit to 1K and it achived about 3 meters of range on 8V (two li-ion's). But I wonder, how much more difficult it would be to have detection signaled with high? (I got myself LM358 too if this helps). Thank you for provided answer and all future ones. \$\endgroup\$
    – Konrad
    Commented Nov 4, 2023 at 2:13
  • \$\begingroup\$ Changed schematic, adding Q1 to invert the comparator output, allowing Q1's collector to pull up near +12V when the transducer hears a 40kHz signal. You could use the other half of LM393 as an inverter too, (instead of 2N3906). Using the other LM393 as an inverter would require adding three resistors, along with the 10k pull-up on the first LM393. \$\endgroup\$
    – glen_geek
    Commented Nov 4, 2023 at 3:37
  • \$\begingroup\$ Dear glen_geek, your suggestions work as always. But I noticed increased power consumption, so I will stick to previous solution. Now LM393 consume 330.4uA and it is too much (few times more than uC). So I wonder to change LM393 to LMV331. Will this new IC noticeably redure current consumption? Or maybe You know even better IC than LMV331? Thank you again for your help, I promise it is last question. \$\endgroup\$
    – Konrad
    Commented Nov 4, 2023 at 4:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.