El Cheapo Phased-Array Sonar

Sonar is a great sensor to add to any small-scale robot project. And for a couple bucks, the ubiquitous HC-SR04 modules make it easy to do. If you’ve ever used these simple sonar units, though, you’ve doubtless noticed that you get back one piece of information only — the range to the closest object that the speaker is pointing at. It doesn’t have to be that way. [Graham Chow] built a simple phased-array using two SR04 modules, and it looks like he’s getting decent results.

PB211200The hack starts out by pulling off the microcontroller and driving the board directly, a hack inspired by [Emil]’s work on reverse engineering the SR04s. Once [Graham] can control the sonar pings and read the results back, the fun begins.

[Graham] uses TI’s Cortex M4F LaunchPad eval kit to generate a ping and receive the reflections. With normal sonar, the time between the ping being sent and its reception is determined by the range to the target. In a phased array, in this case just the two modules, the difference in the times it takes for the ping to return to each module is used to determine the angle to the target.

phased_array_sonar_tableau

If you’re DSP-savvy, [Graham] is using a phase-shifted square wave signal so that the correlations of the sent and returned signals have better peaks. This also helps the peaks in correlation across the two SR04s in the array. We think it’s pretty awesome that [Graham] is resolving a couple of degrees in angular separation when he moved his wine bottle. With a couple more SR04 units, [Graham] could start to get height information back as well.

For not much scratch, [Graham] has himself an experimental setup that lets him play with some pretty heavy signal processing. We’re impressed, and can’t wait to see what’s next. Special thanks to [Graham] for posting up the code.

And thanks [João] for the tip!

Looking Inside The Arksen Dual Power Supply

I recently picked up an Arksen dual power supply. You’ve seen these before, I’m sure, under a variety of names in places ranging from electronics stores to eBay. They look amazing for the price, and while I didn’t expect it to measure up to some of the pro supplies I have, I just wanted something to stick under my desk instead of having to move things to the bench or–worse–drag a heavy power supply over to my desk.

When I was putting together the sonic motion sensor, I found that the HC-SR04 module needed more current than I could draw out of an Arduino Leonardo. I figured this would be a good chance to use the new supply in anger. It seemed to work without too many problems. But there were a few things you might want to know if you have a similar supply or are thinking about getting a similar one.

Continue reading “Looking Inside The Arksen Dual Power Supply”

Bootstrapping Motion Input With Cheap Components

Motion control is a Holy Grail of input technology. Who doesn’t want an interface that they can control with simple and natural movements? But making this feel intuitive to the user, and making it work robustly are huge hills to climb. Leap Motion has done an excellent job creating just such a sensor, but what about bootstrapping your own? It’s a fun hack, and it will give you much greater appreciation for the currently available hardware.

Let’s get one thing straight: This device isn’t going to perform like a Leap controller. Sure the idea is the same. Wave your hands and control your PC. However, the Leap is a pretty sophisticated device and we are going to use a SONAR (or is it really SODAR?) device that costs a couple of bucks. On the plus side, it is very customizable, requires absolutely no software on the computer side, and is a good example of using SONAR and sending keyboard commands from an Arduino Leonardo to a PC. Along the way, I had to deal with the low quality of the sensor data and figure out how to extend the Arduino to send keys it doesn’t know about by default.

The Plan

The plan is to take an inexpensive SONAR module (the HC-SR04) and an Arduino Leonardo and use it to perform some simple tasks by mimicking keyboard input from the user. The Leonardo is a key element because it is one of the Arduinos that can impersonate a USB keyboard (or mouse) easily. The Due, Zero, and Micro can also do the trick using the Arduino library.

I wanted to determine how many gestures I could really determine from the HC-SR04 and then do different things depending on the gesture. My first attempt was just to have the Arduino detect a few fingers or a hand over the sensor and adjust the volume based on moving your hand up or down. What I didn’t know is that the default Arduino library doesn’t send multimedia keys! More on that later.

Continue reading “Bootstrapping Motion Input With Cheap Components”

Water Tank Monitoring System Is Now Slug-Proof

[Peter] is doing his part toward protecting the environment and conserving water. He’s built a rainwater collection system complete with an underground storage tank. Since he wanted to monitor the water level in the tank, he made a level indicating system. Everything was going well until one day out of nowhere it stopped working, only returning 0’s as the level. [Peter] took a look and found that I slug had made its way into the electronics enclosure and slimed up the traces on the PCB, causing short circuits.To fix the problem [Peter] decided to redesigned the system. This time it would be built into an all-weather electrical box. The system uses a standard hobby ultrasonic range finder to measure the distance from the top of the tank to the level of the water. Two holes cut into the electrical box allow the sender/receiver components to peek outside of the enclosure. Any gaps were then filled with sealant. [Peter] also added a thermistor to measure the temperature inside the tank.The sensor values are read by an Arduino and sent wirelessly to [Peter]’s computer via a pair of XBee’s and a second Arduino with an ethernet shield. The data are sent in 3 minute intervals and automatically stored in a MySQL database for quick reference of level and temperature trends. Now [Peter] can monitor his rain water remotely and adjust his usage habits accordingly. Want to read more about water tanks? Check out this overflow monitor system.

Fail Of The Week: Sonar Submersibility Sealing

For the last decade or so, [Jason] has wanted to build an underwater robot. Can you blame him? More recently, he’s been researching sonar sensing and experimenting with the relatively inexpensive HC-SR04 module. Since he had good luck getting it to work with a PC sound card and a Stellaris Launchpad, he figured it was time to try using it underwater.

Hydrophone research led him to the idea of submerging the sensor in mineral water oil to both seal it and couple it with the water. Unfortunately, the HC-SR04 only sends one pulse and waits for echo. Through the air, it reliably and repeatedly returned a small value. Once inside a pill bottle filled with mineral oil, though, it does something pretty strange: it fluctuates between sending back a very small value and an enormous value. This behavior has him stumped, so he’s going to go back to the Launchpad unless you can help him figure out what’s going on. Should he use a different method to seal it?


2013-09-05-Hackaday-Fail-tips-tileFail of the Week is a Hackaday column which runs every Thursday. Help keep the fun rolling by writing about your past failures and sending us a link to the story — or sending in links to fail write ups you find in your Internet travels.

THP Hacker Bio: Felix Rusu

As far as entries for The Hackaday Prize go, Moteino is exceptionally interesting. It’s the only project to be used in other projects for The Hackaday Prize. The two other projects making use of the Moteino, 433MHz transceiver and Plant Friends didn’t make the cut, but [Felix]’s Moteino did.

Like many of the Internet of Things project, Moteino is a radio module and a microcontroller in an extremely convenient package. The radio is a HopeRF RFM69 operating in the  315, 433, 868 and 915MHz ISM bands. The microcontroller is everyone’s favorite – the ATMega328, but [Felix] also has a Mega version with the ATMega1284 on board. Already there are a few great examples of what the Moteino can do, including a mailbox notifier, a sump pump monitor, and a way to Internetify a water meter.

[Felix]’s bio below.

Continue reading “THP Hacker Bio: Felix Rusu”

A Virtual Touchscreen (3D Ultrasonic Radar)

virtualtouch

Producing items onto a screen simply by touching the air is a marvelous thing. One way to accomplish this involves four HC-SR04 ultrasonic sensor units that transmit data through an Arduino into a Linux computer. The end result is a virtual touchscreen that can be made at home.

The software of this device was developed by [Anatoly] who translated hand gestures into actionable commands. The sensors attached to the Arduino had an approximate scanning range of 3m, and the ultrasonic units were modified to broadcast an analog signal at 40 kHz. There were a few limitations with the original hardware design as [Anatoly] stated in the post. For example, at first, only one unit was transmitting at a time, so there was no way the Arduino could identify two objects on the same sphere. However, [Anatoly] updated the blog with a 2nd post showing that sensing multiple items at once could be done. Occasionally, the range would be finicky when dealing with small items like pens. But besides that, it seemed to work pretty well.

Additional technical specifications can be found on [Anatoly]’s blog and videos of the system working can be seen after the break.

Continue reading “A Virtual Touchscreen (3D Ultrasonic Radar)”