Garage Distance Sensor Kicks Tennis Ball To Curb

Those with small garages might be familiar with the method of hanging a tennis ball from a ceiling to make sure they don’t hit the back wall with their car. If the car isn’t in the garage, though, the tennis ball dangling from a string tends to get in the way. To alleviate this problem, [asaucet] created a distance sensor that can tell him when his car is the perfect distance from the garage wall.

At the heart of the distance sensor is an HC-SR04 ultrasonic rangefinder and a PIC16F88 microcontroller. [asaucet] uses a set of four LEDs to alert the driver how close they are to the garage wall. [asaucet] also goes into great detail about how to use an LCD with this microcontroller for setting up the project, and the amount of detail should be enough to get anyone started on a similar project.

While this isn’t a new idea, the details that [asaucet] goes into in setting up the microcontroller, using the distance sensor, and using an LCD are definitely worth looking into. Even without this exact application in mind, you’re sure to find some helpful information on the project page.

Continue reading “Garage Distance Sensor Kicks Tennis Ball To Curb”

Measuring Air Flow With Ultrasonic Sensors

Measuring air flow in an HVAC duct can be a tricky business. Paddle wheel and turbine flow meters introduce not only resistance but maintenance issue due to accumulated dust and debris. Being able to measure ducted airflow cheaply and non-intrusively, like with this ultrasonic flow meter, could be a big deal for DIY projects and the trades in general.

The principle behind the sensor [ItMightBeWorse] is working on is nothing new. He discovered a paper from 2015 that describes the method that measures the change in time-of-flight of an ultrasonic pulse across a moving stream of air in a duct. It’s another one of those “Why didn’t I think of that?” things that makes perfect sense in theory, but takes some engineering to turn into a functional sensor. [ItMightBeWorse] is using readily available HC-SR04 sensor boards and has already done a proof-of-concept build. He’s getting real numbers back and getting close to a sensor that will go into an HVAC automation project. The video below shows his progress to date and hints at a follow-up video with more results soon.

Here’s wishing [ItMightBeWorse] the best of luck with his build. But if things go sideways, he might look to our post-mortem of a failed magnetic flow meter for inspiration.

Continue reading “Measuring Air Flow With Ultrasonic Sensors”

Ultrasonic Raspberry Pi Piano

Cheap stuff gets our creative juices flowing. Case in point? [Andy Grove] built an eight-sensor HC-SR04 breakout board, because the ultrasonic distance sensors in question are so affordable that a hacker can hardly avoid ordering them by the dozen. He originally built it for robotics, but then it’s just a few lines of code to turn it into a gesture-controllable musical instrument. Check out the video, embedded below, for an overview of the features.

His Octasonic breakout board is just an AVR in disguise — it reads from eight ultrasonic sensors and delivers a single SPI result to whatever other controller is serving as the brains. In the “piano” demo, that’s a Raspberry Pi, so he needed the usual 5 V to 3.3 V level shifting in between.

The rest is code on the Pi that enables gestures to play notes, change musical instruments, and even shut the Pi down. The Pi code is written in Rust, and up on GitHub. An Instructable has more detail on the hookups.

All in all, building a “piano” out of robot parts is surely a case of having a hammer and every problem looking like a nail, but we find some of the resulting nail-sculptures arise that way. This isn’t the first time we’ve seen an eight-sensor ultrasonic setup before, either. Is 2017 going to be the year of ultrasonic sensor projects? Continue reading “Ultrasonic Raspberry Pi Piano”

Octosonar Is 8X Better Than Monosonar

The HC-SR04 sonar modules are available for a mere pittance and, with some coaxing, can do a pretty decent job of helping your robot measure the distance to the nearest wall. But when sellers on eBay are shipping these things in ten-packs, why would you stop at mounting just one or two on your ‘bot? Octosonar is a hardware and Arduino software library that’ll get you up and running with up to eight sonar sensors in short order.

Octosonar uses an I2C multiplexer to send the “start” trigger pulses, and an eight-way OR gate to return the “echo” signal back to the host microcontroller. The software library then sends the I2C command to select and trigger a sonar module, and a couple of interrupt routines watch the “echo” line to figure out the time of flight, and thus the distance.

Having two sonars on each side of a rectangular robot allows it move parallel to a wall in a straightforward fashion: steer toward or away from the wall until they match. Watch the video below for a demo of this very simple setup. (But also note where the robot’s 45-degree blind spot is: bump-bump-bump!)

Continue reading “Octosonar Is 8X Better Than Monosonar”

Open Source Robotics With WireBeings

Everyone needs a cute robotic buddy, right? [Matthew Hallberg] created WireBeings, an open source 3D printed robotic platform. Looking like a cross between Wall-E and Danbo, WireBeings is designed around the Arduino platform. We do mean the entire platform. You can fit anything from an Arduino micro to a Mega2560 stacked with 3 shields in its oversized head. There’s plenty of room for breadboards and custom circuits.

WireBeings is designed to be 3D printed. All the non-printable parts are commonly available. Gear motors, wheels, the ubiquitous HC-SR04 ultrasonic sensor, and a few other parts are all that is needed to bring this robot to life. Sketches are downloaded via USB. Once running, WireBeings can communicate via an HC-06 Bluetooth module.  If the Arduino isn’t enough power for whatever project you’re working on, no problem. [Matt] designed WireBeings to carry a smartphone. Just connect the robot and phone via Bluetooth, and let the phone’s processor do all the heavy lifting. What if you don’t have a spare phone? Check our report on hacks using prepaid Android Smartphones.

We could see WireBeings as the centerpiece for a “learn Arduino” class at a hackerspace. Start with the classic blinky sketch on one of the robot’s eyes. Build from there until the students have a fully functioning robot.

There is definitely room for improvement on the WireBeings project. [Matt] made the rookie mistake of going with a single 9-volt battery to power his creation. While a 9V is fine for the Arduino, those motors will quickly drain it. [Matt’s] planning on moving to a LiPo in the future. Why not stop by the project page and give him a hand?

Continue reading “Open Source Robotics With WireBeings”

Hacklet 91: Ultrasonic Projects

Ultrasound refers to any audio signal above the range of human hearing. Generally that’s accepted as 20 kHz and up. Unlike electromagnetic signals, ultrasonics are still operating in a medium – generally the air around us. Plenty of animals take advantage of ultrasonics every day. So do hackers, makers, and engineers who have built thousands of projects based upon these high frequency signals. This weeks Hacklet is all about the best ultrasonic projects on Hackaday.io!

spambakeWe start with [spambake] and World’s Smallest Bat Detector. [Spambake] is interested in bats. These amazing creatures have poor eyesight, but that doesn’t slow them down. Bats use echolocation to determine their surroundings. Ultrasonic chirps bounce off obstacles. The bat listens to the echos and changes its flight path accordingly. While we can’t hear most of the sounds bats make, electronics can. [Spambake] cooked this circuit up starting with a MEMs microphone. These microphones pick up human sounds, but unlike our ears, they can hear plenty above the 20 kHz range. The audio signal is passed through an amplifier which boosts the it up around 10,000 times. The signal is filtered and then used to trigger LEDs that indicate a bat is present. The final circuit works quite well! Check out [spambake’s] video to see the bat detector in action!

movvaNext up is [Neil Movva] with Pathfinder – Haptic Navigation. Pathfinder uses ultrasonic transducers to perform echolocation similar to bats. The received data is then passed on to a human wearer. [Neil’s] idea is to use Pathfinder to help the visually disabled and blind navigate the world around them. Pathfinder was a 2015 Hackaday Prize finalist. The ultrasonic portion of Pathfinder uses the ubiquitous HC-SR04 distance sensor, which can be found for as little as $2 USD on eBay and Alibaba. These sensors send out a 60 kHz signal and listen for the echos. A microcontroller can then measure the time delay and determine the distance from the sensor to an obstacle. Finally the data is passed on to the user by a vibrating pager motor. [Neal] was kind enough to give a talk about Pathfinder at the 2015 Hackaday SuperCon.

levitate[HoboMunching] likes his ultrasonic devices ultra powerful, and that’s just what he’s got with Ultrasonic Levitation Rig. Inspired by a similar project from Mike, [HoboMunching] had to build his own levitation setup. Ultrasonic levitation used to be a phenomenon studied only in the laboratory. Cheap transducers designed for the industrial world have made this experiment practical for the home hackers. [HoboMunching] was able to use his rig to levitate up to 8 tiny balls on the nulls between the 28.5 kHz sound waves produced by his transducer. The speed of sound can be verified by measuring the distance between the balls. Purists will be happy to hear that [HoboMunching]’s circuit was all based upon the classic 555 timer.

speaker-arrayFinally we have [Alan Green] with Ultrasonic Directional Speaker V1. Most audio signals are not very directional, due to wavelength and practical limitations on speaker size. Ultrasonics don’t have this limitation. Couple this with the fact that ultrasonic signals can be made to demodulate in air, and you have the basis for a highly directional speaker setup. “Sound lasers” based on this system have been around for years, used in everything from targeted advertising to defensive weapons. [Alan] is just getting started on this project. Much of his research is based upon [Joe Pompei’s] work at the MIT media lab. [Alan] plans to use an array of ultrasonic transducers to produce a directional signal which will then demodulate and be heard by a human. This project has a hard deadline though:  [Alan] plans to help his son [Mitchell] with a musical performance that is scheduled for May, 2016. The pair hope to have a prototype in place by March.

If you want to see more ultrasonic projects, check out our new ultrasonic projects list! If I missed your project, don’t be shy! Just drop me a message on Hackaday.io. That’s it for this week’s Hacklet. As always, see you next week. Same hack time, same hack channel, bringing you the best of Hackaday.io!

Ball Balancing Arduino-Style

If you have a good sense of balance, you can ride a unicycle or get on TV doing tricks with ladders. We don’t know if [Hanna Yatco] has a good sense of balance or not, but we do know her Arduino does. Her build uses the ubiquitous HC-SR04 SONAR sensor and a servo.

This is a great use for a servo since a standard servo motor without modifications only moves through part of a circle, and that’s all that’s needed for this project. A PID algorithm measures the distance to the ball and raises or lowers a beam to try to get the ball to the center.

Continue reading “Ball Balancing Arduino-Style”