Hi there,
New to the forum. I purchased two continuous rotation micro servo (fs90r) from this site last week. Got them in today and started working with them while connected to an arduino.
robotshop.com/en/9g-continuo … servo.html
For some reason they are unable to switch directions when I write the code to do so.
The code “write(180);” works just fine, and “write(90);” stops the servo, but “write(0);” does nothing. No movement.
I attempted to calibrate it, but I’m either doing it wrong or it’s just not working.
I’ve tried to use both servos, neither one works.
I figure it must be user error, but honestly, I have no idea what I’m doing wrong.
Oh also I’ve tried my larger continuous rotation servo with the same code and it works fine. I know the wiring on these particular servos is a bit different and I’ve accounted for that in the circuit.
Any suggestions would be helpful.
Thanks!
Which microcontroller are you using? If you’re using an Arduino, use the servo library.
Note that an RC servo needs its position to be updated every ~30ms.
Sorry. I neglected to mention, yes, I’ve been using the Arduino. The servo library is being used.
Can you explain what it means to update the position?
The servo library should take care of re-sending the pulses to the servo at the correct intervals.
When it comes to RC servos, you cannot just send one signal and then not communicate with it again and have it remain in the desired position; you need to constantly send the desired position every ~20-30ms. It’s just part of the technology / code implemented on RC servos as the technology comes from R/C cars, planes etc.
So if the servo library is in use, if the circuit is correct, and the code is correct, i can only imagine the issue can be with the servo itself.
What is the best practice for calibrating the servo?
I’ve rotated to tiny potentiometer and gotten the servo to reverse directions, but that only appears to be working when the code is “.write(180);”.
Servos don’t require calibration - their positioning is absolute based on the internal potentiometer.
Can you post your code and a clear image (or few) showing which pins on the servo are connected to which pins on the Arduino, as well as how you’re powering it?
SMACKS HEAD
So while labeling the circuit for the photo I realized that although I had moved the wires (power, ground, input) to account for the different servo, I had neglected to change the position of the decoupling capacitor. Fixed that and all works as need.
So yeah. dumb mistake. Thanks for your help. I really appreciate it.