Ultrasonic Wave TCT40-18R from dx.com |
I have tried using two HC-SR04 units and tried measure the distance between them but the echo cannot be detected before the trigger has been activated.
A schematic for ultrasonic range finder from micro-examples.com |
I intend to build one sending circuit for the robot and one receiver circuit for the radio-beacon with these. I found the above schematics from micro-examples.com with PIC example code. That circuit looks easy to connect and I just need to divide it into two parts. The code needs to be adapted to Arduino but that sounds even more easy, PWM at 40kHz, delay to avoid false readings and wait for the response... easy as pie. I can probably use the pulseIn Arduino function or a interrupt trigger.
No comments:
Post a Comment