Circuit Lake

Electronic Project and Circuit Collection

DC Servomotor Controller System

08/24/2011 Category: AVR, Control, Interfacing, Microcontroller, Motor, Project

The ATtiny2313-based project is an experiment on the closed loop DC servomotor control system (SMC) by Elm Chan. It can be used for practical use with/without some modifications. The closed loop servo mechanism requires real-time servo operations, such as position control, velocity control and torque control. It will be suitable for implementation to any embedded 32 bit RISC processors as a middleware.

AVR based DC Servomotor Controller


To capture the motor position, 52 kHz timer interrupt is used to sample the quadrature output from incremental rotary encoder and update current position register. Normally, a hardware buffer counter is used for the encoder interface to reduce load of the capturering process. However, SMC samples the input signals directly with only software process to reduce external components.

This Servomotor control system is controlled by online commands form host controller via its serial interface. Ther serial data format is N81 and the data rete is 38.4k bps. It can be connected to a PC’s serial port directly. Download : circuit & source code.

DC Servomotor Control
Project Firmware, Schematic and Documentation
elm-chan.org