HC-SR04 and Ultrasonic target direction sensor

Hi I have a couple question concerning ultrasonic sensors, let me fist introduce my goal. The device I am prototyping needs to always be oriented in the direction of a specific target that is always in eyesight. The device will be using a stepper motor to change orientation. My best option I believe is ultrasound. The target would emit a ultrasonic pulse. The receiver would have 2 sensors, and the Arduino would simply check what sensor received the pulse first to know what direction to turn the stepper motor. It would correct direction until both sensors receives the pulse almost at the same time. I am looking for a use between 4m and 14m.

For prototyping I ordered HC-SR04. It has a 4m range witch would become 8m and I believe more since it would not be an echo that is measured but a direct signal.

  1. My strategy would be to deactivate the receiver ont the target and trigger the pulse every time the HC-SR04 allows it. On the receiver the emitter transducer would be desoldered so when both sensor would be activated they would be waiting from a pulse generated by the target. Would this work ?
  2. How long after the HC-SR04 sensor receive the pulse does it sends the data to the Arduino and is the delay constant ?
    Second question, I would eventually want to use other better range sensor that are made to be only receiver or emitter could you point me to that.
  3. Any suggestion about anything concerning this end goal ?

Thanks for the help
and sorry for my english it is not my first language.

The logic that separation of the receiver from the sender would double the distance would hold true if signal does not have to much "spread" and loss. You might even reach the 14 meters.
http://www.elecfreaks.com/store/download/HC-SR04.pdf

Use of the receiver separated from the transmitter side of this unit, I would wonder how you expect to sync the two for the measurement?

I would look at using a fixed transmitter signal at the target and use two receivers slightly separated at the tracking end looking for differential of receive signal for movement.

Take a look at this effort linked below.

http://www.best-microcontroller-projects.com/ultrasonic-tracking-system.html

Thanks a lot for the info, actually I found a project using exactly what I want, but I cant find what they are thecnologie they are using.

https://www.kickstarter.com/projects/airdog/airdog-worlds-first-auto-follow-action-sports-dron
airdog drone
Any idea ?

Thanks

That is most likely done with GPS tracking. I had seen a RC Helicopter tracker that is similar.
Had also spotted GPS, gyro and triple axis tracker stabilizers kits on EBAY.

I also tought of gps. I beleived that 2 exact same gps would give the same error. If you place them close they would both tell where they are with the exact error of +2m for example. But I was told that just by having them apart one might give a +1m and the other a -1 because of the slight change of enviroment. ?

Because I am aiming for outdoor use, this might be a solution but I dont want to have 30degree error on direction.
What do you think ?

Thanks

I think your idea of modifying HC-SR04 sensors could work. You could use one for the transmitter and two with the emitters removed as the receiver, however as pointed out you need to synchronize all three of them to start at the same instant. Some people have used a light flash (IR) to synchronize distant receivers, which avoids the problems of having long wires connecting everything.

If you are interested, Emil reverse engineered the HC-SR04 circuit board and posted the schematic here: http://uglyduck.ath.cx/ep/archive/2014/01/Making_a_better_HC_SR04_Echo_Locator.html

Here is a cave mapping project that uses independent transmitters and multiple receivers for ranging: http://www.interestingto.me.uk/Open%20Source/adventures-ultsasonics

jremington

Thanks but could you explain my I would need to syncronise ?
I am not trying to get a distance, but only a direction information. Only by knowing what receiver got the pulse first I would be able to know witch side is my beacon comming from ?

thanks for the links

It might work the way you suggest (without synchronization), but if you read through Emil's post, you will see that the receivers seem to trigger randomly and often return false echos. With synchronization you would be in a much better position to distinguish false echos from genuine signals.

Check it out:
http://coolarduino.wordpress.com/2014/08/10/virtual-touch-screen-3d-ultrasonic-radar/
Basically, this is "passive" target tracker. For "active" everything much easier, and more accurate, +-1 degree error in direction at least.

Magician
Am I understanding this right ?
He connects the arduino directly to the analogue output of the HC-SR04 transducer to then process it.
So he skips the part where the HC-SR04 transform the data into a pulse of a certain length.
Thanks

http://diydrones.com/profiles/blog/show?id=705844%3ABlogPost%3A1587991&commentId=705844%3AComment%3A1588949&xg_source=activity
This guy made exactly what I am looking for but I need help on understanding how the receivers are made, so I can make my own.

Am I understanding this right ?
He connects the arduino directly to the analogue output of the HC-SR04 transducer to then process it.
So he skips the part where the HC-SR04 transform the data into a pulse of a certain length.
Thanks

Correct.

Read more how HC-SR04 works, on-board uCPU, that generates a pulse with a length proportional to distance, starts the sequence only after you trigger "send" pin. So , it sends a pulse and wait a response. In your model with 3 units, one as a transmitter and two as receivers, you would need some way to synchronize 3 units, because receivers also needs "start" events (even it doesn't send anything - transmitting piezo removed) in order to switch in "listening" mode. You may use cheep 315 - 434 MHz radio for this.
It would be still possible to build an "asynchronous " system, when two receivers get same "trigger" events periodically, not necessarily the same time with transmitter. For example, transmitter pings each 1 sec a pulse. You trigger receivers also every second, but doing so signal may arrive immediately or at the end of period. It's not important, if you don't need to know a distance, just an angle. Than you get just a difference in between arriving
Now, this guy in a link you posted, build two receivers on himself, most likely he is also did just analog part w/o special uCPU for each receiver. Your options - modify cheep HC-SR04 or solder your own. This uCPU, that build-into HC-SR04, does some noise measurements and keep adjustment of the comparator , so if you are not really into analog design, better to modify cheep unit.
I'd suggest, start to experiment, have a scope?

Yes I do have access to a scope, in my Cegep :wink:
The reason I am thinking of going for my own transducer even if its more work is the following, I will be at a dead end if the HC-SR04 do not meet my requirement in range. This brings me to my last question for the moment, how do I get more range ? Is it just by making a more powerful emitter or will I need to arrange the receivers to ?

Thanks a lot for your help, I will receive the HC-SR04 soon and start experimenting.

A simple modification of the HC-SR04 will give you more range.

It turns out that the design is flawed and the analog circuitry is most sensitive at the wrong frequency (18 kHz instead of 40 kHz). To correct this, the easiest solution is to replace C3 (currently 1 nF) with 220 pF. See the schematic and board diagrams here: http://uglyduck.ath.cx/HC-SR04E/HC-SR04.svgz

Alternative, replace two resistors as described in the above link.

his brings me to my last question for the moment, how do I get more range ? Is it just by making a more powerful emitter or will I need to arrange the receivers to ?

You may get more distance, x10 times or so, by changing the concept of the receiver . All units, AFAIK, including HC-SR04, register an echo by comparator. If you ditch the comparator and process analog signal with FFT, you 'll get at least 10x increase in distance, and 300x better accuracy. It's all in reply #8.

Some more thoughts on targeting.

The device I am prototyping needs to always be oriented in the direction of a specific target that is always in eyesight.

How fast target is moving in both left and right and toward and away? As well as how big is the target? How much space to mount your transmit pinger on the target?

I am looking for a use between 4m and 14m.

Concerns on 45 foot distance with ultrasonic.

Because I am aiming for outdoor use, this might be a solution but I don't want to have 30degree error on direction

Biggest error with GPS is in the "z" axis of the WGS coordinate do to ellipsoid errors.

Another concept that could be looked at is contrast tracking.
http://nootropicdesign.com/projectlab/2011/03/20/arduino-computer-vision/

Magician, thanks I will look into that !

spicetraders:
How fast target is moving in both left and right and toward and away? As well as how big is the target? How much space to mount your transmit pinger on the target?

Target would be moving to a maximum speed of 35km/h in any direction but usally the receiver unit would be following simillar speed vector.
Target is a human, so I am planning on mounting the transmitter on the head to get a 360 degree possibility of beacon.

Concerns on 45 foot distance with ultrasonic.

My budget is bigger then the 3$ a HC-SR04 cost so I could go with better ultrasound units.
Why are you concerned for a 14m distance ?

Thanks

Magician:
Correct.

Read more how HC-SR04 works, on-board uCPU, that generates a pulse with a length proportional to distance, starts the sequence only after you trigger "send" pin. So , it sends a pulse and wait a response. In your model with 3 units, one as a transmitter and two as receivers, you would need some way to synchronize 3 units, because receivers also needs "start" events (even it doesn't send anything - transmitting piezo removed) in order to switch in "listening" mode. You may use cheep 315 - 434 MHz radio for this.
It would be still possible to build an "asynchronous " system, when two receivers get same "trigger" events periodically, not necessarily the same time with transmitter. For example, transmitter pings each 1 sec a pulse. You trigger receivers also every second, but doing so signal may arrive immediately or at the end of period. It's not important, if you don't need to know a distance, just an angle. Than you get just a difference in between arriving
Now, this guy in a link you posted, build two receivers on himself, most likely he is also did just analog part w/o special uCPU for each receiver. Your options - modify cheep HC-SR04 or solder your own. This uCPU, that build-into HC-SR04, does some noise measurements and keep adjustment of the comparator , so if you are not really into analog design, better to modify cheep unit.
I'd suggest, start to experiment, have a scope?

Excuse me. How to know the signal arrived? U said to calculate difference between arriving right. Can u guide me on how to get that arrival difference values