Mini Acoustic Levitation

by millerman4487 in Circuits > Arduino

8407 Views, 56 Favorites, 0 Comments

Mini Acoustic Levitation

IMG_20181126_102219-01.jpeg

View this project on my website to see a circuit simulation and a video!

Acoustic levitation is made possible through the fact that sound behaves as a wave. When two sound waves intersect each other, they can either constructively or destructively interfere with each other. (This is how noise-cancelling headphones work)

This project uses an ultrasonic distance sensor to create a levitation effect. This works by creating "pockets" where two opposing sound waves interfere with each other. When an object is placed in the pocket it will stay there, seemingly hovering in place.

Materials needed:

Original project from Make Magazine by Ulrich Schmerold.

Get Ultrasonic Transmitters

IMG_20181126_084005_HDR.jpg
IMG_20181126_084051.jpg
IMG_20181126_084829_HDR.jpg
IMG_20181126_085611.jpg
IMG_20181126_090108_HDR.jpg

You will need to sacrifice a distance sensor for this step (don't worry, they're relatively cheap):

  • Desolder and remove both transmitters from the board
  • Remove and save the mesh screen from one
  • Solder wires to both transmitters

Create Circuit

Mini Acoustic Levitator.png

Create the above circuit and note the following:

  • You may not necessarily need to include the two 100nF capacitors. (only if your board is for some reason not able to handle the circuit and it keeps shutting itself down)
  • The 9v battery is a stand-in for any DC power supply - mine worked fine with a 7.5v LiPo battery

Code

Upload this code to your Arduino:

//original code from: https://makezine.com/projects/micro-ultrasonic-levitator/
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 :)
}

Mount Transmitters and Calibrate

IMG_20181126_102613.jpg
IMG_20181126_105447.jpg
IMG_20181126_102219.jpg

You can really use anything to do this, but I ended up using a set of helping hands (buy some here: https://amzn.to/2TPifsW):

  • Start by positioning the transmitters about 3/4" apart
  • Get a small piece of Styrofoam about half the size of a pea (it doesn't need to be round)
  • Place the Styrofoam on the mesh screen from step 1
  • Using tweezers or pliers, position it in between the two transmitters (it should start to wiggle when you get close)
  • Move the transmitters around (closer and farther apart) until the Styrofoam stays still

Troubleshooting

It took me about fifteen minutes to get it to work the first time, but after that it was pretty easy to get it going again. Here are some things you can try if it doesn't work at first:

  • Make sure you wired everything correctly
  • Increase the voltage to the H-bridge (different battery)
  • Get a smaller piece of Styrofoam
  • Try a different position for the transmitters
  • Try adding the capacitors (if you didn't already)
  • If it still doesn't work, maybe something is broken: try a different set of transmitters or a new battery.