Pololu Qik 2s12v10 User Manual

Qik 2s12v10 User's Guide © 2001–2012 Pololu Corporation
Qik 2s12v10 User's Guide
1. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2. Contacting Pololu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
3. Connecting the Qik . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.a. Power and Motor Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.b. Logic Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.c. Included Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.d. Jumpers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.e. Indicator LEDs and Phases of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.f. Board Dimensions and Mounting Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
4. Serial Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
4.a. TTL and RS-232 Serial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
4.b. Baud Rates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
4.c. Command Protocols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
5. Serial Parameters and Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
5.a. Configuration Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
5.b. 0x81: Get Firmware Version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
5.c. 0x82: Get Error Byte . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
5.d. 0x83 & 0x84: Get & Set Configuration Parameter . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
5.e. 0x86 & 0x87: Motor M0 & M1 Variable Brake . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
5.f. 0x88 – 0x8F: Set Motor Forward/Reverse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
5.g. 0x90 & 0x91: Get Motor M0 & M1 Current . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
5.h. 0x92 & 0x93: Get Motor M0 & M1 Speed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
6. Cyclic Redundancy Check (CRC) Error Detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
6.a. CRC Computation in C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
7. Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
8. Arduino Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
http://www.pololu.com/docs/0J29 Page 1 of 33
Qik 2s12v10 User's Guide © 2001–2012 Pololu Corporation

1. Overview

The qik 2s12v10 adds a comprehensive yet easy-to-use, high-power option to Pololu’s line of motor controllers. The compact board—it’s almost the same size as the dual VNH2SP30 carrier board [http://www.pololu.com/catalog/
with full direction and speed control, providing up to 13 A (continuous) per motor channel and tolerating peaks as high as 30 A. The improvements over competing products include:
• high-frequency PWM to eliminate switching-induced motor shaft hum or whine
• a robust, high-speed communication protocol with user-configurable error condition response
• visible LEDs and a demo mode to help troubleshoot problematic installations
• reverse power protection on the power supply

Main Features of the Qik 2s12v10

• Simple bidirectional control of two DC brush motors.
• 6 V to 16 V motor supply range.
• 13 A maximum continuous current per motor (30 A peak).
• Logic-level, non-inverted, two-way serial control for easy connection to microcontrollers or robot controllers.
• RS-232-level, one-way serial control for easy connection to a PC serial port.
• Optional automatic baud rate detection from 1200 bps to 115.2 kbps.
• Seven on-board indicator LEDs (power, status/heartbeat, error indicator, and motor indicators) for debugging and feedback.
• Error output to make it easier for the main controller to recover from an error condition.
• Jumper-enabled demo mode allowing initial testing without any programming.
• Optional CRC error detection eliminates serial errors caused by noise or software faults.
• Optional motor shutdown on error or serial timeout for additional safety.

Specifications

Motor channels: 2
Operating voltage: 6 – 16 V
Continuous output current per channel: 13 A
Peak output current per channel: 30 A
Auto-detect baud rate range: 1200 – 115,200 bps
Available fixed baud rates: 115,200 bps, 38,400 bps, 9600 bps
Available PWM frequencies: 19.7 kHz, 9.8 kHz, 2.5 kHz, 1.2 kHz, 310 Hz, 150 Hz
Reverse voltage protection?: Y
Motor driver: VNH2SP30 x2
1. Overview Page 2 of 33
Qik 2s12v10 User's Guide © 2001–2012 Pololu Corporation

Important safety warning

This product is not intended for young children! Younger users should use this product only under adult supervision. By using this product, you agree not to hold Pololu liable for any injury or damage related to the use or to the performance of this product. This product is not designed for, and should not be used in, applications where the malfunction of the product could cause injury or damage. Please take note of these additional precautions:
• This product contains lead, so follow appropriate handling procedures, such as not licking the product and washing hands after handling.
• Since the PCB and its components are exposed, take standard precautions to protect this product from ESD (electrostatic discharge), which could damage the on-board electronics. When handing this product to another person, first touch their hand with your hand to equalize any charge imbalance between you so that you don’t discharge through the electronics as the exchange is made.
• Review the instructions carefully before making any electrical connections, and do all wiring while the power is turned off. Incorrect or reversed wiring could cause an electrical short or unpredictable behavior that damages this product and the devices it is connected to.
• This product is designed to be connected to motors, which should be operated safely. Wear safety glasses, gloves, or other protective equipment as appropriate, and avoid dangerous situations such as motors spinning out of control by designing appropriate safeguards and limits into your projects.
1. Overview Page 3 of 33
Qik 2s12v10 User's Guide © 2001–2012 Pololu Corporation

2. Contacting Pololu

You can check the qik 2s12v10 dual serial motor controller page [http://www.pololu.com/catalog/product/1112] for additional information. We would be delighted to hear from you about any of your projects and about your experience with the qik motor controller. You can contact us [http://www.pololu.com/contact] directly or post on our
forum [http://forum.pololu.com/]. Tell us what we did well, what we could improve, what you would like to see in
the future, or anything else you would like to say!
2. Contacting Pololu Page 4 of 33
Qik 2s12v10 User's Guide © 2001–2012 Pololu Corporation

3. Connecting the Qik

Connecting to the qik can be as simple as hooking up power, your motors, and your serial connections. Many applications can leave the jumpers off and the remaining logic connections unconnected. The qik’s serial transmit line, TX, is only necessary if you want to get feedback from the controller.
The qik logic and power connections and key components are shown above; the pins are labeled on the back side of the motor controller. All square pads are ground.
3. Connecting the Qik Page 5 of 33
Qik 2s12v10 User's Guide © 2001–2012 Pololu Corporation

3.a. Power and Motor Connections

Power

The qik motor controller is powered via the large VIN and GND pads on the power side of the board (do not power the controller through the VIN and GND pads on the logic side of the board!), as shown in the picture above. The input voltage can be between 6 and 16 V and is the voltage that the motors will see. An integrated voltage regulator produces the 5 V that powers the board’s logic, so no separate logic power supply is necessary. Both the input voltage and regulated voltage can be accessed as outputs on the left side of the board (i.e. the logic connections). See Section 3.b for more information. Please ensure that your power source can supply the current your motors will draw.
3. Connecting the Qik Page 6 of 33
Qik 2s12v10 User's Guide © 2001–2012 Pololu Corporation
Qik 2s12v10 power and motor connections.

Motors

The qik can independently drive up to two bidirectional brushed DC motors, referred to as M0 and M1. The two terminals of each motor should be connected to the qik as shown above. Variable speed is achieved with 7-bit or 8-bit pulse width modulated (PWM) outputs at one of several selectable frequencies. 7-bit control allows for PWM frequencies of 19.7 kHz, 2.5 kHz, and 310 Hz; 8-bit control allows for PWM frequencies of 9.8 kHz,
1.2 kHz, and 150 Hz. The highest achievable frequency of 19.7 kHz is ultrasonic, which can result in quieter motor control. Lower frequencies might make the motors louder, but they can help decrease power losses due to switching and affect the relationship between PWM duty cycle and motor RPM. The resolution and frequency can be set via the qik’s PWM configuration parameter (see Section 5.a).
The motor direction convention used in this document is that “forward” corresponds to holding the + output at VIN while PWMing the - output between ground and high impedance. “Reverse” is the same as forward but with the outputs flipped: - is held at VIN while + is PWMed between ground and high impedance. As a result, the motor is rapidly alternating between drive and coast when the direction is “forward” or “reverse”. Variable speed control is achieved by varying the fraction of the cycle that the motor outputs are driving. Full speed arises when the motor outputs are driving 100% of the time (one motor output is held at VIN and the other at ground). See
Section 5.f for more information.
The qik 2s12v10 allows for variable braking. In this mode, the motor’s + and - outputs are PWMed between ground and high impedance. While the outputs are high-impedance, the motor coasts, and while the outputs are tied to ground the motor brakes. See Section 5.e for more information.
The qik 2s12v10 motor controller uses VNH2SP30 motor driver integrated circuits. These motor drivers have maximum current ratings of 30 A continuous, but the chips by themselves will overheat at lower currents (see the table below for typical values). The actual current the qik can deliver will depend on how well the motor drivers are kept cool. The qik’s printed circuit board is designed to draw heat out of the motor driver chips, but performance can be improved by adding a heat sink. In our single-driver tests, we were able to deliver 30 A for a fraction of a second and 20 A for several seconds without overheating the IC. At 6 A, the chip gets just barely noticeably warm to the touch. For high-current installations, the motor and power supply wires should also be soldered directly instead of going through the supplied terminal blocks, which are rated for up to 15 A.
3. Connecting the Qik Page 7 of 33
Qik 2s12v10 User's Guide © 2001–2012 Pololu Corporation
• Time to overheat at 30 A: < 1 s
• Time to overheat at 20 A: 35 s
• Time to overheat at 15 A: 150 s
• Time to overheat at ≤ 13 A: N/A (does not overheat)
Note that these above times were obtained using only one driver with 100% duty cycle at room temperature without a heat sink. Drawing high currents from both drivers simultaneously could cause them overheat faster. Switching-induced power losses arising from duty cycles below 100% could also cause the drivers to overheat faster and lower the continuous current rating.

3.b. Logic Connections

Serial Lines: RX, TX, and SIN

The qik can accept a logic-level (0 – 5 V), non-inverted serial input connected to its serial receive line, RX, and it can handle baud rates from 1200 – 115,200 bps. This type of serial is often referred to as TTL and is an interface method commonly used by microcontrollers. The voltage on this pin should not exceed 5 V. The qik provides logic-level (0 – 5 V), non-inverted serial output on its serial transmit line, TX, in response to commands that request information. Information requests always result in the transmission of a single byte per request. If you aren’t interested in receiving feedback from the qik, you can leave this line disconnected.
The qik can also accept RS-232 serial input connected to the serial receive line, SIN. A computer serial port typically communicates via RS-232 serial, which is inverted and uses voltages that would be out of spec for the rest of the qik’s inputs (e.g. -12V to 12V), so SIN is the only pin to which it is safe to make a direct RS-232 connection. The qik does not have an RS-232 output, so you will need to use an RS-232 level converter connected to the logic-level output if you want RS-232 feedback from the qik.
3. Connecting the Qik Page 8 of 33
Qik 2s12v10 User's Guide © 2001–2012 Pololu Corporation
Qik 2s12v10 TTL serial connection example
(transmit and receive).
Qik 2s12v10 RS-232 serial connection example
(qik receive only).
Both RX and SIN connect to the same serial port on the qik, so you should not use both of these inputs simultaneously. Don’t forget to connect your serial source’s ground to the qik’s ground!

Reset

The reset line, RST, is an active-low input, which means that it resets the qik when driven low. This pin is internally pulled to 5 V, so many applications can leave this pin disconnected.

Error

The error line, ERR, is an output that is connected to the red error LED and drives high (5 V) in response to an error (which in turn lights the LED). Once an error occurs, the pin outputs high until a serial command is issued to read the error byte, at which point the pin goes to a high-impedance state that is pulled low through the LED. This allows you to connect the error lines of multiple qiks to the same digital input. Please note, however, that doing this will cause the error LEDs of all connected qiks to turn on whenever one qik experiences an error; the ERR output of the qik experiencing the error will drive the LEDs of any other qiks it is connected to, even though they are not experiencing error conditions themselves. For more information on the possible error conditions, please see Section 5.c. If you don’t care about error detection, you can leave this pin disconnected.

5V (out)

This line connects to the 5 V output of the qik’s voltage regulator and can be used to power additional electronics in your system. It can safely supply up to 70 mA beyond what the board draws when VIN is 16 V. The closer the input voltage is to 5 V, the more current the regulator can deliver without overheating.

VIN (out)

This is a convenient connection point to the input voltage that can be used as a power source for additional electronics. Note that this pin is not intended to handle high currents, so it should not be used to power the qik (use the large VIN and GND pads on the other side of the board for this). Do not attempt to draw more than 1 A from this pin.

Connecting to a 3.3 V Microcontroller

The logic components on the qik 2s12v10 run at 5 V, but it is still possible to interface with a 3.3 V microcontroller. The RX high input threshold is 3 V, so you can directly connect your microcontroller’s transmit line to the qik’s TTL serial receive line (i.e. no additional components are required for sending commands to the qik from a 3.3 V MCU).
If your microcontroller digital inputs are 5V-tolerant, you can make direct connections to the ERR and TX outputs and RST input, which is weakly pulled to 5 V on the qik. If not, you can leave these optional outputs unconnected, or you can use external components to decrease the voltage to a range your MCU can handle. A simple way to accomplish this is by placing voltage dividers between each qik output and your MCU.
3. Connecting the Qik Page 9 of 33
Qik 2s12v10 User's Guide © 2001–2012 Pololu Corporation

3.c. Included Hardware

The qik ships with a 12×1 straight 0.100" male header strip [http://www.pololu.com/catalog/product/965], a 3×2
straight 0.100" male header strip [http://www.pololu.com/catalog/product/966], three 2-pin terminal blocks
[http://www.pololu.com/catalog/product/2440], and three red shorting blocks [http://www.pololu.com/catalog/product/971].
For the most compact installation, you can solder wires directly to the qik pins themselves and skip using the included hardware. For high-current installations, you should avoid using the supplied terminal blocks, which are rated for up to 15 A, and instead directly solder the motor and power supply wires to the pads.
strip [http://www.pololu.com/catalog/product/967] (not included) for a lower profile.
3. Connecting the Qik Page 10 of 33
Loading...
+ 23 hidden pages