Driving an Analog Servo With PWM

Pictured above is iMSO measuring a signal from an Arduino microcontroller used to control an analog servo motor. iMSO measures the Pulse Width Modulated (PWM) control signal with the digital input and reports it to the iPhone screen as the purple trace.

Analog and Digital Inputs to Oscium’s iMSO-104 Digital Oscilloscope

For scale and reference, I also monitored a pulsed analog signal from the Arduino. I wanted to look at how the analog and digital channels of iMSO-104 represent similar signals.

Purple trace is the digital PWM signal controlling the orientation of the servo's horn; the green trace is a 0-5V signal reference from the Arduino microcontroller.

Components of a Simple Servo

The figure below shows the major components of an analog servo motor. With the theory of operation understood, hobbyists and tinkerers like you and I can incorporate servos and microcontrollers into exciting projects.

  • The controller circuit converts a digital PWM waveform into a drive signal to the motor while monitoring the position feedback returned from the servo.
  • The dc motor converts electrical energy into a rotational movement. The driving voltage to the motor is pulsed. The motor can rotate clockwise and counterclockwise.
  • The servo’s gearbox acts like the transmission in your car. The DC motor spins at a higher RPM than you’d want your servo arm to move, and there may not be enough native torque in the motor to move a load with any resistance. The gearbox reduces the angular velocity of the servo (effectively slowing down its rate of rotation), and the gears allow the motor to push and pull with more torque.
  • Lastly, the positional feedback of the servo arm is generated by a potentiometer (variable resistor) that turns at the same rate and in the same direction as the servo arm itself. There is a constant voltage applied across the potentiometer itself, and as the adjustable leg moves with the servo it produces an output voltage that’s proportional to the rotation. Illustrated components to a simple servo: Gears, Motor, Controller, and Feedback. Photo taken from www.pcbheaven.com. See a servo in action The PCBHeaven bloggers uploaded a short servo and oscilloscope video that’s worth watching. As the user adjusts the PWM signal to the servo, the signal is shown in the oscilloscope and the servo arm rotates through its range of movement.

Illustrated components to a simple servo: Gears, Motor, Controller, and Feedback. Photo taken from www.pcbheaven.com.

Servo In Action

The PCBHeaven bloggers uploaded a short servo and oscilloscope video that’s worth watching. As the user adjusts the PWM signal to the servo, the signal is shown in the oscilloscope and the servo arm rotates through its range of movement.