Viewable With Any Browser


Todays date:
Sunday 03rd of December 2023 01:56:37 PM

You are visitor


Your IP address is

Page last updated
29 Nov 2023

Advanced robot sonar project

On these pages you will find details of our advanced robot sonar project.

Or what we are calling "The So Now Sonar."

2022 update

We worked on this project in 2020. The video from that stage of our work is on youtube and there is a link below.

2020 radar update

Scroll down to see what we have done in 2022, including new code to make this work. Or click this link....

2022 radar update

Slight adaptation to increase the window size. Scroll down to see what we have done in 2023, including new code to make this work. Or click this link....

2023 radar update

The original youtube video

We thought our work on the 360ยบ radar might be of interest to others, so we put together a short Youtube video, briefly describing what we had so far. Sooner than we thought, people were visiting these pages, seemingly to find out more.

We began to work on this page, then realised that several of our projects were based on the same turntable design. So we back-tracked a little, finished the turntable page, then came back to finish this page.

If you have not seen it, the video is below.

The story so far

This all dates back several years, even before the HC-SR04 sonar ranger module was born.

In fact, the Arduino and Raspberry Pi boards were not yet in existence at that time.
We had to make all our prototype boards and back then, there was a very limited range of programmable processors.
We were pretty much restricted to some flavour of Microchip PIC processor. There were others, but don't even get me started on 8086 and 68000 etc... etc... etc...
Other than that, most of our projects were based on good old fashioned descreet analog and digital devices.

I somehow got bitten by the robot bug and started playing around with H-Bridges, servos and motors and stuff.
I was also toying with my ideas of how a robot might autonomously navigate from point A to point B, detect other robots/vehicles/cats/dogs/etc. and perhaps target them accurately in order to attack them in novel ways. More on the rapid fire laser cannon later.

World domination would then just be a natural next step. Right?

I was working for a company, designing stuff to track vehicles using GPS. For me, it was easier to make an ocean going drone (given the funding) to navigate from Southampton to Florida, than it was to make an ROV to autonomously navigate from one side of a factory floor to the other.
The main problem was the available sensors for accurate short range location, detection and navigation.

Clearly, we would have to make our own.

So, armed with a couple of ultrasonic transducers from Maplin Electronics (RIP) (they stocked them mainly for their own ultrasonic car alarm kit), I experimented driving them with more power for longer range, built parabolic(ish) reflectors and sensitive detector circuits, to squeeze as much range and accuracy out of them as possible. I seem to remember good results up to about 10 metres.

At about that time I became aware of girls and went off to experiment with those instead.

Several misadventures later, I got to wondering what it was that I was doing before I got so distracted by girls and stuff.

So putting girls on the back burner, for now at least, back to robotics I went, finding just how much technology had evolved for the 'home constructor' as we were called back in the day.

I use the term 'putting girls on the back burner' merely as a figure of speech. I have not actually disposed of any in this manner, yet.

Still, I digress.....

My simple robot platform is nearly finished, I hope to have it ready for when the snow hits the U.K. this year.

As a side project, I resurrected the robot radar/sonar system. Now though, I have a 3D printer which is a fantastic tool for prototyping.

Let's get on and look at what we have so far.

The HC-SR04

After the turntable, the next important thing would be the detector.

For simplicity sake, we went for the HC-SR04 ultrasonic range finder module. It is inexpensive, widely available, simple to use, and it works for short range.
It is rated for about 400cm but the ones we tested could not see further than 200cm.

We will not describe these modules further. There is plenty of data on the information-super-traffic-jam already, so we will not clutter it up more with another description..

Later however, we will show our own design which greatly enhances range and accuracy.


The PCB, was basically a small piece of Veroboard, with a 4 pin female header attached.

The wires from below the turntable, would pass through the slip ring and were soldered to the PCB.
Those were then connected to the 4 pin header, so that the HC_SR04 was plugged into the header and therefore connected to 4 wires coming out of the bottom of the turntable.

These wires were then connected to our prototype board.

I did try using DesignSpark PCB to make something tangible for you to see, but it has been a very long time since I used Circuit design, schematic, PCB software and, this particular circuit has many variations, so a schematic and PCB example will come soon.

Arduino code (2020)

As requested by some viewers, the link below points to the Arduino source code.


Processing code (2020)

As also requested by some viewers, the link below points to some experimental Processing code.


For the above code to work, you may need the sample data file 'pings.json' to be placed in your project data directory.


Please note, this is my 'current' project and is changing daily.

This is being worked on March 2023.

2020 robot radar

We worked on this project in 2020. There is a 2022 update below. The 2020 versions are shown here for reference. The video is on youtube and there is a link below.

Experimental/development page (2020)

The following page is experimental. If it is broken, it is because I am working on it now.

>>development page>>

download draw.php

2022 robot radar

We have been working on this project again recently, The new video is on youtube but there is a link below. Keep checking back for updates.

2022 robot radar code

You may remember that, in order to cater for most users, the radar ping data was stored in data files. This was O.K for giving users a feel for how the system worked and how to visualise data.
We went through the code again in the hope we could simplify it and have it provide 'live' data.

The Arduino code controls the stepper motor. It rotates the rotor mast one step at a time. With the motors we are using, along with the gear ratios, we have 512 steps per full rotation.
After the mast has rotated one step, the sonar module is triggered, taking a distance measurment.
The data is put together in a short comma-separated-values string and sent out of the serial port. Keeping the functions modular, we have the options to use different types of display.
If our hardware can receive serial data and process it, to a screen or a database for more processing etc. we have more options available.

In our case we will use Processing to retrieve the data and display it on screen.

The processing application reads data from the serial port. It then draws 'pings' to the screen with the correct distance and range. It then slowly fades the old pings, as would a 'real' radar.

The first two serial values received are angle to object and range to object.
The third value is not currently used but is for the magnitude of the echo.
More sensitive sonar devices may be able to detect the size of an object and therefore transmit a bigger or smaller echo

Arduino code (2022)

As requested by some viewers, the link below points to the Arduino source code.


Processing code (2022)

As also requested by some viewers, the link below points to some experimental Processing code.


Processing code (2023)

As also requested by one Youtube viewer, the link below points to more experimental Processing code.

This code is adapted to fit a window of 800x800 pixels.


3D printer files

For those of you lucky enough to own a 3D printer, here are our .STL files.






Ongoing project

Please note, this is our 'current' project and is changing daily.

This is being worked on November 2023.