Author: Ulrich Schmerold / Source: Make: DIY Projects and Ideas for Makers
Originally published in the German online edition of Make:. Translation by Niq Oltman.
If you’d like to experiment with ultrasonic levitation — making objects hover in mid-air using just the energy in sound waves! —
you don’t need any scientific equipment, complicated control loop setups, or expensive kits.
Yeah, we admit it, our Micro Ultrasonic Levitator won’t levitate any heavy items. But it’s fascinating enough to watch tiny styrofoam balls hover like magic.
In contrast to magnetic levitation, the ultrasound method does not require a control loop to stabilize the hovering object. Using acoustic levitation, the object simply lodges itself into one of the nodes of a standing acoustic wave. And you can make multiple items hover on top of one another simultaneously, evenly spaced apart!
In our 2/18 issue of Make: German edition, we published two alternative approaches to ultrasonic levitation devices, one of them based on a transducer taken from a gutted ultrasonic cleaner.
But a third approach, the one we’ll show you here, based on an inexpensive distance sensor, is by far the easiest.
1. DISASSEMBLE THE ULTRASONIC SENSOR
This project is based on ultrasonic transducers of the kind used in distance sensors such as the HC-SR04 module, which can be sourced from eBay for less than $2
These modules contain one transducer operating as a transmitter (T), and another serving as a receiver (R). In principle, the T transducer is the better pick for use as an actual transmitter, so we bought two sensors and pulled the T transducers off each of them. (In a pinch, you could buy just one sensor — the R transducer also transmits well enough for your first experiments.)
Desolder both transmitter transducers. While you’re at it, disassemble one of the receiver transducers. Please don’t throw away the small, wire screen from the receiver— it turns out to be unexpectedly useful.
The transducers are designed to operate at 40kHz, the frequency at which they work most efficiently. That signal will be generated by your Arduino Nano.
2. UPLOAD THE ARDUINO CODE
The Arduino sketch below performs most of its work in the setup() stage. First, it sets all analog ports to be outputs. Then, Timer1 is configured to trigger a compare interrupt clocked at 80kHz. Each interrupt simply inverts the state of the analog ports. This turns an 80kHz square signal into a full wave cycling at 40kHz. There’s nothing left to do for the loop() part of the code!
byte TP = 0b10101010; // Every other port receives the inverted signal void setup() { DDRC = 0b11111111; // Set all analog ports to be outputs // Initialize Timer1 noInterrupts(); // Disable interrupts TCCR1A = 0; TCCR1B = 0; TCNT1 = 0; OCR1A = 200; // Set compare register (16MHz / 200 = 80kHz square wave -> 40kHz full wave) TCCR1B |= (1 << WGM12); // CTC mode TCCR1B |= (1 << CS10); // Set prescaler to 1 ==> no prescaling TIMSK1 |= (1 << OCIE1A); // Enable compare timer interrupt interrupts(); // Enable interrupts } ISR(TIMER1_COMPA_vect) { PORTC = TP; // Send the value of TP to the outputs TP = ~TP; // Invert TP for the next run } void loop() { // Nothing left to do here :) }
The full code and schematics are available for free download as a ZIP archive at makezine.com/go/micro-ultrasonic-levitator.
3. BUILD THE CIRCUIT
In theory, you could hook up both transmitters directly to the analog ports on the Arduino Nano, as they require very little current. However, this would limit you to the 5 volts supplied by the Arduino,…
The post Micro Ultrasonic Levitator appeared first on FeedBox.