Shrinking my ultrasonic levitator


At the electronics evening on 25 Nov I demonstrated my version of an ultrasonic levitator.
The original build is here:
I built the version using an L293D type H-bridge chip and capacitor, rather than the stepper motor driver board.

My goal is to create an open build design using cheap off-the-shelf components, protoboard and a simple laser-cut assembly.
That way, code clubs, STEM clubs and makerspaces could create their own kits for use in electronics classes.

You’ll see that the Arduino function is very simple, and I am hoping I can replace the Arduino with an ATtiny chip. However, I lack the electronics knowledge to even know if this is possible.

I’m hoping someone here could have a quick look at the project and come back with a yes/no/maybe.
If yes or maybe, I’ll continue to explore this at an electronics evening.



An attiny85 is plenty powerful enough to create that waveform. Here’s an example using hardware timer 0.

The classic grumbly crowd would suggest a microcontroller is overkill and a 555 timer is more than up the task. Here’s a simple circuit with a few components to mange the task but I think however we make things, the key is getting it done!

1 Like

Hi Kyle.

Thanks! I had no idea that a 555 would be sufficient (I knew what a 555 can do, but didn’t make the conceptual jump!). This will be MUCH cheaper and less “wasteful”.

I found an even simpler circuit here:
However, that circuit doesn’t have a 2N2222 transistor to amplify the signal, and I think I probably need that (since the original build used the L293D to amplify the signal)?

I need to attach 2 transducers. Based on the original build, it looks like I can just attach them in parallel?

Thanks again

Hi Brendon,

Yes, I would definitely use a transistor to drive them in parallel. Your previous work seems to validates that approach. I think that consistent frequency is more important than exactly nailing the 40kHz. The only potential issue I can think of is temperature changes will cause the frequency to drift and thus change the optimal distance between transducers.

Hi Brendon,

I’ve always wanted to learn LTSpice so I used this project as motivation! I’ve built up the example posted above and simulated it

You can see 10 peaks over .25ms or 40kHz.

The transducer modeled as a 1k resistor is a very coarse model, here’s a hackaday article about refining it to approximate real world conditions much better. Still useful for poking around however.

Short cuts worth learning:
F2 Component e.g. “npn transistor” -> right click once placed and change it to 2N2222, or “volt” for supply/signal, NE555 for 555, etc
F3 Wire
F4 Create a net label e.g. Enter in +VCC and all same named nets are connected
F5 Delete - drag a box entirely enclosing what you want to delete
F7 Move - drag a box entirely enclosing what you want to move, will not keep things connected
F8 Drag - drag a box entirely enclosing what you want to move, keeping things connected
C Capacitor
R Resistor

Rotate: Ctrl+r
Mirror: Ctrl+e

Again, right click any symbol to edit its properties.

Hit simulate and set the duration to .25m (seconds implicit unit), then click on a wire to see the signal.

Here’s the tutorial I followed, only watching the parts with LTSpice visible

Thanks for this!

I had just started loading the circuit into LTSpice myself (but without any success).

I built the circuit on a breadboard, and can at least get a voltage and amperage reading on the output to the transducers.

I found an online calculator for calculating resistor and capacitor values in order to set the output frequency.
The values in the circuit diagram appear correct.

My goal on Thursday night will be to hook the circuit up to the oscilloscope and look at the results.

I connected the 2 transducers which appeared to work for a short while (high pitched buzzing when I lightly touched them with a thin wire). Shortly after that they went silent, and I cannot get a continuity beep or voltage reading across the terminals. I suspect I have killed them.

The learning continues!


How far did you get in modeling?

Did you have a current limit resistor?

I got nowhere with LTSpice - have never used it before.
I’m going to shuffle it slightly up my list of things to learn.

I did have a limiting resistor R4 (2k) between 12V and the transducer.
The challenge is that the transducer is not a discrete component with its own datasheet.
I pulled them off a HC-SR04 ultrasonic sensor to keep costs down (weirdly, the transducers are MUCH more expensive as separate components).

I’ve tracked down a P/N after chasing down a couple schematics from SparkFun. TCT40-16T is the trasmitter (swap the last T for R for the receiver). You can find them super cheap on ebay, Amazon, or direct from China. Amazon seems to like the search better when it’s just “TCT40”.

Great! This will help with working out how I blew them up!

1 Like