Qik 2s12v10 User's Guide © 2001–2012 Pololu Corporation Qik 2s12v10 User's Guide 1. Overview . . . . . . . . . . . . . . . . . . . . . . . . . 2. Contacting Pololu . . . . . . . . . . . . . . . . . . . . . 3. Connecting the Qik . . . . . . . . . . . . . . . . . . . . 3.a. Power and Motor Connections . . . . . . . . . . 3.b. Logic Connections . . . . . . . . . . . . . . . . 3.c. Included Hardware . . . . . . . . . . . . . . . . 3.d. Jumpers . . . . . . . . . . . . . . . . . . . . . . 3.e.
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.
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.
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/].
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.
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.
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.
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.
Qik 2s12v10 User's Guide Qik 2s12v10 TTL serial connection example (transmit and receive). © 2001–2012 Pololu Corporation 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.
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].
Qik 2s12v10 User's Guide © 2001–2012 Pololu Corporation The 3×2 header strip can be soldered to the jumper pins as shown above, which lets you make use of the included shorting blocks, and the included terminal blocks lock together to make a single, 6-pin strip that you can solder to the power side of the board. 3.d. Jumpers The qik jumpers allow you to easily alter the behavior of the device. These jumpers can be left off for most applications.
Qik 2s12v10 User's Guide © 2001–2012 Pololu Corporation the silkscreen labels). This sets the baud rate to a predetermined value, as described in the table below, and the qik skips the automatic baud detection phase that normally occurs on start-up.
Qik 2s12v10 User's Guide © 2001–2012 Pololu Corporation • Error LED (red): This red LED is tied to the ERR output pin and lights when the ERR pin drives high in response to an error. Once an error occurs, the LED remains lit until a serial command is issued to read the error byte, at which point the LED turns off. For more information on the possible error conditions, please see Section 5.c. It is located on the logic side of the board.
Qik 2s12v10 User's Guide © 2001–2012 Pololu Corporation 3.f. Board Dimensions and Mounting Information The qik 2s12v10 measures 2.15" x 1.86" x 0.28" (54.6 x 47.2 x 7.1 mm) and weighs 0.5 oz (14 g) without the header pins or terminal blocks installed. It has four mounting holes, one in each corner. The holes have a diameter of 0.125" and are designed for #4 or M3 screws. 3.
Qik 2s12v10 User's Guide © 2001–2012 Pololu Corporation 4. Serial Interface You can use the serial interface for three general purposes: querying the qik for information, setting its configuration parameters, and sending it motor commands. Motor commands are strictly one-way; the qik responds to all other commands by transmitting a single byte that either represents information that has been requested or feedback on the effect of the issued command. 4.a.
Qik 2s12v10 User's Guide © 2001–2012 Pololu Corporation information. Information requests 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. Note: Only the SIN line is compatible with RS-232 serial, which is inverted and uses voltages that would be out of spec (e.g. -15 to 15 V). You should not connect RS-232 serial lines to RX or TX. The qik does not provide RS-232 serial output. 4.b.
Qik 2s12v10 User's Guide © 2001–2012 Pololu Corporation For example, if we want to set motor M1 to full speed forward using the compact protocol, we could send the following byte sequence: in hex: 0x8D, 0x7F in decimal: 141, 127 The byte 0x8D is a command for M1 forward, and the data byte contains the motor speed. Note that every qik command byte starts with 0x8_ or 0x9_ when using the compact protocol.
Qik 2s12v10 User's Guide © 2001–2012 Pololu Corporation If you want to daisy-chain a qik with other Pololu devices that use 0x80 as an initial command byte, the procedure becomes slightly more complicated. You should first transmit the byte 0x80 so that these devices can automatically detect the baud rate, and only then should you send the byte 0xAA so that the qik can detect the baud rate.
Qik 2s12v10 User's Guide © 2001–2012 Pololu Corporation 5. Serial Parameters and Commands 5.a. Configuration Parameters The qik 2s12v10 has twelve configuration parameters that are saved in non-volatile memory, which means that once set, these parameters will retain their values even if the unit is powered off. Commands 0x83 and 0x84 are used to read and write these parameter values, respectively (see Section 5.d).
Qik 2s12v10 User's Guide © 2001–2012 Pololu Corporation • bit 1: if this bit is set, stop motors M0 and M1 when any motor-over-current error occurs. • bit 2: if this bit is set, stop motors M0 and M1 when any motor-fault error occurs. When this parameter has a value of 7, both motors M0 and M1 are stopped as a safety precaution whenever any error occurs; conversely, if this parameter has a value of 0, no error causes the motors to stop.
Qik 2s12v10 User's Guide © 2001–2012 Pololu Corporation • If the target direction does not match the current direction, the motor speed is immediately set to zero, and the qik then proceeds to ramp the motor speed linearly from zero to the target speed by adding the value of the associated acceleration parameter to the speed every 40 ms. For example, if the M0 acceleration parameter is 1, it takes a stationary motor M0 5.08 s (127 * 40 ms) to reach a speed of 127.
Qik 2s12v10 User's Guide © 2001–2012 Pololu Corporation set-motor command sets motor M0 to full brake for 0.5 s before the qik acts on the set-motor command and starts moving in reverse. 8: Motor M0 Current Limit / 2 9: Motor M1 Current Limit / 2 default value: 0 (current-limiting disabled) allowed values: 0 – 127 When one of these parameters has a value of zero, current limiting is inactive for the associated motor.
Qik 2s12v10 User's Guide © 2001–2012 Pololu Corporation 5.b. 0x81: Get Firmware Version Command 0x81 (129): Get Firmware Version Compact protocol: 0x81 Pololu protocol: 0xAA, device ID, 0x01 This command returns the a single ASCII byte that represents the version of the firmware running on the qik. All qik 2s12v10’s produced so far have firmware version ‘1’ or ‘2’. Firmware version 2 fixes a bug in the handling of motor fault errors (see Section 5.c for more information on motor fault errors).
Qik 2s12v10 User's Guide © 2001–2012 Pololu Corporation computed as that packet’s CRC. In such a case, the qik ignores the command packet and generates a CRC error. See Section 6 for more information on cyclic redundancy checking. • bit 6: Format Error This error occurs when the qik receives an incorrectly formatted or nonsensical command packet.
Qik 2s12v10 User's Guide © 2001–2012 Pololu Corporation Once you have set the value of a configuration parameter, that value is saved in non-volatile memory, so it will persist even if the qik is subsequently turned off or reset.
Qik 2s12v10 User's Guide © 2001–2012 Pololu Corporation as the speed parameter ranges from 0 to 127. In 8-bit mode, motor speed ranges from stopped (high-impedance outputs, or “coast”) to full speed as the speed parameter ranges from 0 – 255.
Qik 2s12v10 User's Guide © 2001–2012 Pololu Corporation = 255, which turns the motor at full speed. In 7-bit mode, both commands set motor M1 speed to 127 out of a maximum of 127, which turns the motor at full speed.
Qik 2s12v10 User's Guide © 2001–2012 Pololu Corporation speed is zero. To get a measure of actual motor speed, you would need to obtain external feedback, such as from an encoder. The values returned by these commands range from 0 to 127 in 7-bit mode and from 0 to 255 in 8-bit mode. The returned motor speed is zero if the associated motor is braking. 5.
Qik 2s12v10 User's Guide © 2001–2012 Pololu Corporation 6. Cyclic Redundancy Check (CRC) Error Detection For certain applications, verifying the integrity of the data you’re sending and receiving can be very important. Because of this, the qik has optional 7-bit cyclic redundancy checking, which is similar to a checksum but more robust as it can detect errors that would not affect a checksum, such as an extra zero byte or bytes out of order.
Qik 2s12v10 User's Guide © 2001–2012 Pololu Corporation Steps 3, 4, & 5: _______________________________________________ 1 0 0 0 1 0 0 1 ) 1 1 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 XOR 1 0 0 0 1 0 0 1 | | | | | | | | | | | | | | | --------------- | | | | | | | | | | | | | | | 1 0 0 1 0 0 0 1 | | | | | | | | | | | | | | shift ----> 1 0 0 0 1 0 0 1 | | | | | | | | | | | | | | _______________ | | | | | | | | | | | | | | 1 1 0 0 0 0 0 0 | | | | | | | | | | | 1 0 0 0 1 0 0 1 | | | | | | | | | | | ________
Qik 2s12v10 User's Guide } © 2001–2012 Pololu Corporation } unsigned char CRC(unsigned char message[], unsigned char length) { unsigned char i, crc = 0; } for (i = 0; i < length; i++) crc = CRCTable[crc ^ message[i]]; return crc; int main() { unsigned char message[3] = {0x83, 0x01, 0x00}; int i, j; GenerateCRCTable(); message[2] = CRC(message, 2); } for (i = 0; i < sizeof(message); i++) { for (j = 0; j < 8; j++) printf("%d", (message[i] >> j) % 2); printf(" "); } printf("\n"); return 0; 6.
Qik 2s12v10 User's Guide © 2001–2012 Pololu Corporation 7. Troubleshooting The following are some suggestions for ways you can troubleshoot your qik: • Test for life: With nothing more than power connected, look for a green LED heartbeat. If you do not see the green LED flashing, you either lack sufficient power (e.g. the voltage is out of range or the power supply is too noisy) or your qik is damaged. See Section 3.a for more information about power requirements.
Qik 2s12v10 User's Guide © 2001–2012 Pololu Corporation 8. Arduino Library We have written a basic Arduino library for the qik dual serial motor controllers that makes it simple to interface the qik 2s12v10 with an Arduino [http://www.pololu.com/catalog/product/2191]. The library handles the details of serial communication with the qik, and two example programs are included to help you configure the qik and get started controlling two brushed DC motors.