I have recently made an electronic ruler with a hc-sr04 ultrasonic module. The module has a transmitter and a receiver. It has two digital pins, TRIGGER and ECHO. You set TRIGGER high for over 10us, then the module sends 8 pulses of 40khz sound waves, then it puts ECHO high and keeps it high until an echo returns. If you measure the time ECHO is high, you can measure the distance.
I didn't like the performance at all, especially at longer distances, it is not very directional or precise.
My idea is like this: instead of trying to measure an echo, what if I measure direct sound from a second device, that you place exactly where you want to measure the distance from? I was thinking about removing the transmitter piezo and put an infrared led instead (it will be driven by the circuit that sends ultrasound pulses, at 40khz, which is the same frequency that remot controls use). The other device will detect the pulses of infrared by using one of these infrared detectors (in a negligeable amount of time compared to sound) and will start sending 8 pulses of ultrasound (which is what the original detector expects). Basically I am trying to fool the module into thinking it's detecting its own echo, but it's actually detecting the sound from another source.
I think replacing the ultrasound transmitter with an infrared transmitter will work, but I am not really sure how to drive the ultrasonic piezo from the second source. Is a single mosfet enough or will I need some sort of a bridge?
I didn't like the performance at all, especially at longer distances, it is not very directional or precise.
My idea is like this: instead of trying to measure an echo, what if I measure direct sound from a second device, that you place exactly where you want to measure the distance from? I was thinking about removing the transmitter piezo and put an infrared led instead (it will be driven by the circuit that sends ultrasound pulses, at 40khz, which is the same frequency that remot controls use). The other device will detect the pulses of infrared by using one of these infrared detectors (in a negligeable amount of time compared to sound) and will start sending 8 pulses of ultrasound (which is what the original detector expects). Basically I am trying to fool the module into thinking it's detecting its own echo, but it's actually detecting the sound from another source.
I think replacing the ultrasound transmitter with an infrared transmitter will work, but I am not really sure how to drive the ultrasonic piezo from the second source. Is a single mosfet enough or will I need some sort of a bridge?