Inexperienced user here. I usually use a prop specific controller but decided this was the year I learned more about Arduino. I'm animating some skeletons, and for the heads I've mounted 2 servos being randomly turned to give the effect they are looking around while opening/closing their mouths. Hardware is working 100%, but when I try to connect to servos to the one output pin they both kind of freak out and eventually just twitch. If they are plugged in independently they function perfectly (with the exception of turning a bit too far each way). I've tried to install a 10k resistor between each signal wire with no change. I either need a second output pin doing the same thing as pin 10, or to find what is happening with these servos "seeing" each other.
If I've made some rookie mistakes, don't be afraid to let me have it. I've been searching for answers for about 2 hours now, just can't crack this.
I tried the servos with sweep to make sure they were working properly, but not wired together. They each work perfectly when connected alone, the second I attach the second to the breadboard it acts strange. I don't know if it's possible to duplicate the sketch and have it work on pin 9 as well.
Are you powering the servos from the Arduino ? The Arduino cannot supply enough power for two servos - it’s very marginal and not good practice even with one.
Also ... why not drive them from seperate pins?
I have an external power supply. 5v 1a. I want both to do the exact same thing, I figured connecting them to the same pin would accomplish this. If I can modify the code to have both pins doing the same thing, that's fine too.
DrDiettrich:
Your external supply may be too weak, or you may have wired ground loops, or bad breadboard contacts.
You nailed it. The power supply, although it should be large enough, wasn't up to the task. Swapped to a 5v 3a and it works perfectly. Thanks for that!
Is there a way to slow the speed down slightly, like 10%?
You can try to hack the servo for lower speed, but that's not very practical. Better implement slow moves in code, but consider the servo signal rate of typically 20ms. You cannot make small steps faster than this.
Thanks for the replies. I changed the delay and that helped, but after assembling the whole project I am curious if it's possible to have pin 9 running it's own servo on a second random sweep? The way it runs now the skeleton opens his mouth according to head position. Was hoping to have more of an eerie opening and closing mouth effect at all times while the head does it's own thing.
I've tried to modify the code and made a total mess of it. I just don't have to time to learn to code this before Halloween. I've been using pre-made programmers on all my previous projects with a totally different interface and it's become a crutch. The kids in our neighborhood thank you in advance.