Page 1 of 1

Arduino Uno Stepper turns max 90°

Posted: Thu Sep 21, 2017 2:40 pm
by nicmaes
I've programming Arduino Uno with flowcode V7. I try to control a micro servo, SG90. I'm programming the component macro. It works, but not 100%
I send 'Move to Position(0,x), x is adjustable from 0 to 255.
Normally the servo has to turn 180°, but with de V7 software he turns only 90°.
What did I wrong? I programmed the Uno also with Arduino software and then he's turning 180°. Conclusion: the hardware is ok. thanks

Re: Arduino Uno Stepper turns max 90°

Posted: Thu Sep 21, 2017 8:55 pm
by Docara
Hi Nicmaes,

I think this is correct, arent servos referenced form the middle of there travel.
I think your thinking the 0to255 is from start to end not middle to ONE end

Matt

Re: Arduino Uno Stepper turns max 90°

Posted: Fri Sep 22, 2017 7:05 am
by medelec35
Docara wrote:I think this is correct, arent servos referenced form the middle of there travel.
I think your thinking the 0to255 is from start to end not middle to ONE end
That's not how I believe servo component will work.
It's something like 1ms fully clockwise (View from the top) = 0 = -90deg , 1.5ms centre = 127 = 0deg and 2ms = fully counter-clockwise = 255 = +90deg.

I have just had a look at the servo properties and as a default, pulse width minimum is set at 1280uS = 1.28ms
Therefore servo will not be fully clockwise.
My guess with the current defaults the maximum angle will only be approximate 130 deg.

Try changing the pulse width minimum to say 1000 = 1.0ms

Just bear in mind that if the pulse width minimum or maximum is set out of servo range, then damage to servo could occur.
So it might be worth changing the maximum from 2500 to 2000 as a starting point.

Martin

Re: Arduino Uno Stepper turns max 90°

Posted: Fri Sep 22, 2017 8:30 pm
by Docara
Thanks Martin

Brain Fart!!! :oops: :oops: :oops: :oops: