Ultrasonic Levitator

by aanvi50 in Circuits > Arduino

20983 Views, 192 Favorites, 0 Comments

Ultrasonic Levitator

IMG_8464.jpg

Most levitation occurs through magnets, but what about making objects levitate with something else, like sound? This design demonstrates acoustic levitation, a concept that uses opposing sound waves to make a tiny object levitate. I created this project in my Principles of Engineering class with the help of Ms. Berbawy and my peers.

Supplies

Screen Shot 2022-05-04 at 7.15.49 PM.png
Screen Shot 2022-05-04 at 7.15.35 PM.png
Screen Shot 2022-05-04 at 7.15.56 PM.png
Screen Shot 2022-05-04 at 7.15.43 PM.png
Screen Shot 2022-05-04 at 7.16.02 PM.png
IMG_7483.jpg

The supplies needed for this project are as listed:

Arduino Nano

Arduino Nano Software

Ultrasonic sensors

9V Battery

Battery Case

Jumper Cables

Breadboard

Styrofoam beads

L298N Chip

2 1/2" x 3 1/8" Perf board (I had not used this in my project, but this can be used at the end to replace breadboard)

1/2" PVC straight pipe (Hardware stores, ex. Home Depot and Lowes)

Two 90° street elbows

One 90° elbow, threaded

Fusion 360 or other CAD software

Access to 3D printer (laser cut wood or acrylic can also be used)

Soldering Iron and wire

Extra tools, ex. pliers, markers, rulers, tweezers, toothpicks, and hot glue

Helping hand (clamps)

Disassemble the Distance Sensor

7AAD2264-53FD-46F8-8FC1-07A120CE8536.jpeg
BC64B998-2232-4DF0-B186-1BE8BDE2F219.jpeg
05F80519-ACC1-45A8-834C-B06E7C7DA308.jpeg

To begin this project, you have to alter the ultrasonic distance sensors by prying off the Transmitters (labeled as T) and components within the sensors. Each board has one transmitter, so two boards are required for this step. This also requires some desoldering to remove the connections of the transmitters from the pcb.

Once those are separated, separate the component and the net from the outer metal shell, and once the net is gone, put back the component in the metal shell. Don’t throw away the netting, this will be useful later.

Program Your Arduino

setup to upload code.png

Moving on to coding, begin by uploading the code onto the Arduino nano on the software linked in the supplies. I’d like to give credits for the code to Ulrich Schmerold on Makezine whose instructions I followed.

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 :)

}

This code emits a 40kHz wave from both ends creating two opposing forces and a middle space for the styrofoam piece to levitate. Compile and upload the code. Make sure the processor and serial ports are correct, I faced some trouble with this. The processor should be selected under Tools>Processor>ATmega328P (old boot loader)

The full schematic and code are available here, once again credit goes to Ulrich Schmerold. makezine.com/go/micro-ultrasonic-levitator

Assemble and Test Circuit

IMG_DED9E22665FF-1.jpg
IMG_8567.jpg
Screen Shot 2022-05-05 at 10.14.34 PM.png
Screen Shot 2022-05-05 at 10.15.29 PM.png
IMG_8618.JPG
Screen Shot 2022-05-05 at 10.25.54 PM.png
Ultrasonic Levitator Test

To make the circuit, follow the schematic provided.

Once everything is set up, solder wires from the to the transmitters from Step 1. Make sure to pay attention to the wire connections from the transmitters to the LN chip, this is an easy thing to overlook.

To test, connect the battery using jumper wires to the breadboard and the LN chip and Arduino will both light up as an indication of a complete circuit. A faint buzzing noise will also occur within the sensors, another indicator that the circuit is working.

This is where the netting from Step 1 comes in handy. Using hot glue, glue the netting to a toothpick and this will be your device to insert the styrofoam between the sound waves. This is much easier than using your hands or tweezers.

It will take some adjusting with the toothpick and the distance between the sensors. For this step, use a clamp or helping hands to hold the sensors in place. The distance that I kept for the sensors was always around 0.4-0.6 inches.

Finishing Up

IMG_7562.jpg
IMG_7488.JPG
IMG_7871.JPG
IMG_0951 2.jpg

The circuit can't stay on the helping hand forever, so let's make a PVC shell to house the circuit and components. Take the PVC straight pipe and cut it to a suitable height for the distance of your sensors. It should be around 2.8 inches. For the top, I used a 90° street elbow and then attached it to a 90° elbow, and then strung the top sensor through. I bought an elbow with threads inside so the sensor can rest on them. Since there was still extra space, I cut up pieces of a sponge to secure the sensors. At the bottom, connect the tee and the 90° elbow and then string the other sensor through. Once again I used a sponge to fill up the extra space.

Now a base has to be made to hold the circuit. I created the base through Fusion 360. At the top, there will be a hole for the tee, I set the tolerance for that to be 0.25 inches. The base has to be tall enough to cover and hold the entire breadboard (or perf board). I also created a hole on the side for the battery wires to snake through as I kept the battery outside the base. The diameter was 5mm.


Conclusion

Ultrasonic Final

Once the base is finished and all the components fit, that's it! Enjoy your Ultrasonic Levitator!

This project was really enjoyable to make, even though I ran into many hiccups. Thanks again to Ms. Berbawy, my peers, and my parents for helping me throughout the way.