DDiiggiilleenntt RReeffeerreennccee DDeessiiggnn [632150]
DDiiggiilleenntt RReeffeerreennccee DDeessiiggnn
SSeerrvvoo–mmoottoorr DDrriivvee wwiitthh XX–BBooaarrdd aanndd PPMMooddCCoonn33
®
www.digilentinc.com
Revision: April 2, 2007 215 E Main Suite D | Pullman, WA 99163
(509) 334 6306 Voice and Fax
Doc: 561-XXX page 1 of 3
Copyright Digilent, Inc. All rights reserved. Other product and company names mentioned may be tradema rks of their respective owners.
Overview
The Digilent X-board / PModHB3
reference design demonstrates
driving a servo motor with PWM
control from the X-board.
The X-board is a CPLD
demonstration board based on a
Xilinx CoolRunner-2 CPLD. The
PModCon3 is a Digilent Peripheral
Module board that contains
connectors for four servo motors and
an optional external power supply.
Servo motors are driven with a
single logic-level PWM signal.
Digilent’s Adept software is used to
program the reference design into
the CPLD, and to move PWM data
from the PC to the X-board. Please
refer to the Reference Manuals
listed below for more detailed
information.
References
Digilent X-board Reference Manual Schematic
Digilent PModHB3 Reference Manual and Schematic
Digilent Adept Reference Manual
Digilent Application Note AN0040 “Digilent Asynchro nous Parallel Interface”
Xilinx CoolRunner-2 Data Sheet
Set-up
This reference design requires a PC running the Xil inx ISE or WebPack tools, Digilent’s Adept
software, an X-board, a Digilent PModCon3, and a se rvo motor. Servo motors are available from most
hobby stores and catalog distributors.
Set the clock frequency select jumper (J11) on the X-board to select 100KHz.
`
Xilinx
X-Board PmodHB3Servo Motor
USB Cable
USB
interface
(EPP
Controller)PModCon3
Interface
(Servo
motor PWM
controller)
CPLD Configuration Data 8Control3
PWM signal
to motor Cypress USB
bus interface 20
Digilent Servo Motor Drive using the X-board and PModAMP1 www.digilentinc.com
Doc: 561-XXX page 2 of 3
Copyright Digilent, Inc. All rights reserved. Other product and company names mentioned may be tradema rks of their respective owners. Description
This reference design is composed of two major bloc ks: a USB interface that implements registers in
the CPLD that Adept can read and write; and a PWM c ontroller that generates a PWM signal that can
drive a servo motor. A simple 8-bit control bus cal led the Digilent asynchronous parallel interface bu s
(based on the Enhanced Parallel Port, or EPP, speci fication) is used to move data internally between
these two blocks.
The USB interface block works with firmware in the USB controller to implement a single register in
the CPLD. The register can be written from the Tran sport application that is available as a part of
Digilent’s freely available Adept software (alterna tively, the API’s available through Adept can be us ed
to create custom applications to access CPLD regist ers). Register writes are communicated from the
USB interface block to the PWM controller using Dig ilent’s asynchronous parallel interface bus. Bus
timings and signal definitions closely follow the E PP specification; please see application note
AN0040 available at www.digilentinc.com for a detailed description of bus timing and contr ol.
A servo motor is an electronic system composed of a DC motor, a shaft encoder, and a feedback
control system. Servo motor rotation is typically c onstrained to a 270 degree (or less) arc, with the
rotation angle being set by a periodic pulse delive red to the servo motor by a controller. The pulse
duration establishes a target voltage within the se rvo system, and the servo controller circuit rotate s
the shaft to try to match the shaft encoder voltage to the target voltage. A typical servo controller
circuit delivers pulses of a prescribed width (typi cally 500us to 1500us) once each 20ms to 100ms.
Shorter pulses (on the order of 500us) select a sma ll rotation angle, and a longer pulses (on the orde r
of 1500us) select a larger rotation angle. To cause a servo to rotate clockwise at a given rate, longe r
and longer pulses would be supplied to the servo mo tor over time. Different servo motors have
different specifications – refer to the specificati ons of the motor you intend to use and adjust the
parameters in the reference design as needed.
This reference design uses a
single address register to
define the duration of a pulse
sent to a servo motor (and
therefore to define the rotation
angle of a servo motor). Pulses
are sent to the servo motor
every 20ms, and pulse
duration is specified by a
number of 10us intervals
entered into any address box.
For example, writing 100 to
any address would specify a
pulse duration of 1ms. Pulse
frequency can be changed by
modifying a constant in the
project source files.
To use the reference design
“as is”, build a project in the
Xilinx tools using the VHDL
and UCF files that are
downloaded from the Digilent
Digilent Servo Motor Drive using the X-board and PModAMP1 www.digilentinc.com
Doc: 561-XXX page 3 of 3
Copyright Digilent, Inc. All rights reserved. Other product and company names mentioned may be tradema rks of their respective owners. website as a part of this reference design. Attach the PModCon3 to the J1 port on the X-board, and
attach a servo motor to JP1 on the Con3 board. Prog ram the CPLD on the X-board with the JED file
created from the downloaded source files, and then run Digilent’s Transport application (available as a
part of the Adept software freely available at the Digilent website). Select the Register I/O tab, an d
write a value between 50 and 200 to any address reg ister (values outside this range define pulse
shorter than 500us or longer than 2000us, and may d amage the servo).
Note that user-written, custom applications can con trol servo motors using the API’s available as a
part of Adept.
Copyright Notice
© Licențiada.org respectă drepturile de proprietate intelectuală și așteaptă ca toți utilizatorii să facă același lucru. Dacă consideri că un conținut de pe site încalcă drepturile tale de autor, te rugăm să trimiți o notificare DMCA.
Acest articol: DDiiggiilleenntt RReeffeerreennccee DDeessiiggnn [632150] (ID: 632150)
Dacă considerați că acest conținut vă încalcă drepturile de autor, vă rugăm să depuneți o cerere pe pagina noastră Copyright Takedown.
