3.e. Indicator LEDs and Phases of Operation

LED Overview

The qik has seven LEDs that are used to provide feedback about its state of operation:

  • Power LED (blue): This blue LED is lit when the board is receiving power. It is located on the logic side of the board.
  • Status LED (green): This green LED provides a heartbeat to let you know that your qik is alive and what state the qik is in, and it also acts as a serial activity indicator. It is located on the logic side of the board near the jumpers.
  • 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.
  • Motor Indicator LEDs: Each motor has a green and red indicator LED tied directly to the motor driver outputs, for a total of four motor indicator LEDs. The color of the lit LED tells you the direction the motor driver would turn an attached motor (green corresponds to “forward”), and the brightness of the LED gives you feedback about the speed. Please note that it is normal for both of a motor’s red and green indicator LEDs to appear lit simultaneously when a motor is attached and driven below full speed. This is because the inductance of the motor keeps the current flowing during the coast phase of the PWM cycle, and since the current cannot flow back through the driver, the only path it has is back through the LED that corresponds to the opposite direction. These LEDs are located on the power side of the board.

Automatic Baud Detection Phase

When the qik first starts up in automatic baud detection mode, it enters a phase in which it is waiting to receive the byte 0xAA (170 in decimal) at a baud rate that is within the range of 1200 bps to 115,200 bps. If the serial receive line RX is pulled high, as is expected for an idle TTL serial line and the default state of an unconnected RX, the green status LED fades in and out evenly every 0.8 s. If the serial receive line, RX, is held low (or, equivalently, the SIN line is held high), this is indicative of a bad serial connection and the red error LED cycles between being on for 0.4 s and off for 0.4 s (with the green status LED off).

If a serial byte other than 0xAA is received in this mode, or if 0xAA is transmitted at an invalid baud rate, the red error LED turns on and stays on until the automatic baud detection phase ends. This gives you feedback that the baud has not yet successfully been set and the controller is still in the automatic detection phase. Once the baud is detected, this phase ends and the qik proceeds to normal operation.

Normal Operation

In normal operation, the green status LED very briefly flashes a heartbeat every 1.3 seconds. If the qik is in enable-CRC mode, the heartbeat LED flickers twice in rapid succession; if not, it pulses just once per heartbeat. If any serial activity is detected, the green status LED turns on until the next heartbeat turns it off. If an error occurs, the red error LED turns on and remains on until you issue a get-error command (see Section 5.c).

Demo Mode

In demo mode, the status and error LEDs cycle through the pattern:

  1. red (error) and green (status) ON
  2. red (error) ON and green (status) OFF
  3. red (error) OFF and green (status) ON
  4. red (error) and green (status) OFF

This cycle takes five seconds, and each of the four LED states corresponds to a different output state of the qik’s motor ports. When the red error LED is on, motor M0 is active, and when the red error LED is off, motor M1 is active. When the green status LED is on, the active motor is moving forward, and when the green status LED is off, the active motor is moving in reverse. If you don’t have any motors connected, the motor indicator LEDs light according to this pattern, and you can see them fade in and out as the motor speed ramps up and back down.