Why Is My Arduino Servo Behaving Like this? - Page 1
Forum section: electronics / beginners

author: tony3d
author_rank: Frequent Contributor
timestamp: January 17, 2014, 03:25:27 pm
content: Hi Guys, Why am I getting this speed up at the beginning of the cycle? I'm using the standard sweep Sketch from the IDE. The servos are the ones packed in the Maker Shed Ultimate Microcontroller pack.

author: mlapaglia
author_rank: Newbie
timestamp: January 17, 2014, 03:28:36 pm
content: How much current is the servo drawing? Could it be more than the arduino can supply?

author: tony3d
author_rank: Frequent Contributor
timestamp: January 17, 2014, 03:38:24 pm
content: Quote from: mlapaglia on January 17, 2014, 03:28:36 pmIt's doing the same thing on Batteries.

author: tony3d
author_rank: Frequent Contributor
timestamp: January 17, 2014, 04:29:39 pm
content: Anybody else?

author: Sam__
author_rank: Regular Contributor
timestamp: January 17, 2014, 05:15:59 pm
content: If you're definitely running the right sketch, on the right arduino. Then it could be a faulty servo?Maybe double check everything by re-uploading the sketch or using a different servo, or using a different PWM pin.

author: fcb
author_rank: Super Contributor
timestamp: January 17, 2014, 05:59:53 pm
content: Can you 'scope the supply pin (look for anomalies, like a dip as previous poster suggested), or the control pulse (is the problem with the servo or the 'duino).

author: tony3d
author_rank: Frequent Contributor
timestamp: January 17, 2014, 06:15:21 pm
content: I have tried the two servos that came in the kit, and they both do the same thing. It also does it on any of the PWM pins.

author: tony3d
author_rank: Frequent Contributor
timestamp: January 17, 2014, 06:29:20 pm
content: Quote from: Sam__ on January 17, 2014, 05:15:59 pmThe sketch is the one that came in the sample of the Arduino software. It's the one in Examples, Servo, Sweep. I'm running it on an official Uno.

author: pickle9000
author_rank: Super Contributor
timestamp: January 17, 2014, 06:37:19 pm
content: Try running this one. It's not a sweeper its a pot based one.http://arduino.cc/en/Tutorial/KnobThis will allow you so see if the output is consistent over the entire range. If it isn't (meaning it jumps at weird places) change the output pin and try again.Troubleshooting is part of the game so be patient and enjoy it. It's simply a puzzle to be solved.

author: tony3d
author_rank: Frequent Contributor
timestamp: January 17, 2014, 07:06:52 pm
content: Quote from: pickle9000 on January 17, 2014, 06:37:19 pmOk, I tried this circuit, and sketch. If I scale back the servo, and change the 179 degrees to 165 the operation is smooth, but of course the rotation is not 180. If I go as high as 168, and turn the pot I get almost to the end, and it glides further on it own, stops, but wants to keep going.

author: tony3d
author_rank: Frequent Contributor
timestamp: January 17, 2014, 07:24:37 pm
content: These two videos shows what I mean. The one that runs up, and back is set at 166, the other is set at 168, and you can see it continue to spin, and you can hear it grinding at the end of it's travel. I just want to make sure the Arduino board itself is ok.http://s46.photobucket.com/user/2001as/media/IMG_3384.mp4.htmlhttp://s46.photobucket.com/user/2001as/media/IMG_3385.mp4.html

author: Cdngreybeard
author_rank: Contributor
timestamp: January 17, 2014, 07:55:21 pm
content: Goto the Arduino website and read about how the servo library works. It explains what causes servo grinding and how it may be resolved.

author: Neverther
author_rank: Regular Contributor
timestamp: January 17, 2014, 07:56:51 pm
content: To me it sounds just like the servo is not meant to turn the full 180, and it is pretty normal with cheap servos.Feedback pot inside the servo going full scale -> jump in the end as the desired output is greater than feedback.It is also possible the servo has some movement outside the "0" range of that library.I found out that atleast MG946 had travel beyond that as I controlled it directly with the 16bit timer.

author: tony3d
author_rank: Frequent Contributor
timestamp: January 17, 2014, 08:08:56 pm
content: Here's the spec Sheet.

author: tony3d
author_rank: Frequent Contributor
timestamp: January 17, 2014, 09:06:16 pm
content: I powered the servo from my bench top power supply feeding it 5 volts, and set the amps to 1 amp. Hooked a common ground to the Arduino board, and fed the control signal from every PWM pin on the board, and still the same results.

author: MatCat
author_rank: Frequent Contributor
timestamp: January 17, 2014, 09:17:36 pm
content: Looks to me like one issue is trying to sweep it too fast, what size servo is that, 26G? Even little 9G servos can peak at 1A just moving, let alone what happens if you hit the stop area. As previously stated too not all servos are going to move 180, often most servos only go 150 to 160. Some servos if you force it past the physical stop point can cause weird drift issues because they no longer can find a fixed center.

author: tony3d
author_rank: Frequent Contributor
timestamp: January 17, 2014, 09:24:29 pm
content: This makes sense. So you think my Arduino board is ok then? Everything else I have tried has worked fine.

author: tony3d
author_rank: Frequent Contributor
timestamp: January 17, 2014, 09:49:19 pm
content: Quote from: MatCat on January 17, 2014, 09:17:36 pmThe servo size is an 8G!

author: tony3d
author_rank: Frequent Contributor
timestamp: January 17, 2014, 11:39:48 pm
content: Has anyone else used the servo's from Radio Shack's Ultimate Micro-controller Pack with similar results? I'm thinking that these really can't go past 166 degrees. Every other thing I have tried with this board is working fine.

author: MatCat
author_rank: Frequent Contributor
timestamp: January 18, 2014, 02:03:27 am
content: 166 degrees is pretty standard for the majority of servos, trust me, my business is electronics for RC Aircraft so I know a bit about servos hehe.

author: tony3d
author_rank: Frequent Contributor
timestamp: January 18, 2014, 02:51:31 am
content: Quote from: MatCat on January 18, 2014, 02:03:27 amOk thanks. I'm pretty new to Arduino so I need all the help I can get.

author: pickle9000
author_rank: Super Contributor
timestamp: January 18, 2014, 03:51:15 am
content: Wow, you did excellent, I just got home and thought I have look to see if I could help and problem solved, nice. The videos where excellent that's always a good way of explaining. Best of all no jiggle cam.

author: tony3d
author_rank: Frequent Contributor
timestamp: January 18, 2014, 07:11:12 am
content: Quote from: pickle9000 on January 18, 2014, 03:51:15 amThanks to all you guys, I think we got it resolved. I'm just glad my Arduino board is ok. This PWM stuff is really interesting. Think I'll put my scope on the output of one of those PWM pins, and watch the square waves expand, and contract. Be fun to get a visual representation of what's going on.