This project uses two ultrasonic sonars HC-SR04
mounted back to back to sweep out a 360° proximity radius.
Full Module | HC-SR04 Mount |
---|---|
![]() |
![]() |
The ultrasonic sensors and servo are controlled by an Arduino Uno, which transmits the distance value from each sensor for the 1-180 degree sweep over a serial connection. An Electron
(Node.js) application uses the library serialport
to pick up each update compiling them into an array and graphic. The radar GUI is produced using the HTML canvas. Interpolating the cylindrical coordinates to the required cartesian system is required.
This is an example of the radar output. The red dot in the center represents the scanner and red line the current angle being scanned. The sensor has a maximum range of 400-500cm however this GUI implementation limits that view to 200cm max.