I am using a RCS-Model-M2313 R/C Servo and I have managed to create a PWM. My problem is that my motor doesn't react as I was expecting. I would like to control the motor angle with the duty cycle but it doesn't work. Indeed, with a 28% duty cycle, a 550 Hz frequency, 1.7V offset, a 3.3V signal from my MCU I can control it to come back to the same position. I have powered the servo with a 3.7 tension. When I change the duty cycle, the motor turn but doesn't stop anymore.

The datasheet doesn't give any information, I really need your advices. Thank you. Regards, Mattew

  • \$\begingroup\$ Personally, I advise testing with an oscilloscope if you haven't already. That way you can make sure you're getting an output of what you expect. \$\endgroup\$
    – Ci3
    Jun 27 '12 at 8:42
  • \$\begingroup\$ On the oscilloscope, the signal is perfect, I just cannot find the good parameters to control the angle \$\endgroup\$
    – Mattew
    Jun 27 '12 at 8:47
  • \$\begingroup\$ Please provide web references to motor data and anything else related and available. \$\endgroup\$
    – Russell McMahon
    Jun 27 '12 at 8:48
  • \$\begingroup\$ rcecho.com/… \$\endgroup\$
    – Mattew
    Jun 27 '12 at 9:10
  • 1
    \$\begingroup\$ @kenny - His "Motor" is actually a radio-control servo, which should have position feedback already built in. \$\endgroup\$ Jun 27 '12 at 11:57

Your frequency is way too high, or conversely, you are not waiting long enough between pulses. You should be sending a 1 to 2 ms pulse every 20 to 50 ms. Note that this means 50 Hz maximum.

Also, your "1.7 V offset" makes no sense. These pulses should generally be 0 to 5 V digital signals. I followed the link you provided, but that only goes to a product sell page not a datasheet, so we can't tell exactly what voltage levels the digital signal must be. When in doubt with hobby servo units, use 5 V logic.

Try a 1 ms pulse every 20 ms. That should send the arm to one end. Then try 2 ms every 20 ms. That should send the arm to the other end. Try it with the 3.3 V signal straight out of your processor and see if that works. If it doesn't, make it a 0-5 V signal instead. That really should work if everything else is hooked up right. If you don't have a level translator chip, you can rig up something with a NPN transistor and pullup resistor. That will invert, but just invert the processor output to compensate. A HCT (note the T) logic gate powered at 5 V can also be used as a 3.3 V to 5 V converter.

Are you sure the processor power is properly filtered so that the current spikes the motor draws doesn't effect it? A schematic and scope traces with a clear description of what happens in each case would help a lot.

  • \$\begingroup\$ Thank you very much, I cannot find a real datasheet, that's the main point. I have tried with my signal generator: 20Hz, it doesn't turn on the motor anymore. I cannot go bellow than 20% duty cycle. I am going to try with my MCU tomorrow I will keep you in touch. \$\endgroup\$
    – Mattew
    Jun 27 '12 at 12:39
  • \$\begingroup\$ @Mattew: This is not about duty cycle but about pulse width. The servo mechanism is driven by the duration of the high-going pulses. The length of the low level doesn't matter much as long as the pulses repeat every 20-50 ms or so. \$\endgroup\$ Jun 27 '12 at 12:50
  • \$\begingroup\$ I have bought a new motor, it works very well now, thank you ! \$\endgroup\$
    – Mattew
    Jul 4 '12 at 8:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.