Introduction: Acoustic Levitation With Arduino Uno Step-by Step (8-steps)

About: I am student studying in 8th grade and I am a Speed Skater and I love it and I want to achieve something great in it and I am a rifle shooter.I want to be a Scientist.

How this works:
First, you upload code to Arduino Uno (it is a microcontroller equipped with digital and analog ports to convert code (C++) into execution). which is all set up in the “setup()” (It is a step to set up all the variables) stage in Arduino IDE software. A variable in the code is set a job to trigger an interrupt (this is to invert the analog ports) at 80Khz. Each time the interrupt is triggered the analog ports are inverted which will cancel out 80khz which is equal to 40khz squared into a full-scale cycle of 40khz (which we need to create it into ultrasonic sound waves). The 40khz squared is in electric pulse but we need ultrasonic sound waves. We can convert electric pulse into ultrasonic sound waves by ultrasonic transducers (converts electric pulse into ultrasonic sound waves). To levitate we need a standing wave and we can levitate things in “nodes” (it is non-moving part of a standing wave) in the standing wave. But we need to distribute the same 40khz electric pulse to both of the transducers, we can do that by the “L298N” ( this circuit board is like a bridge which gives two outputs of the same electrical pulse)which gives both transducers the same electric pulse. So if we power the Arduino connected to the L298N and it is connected to the transducers now the transducers create a standing wave and we can levitate any tiny items in certain conditions in the nodes of it.

Step 1:

First, Upload the code to the Arduino:

<pre style="box-sizing: border-box; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 13px; padding: 9.5px; line-height: 1.42857; color: rgb(85, 85, 85); background-color: rgb(245, 245, 245); border-color: rgb(204, 204, 204); border-radius: 4px;">byte TP = 0b10101010; 

void setup() {

DDRC = 0b11111111; 


TCCR1A = 0;

TCCR1B = 0;

TCNT1 = 0;

OCR1A = 200; 
TCCR1B |= (1 << WGM12); 

TCCR1B |= (1 << CS10); 

TIMSK1 |= (1 << OCIE1A); 


TP = ~TP; 

void loop() {


Step 2: ​Connect the Ultrasonic Transducers to the L298N Output 1 & 2 Like This:

Step 3:

connect the A0 pin in the analog section of the Arduino to the Input 1 in L298N and connect the A2 to pin in the Arduino to L298N to Input 2 in the L298N.

Step 4:

Connect the 12v input in the L298n to the + column in the breadboard and connect the Gnd (Ground) pin to the - column.

Step 5:

Connect the "vin" pin in the power section of the Arduino to the + column in the breadboard and GND (ground) pin in the Arduino to the - column in the breadboard.

Step 6:

Connect the two GND pins to him - column of the breadboard and V+ pin to the + column of the breadboard

Step 7:

Connect the power supply to the female Dc pin and set the voltage to 12.5v.

Step 8: Have Fun

Arduino Contest 2020

Participated in the
Arduino Contest 2020