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!

Update: Battlezone On Vector Display Step-by-Step

When we ran the story of Battlezone played on tube displays earlier this week there were immediately questions about recreating the hack. At the time the software wasn’t available, and there is also a bit of hardware hacking necessary to get the audio working. You asked and [Eric] from Tubetime delivered. He’s posted a pair of articles that show how to get an STM32F4 Discovery board to play the classic game, along with instructions to build the firmware.

The hardware hack in this case is untangling the pinout used on the discovery board. It seems that one of the lines needed to get sound working for this hack is tied to one of the two DACs. If you read the original coverage you’ll remember that both of the DACs are used to drive X and Y on the vector display. The image above shows a cut trace on the bottom of the board. You’ll then need to route that signal to an alternate pin by soldering a jumper wire from the chip to a resistor on the board.

This (as well as one other alteration that bridges two of the chip pins) is a great example of work you should be unafraid to do on your own dev boards. We’ve had to do it with the Launchpad boards to get at the functionality we needed. We’d like to hear your own epic stories of abusing dev boards to do your bidding. Let us know in the comments.

Logic Noise: Sawing Away With Analog Waveforms

Today we’ll take a journey into less noisy noise, and leave behind the comfortable digital world that we’ve been living in. The payoff? Smoother sounds, because today we start our trip into analog.

If you remember back to our first session when I was explaining how the basic oscillator loads and unloads a capacitor, triggering the output high or low when it crosses two different thresholds. At the time, we pointed out that there was a triangle waveform being generated, but that you’d have a hard time amplifying it without buffering. Today we buffer, and get that triangle wave out to our amplifiers.

triangle_square

But as long as we’re amplifying, we might as well overdrive the amps and head off to the land of distortion. We’ll do just that and build up a triangle-wave oscillator that can morph into a square wave, passing through a rounded-over kinda square wave along the way. The triangle sounds nice and mellow, and the square wave sounds bright and noisy. (You should be used to them by now…) And we get everything in between.

And while we’re at it, we might as well turn the triangle wave into a sawtooth for that nice buzzy-bass sound. Then we can turn the fat sawtooth into a much brighter sounding pulse wave, a near cousin of the square wave above.

What’s making all this work for us? Some dead-boring amplification with negative feedback, and the (mis-)use of a logic chip to get it. After the break I’ll introduce our Chip of the Day: the 4069UB.

If you somehow missed them, here are the first three installments of Logic Noise:

Continue reading “Logic Noise: Sawing Away With Analog Waveforms”

Logic Noise: The Switching Sequencer Has The Beat

Logic Noise is all about using logic circuits to make sounds. Preferably sound that will be enjoyable to hear and useful for making music. This week, we’ll be scratching the surface of one of my favorite chips to use and abuse for, well, nearly anything: the 4051 8-way analog switch. As the name suggests, you can hook up eight inputs and select one from among them to be connected up to the output. (Alternatively, you can send a single input to one of eight destinations, but we won’t be doing that here.)

Why is this cool? Well, imagine that you wanted to make our oscillator play eight notes. If you worked through our first installment, you built an abrasive-sounding but versatile oscillator. I had you tapping manually on eight different resistors or turning a potentiometer to eight different positions. This week, we’ll be letting the 4051 take over some of the controls, leaving us to do the more advanced knob twiddling.

Continue reading “Logic Noise: The Switching Sequencer Has The Beat”

Logic Noise: 8-bits Of Glorious Sounds

Logic Noise is all about using analog circuits to make sounds. Preferably sound that will be enjoyable to hear and useful for making music. Now, the difference between music, sound, and noise is certainly in the ear of the behearer, but you must admit that last installment’s simple square wave lacked a little something. (Although the sync oscillator circuit extension was kinda cool.)

This week, we’ll take our single wimpy square-wave oscillator and beef it up by adding a bunch of sub-octaves to the mix. And we’ll do it using a chip that’ll be really useful for us in the future as well: the 4040 binary counter chip.

Counters (binary or decimal) are going to be fertile ground for more musical noise experiments. Why so? Because octaves are just doublings or halvings of frequencies, and because a lot of rhythmic patterns have factors of two underlying them.  Just think about the most basic drum pattern you know: bass drum on the one, snare on one and three, and hi-hats on one, two, three, and four. Each different instrument fires off twice as frequently as the one before it.

But for now, enough blabber. We’ve got an oscillator to build.

Continue reading “Logic Noise: 8-bits Of Glorious Sounds”

SingLock

SingLock Protects Your Valuables From Shy People

Two Cornell students have designed their own multi-factor authentication system. This system uses a PIN combined with a form of voice recognition to authenticate a user. Their system is not as simple as speaking a passphrase, though. Instead, you have to sing the correct tones into the lock.

The system runs on an ATMEL MEGA1284P. The chip is not sophisticated enough to be able to easily identify actual human speech. The team decided to focus their effort on detecting pitch instead. The result is a lock that requires you to sing the perfect sequence of pitches. We would be worried about an attacker eavesdropping and attempting to sing the key themselves, but the team has a few mechanisms in place to protect against this attack. First, the system also requires a valid PIN.  An attacker can’t deduce your PIN simply by listening from around the corner. Second, the system also maintains the user’s specific voice signature.

The project page delves much more deeply into the mathematical theory behind how the system works. It’s worth a read if you are a math or audio geek. Check out the video below for a demonstration. Continue reading “SingLock Protects Your Valuables From Shy People”

Tripping On Oscilloshrooms With An Analog Scope

This might be an old trick, but it’s still cool to see a functional tool like the oscilloscope manipulated for an unrelated purpose such as this. [Jerobeam Fenderson] made a video explaining how to input stereo audio into an old digital scope in order to create of all things, dancing mushrooms… because why not?

In this case, [Jerobeam] used a Tektronix D11 5103N set in X Y mode and attached the left and right channels from his RME Fireface UC audio interface. One channel corresponds with X, and the other with Y. From here, he controls the wave forms discretely with the help of software like Pure Data (Pd) and Max (not free, but more powerful) which are visual programming environments made to enable musicians and artists to create software without writing lines of code. His video explains how to make a circle out of a sine wave, and then beat the crap out of it with math far beyond our comprehension. The outcome is pretty mesmerizing and leaves us wanting to try it out ourselves. Luckily, if you’re interested in experimenting with the voice of sine waves… [Jerobeam] has more information on his blog on how to do some scope play of your own whether your hardware is analog or digital.

You can see the dancing mushrooms in his video below:

Continue reading “Tripping On Oscilloshrooms With An Analog Scope”