Servo Controller - Background

Background

Accurately controlling the position of rotating elements is the heart of a motion controlled system. Often stepper motors are called upon to complete this task. Although cheap and plentiful at lower power levels, more powerful versions are expensive and difficult to source.

Steppers 

Stepper motors are the norm in hobby CNC systems. Although stepper motors have limitations:

  • Constant-power device (power = angular velocity x torque). As motor speed increases, torque decreases.
  • Generally must be over engineered, so that there is no possibility that the motor will lose steps.
  • More vibration than other motor types, as the discrete step tends to snap the rotor from one position to another.

Servos 

Another device is the servo motor. This combines a standard electric motor and position feedback sensor with a controlling circuit. The electric motor can be DC (brushed) or AC (brush-less).

There are a couple of fundamental components to these servo drives:

  • Actual position conditioning & decoding
  • Desired position conditioning & decoding
  • Error calculation (from actual-desired)
  • Error filtering (PID calculation)
  • PWM generation
  • H-Bridge

Actual position conditioning & decoding
Function:
This is the feedback sensor to determine the current position. They are built in to industrial servo motors, and industrial external sensors cost many $100s.
Hobby Option: A low cost optical encoder can be had for US$20, and with a little effort these can be fitted to a standard permanent magnet DC motor. The output from these incremental rotary encoders, is "quadrature" encoded (two output wave forms 90 degrees out of phase). Decode quadrature input with a microcontroller.

Desired position conditioning & decoding
Function:
The servo controller must be instructed of the desired position.
Hobby Option: Derived from stepper motors, the defacto standard is STEP & DIRECTION signals. A "step" line is pulsed, and each pulse represents an increment or decrement depending on the state of the "direction" line. Software such as EMC2 & Mach3 can generate these signals.  Decode step/direction input with a microcontroller.

Error calculation (from actual-desired)
Function: From the actual and desired position, an error level must be derived. This can be done via analogue, or digital means.
Hobby Option: Calculate with a microcontroller.

Error filtering (PID calculation)
Function:
From the error calculate an output level.
Hobby Option: Calculate with a microcontroller.

PWM generation
Function:
From processed error calculate an output level.
Hobby Option: Generate with a microcontroller. This is a logic level PWM signal (or signals) that control the H-bridge.

H-bridge
Function:
Produce a high power PWM DC signal.
Hobby Option: The H-bridge needs to match the motor. A simple 100mA unit can be constructed with BC548 NPN and BC558 PNP transistors. At 160A the 16 MOSFET Open Source Motor Controller project is the other extreme. Most setups will lie somewhere in between.

Motor
Function:
Converts electric power to motion.
Hobby Option: DC Brush motors provide the best performance/price. Genuine high power, low inertia, industrial servo motors cost many $100s. Existing automotive, electric scooter, & general purpose motors can be used quite effectively.

Options

Buy: At the hobby level Gecko (US$114) drives appear to be the norm. The Gecko (320 & 340) appear to be analogue units with gain & dampening trim-pots. A test-point reflecting the error (as voltage) is available to assist in tuning with an oscilloscope. 

Build: A number of DIY controllers, Elm Chan Servo, UHU Servo, Dspic-Servo, were all designed for the specific purposes of their creator, and integrate the H-bridge into the controller PCB. The most variable component is the motor. Different uses will require different motors, and different motors have different drive requirements. It's beyond most hobbyists to modify a PCB and design their own high-power section. A modular approach, with a separate controller & H-bridge would be much more flexible. Allowing you to select a H-bridge matched to you motor.

When looking at the DIY servo controllers I found a few short commings:

  • Elm Chan Servo - No standard PCB available. Not well supported.
  • UHU Servo - Closed source. Getting the preprogrammed chip appears quite an ordeal.
  • Dspic-Servo - Uses uncommon High-Voltage, High-Current Op Amp ($18).

What was missing is a modular DIY servo controller - the lego of DIY servo controllers. This is my goal.

Powered by BlogEngine.NET 1.3.1.30
Original theme by Mads Kristensen

About the author

Name of author Ivan Hamilton
"My inner nerd can beat up your inner nerd."

E-mail me Send mail

Adsense

Calendar

<<  November 2014  >>
MoTuWeThFrSaSu
272829303112
3456789
10111213141516
17181920212223
24252627282930
1234567

View posts in large calendar

Recent comments

Tags

None

    Entropy

    Disclaimer

    The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

    © Copyright 2014

    Sign in