1
\$\begingroup\$

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.

\$\endgroup\$
  • 1
    \$\begingroup\$ @chris stratton I can understand that. Thanks for the feedback. I know there is a lot to diagnose and much room for Error. I was just looking to see if the theory was sound if the components and calculations were proper. \$\endgroup\$ – Archaeus Jun 28 '17 at 1:59
  • 1
    \$\begingroup\$ Definitely didn't think the effort and request was worth a down vote though.. Tough room. \$\endgroup\$ – Archaeus Jun 28 '17 at 2:02
  • 2
    \$\begingroup\$ I doubt the 4017 will count with the reset pin pulled high \$\endgroup\$ – sstobbe Jun 28 '17 at 4:13
  • 1
    \$\begingroup\$ @sstobe thanks for pointing that out. I just found the 'reset' min. pulse time of about 250ns and its min. removal time of about 400ns. To understand this, does the removal time indicate the shortest amount of time the reset will take to transition back to low? Akin to 'fall Time' or something different. I've never encountered it before. \$\endgroup\$ – Archaeus Jun 28 '17 at 13:20
  • 1
    \$\begingroup\$ AFAIK, removal time is related to the clock edge so, if you pull out of reset just at the clock edge some flops may still be in reset and some aren't and see the clock edge, holding of the removal time makes sure they all come out of reset and behave the same. I would derive your reset pule from your scan clock not the return echo. As Reset must be low for it to count anyways \$\endgroup\$ – sstobbe Jun 28 '17 at 21:53
1
\$\begingroup\$

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.

\$\endgroup\$
  • \$\begingroup\$ Thank you for taking the time to assess the idea. You are virtually spot on with its design idea. The trigger would be activated by a separate timer, but the echo line turns on simultaneously and does what you analyzed. The 'reset' pin issue was fixed with a small capacitor in series to quickly bounce high/ low in a fraction of the echo pulse. What polarities and values are incorrect? Thanks again. \$\endgroup\$ – Archaeus Jun 30 '17 at 12:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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