µModule Servo-32 | ||
|
Site movedThis website has been moved to another location. Please update your bookmarks.You will be redirected to the new location (http://www.modularcircuits.com/servo_32.htm) in five seconds. Alternatively, you can click on the link above to get to the new location immediately ![]() Preliminary information: Documentation is not fully updated IntroductionThis µModule implements a 32-channel R/C servo controller. The module interfaces to the external world using the TWI interface that's common among all µModules. It also has an optional CMOS-level RS-232 interface option. The module is ideal for biped (humanoid) or hexapod robot control applications where a large number of servos have to be controled. For even higher number of servos multiple servo controllers can be connected to the same TWI channel. With this feature hundreds of servos can be controlled by a single central controller.Features
LicenseThis document and all the accompanying design documentation (for example schematic and PCB files) are covered by the H-Storm Non-Commercial License (HSNCL). H-Storm Non-Commercial License (HSNCL)Copyright 2004 Andras Tantos and Modular Circuits. All rights reserved. Redistribution and use in source or binary forms, or incorporated into a physical (hardware) product, with or without modification, are permitted for non-commercial use only, provided that the following conditions are met:
ALL THE INFORMATION, TECHNOLOGY, AND SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANDRAS TANTOS, MODULAR CIRCUITS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE OR TECHNOLOGY, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Design descriptionThe bus interfaceThe TWI bus interface follows the µModule standards. There are two four-pin telephone sockets on the board, both with identical functionality. The two center wires are used for the TWI signal transmission (clock and data) while the other two provide power and ground signals. The interface can be operated at a rate up to 400kHz. This module never initiates any transactions on the bus, it operates in slave-only mode. Status information can be acquired by polling and commands can be sent to the module at any time. The module implements the H-Storm PnP command set (very similar to SMBus 2.0 with ARP) with extentions specific to the function of the module.Powering optionsThe module can source and sink power on this interface. The power to and from these sockets can be interrupted by an on-board jumper. With this there are three possible powering configurations with regards to the logic-level functions:
Servo controlEach servo output is a PWM signal, with an approximately 50Hz repetition rate and a pusle width between 0 and 2.5ms. The pulse width is controlled by an 8-bit register so the step-increment in the pulse is around 10us. Most R/C servos require a 1..2ms pulse with, with 1.5ms corresponding to the center position. These values lead to 100 different values that servos can interpret or about 7 bits of usable resolution. The control signal for the servos is a 3.3V-compatible CMOS signal (unless an external 5V power supply is used) which is compatible with 5V TTL input levels that most R/C servos require.Note that these are aproximate values and are not intendted to be used as a source of any kind of timing. Our measurements show that for example a Hitec HS-425BB servo requires value 61 for its left-most position and the value 220 for its rightmost position. Exact values and limits differ from servo to servo and must be experimented with for each application. Power consumptionThe current drawn by the circuit is around 7mA when operated from the TWI interface. The optional external RS-232 level shifter consumes an additional 4mA.Miscelanious functionsThe module on the top of the standard TWI interface, that is commond among all µModules also contains a (logical level) RS-232 interface. This interface can be used to connect the module to other microcontroller modules or (after level-shifting) to a PC which doesn't have a TWI interface.Serial interfaceThe serial interface is configured to 38400 BAUD, 8 data bits, no parity and 2 stop bits. The communication protocol is very simple.The host uses commands to initiate communication with the servo controller. The command consists of a single character identifying the command followed by zero or more data transmitted by either the servo controller or the host. For each byte the servo controller receives it will send exactly one byte. This way the host can make sure that the communication channel is intact. The
The purpose of this command is to establish connection from the host to the servo controller or re-syncronize the communication in case
it is lost. The host transmits a single 'c' (dec 99) character to which the servo controller responds with the same 'c' character. If
any other response is received it can be assumed that there was a communication error and/or the syncronization between the host
and the servo controller has been lost. The |
|
| © 2004 Andras Tantos | ||