Electrical – Ultrasonic sensor without micro controller

cd4017pwmultrasound

I have been researching how ultrasonic proximity detection works and I believe the HC-SR04 would be a decent fit for a project. The sensor unit looks like this.
enter image description here

I would like to know is if this schematic would function as I imagine it or a flop. The premise is based from the datasheet for the HC-SR04 here.
Datasheet

The sensor works by sending 8 40KHz pulses when the trigger pin receives a 10us pulse. If an object is picked up by the receiving sensor, the "Echo" pin goes high between 150us-25ms (38ms if no object detected). I was thinking for the fun of it, to use a pwm signal from a 40106 to a 4017 counter. If I could activate the 4017 for whatever the Echo pin signal width time would be, I could output a fractional voltage which could be sent to an ADC etc. Here's is the working idea. Assume output 3-9 continue the fractional voltage. I left them open to not bog down schematic.
enter image description here

The pins on the spice model are confusing, however assume R=reset, C=Clock inhibit. When "Echo" pin from HC-SR04 goes high, 4017 is initiated and reset. The outputs will toggle from the 263Hz which should cycle based on min-max Echo signal time. Since the trigger would only be activated once every few seconds (to scan), whichever 4017 output was high when Echo pulse ended would freeze until the next sensing pulse; ideal for using that voltage for other applications. Here is the idea behind the Trigger/Echo function.
enter image description here

Any and all feedback is welcome. Just an idea, not sure if it's feasible or missing important variables. Thanks for viewing. Cheers.

Best Answer

I am not sure that your polarities and values are correct but the idea I get from analyzing the circuit, is that it triggers the transmitter, turns on the echo line and waits for the receiver to detect the echo to turn off the echo line. The counter starts counting at the rise of the echo line and stops at the fall of the same line. So essentially you have a count proportional to the time it takes the signal to propagate and its echo to return. If you "calibrate" this, you have a distance measuring device, or a type of alarm.