Green-Sweep for Your Ultrasonic Rangefinder

Maybe you’ve never programmed an Arduino before. Or maybe you have, but nothing beyond das blinkenlights. Maybe your soldering iron sits in a corner of your garage, gazing at you reproachfully every time you walk by, like a ball begging to be thrown. Maybe you’ve made a few nifty projects, but have never interfaced them with a PC. If this describes you, then this article and project is just what you need. So grab your favorite beverage, tuck in and prepare to get motivated.

[Anuj Dutt] has not only made a really cool project, he has also done a most excellent job at documenting it. It’s an Arduino controlled “RADAR” like project that uses the familiar Parallax ultrasonic sensor. It’s mounted to a servo and feeds data to a PC where a custom VB.NET program translates the data in to a cool “green radar sweep” screen. It also pushes text to an LCD which reveals the distance from the target.

screenshot of radar program

[Anuj Dutt] hand rolled his Arduino just because, but ran into some trouble getting everything to talk to the PC. He wound up using the ultra user friendly FTDI to save the day. Be sure to check out the video below to see the project in action. [Anuj] published the code for both the Arduino and PC in the video description.

26 thoughts on “Green-Sweep for Your Ultrasonic Rangefinder

    1. While I have been known to be critical of posted hacks, I have been even more critical of people who think it some odd right to not be confronted with differing opinions of differences in taste. At the very least reading and ignoring are the option at your disposal. Topically bashing it to a pulp, if you are skillful at such things, also is an option, but demanding to stop it just make you a very ignorable idiot.

    2. If you are not going to be respectful of the posts or of the project, then please keep it to yourself (or better yet, just leave!) – nobody want’s to hear it. If you think you can do a better job, by all means do it and come back to tell us. But don’t criticize somebody just because “a child could do that…”. You produce nothing meaningful to the conversation and are discouraging newbies with their proud projects.

      As for the “stop posting” remark, remember that HaD is open to ALL, new hackers and old-time sparkies alike.

      And this is just my personal opinion based on this comment alone: you are a jerk and an embarrassment to your mother.

      Have a nice day.

    3. Let’s see some of the things that you’ve done. Please post them. Guess what? No matter how lame, we will not be critical. We will be respectful. You put time and effort into something.

      With 30 years engineering experience, I’ve designed things from 3D modules that go inside laptops (see RealSense) and multi-processors Intel,TI, and Freescale on one board. And, I still like the Ultrasonic Rangefinder (Radar). It’s a fun project. Kind of Cool.

    4. I think everyones is being rather polite to you in response to your comment, so i’ll change that now.
      Fuck you, Don’t read the fucking post if you don’t want to. Your statement is bullshit too, the write up alone probably took a while, and a lot of effort clearly went into it.
      I hope you have a shitty day. Cunt.

  1. Would I be a jerk if I pointed out that there’s no RADAR (but a lot of SONAR) in his “RADAR”?

    Other than that, it looks like he built himself a working Arduino and some fun stuff to go with it – not bad for a rookie (which we all were at some point — ahem), and given that he’s documented the heck out of it, possibly instructive for others who are looking for information.

    https://independent.academia.edu/AnujDutt/Papers

      1. If you keep watching all the videos, you will see a radar screen appearing on the 3rd video. But it don’t look like it’s the same project. It seems that the screenshot is from one project, and the video from another.

  2. :)) this is so cute: i did this about a year ago as an afternoon experiment. i wanted to come up with a visualisation of how a robot equiped with ultrasonic sensors would perceive its environment.

    i had this ridiculous dream that i could make an autonomous rover that would take a reading around it then move a certain unknown distance, then rescan, and calculate movement according to the shift in the scan pattern.

    because encoders on the wheels are THEORETICALLY fine, but when the wheels start slipping, you get accumulated errors.

    it came out to be horrible, because as soon as the object in front of the sensor had some facet that was somehow at an angle, where it would not reflect the ultrasound back to the receiver, it would simply fail to detect it any more.

    equally so, for soft surfaces.

    i need to find some better sensor that is not as expensive as hell.

    anyway, it is nice to feel that this could have been me featured on hackaday, even if i dont really feel that i have done ahything special, and in fact, i think my setup was a bit more elegant.

    learning curves, people. learning curves. no matter where you are on your learning curve, i think we should appreciate the fact that this dude is pursuing his.

    while it is not the thing i would EXPECT to see on hackaday, i certainly dont think that berating the dude, or the editors is constructive criticism.

    1. Probably the cheapest would be the LIDAR sensor from a Neato XV-11/21 vacuum cleaning robot. You can find such sensors beings sold as replacement parts (and/or experimentation) on Ebay for around $100.00. They work fine indoors (but not so great outdoors).

      That said, you’ll probably still find that things don’t work as well as expected; but who knows, maybe you’ll come up with a breakthrough…?

      That all said – you could still use the ultrasonic sensor method, as such has been successfully used in the past in a number of ways. The best thing to do is to assume that all of your sensors and all of your outputs are horribly noisy and filled with errors. What the sensor shows is sensing may not be what it is actually sensing, within a given amount of probability. You may command a motor to turn so much, and it does, but the robot doesn’t move the same amount, again within a certain level of probability.

      Once you accept that, you’ll be further down the road. Then you need to investigate something called SLAM (Simultaneous Localization and Mapping) – there’s a good wikipedia entry about it (be sure to research the whole “SLAM for Dummies” article – that one link the wiki article gives isn’t everything published!). Finally, take a look at the Udacity CS373 course – provided that your skills with linear algebra, along with probabilities and stats are ok (or take a refresher course at Khan Academy) – and you understand how to write Python – it’s a great course for learning the basics of SLAM (along with other interesting problems that people doing robotics have common trouble with – like PID and Kalman filters).

      1. Indeed – using a combination of sensors (ultrasound and laser) will give you a better confidence level for each reading when the objects may not reflect nicely. If the two don’t agree within an allowable tolerance, then you can compare with the readings either side, or after you (or the object) has moved. This is why car parking sensors generally use four sensors – partly to ensure the full width of the car is covered, but also by sending out a pulse from one and listening for the reply with itself and the other three (which will receive reflections at different angles), then repeating for the others, gives you 16 readings that you can compare to reduce error.

        Right – time to get some ultrasound sensors ordered and connected to my Arduino. :)

  3. Very cool visual interface. I am working on a project like this as well, trying to get something like the motion tracker from Aliens (like Hirudinea was saying). My current hurdle is the 2 meter mark. Not sufficient. I though of a low tech solution to a high tech problem by using cones on the sensor. I believe this will work for picking up the ping from a further distance however I am not sure if it will push the ping further. Maybe, someone here has tried this already.

Leave a Reply

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