Faux Radar Uses Ultrasound & Python

Radars are simply cool, and their portrayal in movies and TV has a lot to do with that. You get a sweet glowing screen that shows you where the bad guys are, and a visual representation of your missiles on their way to blow them up. Sadly, or perhaps thankfully, day to day life for most of us is a little less exhilarating. We can make do with a facsimile of the experience instead.

The project consists of an Arduino Uno outfitted with an ultrasound module that can do basic range measurements on the order of tens of centimeters. The module is then placed on a servo and scanned through a 180 degree rotation. This data is passed back to a computer running a Python application, which plots the results on a Plan Position Indicator, or PPI – the sweeping display we’re all so familiar with.

While it’s unlikely you’ll be using such a setup to engage bandits, it could prove as a useful module for robot navigation or similar applications. We’ve seen ultrasonic transducers used for exactly that. Video after the break.

25 thoughts on “Faux Radar Uses Ultrasound & Python

    1. Seriously! Using ATMegas in modern tutorials is a huge pet peeve of mine. Some people like them, which is understandable, but please don’t present it as a good solution for new learners in 2020.

      They are more expensive, slower, more memory-constrained, and often less power efficient than low-end Cortex-M chips. And the Arduino IDE supports a wide variety of platforms these days.

      Remember, kids: friends don’t let friends use ATMegas for education.

        1. Somewhen, I saw an old Electonics Projects something book that did exactly that. Ultrasonic emitters, CRT display, tube amplifiers etc. A snowball’s chance in Vegas of it getting built even ?? years ago since the parts were long past obsolete even then.

      1. When your peeves become as familiar as pets, it is probably time to admit ownership and only talk about yourself while discussing them.

        Anything with tight timing, the atmega line is nearly identical to program to a Cortex-M. 1 instruction per clock cycle. A small variable delay from the pipeline when coming out of sleep modes. Peripherals controlled by writing to registers. Similar interrupts.

        I use both all the time, though I sure as heck don’t use “arduino.” Maybe your peeve is actually that you use arduino, instead of that other people use atmega?

        Remember, kids: Friends don’t let friends push pet peeves on others. That’s called “peer pressure,” and you should Just Say No. Echo chambers produce shop myths, not education.

    2. I made something similar but less polished and I Needed more power in placement of sensor IMO then processing. I did this with a small PIC and functionally was identical but used Pygame to plot.

      What I really wanted was linear translation as well as rotation as I found scattered and deflected pings most damaging to the “radar”

      1. False. Many people commenting only clicked on the blog post; no mission is accomplished unless you click on the video and they make the advertising money. That’s how sponsored posts usually work.

        Using technically accurate vocabulary would make it more like that I would click it. Though a video is still a difficult sell, especially during a pandemic when we’ve all been practicing social isolation and have become more meditative, more comfortable with deeper thinking.

  1. this is cheep arduino fun and a good coding excersize
    instead of ‘stepping’ the servo between each distance reading,
    try sweeping at servo speed and record servo angle with distance.

      1. Lewin, it’s a nice article!

        I really don’t like the word choice, however: A motorboat is not a “faux car”; it’s a boat, and we have words for that. In the title, sure, make it reasonably attractive to readers who might have heard about RADAR but not SONAR, but the RA in radar is simply for “radio”; instead of claiming a working device is a fake other device, name that working device as what it is, at least in the article body :)


        1. Right, but its design is to imitate the RADAR used in the Aliens movie, so it was in keeping with theme..

          Besides, either way SOMEONE was going to find a fault, because you know, its Sunday…

  2. An interesting pure sonar project, I would like this on a Raspberry Pi robot system. The transfer to RPi should be no problem at all. But I am considering using a Arduino or some other Microprocessor to process IO and use a Servo board for PWM . I will also be looking at an alternative to sonar – a laser perhaps LiDar but that is an expensive solution. Any tips most welcome

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.