|The Errors box in the Status tab of the Pololu Simple Motor Control Center reveals problems that are stopping your motor.|
The Simple Motor Controller has several features that stop the motor when something is going wrong. These are called errors, and they can help protect your project from damaging itself. Whenever you are having an issue with the controller, you should first check to see what (if any) errors are occurring. You can get information about the errors by:
- Checking the Errors box in the Status tab of the Simple Motor Control Center. This is recommended because it gives you the most information, including a running count of how many times the error has been reported.
- Running the command-line utility (just type
SmcCmd -s at the command line).
- Looking at the red LED on the device. It will be lit if there are any errors stopping your motor.
- Writing PC software or using a microcontroller to send the Get Errors serial command.
- Using a microcontroller to measure the voltage on ERR pin. This pin is linked to the red LED so it should go high (3.3 V) when there is an error stopping your motor and low (0 V) otherwise.
All the errors are explained below:
- Safe start violation: Safe Start is a feature that helps prevent the motor from starting up unexpectedly. This feature is enabled by default, but can be disabled in the Advanced Settings tab. The behavior of Safe Start depends on what Input Mode you are using.
In Serial/USB input mode, the Safe start violation error occurs whenever any other error is stopping the motor. After all the other errors have been fixed, you can clear the Safe start violation error by pressing the Resume button (which issues a native USB command) or using a serial command.
In Analog or RC input mode, the Safe start violation error occurs whenever the motor is stopped because of an error AND the inputs that control the speed of the motor are not near their neutral positions. This helps prevent the situation where there might be an error stopping your motor (such as a disconnected battery), and the motor starts running at a high speed when you fix the error. To clear the Safe start violation error, move all the inputs that control the speed of the motor to their neutral positions (the sum of the absolute values of their scaled values must be less than 8 %).
- Required channel invalid: This error occurs whenever any required RC or Analog channel is invalid. This error helps ensure that your motor will stop if you accidentally disconnect your joystick, potentiometer or RC receiver. A channel is invalid if it is disconnected, or has a value that is out of range. A channel is required if it controls the speed of the motor or it is configured as a limit switch or kill switch. By default, there are no required channels because the input mode is serial and no limit or kill switches have been configured. You can check the Input Settings tab to see which channels are required. Channels that are required and invalid are highlighted in red in the Input Channels box of the Status tab so you can quickly see which channel is causing this error.
- Command timeout: This error occurs if you are controlling your motor using a microcontroller or a PC (Input Mode is Serial/USB) and the (configurable) time period has elapsed with no valid serial or USB commands being received by the controller. The purpose of this error is to ensure that your motor will stop if the software talking to the controller crashes or if the communications link is broken. All valid serial commands clear this error. The native USB commands for setting the speed and exiting safe start also clear this error. By default, this error is disabled, but it can be enabled from the Advanced Settings tab by setting a non-zero Command Timeout value.
- Limit/kill switch: This error occurs when a limit or kill switch channel stops the motor. More specifically, it occurs in three cases: when a kill switch is active, when a Forward Limit switch is active AND the Target Speed is positive, or when a Reverse Limit switch is active AND the Target Speed is negative. A limit/kill switch is considered active if its scaled value is above 50 %. If you are using a limit switch and your input mode is Serial/USB, you will need to check the Count column in the Status tab to see this error because in Serial/USB mode the Target Speed gets set to 0 whenever there is an error.
- Low VIN: This error occurs whenever your power supply’s voltage is too low or it is disconnected. If you set the correct thresholds in the Advanced Settings tab, this error will prevent you from over-discharging your battery.
- High VIN: This error occurs whenever your power supply’s voltage is too high. You can set the threshold voltage in the Advanced Settings tab.
- Motor driver error: This error occurs whenever the motor driver chip reports an under-voltage or over-temperature error (by driving its fault line low).
- Over temperature: This error occurs whenever the reading from the temperature sensor is too high. You can see the temperature reading in the Conditions box of the Status tab. The behavior of this error and the threshold temperatures can be configured in the Advanced tab.
- ERR line high: This error occurs whenever there are no other errors but the voltage on the ERR line is high (2.3–5 V). This error allows you to connect the error lines of two Simple Motor Controllers together and have both of them stop when either one experiences an error. This error can be disabled in the Advanced Settings tab.
- Serial errors: Serial errors are recorded whenever something goes wrong with the serial communication, either on the RX/TX lines or on the USB virtual COM port. If the input mode is Serial/USB, then a serial error will stop the motor from running until a valid serial command is received, or the Resume button is pressed, or the native USB Set Speed or Exit Safe Start commands are sent. If you are using serial and have not disabled Safe Start mode, you will need to send the Exit Safe-Start command, followed by a Set Speed command to recover from an error and get the motor running again. If you are using serial and have disabled Safe Start, the motor will start driving as soon when a valid Set Speed command is received. These are the types of serial errors that are recorded:
- Frame: This is error occurs when a de-synchronization or excessive noise on the RX line is detected.
- Noise: This error occurs when noise is detected on the RX line.
- RX overrun: This error occurs when the buffer for storing bytes received on the RX line is full and data was lost as a result. This should not occur during normal operation.
- Format: This error occurs if the serial bytes received on RX or the virtual COM port do not obey the protocol specified in this guide. If you get this error, check the bytes you are sending carefully, and compare them to the examples provided.
- CRC: This error occurs if you have enabled cyclic redundancy check (CRC) for serial commands, but the CRC byte received was invalid. CRC helps prevent the motor controller from accidentally performing unwanted actions when it is receiving commands over a noisy serial link. If you get this error, check your algorithm for calculating CRCs and check the quality of your serial signal at the RX pin.