Location Sensor Module (ROACH)

A device that can calculate its location relative to a 24kHz sonic beacon

Similar projects worth following
The ROACH (Radio On/off Audio Controlled Homing) robotics module is a device that can calculate its location relative to a 24kHz sonic beacon. This could be employed in a variety of applications such as a shopping cart that could follow you around, a drone/robot taking video of a moving target or a robot that must accomplish tasks in a room where the locations of certain objects relative to the beacon are known. Current systems for small distance tracking use computer vision to track the locations of objects, however, these systems may fail in environments that are erratic, low light, or have a chance of interfering with the robot’s line of sight. Similar systems to the one I propose exist for underwater vehicles/robots, however, I was unable to find an equivalent for regular robotics systems, so I’d like to try my hand at designing and building one!

The ROACH beacon will send out brief 24kHz pulses of sound and a radio signal that will be received by the ROACH module. The ROACH module will have 3 microphones arranged in a triangle (for the 2D version) and eventually 4 microphones arranged in a pyramid (for the 3D version). Pulses of sound from the beacon will arrive at these microphones at different times after the radio signal arrives. The module can then use these varying times of arrival to trilaterate the position the beacon. 

When a radio signal arrives at the module from the beacon. The microcontroller (TBD) on the module will start a timer. When the sonic pulse arrives at the microphones they are converted to electrical signals. These signals will first be filtered with a Hi-Q bandpass filter, then put through an envelope detector and Schmitt trigger to get a clean digital signal. These three signals will be connected to the hardware interrupts of a microcontroller that will time the arrival of these signals. The microcontroller will then either calculate the position of the beacon or reject the signals if it determines they are problematic (i.e.: sound that was bounced off a wall before arrival). This module will communicate with the robotics it is integrated into over i2c or a similar protocol. 

  • 1 × NE5532 op amps
  • 1 × NRF24L01
  • 1 × Microphones

  • Log 004: PCB Assembly

    Joseph Primmer05/18/2018 at 00:34 0 comments

    My PCBs from @oshpark  arrived today!

    Here is one assembled:

    I don't know whether these work yet because I haven't gotten around to testing them. 

    I also worked out some of the math for using times of arrival to calculate location:

  • Log 003: PCB Design

    Joseph Primmer05/09/2018 at 20:08 0 comments

    It's my last day of classes, so I decided to celebrate by sitting down for a few hours and designing the PCB for the ROACH sensor module.

    This is the schematic I came up with for the PCB:

    This is the PCB itself. It has a 3 pin header for 5V, GND, and Digital Output:

    I am fairly new to PCB design and feedback would be greatly appreciated!

    Also, I am probably not going to order these today. I am going to wait until tomorrow, so I can look over my design again when I'm more awake and then order.

  • Log 002: Breadboard Prototype and Schematic

    Joseph Primmer05/05/2018 at 17:46 0 comments


    I continued my breadboard prototyping by trying to get my mic & filters to respond to a piezo speaker, however, no matter what gain on my filters I tried, I couldn't get a good response:

    I was on the verge of giving up when Professor @Bruce Land suggested I use one of his "really loud" 24kHz ultrasonic transducers.  This transducer showed much more promise than the piezo:

    I could get a response on an oscilloscope even when the transducer wasn't playing at its 24kHz resonance frequency. I decided to re-tune my filters for 24kHz in order to take full advantage of the transducer's abilities. 


    I ran around in circles for several hours because I had accidentally shorted my voltage reference to ground. :(


    After re-tuning my filters and putting that signal through an envelope detector, amplifier, and comparator, I was able to get a fairly clean output that was either at 4.4V or 1.4V  based on whether the transducer was playing or not. I could even get a range of about 2 meters (may try to improve this in latter designs) in the room with the occupancy sensors! 

    4.4V and 1.4V isn't quite a good digital signal, so I will probably put this through a Schmitt trigger as well. I could also use a differential drive on the transducer to increase the range a bit. 

    Here is the schematic I will probably use for the PCB I plan to design (I may start out with just designing small sensor modules instead of a full board with a microcontroller on it. This will make it easier to experiment with different microcontrollers):

  • Log 001: Design Plan and Initial Experimentation

    Joseph Primmer05/01/2018 at 15:09 0 comments

    June 4th is going to be a tough deadline to make for this project because I would like to design a PCB for the module that will contain the filters and microcontroller (perhaps a PIC32). I'd like to be able to assemble the PCB at school where I have access to nice equipment and decent soldering irons meaning I need to design and send out the PCBs ASAP (school ends May 22nd). 

    Here is my proposed schedule:

    • April 23rd - May 5: Breadboard experimentation & Filter design + Proof of concept to show I can use a set of two microphones/filters to measure a distance
    • May 5 - May 9: PCB design (send out PCBs to be created on May 9th)
    • May 9 - May 15: try not to fail my ECE exams
    • May 15 - May 22: Write microcontroller firmware + PCB assembly + cardboard prototype + beacon prototype
    • May 22 - June 4: Integrate Module into a basic robot 
    • June 4+ (Improvements phase):
      • Design 3D model of module and beacon to be 3D printed
      • Integrate module into a more practical application, i.e.: shopping cart or video robot (I might do this as part of a class I'm taking next semester)

    My progress so far has been getting the Hi-Q band pass filters mostly working when hooked up to a function generator (I need to adjust the gain a bit and maybe cascade two of them together). I've also been able to figure out the envelope detector. Here are some pics:

    My setup.

    At 20kHz the signal is allowed to pass through and the envelope detector puts out about 3.2V.

    At 17kHz the signal can be seen to be attenuated on the oscilloscope and the envelope detector only puts out 2.8V.

    When I tried to interface this system with my microphones however, everything went awry! I kept getting this weird 20-25kHz signal that seemed to be coming out of nowhere! After looking around the room however, I found the culprit: 

    An occupation sensor with ultrasonic transducers on it. Darn. Guess I can't test in this lab. (I guess that also means robots with this module can't be used in rooms with occupancy sensors).

View all 4 project logs

Enjoy this project?



panovvv wrote 06/04/2018 at 16:45 point

A while ago I was facing the need to determine the location of my device in the room. "Well, ", I thought, "there's cheap sensors for everything nowadays! It'll be finished in a jiffy." Oh how I was mistaken... After a couple of day's worth of solid research the only robust solution I found was DWM1000 UWB modules and, well, you can look up its price yourself... The rest was feeble attempts at filtering the immense amount of reflection noise out of RSSI in 2.4Ghz modules.

You, sir, are making something that's got a great potential to fill the niche of DIY local positioning.

  Are you sure? yes | no

Wade Bortz wrote 05/20/2018 at 18:51 point

This would be great for small robots around the house - I’ve been thinking about a string bot that would use a similar setup. With three sensors on the robot, you get a relative direction and distance to the beacon, but if the robot can rotate, you don’t know the absolute angle to the beacon, right?  You might need to add a beacon or a magnetometer to work out the mobile sensor’s orientation relative to the room.

  Are you sure? yes | no

ActualDragon wrote 05/01/2018 at 18:51 point

How about a antenna tracker for long range drones? If you can make it cheaper than $200 and start producing them, you'll own the market.

  Are you sure? yes | no

Joseph Primmer wrote 05/01/2018 at 21:13 point

Coincidentally, for my project team for school (that creates an autonomous aerial vehicle), I am in charge of maintaining and improving the antenna tracker system. It uses the GPS position of the vehicle and the antenna tracker to calculate what way to point the patch antennas. Though, currently this system is in a perpetual state of falling apart and not working very well, so I'm probably going to be tasked to redesign it. Is this what you meant by an "antenna tracker"? I could possibly document the redesign on Hackaday. 

  Are you sure? yes | no

Ted Yapo wrote 05/01/2018 at 14:50 point

I like it!

One thought occurs - would it be advantageous to use multiple beacons instead of multiple sensors on the module?  That way, you can leverage diversity - the sensor only needs line-of-sound to any 3 of the beacons.

  Are you sure? yes | no

Joseph Primmer wrote 05/01/2018 at 15:27 point

This is a good idea and would be a good solution for a system where beacons are fixed in one place (like in a room) or mounted on a larger moving object (like a car). However, I am attempting to design a system where a beacon could be quickly attached to or carried by a moving object (like a human), and then have a robotics system track that location. Maybe I can eventually make two different versions of this project each targeting different applications!   

  Are you sure? yes | no

Ted Yapo wrote 05/01/2018 at 15:38 point

Oh, that makes sense.  Somehow I envisioned fixed-position beacons.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates