|
|||
| Introduction: | A Servomechanism is a device that is
capable of positioning it's mechanical actuator to a
specified position. The current mechanical position of the servomechanism's actuator is read by its control circuit and compared to a desired position provided by an external input. If the current position is different than the desired position, then the control circuit determines which direction the actuator need to be moved and activates the actuator's mechanical movement apparatus to move the actuator in the direction of the desired position. This process is repeated continuously until the current position matches the desired position, at which time, the actuator's mechanical movement apparatus is stopped. This process continues to operate continuously, checking for the need to move the actuator again. In this application note, we will construct a Virtual Circuit for an OOPic that provides the basic framework of a control circuit for a servomechanism. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Theory of Operation: | For this servo control circuit, an
Analog-To-Digital converter will read a voltage from a
potentiometer that is physically connected to the
actuator and will be used to provide the external input
of the actuator's current position. A
Pulse-Width-Modulated signal will be generated to drive
the DC Motor at a specified speed and a single TTL signal
will be used to select the direction that it will travel.
These signals will be used to drive a DC motor which will
be used as the actuator's mechanical movement apparatus. Six different Object Classes will be used to create the Servo Device's Virtual Circuit. The following table lists the six Object Classes:
The 3 Hardware Objects, oA2D, oDIO1 and oPWM, will provide the I/O that will physically connect to our servo actuator's hardware. Each of these 3 Objects have an IOLine property that specifies which I/O Line on the OOPic to use. The 2 Processing Object, oMath and oGate, will provide the control logic. The oByte Object will be used to specify the desired location. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Construction: | The Link method
will be used to progmatically assembled these Objects
into a Virtual Circuit. The following diagram shows the Virtual Circuit's schematic:
The following listing shows the program to assemble the Virtual Circuit.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Enhancements: | Several other Object are available within the OOPic that allow enhancements to be made. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home | Send mail and comments to: Savage Innovations. |