Author Topic: Why Is My Arduino Servo Behaving Like this?  (Read 8384 times)

0 Members and 1 Guest are viewing this topic.

Offline tony3dTopic starter

  • Frequent Contributor
  • **
  • Posts: 393
  • Country: us
Why Is My Arduino Servo Behaving Like this?
« on: January 17, 2014, 03:25:27 pm »
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.
 
« Last Edit: January 17, 2014, 03:42:48 pm by tony3d »
 

Offline mlapaglia

  • Newbie
  • Posts: 8
Re: Why Is My Arduino Servo Behaving Like this?
« Reply #1 on: January 17, 2014, 03:28:36 pm »
How much current is the servo drawing? Could it be more than the arduino can supply?
 

Offline tony3dTopic starter

  • Frequent Contributor
  • **
  • Posts: 393
  • Country: us
Re: Why Is My Arduino Servo Behaving Like this?
« Reply #2 on: January 17, 2014, 03:38:24 pm »
How much current is the servo drawing? Could it be more than the arduino can supply?

It's doing the same thing on Batteries.
 

Offline tony3dTopic starter

  • Frequent Contributor
  • **
  • Posts: 393
  • Country: us
Re: Why Is My Arduino Servo Behaving Like this?
« Reply #3 on: January 17, 2014, 04:29:39 pm »
Anybody else?
 

Offline Sam__

  • Regular Contributor
  • *
  • Posts: 118
  • Country: gb
Re: Why Is My Arduino Servo Behaving Like this?
« Reply #4 on: January 17, 2014, 05:15:59 pm »
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.
 

Offline fcb

  • Super Contributor
  • ***
  • Posts: 2117
  • Country: gb
  • Test instrument designer/G1YWC
    • Electron Plus
Re: Why Is My Arduino Servo Behaving Like this?
« Reply #5 on: January 17, 2014, 05:59:53 pm »
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).
https://electron.plus Power Analysers, VI Signature Testers, Voltage References, Picoammeters, Curve Tracers.
 

Offline tony3dTopic starter

  • Frequent Contributor
  • **
  • Posts: 393
  • Country: us
Re: Why Is My Arduino Servo Behaving Like this?
« Reply #6 on: January 17, 2014, 06:15:21 pm »
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.
« Last Edit: January 17, 2014, 06:26:02 pm by tony3d »
 

Offline tony3dTopic starter

  • Frequent Contributor
  • **
  • Posts: 393
  • Country: us
Re: Why Is My Arduino Servo Behaving Like this?
« Reply #7 on: January 17, 2014, 06:29:20 pm »
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.

The 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.
 

Offline pickle9000

  • Super Contributor
  • ***
  • Posts: 2439
  • Country: ca
Re: Why Is My Arduino Servo Behaving Like this?
« Reply #8 on: January 17, 2014, 06:37:19 pm »
Try running this one. It's not a sweeper its a pot based one.

http://arduino.cc/en/Tutorial/Knob

This 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.

 

Offline tony3dTopic starter

  • Frequent Contributor
  • **
  • Posts: 393
  • Country: us
Re: Why Is My Arduino Servo Behaving Like this?
« Reply #9 on: January 17, 2014, 07:06:52 pm »
Try running this one. It's not a sweeper its a pot based one.

http://arduino.cc/en/Tutorial/Knob

This 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.
Ok, 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.
 

Offline tony3dTopic starter

  • Frequent Contributor
  • **
  • Posts: 393
  • Country: us
Re: Why Is My Arduino Servo Behaving Like this?
« Reply #10 on: January 17, 2014, 07:24:37 pm »
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.html

http://s46.photobucket.com/user/2001as/media/IMG_3385.mp4.html
 

Offline Cdngreybeard

  • Contributor
  • Posts: 26
  • Country: ca
Re: Why Is My Arduino Servo Behaving Like this?
« Reply #11 on: January 17, 2014, 07:55:21 pm »
Goto the Arduino website and read about how the servo library works.  It explains what causes servo grinding and how it may be resolved.
 

Offline Neverther

  • Regular Contributor
  • *
  • Posts: 129
Re: Why Is My Arduino Servo Behaving Like this?
« Reply #12 on: January 17, 2014, 07:56:51 pm »
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.
 

Offline tony3dTopic starter

  • Frequent Contributor
  • **
  • Posts: 393
  • Country: us
Re: Why Is My Arduino Servo Behaving Like this?
« Reply #13 on: January 17, 2014, 08:08:56 pm »
Here's the spec Sheet.
 

Offline tony3dTopic starter

  • Frequent Contributor
  • **
  • Posts: 393
  • Country: us
Re: Why Is My Arduino Servo Behaving Like this?
« Reply #14 on: January 17, 2014, 09:06:16 pm »
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.
 

Offline MatCat

  • Frequent Contributor
  • **
  • Posts: 377
  • Country: us
Re: Why Is My Arduino Servo Behaving Like this?
« Reply #15 on: January 17, 2014, 09:17:36 pm »
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.
 

Offline tony3dTopic starter

  • Frequent Contributor
  • **
  • Posts: 393
  • Country: us
Re: Why Is My Arduino Servo Behaving Like this?
« Reply #16 on: January 17, 2014, 09:24:29 pm »
This makes sense. So you think my Arduino board is ok then? Everything else I have tried has worked fine.
 

Offline tony3dTopic starter

  • Frequent Contributor
  • **
  • Posts: 393
  • Country: us
Re: Why Is My Arduino Servo Behaving Like this?
« Reply #17 on: January 17, 2014, 09:49:19 pm »
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.

The servo size is an 8G!
 

Offline tony3dTopic starter

  • Frequent Contributor
  • **
  • Posts: 393
  • Country: us
Re: Why Is My Arduino Servo Behaving Like this?
« Reply #18 on: January 17, 2014, 11:39:48 pm »
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.
 

Offline MatCat

  • Frequent Contributor
  • **
  • Posts: 377
  • Country: us
Re: Why Is My Arduino Servo Behaving Like this?
« Reply #19 on: January 18, 2014, 02:03:27 am »
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.
 

Offline tony3dTopic starter

  • Frequent Contributor
  • **
  • Posts: 393
  • Country: us
Re: Why Is My Arduino Servo Behaving Like this?
« Reply #20 on: January 18, 2014, 02:51:31 am »
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.

Ok thanks. I'm pretty new to Arduino so I need all the help I can get.
 

Offline pickle9000

  • Super Contributor
  • ***
  • Posts: 2439
  • Country: ca
Re: Why Is My Arduino Servo Behaving Like this?
« Reply #21 on: January 18, 2014, 03:51:15 am »
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.



 
 

Offline tony3dTopic starter

  • Frequent Contributor
  • **
  • Posts: 393
  • Country: us
Re: Why Is My Arduino Servo Behaving Like this?
« Reply #22 on: January 18, 2014, 07:11:12 am »
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.



 

Thanks 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.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf