3
\$\begingroup\$

I am trying to understand exactly how a servo works, so that I can build one.

I bought and built a small robot arm kit, and it has five geared DC motors to actuate it. I would like to control the robot arm from a computer, but in order to do that, I need to make the actuators smarter, essentially turning them into servos.

I opened up a couple of inexpensive analog RC servos, and the design looks simple. It has a dc motor, a potentiometer on the output shaft, and circuitry to turn the PWM signal to a position for the output shaft.

My problem is that after opening a couple of servos, I got a range of controller chip models ranging from KC2462 to KC8801. These all seem to be made by the same Chinese company. Unfortunately, I can't find the data sheets, and even if I did, I do not understand any Chinese dialect.

My question can be summed up as this:

  • Is there another servo control chip datasheet that I can read?
  • Is there a website with enough information to learn how exactly a typical analog servo does what it does?
  • Is there perhaps a book with the above information?

Please understand that I already understand how I could hack a servo motor together - I can reprogram an ATtiny45 to take some kind of positional input from one pin, an analog input from a potentiometer on the output shaft, and then output direction and speed to the DC motor. Speed accomplished with PWM in this case. Maybe with a huge cap on the supply to ensure the DC motor doesn't cause too big of a voltage drop when it starts moving.

However, I don't know if the above would damage the chip with inductive feedback from the motor, or if there's a different way to do the speed control.

I would like to understand how the problem is solved in a real-life professionally designed and built servo motor.

As for my background, I did some electronics in school, and I've been playing with Arduino and ATtiny45/85 microcontrollers for a few weeks.

\$\endgroup\$
3
  • 4
    \$\begingroup\$ What's missing from your ATtiny solution is an H bridge to drive the motor, catch diodes, and some supply filtering. Openservo v1.1 at openservo.com/Schematic seems like an example of what you want to do and is ATtiny based, while their current design uses an ATmega168. \$\endgroup\$ Commented Sep 15, 2013 at 14:44
  • \$\begingroup\$ @ChrisStratton - You should add this as an answer. An open design for building your own servo seems to be a pretty good answer to what I'm asking. \$\endgroup\$ Commented Sep 15, 2013 at 17:20
  • \$\begingroup\$ Perhaps in an ideal world, but there's a strong bias against link-only answers here, and any quick summary would be inferior to the information found at the link. \$\endgroup\$ Commented Sep 15, 2013 at 17:54

5 Answers 5

3
\$\begingroup\$

Another RC servo IC was made by Signetics - the NE544 (and some similar models, perhaps NE5044) for which quite a bit of information can be found.

This is the old style pulse width control which is easy to generate and still seems to be quite common; I don't know anything about newer "digital" servo interfaces.

\$\endgroup\$
1
\$\begingroup\$

Here is the datasheet: http://www.kcsemitech.com/upLoad/down/month_1403/201403091839011423.pdf You can use google translate to get some info out of it, but some data is in english.

\$\endgroup\$
1
\$\begingroup\$

"Is there perhaps a book with the above information?"

I think, there are many books in Control Theory/Control Systems describing servo loops.

Examples: Classical Feedback Control (B.J. Lurie); Modern Control Systems (R. Dorf, R. Bishop).

Don`t overlook the importance to select a suitable controller/compensator for ensuring closed-loop stability with a good step response (without ringing) at the same time.

Comment (edit): The transfer function of a dc motor (Output rotation angle-to-input voltage) can be approximated by an I-T2 function (integrate with two first-order delay elements). Hence, compensation with a PD-T1 controller works good.

\$\endgroup\$
1
\$\begingroup\$

OpenServo (Internet Archive link) was an open hardware project that aims to upgrade a servo by replacing the controller board. The chip they use is some variant of the ATtiny chips.

The board designs are still available in Github.

Sparkfun used to sell a custom implementation of these boards.

\$\endgroup\$
2
  • \$\begingroup\$ openservo.com no longer exists, and the sparkfun product is now discontinued. Might not be a bad idea to update this answer. \$\endgroup\$
    – Hearth
    Commented Dec 29, 2020 at 21:02
  • \$\begingroup\$ This is why link only answers are bad. \$\endgroup\$
    – Drew
    Commented Jan 26, 2021 at 11:07
0
\$\begingroup\$

Please understand that I already understand how I could hack a servo motor together - I can reprogram an ATtiny45 to take some kind of positional input from one pin, an analog input from a potentiometer on the output shaft, and then output direction and speed to the DC motor. Speed accomplished with PWM in this case.

That's not hacking a servo. That is a servo. Sure, rc servos are a commodity now and there are all-in-one chips to control them, but there is no secret sauce. They're doing exactly what you described.

Add to your description a motor driver of some kind, and a PID loop between the input and output and you have a servo that's exactly the same as a commercial one.

Once you've got that down, your questions are no longer servo specific, they're things like: "how do I tune a PID loop" or "how do I make a compact circuit board".

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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