Page 1 of 1
Ultrasonic Haptics project help
Posted: Tue Nov 25, 2025 9:26 am
by amyCC
Posted on behalf of student
Student is using Science Buddies kit
Project:
https://www.sciencebuddies.org/science- ... c-feedback
---------------------------------
I am doing the Ultrasonic Haptic Project.
I followed all the instructions and bought all the listed parts. But no vibration is coming out of the transducer. What are common problems and their solutions.
To try and give more detail, I followed the tutorial provided by Science Buddies to build the circuit and I also downloaded the code straight from their website only changing the numPulses variable (which my science fair is focused on). See images provided below.

- thumbnail_IMG_1329.jpg (884 KiB) Viewed 3994 times

- thumbnail_IMG_1330.jpg (986.08 KiB) Viewed 3994 times

- thumbnail_IMG_1331.jpg (482.89 KiB) Viewed 3994 times
Re: Ultrasonic Haptics project help
Posted: Tue Nov 25, 2025 9:39 am
by bfinio
Hello,
Your H-bridge does not have power. Carefully look at FIgure 4 in the project procedure:
https://www.sciencebuddies.org/science- ... c-feedback
and notice how the wire going to the lower left corner of the H-bridge (H-bridge pin

is going to the
power (red) bus.
In your picture, the orange jumper wire on the left side (breadboard row 17) is going to the ground bus, and it should be going to the power bus.
I believe everything else looks correct - let us know if that fixes the problem.
Re: Ultrasonic Haptics project help
Posted: Tue Nov 25, 2025 3:49 pm
by misobower123
Hello,
Please see images of my circuit and code. (the motor driver now has power)
The "on" LED on my arduino is on, i verified and uploaded the code. How do I make sure the Arduino is "producing" the frequencies?
I know the arduino shown is an R4 but i have since switched to an R3. How would i change the code to use the tone fonction if that would be easier than the current code.
[Administrator note / linked images have been attached directly.]

- circuit.jpg (835.71 KiB) Viewed 3292 times

- code.jpg (82.92 KiB) Viewed 3292 times

- transducer.jpg (911.38 KiB) Viewed 3292 times
Re: Ultrasonic Haptics project help
Posted: Sun Nov 30, 2025 7:31 pm
by misobower123
My code for the Arduino Uno R3
const int trigPin = 3;
const int delayTime = 10;
const int numPulses = 100;
const int digitalWriteTime = 2;
const int offTime = 2*(digitalWriteTime+delayTime)*numPulses;
const float frequencymod = 208.33;
void setup() {
pinMode(trigPin,OUTPUT);
}
void loop() {
for(int i=0; i<numPulses; i++){
tone(trigPin, 40000);
delayMicroseconds(delayTime);
tone(trigPin,frequencymod);
delayMicroseconds(delayTime);
}
delayMicroseconds(offTime);
}
My code keeps giving me errors that. Every time I solve one another one pops up.
I tried to DIY it because the original was not working. I don't know if I made it worse or better.
Thank you
Re: Ultrasonic Haptics project help
Posted: Mon Dec 01, 2025 9:51 am
by bfinio
Hello - a few things:
1. Unfortunately, unless you have access to an oscilloscope (which lets you view a graph of voltage on an Arduino pin), there's no easy way to tell whether the pin is actually producing the signal. One possible option would be to connect an LED with a current-limiting resistor (see our Arduino tutorial series) directly to the pin, instead of connecting it to an H-bridge, and you should see the LED light up when the signal is on.
2. One of your pictures did not attach properly in your last message, so I'm not sure what you had there.
3. See procedure step 2a for using an R3, but here is a hint for the loop section of your code. You do not need the for loop at all - that was for manually turning the pin on and off to generate the ultrasonic signal on the R4.
loop{
tone(trigPin, 40000); // this turns the ultrasonic signal on at 40kHz
delay(onTime); // this leaves the ultrasonic signal
// on for onTime milliseconds
noTone(trigPin); // this turns the ultrasonic signal off
delay(offTime); // this leaves the signal off for offTime ms
}
You can adjust the onTime and offTime variables to adjust the modulation frequency and duty cycle.