i have been working on my little project to create a 360 degree photography turntable. In short, it has an arduino board, switch, IR diode and a modified digital servo to turn 360 degree. The servo basicaly turns a white wood board with a product for about 6°and uses the IR diode to send data to my DSLR to take automatically a photo. Everything is fine but the servo is acting unpredictable. Sometimes it turns 6°sometimes 10°and sometimes it randomly goes backward for about 20°. Dont know how to fix it and i tryed everything. Please help
In my code i use this to control the servo:
myservo.write(93.5); // stop position of servo
(take photo with code)
delay(6500); //wait to take photo
myservo.write(92); // move slow
delay(400);
Ok so i tryed some USB power adapters from ipad and iphone and the servo went crazy Curently i am powering it from USB in my macbook, but it seems to work like before. Any other suggestions ?
The number 93,5 is working, but i tryed only 93 with no affect.
Give your servo a dedicated power supply providing a regulated output with the correct voltage for your servo, and at least 1A capacity (more if your servo has a higher current rating). Remember to connect the grounds. Depending how long you need it to run for, a rechargeable battery pack could be a convenient solution.