I want a code for this project. And tell me how many power supplies needed for this
Can you check the connections in the attached photo
Moderator note: https://www.sciencebuddies.org/science- ... -levitator -- The starting code is provided in step 2 of the project
ultrasonic levitation
Moderators: kgudger, bfinio, MadelineB, Moderators
-
Albin_Mathew
- Posts: 1
- Joined: Wed Mar 11, 2026 7:05 pm
- Occupation: Student
ultrasonic levitation
- Attachments
-
- PN085RQGRmdJ2J45MmeSUql8Hki5uUMJGw.jpg (3.67 MiB) Viewed 4299 times
-
- IMG_20260312_074210.jpg (448.82 KiB) Viewed 4547 times
-
calixte
- Student Expert
- Posts: 49
- Joined: Tue Oct 01, 2024 9:42 pm
- Occupation: Student
Re: ultrasonic levitation
Hello!
For your ultrasonic levitator, you need two power supplies: one 5V supply from the Arduino for the logic (the chips), and a separate higher-voltage supply (like 9V–12V) to power the ultrasonic transmitters. Your circuit looks mostly correct, but there are a few likely issues: the ground connections must all be shared (Arduino, battery, and breadboard), the 5V and external voltage rails must NOT be connected together, and the transducers must be connected exactly to the H-bridge output pins (3 and 6). Also, your wiring looks a bit messy, which can cause bad connections, so double-check each pin carefully. For the code, you can use a simple loop that rapidly turns a pin on and off to create a ~40 kHz signal, like this: set pin 3 as output, then in the loop alternate HIGH and LOW with very short delays (around 12 microseconds each).
For your ultrasonic levitator, you need two power supplies: one 5V supply from the Arduino for the logic (the chips), and a separate higher-voltage supply (like 9V–12V) to power the ultrasonic transmitters. Your circuit looks mostly correct, but there are a few likely issues: the ground connections must all be shared (Arduino, battery, and breadboard), the 5V and external voltage rails must NOT be connected together, and the transducers must be connected exactly to the H-bridge output pins (3 and 6). Also, your wiring looks a bit messy, which can cause bad connections, so double-check each pin carefully. For the code, you can use a simple loop that rapidly turns a pin on and off to create a ~40 kHz signal, like this: set pin 3 as output, then in the loop alternate HIGH and LOW with very short delays (around 12 microseconds each).
-
bfinio
- Expert
- Posts: 964
- Joined: Mon Aug 12, 2013 2:41 pm
- Occupation: Lead Staff Scientist, Science Buddies
- Project Question: Expert
- Project Due Date: n/a
- Project Status: Not applicable
Re: ultrasonic levitation
Hi - it's a little hard to tell from the photo, but it looks like the negative wire from your transducers is going directly to a grounded H-bridge pin (breadboard row 14) instead of the second H-bridge output pin (row 15). That would cut the voltage to your transducers in half and significantly decrease the performance. At a glance, the rest of your wiring looks OK (this is actually some of the neatest breadboard wiring I've seen, I don't think messiness is an issue).
Ben Finio, PhD
Lead Staff Scientist
Science Buddies
Ben Finio, PhD
Lead Staff Scientist
Science Buddies

