Hi,
I ran across this video making animatronics using blender to animate them and export the animation to an Arduino.
There are links for the sketch examples on the creator's github here.
https://github.com/timhendriks93/blender-servo-animation-arduino
for testing I'm specifically working with this example sketch before I work on my own animatronic.
https://github.com/timhendriks93/blender-servo-animation-arduino/tree/main/examples/AdafruitPCA9685
I'm very certain I have everything connected properly and the sketch uploads successfully but I get no movement by the servos.
I don't know what I am doing wrong and I'm sure it is on my end. I'm new to Arduino so I'm sure there is something I'm missing and most likely something pretty simple.
What will be the most useful information I can provide to get help in figuring this out?
thanks
I think it will be better if you share the exact code that you're running.
I'm assuming you have it wired as illustrated in the wiring diagram on GitHub?
If so, then you need to start troubleshooting. Here is how I would go about it:
- Check the power supply. If you're wiring it as in the GitHub diagram, it should be matched to the servo supply voltage with a decent amount of current capability. Not knowing what servos you are using makes it difficult to give you exact specs.
- If the power supply is good, I would write a quick sketch to drive the servos with the PCA9685. My last video was about servo motors; the PCA9685 demo sketch I showed would work.
- If it won't work with the demo sketch, it certainly won't work with the "Blender Servo Animation" (which is totally cool, by the way — you've introduced me to something new—thanks!!). At that point, I'd be rechecking wiring or even swapping the PCA9685 (use the I2C scan sketch in the example code to see if you can see the PCA9685 on the I2C bus). Hopefully it won't come to that.
I hope that gets you started. Perhaps you can post details regarding the exact servo motors and power supply you're using. I mentioned the power supply first, as that's the source of most servo motor issues.
😎
Bill
"Never trust a computer you can’t throw out a window." — Steve Wozniak
So maybe this will help - @bill, this will show that I believe I did wire correctly according to the diagram. See the images below.
Check the power supply. If you're wiring it as in the GitHub diagram, it should be matched to the servo supply voltage with a decent amount of current capability. Not knowing what servos you are using makes it difficult to give you exact specs.
I listed the power supply above. Its the 5v SBEC coming from a 24v power tool battery.
If the power supply is good, I would write a quick sketch to drive the servos with the PCA9685. My last video was about servo motors; the PCA9685 demo sketch I showed would work.
This one right?
cool, I will watch it tonight.
I will double check wiring. and test servos and test some demo sketches and see what happens.
I did reach out to the creator again. Hopefully he has some ideas too.
Thanks for the help. I'll keep you all posted.
Update.
I watched your video on servos. Great video and very helpful.
I tested all the servos (I have 10) with the servo tester and power supply I listed above. They all work.
I set up and tested your (Bill) Arduino test code with a single servo connected to the Nano.
This worked fine - as expected. So I know the Nano is working.
/* Arduino Uno Servo Motor Demo arduino-servo.ino Sweeps servo motor 180 degrees in both directions Servo connected to pin D9 DroneBot Workshop 2025 https://dronebotworkshop.com */ // Include Arduino Servo Library #include <Servo.h> // Create servo object and set position Servo myServo; int pos = 0; // Define Servo pin #define SERVO_PIN 9 void setup() { // Attach the servo myServo.attach(SERVO_PIN); } void loop() { // Sweep from 0 to 180 degrees for (pos = 0; pos <= 180; pos += 1) { // Set position myServo.write(pos); // Wait for servo to reach position delay(15); } // Sweep from 180 to 0 degrees for (pos = 180; pos >= 0; pos -= 1) { // Set position myServo.write(pos); // Wait for servo to reach position delay(15); } }
Then I tested the code for the PCA9685 Module
Because I'm using the Nano and not the Seeeduino, I had to use Pins A4 and A5 for the I2C communications.
To clarify, this code, from your video, which also worked in. All four servos did their thing. So I know the PCA9685 board is working.
/* PCA9685 Servo Demo pca9685-demo.ino Uses Adafruit Adafruit_PWMServoDriver Library Uses Seeeduino XIAO ESP32-S3 module Demonstrates operation of PCA9685 16-Channel 12-Bit PWM module DroneBot Workshop 2025 https://dronebotworkshop.com */ #include <Wire.h> #include <Adafruit_PWMServoDriver.h> // Initialize with default I2C address (0x40) Adafruit_PWMServoDriver pwm = Adafruit_PWMServoDriver(); // Servo parameters (adjust based on your servos) #define SERVO_MIN 150 // Minimum pulse length count (out of 4096) #define SERVO_MAX 600 // Maximum pulse length count (out of 4096) void setup() { //Start PWM pwm.begin(); // Set PWM frequency to 50Hz (standard for servos) pwm.setPWMFreq(50); delay(10); } // Function to set angle (0-180) for a servo on specified channel void setServoAngle(uint8_t channel, int angle) { // Map angle to pulse length int pulse = map(angle, 0, 180, SERVO_MIN, SERVO_MAX); pwm.setPWM(channel, 0, pulse); } void loop() { // Demonstrate controlling four servos for (int i = 0; i < 4; i++) { // Sweep servo on channel 0 from 0 to 180 degrees for (int angle = 0; angle <= 180; angle += 5) { setServoAngle(i, angle); delay(50); } // Sweep back from 180 to 0 degrees for (int angle = 180; angle >= 0; angle -= 5) { setServoAngle(i, angle); delay(50); } } }
Now I just need to figure our what I'm doing wrong with the animatronics setup.
Would anyone be willing to test it on their end?
I did notice that he uses the TX and RX pins instead of A4 an A5. Although I think I tried that too and it still did not work.
I'll try and test it again and let you know.
OK! Another update.
Instead of using the SCL to RX0 and SDA to TX1 as shown in the wire diagram on the animatronics github, I changed it to using A4 and A5 and the servos moved!
I'll reach out to him and let him know.
@slamer did you also change the default code accordingly?
Forgive my ignorance, but what would be the default code you are referring to?
Since it was a matter of using different pins I didn't need to change any code.
I did reach out to the creator about the pin and he mentioned the board he was using was different so the diagram was not accurate.