Handheld Sonic Radar

Handheld Sonic Radar

thingiverse

<H1>Handheld Sonic Radar</H1> There are lots of Arduino "Sonic Radar" projects out there using the HC-SR04 sensor and the SG90 servo. Many of these export the data to processing by an external computer for display on a monitor. Few of them actually use a TFT display that is directly attached to the Arduino. As these TFT displays are getting less expensive and more affordable, I wanted to keep this portable as a standalone unit with battery pack. This project uses the 3.5 inch TFT display shield for the Mega 2560 to display the "sonic radar" graphics. It is one thing to get the data to the serial monitor. It is another thing to create the graphics for the display and use trigonometry to graph the image. Special graphics libraries with fonts and shapes need to be tried out and tested to get this to work. This project ended up being a journey off the deep end for me. I found ThePinPnz youtube channel to see what he had done with a 128x160 display and adapted his code to work with the larger 480x320 display shield. I also removed the excess scan lines and kept a singular scan line while refreshing after one complete left-right cycle rather than at half cycle intervals. I also tightened up the range from 40 to 140 degrees rather than sweep from 0 to 180. I also used the SR04.h library to calculate distance from the sound echo. Anyway, thanks to ThePinPnz for getting me started with the seed sketch. (https://www.youtube.com/watch?v=4UAooEcI3QQ) Thanks to Bodmer for the HX8357 library and for using speedy hardware SPI graphics mode. Also, thanks to Christine86 for making this case as a starting point for my odd looking remixed case. To my dismay, I am finding out that the Mega 2560, Uno, and Nano operate at the same clock speed. The display shield is only for the Mega 2560. <B>Parts:</B> 3.5" TFT LCD Display ILI9486/ILI9488 480x320 36 Pins for Arduino Mega2560 Mega 2560 (I used an Elegoo model) SG90 servo HC-SR04 ultrasonic sensor (Elegoo model) various wires to connect servo and sensor (see sketch for control pins, 5V and GND) Servo, SR04, and TFT_HX8357 libraries are needed to compile the code. Google: Bodmer HX8357 Sketches: (choose one and rename the .txt with .ino) activeradar-hx-48-ino.txt (48 cm range) activeradar-hx-96-ino.txt (96 cm range) <hr> <H3>Updates</H3> Update 1: I modded the Radar_platform_lid to rev 2 as it did not sit exactly as I would like with the display shield I am using. I could have sanded it down, but I moved the viewport and flipped it onto the flat side so that it will print properly without too much slicer adjustment. I am removing the old lid file. The original lid file will be with the original case that I am remixing this from. I also updated the photo to show it centered with the screen. Update 2: Added two more sketches that clean up the code a bit, refresh the grid at strategic intervals, increase the font size and color code the Distance (red) and Angle (purple) output, and replaced the gray background with black for better contrast. R2 Sketches: (choose one and rename the .txt with .ino) activeradar-hx-48-r2-ino.txt (48 cm range) activeradar-hx-96-r2-ino.txt (96 cm range) I'll leave the original sketches in case they are preferred. <hr>

Download Model from thingiverse

With this file you will be able to print Handheld Sonic Radar with your 3D printer. Click on the button and save the file on your computer to work, edit or customize your design. You can also find more 3D designs for printers on Handheld Sonic Radar.