Pololu DMC01 User Manual

Trex dual motor controller

Advertisement

Quick Links

Pololu TReX User's Guide
Pololu TReX User's Guide
1. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2. Contacting Pololu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
3. Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
3.a. Motor and Power Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
3.b. Signal Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.c. Jumper Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.d. LED Feedback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.e. Automatic Calibration for Your RC/Analog Controller . . . . . . . . . . . . . . . . . . . . . . . . . . 10
4. RC/Analog in Detail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4.a. Channel Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4.b. Channel Calibration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4.c. General RC Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.d. General Analog Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.e. Safe-Start Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
5. The Serial Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
5.a. Serial Communication Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
5.b. Serial Command Protocols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
5.c. Serial Command List and Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
5.d. Configuration Parameter List and Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
5.e. Cyclic Redundancy Check (CRC) Error Detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
5.f. CRC-Generation Algorithm in C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
5.g. Resetting the Serial Communication Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
6. Updating the TReX's Firmware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
© 2001-2009 Pololu Corporation
Page 1 of 22

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DMC01 and is the answer not in the manual?

Questions and answers

Summary of Contents for Pololu DMC01

  • Page 1: Table Of Contents

    2. Contacting Pololu ........
  • Page 2: Overview

    Pololu TReX User's Guide © 2001–2009 Pololu Corporation 1. Overview The TReX Dual-Motor Controller is a versatile DC motor controller [http://www.pololu.com/catalog/product/777] designed to seamlessly blend autonomous and human control of small- and medium-sized robots. The TReX can control two bidirectional and one unidirectional motor via three independent control interfaces: radio control (RC) servo pulses, analog voltage, and asynchronous serial (RS-232 or TTL).
  • Page 3: Contacting Pololu

    Pololu TReX User's Guide © 2001–2009 Pololu Corporation 2. Contacting Pololu You can check the TReX motor controller page for additional information. [http://www.pololu.com/catalog/product/777] We would be delighted to hear from you about any of your projects and about your experience with the TReX motor controller.
  • Page 4: Getting Started

    Pololu TReX User's Guide © 2001–2009 Pololu Corporation 3. Getting Started TReX input/output connection points Getting started with your TReX can be as simple as connecting power, your motors, and your RC or analog control signals (see Section 3.a and Section 3.b). Configure your jumpers for RC or analog mode (see Section 3.c) and you’re good to go.
  • Page 5 Pololu TReX User's Guide © 2001–2009 Pololu Corporation The figure above demonstrates how to connect two bidirectional motors and a unidirectional auxiliary motor to your TReX, all powered by the same battery. Note that the auxiliary motor is driven by permanently connecting one lead to power while the board PWMs the other lead between high impedance and ground.
  • Page 6: Signal Connections

    Pololu TReX User's Guide © 2001–2009 Pololu Corporation Lastly, you can use both motor 1 and 2 outputs to control a single, more powerful (up to 25 A continuous) bidirectional motor by connecting it as shown above. One of the motor’s terminals connects to both of motor 1’s outputs while the other of the motor’s terminals connects to both of motor 2’s outputs.
  • Page 7: Jumper Settings

    Pololu TReX User's Guide © 2001–2009 Pololu Corporation TReX’s RX or SI line should connect to your target’s transmit line (the orange wire in the figure above). On a DB9 connector, pin 2 is your computer’s receive line and pin 3 is your computer’s transmit line.
  • Page 8: Led Feedback

    Pololu TReX User's Guide © 2001–2009 Pololu Corporation outputs. When the jumper shorts the right two mode pins, the TReX is in analog mode; the TReX measures the analog voltages on the five input channels and sets the motor outputs accordingly. When there is no jumper on the three mode pins, the TReX is in serial mode and the serial interface controls the motors.
  • Page 9 Pololu TReX User's Guide © 2001–2009 Pololu Corporation channel has been learned; a red flash indicates the corresponding channel has not been learned. For example, a flash sequence of “red, red, green, red, green” means only channels 3 and 5 have been learned. If the TReX is in analog mode, it signals which analog channels have been learned;...
  • Page 10: Automatic Calibration For Your Rc/Analog Controller

    Pololu TReX User's Guide © 2001–2009 Pololu Corporation ▪ Red LED on solid, green LED off: This is the first stage of the learning sequence in which the TReX is attempting to learn the neutral values of each channel. This phase should last around two seconds.
  • Page 11 Pololu TReX User's Guide © 2001–2009 Pololu Corporation The TReX calibrates itself by first learning the neutral values of all the channels and then learning the extremes. You can enter learning mode via the secret handshake: 1. Power off your TReX.
  • Page 12: Rc/Analog In Detail

    This section provides a detailed overview of the RC and analog modes of operation. It explains how the TReX processes its channel inputs and how those inputs influence the TReX when it’s in RC or analog mode. Pololu TReX connected to an RC receiver 4.a. Channel Functions The five input channels along the left side of the TReX accept either radio-controlled (RC) servo pulses or analog voltages, depending on the position of the mode-selection jumper (or on the value of the “channel input source”...
  • Page 13: General Rc Information

    Pololu TReX User's Guide © 2001–2009 Pololu Corporation Perhaps most noticeably, these parameters help determine how the channel inputs affect the motors. Motor speed is scaled linearly (or parabolically, if the channel is set as parabolic using the “parabolic channels” configuration parameter) from 0 at a channel input of neutral+deadband to max speed at a channel input of maximum.
  • Page 14: Safe-Start Mode

    Pololu TReX User's Guide © 2001–2009 Pololu Corporation flipped mode or serial override. One solution to this problem is to use the “ignored channels” configuration parameter to set unused analog channels as ignored. The TReX considers ignored channels to be fixed at their neutral positions.
  • Page 15: The Serial Interface

    5.a. Serial Communication Settings Unlike our other Pololu serial controllers, the TReX does not support automatic baud detection. Instead, you can configure the TReX to run at one of 11 common baud rates ranging from 1200 to 115,200 bits per second. The TReX ships with a default baud rate of 19,200 bps.
  • Page 16 The Pololu protocol is to transmit 128 (0x80 in hex) as the first (command) byte, followed by a device-number data byte. The default device number for the TReX is 7, but this is a configuration parameter you can change. Any Pololu device on the line whose device number matches the specified device number will accept the command that follows;...
  • Page 17: Serial Command List And Documentation

    Pololu TReX User's Guide © 2001–2009 Pololu Corporation The TReX will respond to both the Pololu and Compact protocols on the fly; you do not need to use a jumper or configuration parameter to identify which protocol you will be using.
  • Page 18: Crc-Generation Algorithm In C

    Pololu TReX User's Guide © 2001–2009 Pololu Corporation message = [1 0 0 0 0 1 1 0] [0 0 0 1 1 1 1 1] 0 0 0 0 0 0 0 Steps 3, 4, & 5: _______________________________________________ 1 0 0 0 1 0 0 1 ) 1 0 0 0 0 1 1 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0...
  • Page 19: Resetting The Serial Communication Parameters

    Pololu TReX User's Guide © 2001–2009 Pololu Corporation void GenerateCRCTable() int i, j; // generate a table value for all 256 possible byte values for (i = 0; i < 256; i++) CRCTable[i] = (i & 0x80) ? i ^ CRCPoly : i;...
  • Page 20: Updating The Trex's Firmware

    Pololu TReX User's Guide © 2001–2009 Pololu Corporation 6. Updating the TReX's Firmware Current Firmware Versions • The firmware that comes preloaded on every TReX motor controller is trexv1_0.trx [http://www.pololu.com/file/ (140k trx). download/trexv1_0.trx?file_id=0J89] • We have released alternate firmware version: trexv1_1.trx...
  • Page 21 Pololu TReX User's Guide © 2001–2009 Pololu Corporation This will bring up the Firmware Upgrade dialog, as shown below. Select the COM port your TReX is connected to and enter the firmware update file’s path. Click the Program button to initiate the firmware update. If all goes correctly, you will be prompted to confirm that you want to erase your current firmware and you will then see a progress bar showing you the status of the upload.
  • Page 22 Pololu TReX User's Guide © 2001–2009 Pololu Corporation Option 2: using a terminal program If you would rather use a terminal program, you will need one that is capable of transferring binary files, such as Tera Term Pro. Connect to the serial port that your TReX is on at 115.2 kbsp with 8-bit characters, no parity, and one stop bit.

Table of Contents