How To Make Ultrasonic Levitator with Arduino

Published on


In this tutorial, I will teach you how to Levitate objects using sound waves and of course with the help of an Arduino board. If you are interested in social networks, most likely projects called  ultrasonic levitator or acoustic levitator.  Visit CiferTech for more tutorials, and be sure to follow my Instagram page to support me.

 Ultrasonic Transmitter

If you have ever worked with ultrasonic modules, for example, SRF05, you have noticed that two ultrasonic sensors are used in this group of modules, one to send waves and the other to receive that using the same wave travels back and forth projects easily. Sensors are made, if you disassemble these sensors, two letters R or T are printed on the back of these sensors. We need a T or Transmitter to make this project. The R Type is the receivers.


 L298N Driver Module

The L298N driver module is normally used to start DC motors, but as you will see later in this project we will use this module differently. This module has four outputs (out1, out2, and out3). , out4) that we will use out1 and ou2 outputs. In this project, using Arduino, the first 5v pp are applied to the driver module and then converted to 25v pp, and transmitters are applied.


 Arduino Nano

Arduino board with Atmega328 processor, the codes we need for this project are programmed inside this microcontroller and will be applied to the driver using A0 and A1 outputs, which are our analog outputs.


DC-DC variable voltage “XL6009E1”

To power the L298N module, we will need a 12-volt power supply, so using this module, we can easily convert the 3.7-volt voltage of ordinary batteries to 12-volt.

Note: Note that with an input of 3.5 or 3.7 volts in this module, we will receive a maximum output of 37 volts, so before connecting the module to the circuit with a voltmeter, measure the output and use the potentiometer in the output module. Set to the desired voltage.


How Objects are Levitate

When you connect the transducers to the driver, you will hear a quiet but annoying sound in the long run. This means that the device is working.



  • Arduino A0 ====> IN1 L298
  • Arduino A1 =====>IN2 L298
  • L298 out1 =====> Ultrasonic transmitter
  • L298 out2 =====>Ultrasonic transmitter


Arduino Source Code

Copy the following code and paste it into the Arduino IDE. Then upload it to the Arduino board. If you do not know how to upload code.



Items Needed

  1. Arduino Nano
  2. L298N engine driver
  3. Voltage booster module
  4. Transducer Ultrasonic Sensor


If you encounter any problems during the setup and implementation of this project, do not hesitate to ask your question at the end of this post. I will answer your problem as soon as possible. Also, if there is a problem in the code or the execution steps, you can inform through this way.

One thought on “How To Make Ultrasonic Levitator with Arduino

  1. Hawwin

    the code is not working

    this is working:
    byte TP = 0b10101010;
    void setup()
    DDRC = 0b11111111;
    TCCR1A = 0;
    TCCR1B = 0;
    TCNT1 = 0;
    OCR1A = 200;
    TCCR1B |= (1 << WGM12);
    TCCR1B |= (1 << CS10);
    TIMSK1 |= (1 << OCIE1A);
    PORTC = TP;
    TP = ~TP;
    void loop(){

Leave a Reply

Your email address will not be published. Required fields are marked *