I have EU1640BCH12T/R waterproof ultrasonic sensors, which I have got from this link. These are standalone raw sensors without breakout board and not a module like HC-SR04. Being a new electronics hobbyist, I want to test these sensors with Arduino for distance sensing. I tried replacing transmitter and receiver of the original HC-SR04 module with my these ultrasonic ones but I am getting very ambiguous outputs from the circuit. Please suggest what circuit do I need to make to test these raw waterproof ultrasonic sensors?
Electronic – arduino – Test circuit for EU1640BCH12T / R Water proof ultrasonic sensors with Arduino
arduinodistancetestultrasoundwaterproof
Related Solutions
The problem with hobby related solutions is documentation is limited and not spec'd like commercial components or modules.
It is possible that it may work but make a block wiring diagram and consult with the OEM is advised. Mind you I don't know if they have adequate support for your question as these are built in China.
Hobby Services 3002 N. Apollo Dr. Suite 1 Champaign, IL 61822 (217) 398-0007 E-Mail: hobbyservices@hobbico.com Internet Address: www.supertigre.com
It appears that your ultrasonic load is TTL so there is no problem switching 5 at the same time with a BEC, but I wonder if you have considered the effects of crosstalk on firing all at the same time. They indicate a 15deg detection angle but this would depend on the reflection angle of objects you wish to detect. There may be phasing issues with reflection cancellations like having 5 tweeters directed in a room. Reading the response of each echo in parallel with a time interval count won't be a simple textbook result with non-smooth objects with 5 senders.
YOu can test your orthogonal array design with any signal pulse generator and look at the signal on a parallel port logic analyzer or scope to ensure what you are design will work.
Power drive is the least of your concerns from these low power devices. Noise avoidance from conducted and radiated sources will be paramount and design of the transponder array must come first. I would spend some time on testing this part 1st to identify all the electrical, physical, acoustic, EMI, thermal, vibration both conducted and radiated sources of interference and how each affects your SONAR expectations with different objects. Will it be microphonic with vibration or loud pulse noises. How well does it reject other ultrasound sources of noise? Will the TTL Echo output change in pulse width with signal strength or just the delay time.
Will you get echos from the wrong sender due to corner refection effects.
It's probably working "well enough".
At present your code should NOT hang but should loop every 1.5 seconds - 1 second for the Arduino mediated pulsein timeout and 500 ms due to delay(500). Nothing the SR04 module does should be able to prvent your code looping every ~= 1.5s. If you eg turn on the on board LED during the delay(500) period you should be able to see that the loop is occurring.
Odds are that your system is not "hearing" the return on soft targets at larger ranges, as per manual, timing out at 1s, delaying for 500 mS then repeating.
The 500 mS delay is not needed (but helps if a heartbeat LED is used) as the 1 second pulsein timeout is independent of the SR04 which has long before "given up".
IF the above is correct then a proof of sorts would be in flicking the sensor JUST AS / AFTER the added heart beat LED goes out. This should work every time if you are fast enough. Whereas flicking it eg when the heartbeat LED goes on would not help.
And/or pointing it at a close object for at least 1.54+ seconds should restore operation.
Bonus:
I would not think it would explain the behaviour BUT the trigger pulse is meant to be 10 uS - not 20 uS plus. The processor will add finite time to that delay - but 'with luck' the low to high and high to low delays of the digitalWrite's will cancel. BUT I'd try 10 uS delay, and also look at the pulse on a scope, if available. |
Best Answer
I think that either the transducer Q factor is too high for the board (extra inertia due to the metal case), causing a pulse to become abnormally long, or the transducers fail to efficiently couple acoustically with the air (impedance mismatch), causing a weak ultrasonic pulse and even weaker reception. Internally a transducer looks like this:
With the little horn being key to efficient coupling. At 40 kHz the wavelenght is just 330 m/s / 40 kHz = 8.25 mm.
Can you measure the terminals of the transmitter with an oscilloscope, and compare the results with the original transducer?
However I think that those transducers should work in open air with a proper controller as they are probably of the same design being used as parking sensors.
Designing an ultrasonic rangefinder is not a trivial task and is beyond the scope of a reasonable answer.