I have a HC-SR04 sonic sensor powered by a standard 9v battery and a regulator which regulates the voltage to 5v. From this regulator, I have VCC going to +, gnd going to -, I have a wire attached to an oscilloscope from echo, and another wire which I plug into + (from the regulator) for trig. This is a basic circuit I am using just to test the sensor - the wire from trig is plugged into 5v to activate the sensor.
My understanding of these devices is that the HC-SR04 should not produce a digital signal out of echo, unless a signal is first sent to trig. This is not what is happening with my sensor. I get a digital pulse out of echo when trig is connected to nothing and when I do connect trig to 5v, the noisy pulse goes away and I do not see any output from my oscilloscope. I am wondering if I have a bad set of sonic sensors? I ordered several of these in a pack - when I tried another sensor, I got the same result.
Do you guys have any suggestions on how to solve this problem? Is there some sort of noise that could be interfering with the correct operation of this sensor?
A couple of other notes:
This circuit is completely removed from any other circuit. In other words, the 9v battery is ONLY powering the sonic sensor.
The pulse I do get from echo (without any trigger) does change some when I change the distance of an object in front of the sensor. A pulse continuously comes from echo unless I plug trig into 5v or stop the battery from sending power to the sensor.
I have tried a different battery - 7.4v lithium polymer. I still have the same problem.
Any ideas as to what could be causing this problem?