Multiplexed Echo Locator

About: 55+ years in electronics, computers, and teaching ... now retired.

Intro: Multiplexed Echo Locator

This instructable describes how to make a “scanning” echo locator using an Arduino and four multiplexed ultrasonic sensors. There are no moving parts.

Construction is simple ... all you require is a sharp knife, two drills, a soldering iron, and a hacksaw.

In theory the location of up to four objects can be pin-pointed. In practice the best I have managed is three.

The circuit and code are purely experimental and are published in the hope that someone will find them useful.

Images

  • Photo 1 shows the assembled echo locator.
  • The video shows the echo locator pin-pointing the location two objects

Step 1: Wiring Diagram

Photo 1 shows the wiring diagram for the “quad sensor echo locator”.

Sensor B1 and B2 are rendered “passive” by placing several layers of masking tape over the transmit (T) transducers.

This tape blocks the ultrasonic sound that would otherwise be emitted.

Step 2: Parts List

Photo 1 shows the parts for my dual sensor echo locator. The quad sensor echo locator described in this article requires a further two ultrasonic sensors.

The following parts were obtained from https://www.aliexpress.com/ :

  • 1 only Arduino Uno R3 complete with USB cable
  • 4 only HY-SRF05, or HC-SR04, ultrasonic transducers

The following parts were obtained locally:

  • 1 only male arduino header strip
  • 4 only female arduino header strips
  • 2 only pieces of scrap aluminium
  • 2 only small pieces of wood
  • 2 only small screws
  • 6 only cable ties
  • 12 only lengths of plastic coated wire (assorted colors) [1]

Notes

[1]

The total length of the wires should equal the desired distance between the sensors plus a small amount for soldering. The wires are then twisted together to form a cable.

Step 3: Theory

The circuit builds upon my “Dual Sensor Echo Locator”. [1]

Dual sensor echo locator

Photo 1 shows the “detection area” for the above echo locator.

The equations for this sensor are shown in photo 2.

This “dual-sensor” echo locator works well but requires both sensors to be mounted below the baseline (i.e. an offset is required) to avoid large "dead spots" that arise from using narrow-beam transducers..

But what if such an offset is not possible?

Quad sensor echo locator

It occurred to me that these “dead spots”, and the “offset”, could be eliminated if we quadruple the number of detection areas by doubling the number of sensors as shown in photo 3.

Switching rapidly (multiplexing) between the four possible sensor combinations effectively creates a rotating beam (photo 3). The entire area is covered and the “offset” has been eliminated.

Even better ... the same equations (photo 2) can be used!

In theory this “quad-sensor” echo locator :

  • can detect up to four objects. [2]
  • has no “dead spots”
  • requires no offset

Results

The concept works, as multiple objects can be detected, but small “dead spots” still remain as the narrow beam-widths do not completely illuminate the target area when the offset is zero. [3]

Notes

[1]

See https://www.instructables.com/id/Dual-Sensor-Echo... for a complete explanation and formulas.

[2]

Four objects assumes:

  • a beam-width of 45 degrees.
  • no “shadowing” of one object by another

[3]

Six sensors mounted at 30 degree intervals should completely eliminate the “dead spots”

Step 4: Construction

Images:

  • photo 1: mounting brackets
  • photo 2: front view
  • photo 3: rear view
  • photo 4: top view

Mounting brackets

Two mounting brackets were made from 18 gauge aluminium sheet using the method described in my instructable https://www.instructables.com/id/How-to-Cut-Fold-...

Use a hacksaw, or tin snips, to make a 30mm cut from one edge to the 45 degree fold line. Now “score” both sides of the center-line from the saw-cut to the base then “wiggle” the unwanted section until it breaks free.

The dimensions for my brackets are shown in photo 1.

Sensor sockets

The sensor sockets have been fashioned from standard Arduino header sockets.

All unwanted pins have been pulled out and a 3mm hole drilled through the plastic.

When soldering the connections take care not to short the wires to the aluminium bracket.

Strain reliefs

A small piece of heat-shrink tubing at each end of the cable prevents the wires from unravelling.

Cable ties have been used to prevent unwanted cable movement.

Step 5: Software Installation

Install the following code in this order:

Arduino IDE

Download and install the Arduino IDE (integrated development environement) from https://www.arduino.cc/en/main/software if not already installed.

Processing 3

Download and install Processing 3 from https://processing.org/download/

Quad Sensor Echo Locator

Copy the contents of the attached file, “quad_sensor _echo_locator.ino”, into an Arduino “sketch”, save, then upload it to your Arduino Uno R3.

Close the Ardino IDE but leave the USB cable connected.

Quad Sensor Display

Copy the contents of the attached file, “quad_sensor_echo_locator.pde” into a Processing “Sketch”.

Now click the top-left “Run” button ... a graphics screen should appear on your screen.

Trouble-shooting

Processing will complain if the [number] associated with your COM port needs changing, but before doing so it will display a list of available “COM” ports each with a [number] in square brackets.

Simply replace the [0] in the following code line with one of these numbers:

  • myPort = new Serial(this, Serial.list()[0], Baud_rate);

Try each in turn ... one of them will work.

Step 6: Testing

Connect the Arduino USB cable to your PC and run “dual_sensor_echo_locator.pde” by clicking the “top-left” run button on your Processing 3 IDE (integrated development environment).

Numbers, separated by a comma should start streaming down your screen as shown in photo1.

The last number is the zone ... the other two numbers are the sensor A1/A2 and sensor B1/B2 distances.

A red (flashing) dot will appear on the display whenever an object is detected inside the target area. Additional data will also appear once the sensors have located an object (photo 2).

Error message at startup

You may get an error message at startup.

If so change the [0] in line 85 of photo 1 to match the number associated with your “COM” port.

Several “COM” ports may be listed depending on your system. One of the numbers will work.

In photo 1 the number [0] is associated with my “COM4”.

Positioning your sensors

Space your sensors 100cm apart with the target 80cm..100cm in front.

Rotate both sensors slowly towards the diagonally opposite corner of an imaginary 1 meter square.

As you rotate the sensors you will find a position where a flashing red dot(s) appears on the graphics display.

The following information will appear once an object is detected:

  • zone
  • distance1
  • distance2
  • baseline
  • semi-perimeter
  • area
  • X coordinate
  • Ycoordinate

Images

Photo 1: No objects ... all distances fall outside in the detection area.

Photo 2: An object has been found in "Zone 3"

  Click here   to view my other instructables.

Share

    Recommendations

    • Audio Contest 2018

      Audio Contest 2018
    • Metalworking Contest

      Metalworking Contest
    • Furniture Contest 2018

      Furniture Contest 2018

    2 Discussions

    0
    None
    lingibshubham_bhatt

    Reply 6 days ago

    Thank you for your comment. Glad you like the idea :)