The SPARK MAX is a motor controller that can control both Brushed DC and Brushless DC motors. Out of the box, the MAX defaults to its Brushless Mode and is ready to drive a NEO Brushless Motor with its PWM interface. Below you will find the basic steps to get a motor spinning as well as information on how to configure your SPARK MAX.
Table of Contents
- Electrical Connections
- NEO Brushless DC Motor Connections
- Brushed DC Motor Connections
- Control Connections
- Power Connections
- Mode Configuration
- PWM Control
- CAN Control
- USB Control
- STATUS LED Colors and Patterns
Before spinning a motor, a few electrical connections need to be made for power, control, and the motor. The first step is determining the type of motor you wish to connect.
In general, brushed motors only have 2 primary wires while brushless motors have 3 primary wires.
First, connect the three primary motor wires; red, black, and white, to the matching SPARK MAX output wires labeled A (red), B (black), and C (white). Next connect the NEO's encoder cable to the port labeled ENCODER just above the output wires.
Connect the two motor wires, M+ (red) and M- (black), to the SPARK MAX output wires labeled A (red) and B (black).
The third output wire, labeled C (white), is not used when driving a brushed motor and should be secured and insulated. We recommend tying it back with a zip-tie and covering the end with a piece of electrical tape.
SPARK MAX can be controlled with PWM, CAN, and USB interfaces.
PWM Interface Conenctions
Plug the 4-pin JST to single PWM cable into the port labeled CAN/PWM on the SPARK MAX. Connect the other end of the cable to the robot controller's PWM ports, black wire to ground and white wire to signal.
CAN Interface Connections
Plug the 4-pin JST to CAN cable into the port labeled CAN/PWM on the SPARK MAX. This cable has both a male and female pair of connectors that can be used to daisy-chain your SPARK MAX into your robot's CAN network. The green wire is CANL and the yellow wire is CANH.
USB Interface Connections
Plug a USB type C cable into the port labeled USB-C on the SPARK MAX. You can control the MAX over USB using the SPARK MAX PC Utility.
Connect 12V power to the integrated power leads labeled V+ (red) and V- (black) on the SPARK MAX. If you need to extend the length of the integrated wires, it is recommended to use 12AWG wire or larger.
SPARK MAX has many operating modes that can be configured through its CAN and USB interfaces. Additionally, the following basic operating modes can be configured with the MODE button located on the top of the SPARK MAX:
- Idle Behavior: Brake/Coast
- Motor Type: Brushed/Brushless
Mode configuration must be done with power applied to the SPARK MAX.
Whenever the SPARK MAX is receiving a neutral signal (no motor movement) or no signal at all (robot disabled), it can either brake the motor or let it coast. When in Brake Mode, MAX will short the motor wires to each other, electrically braking the motor. This slows the motor down very quickly if it was spinning and makes it harder, but not impossible to back-drive the motor when it is stopped.
- With power turned on, press and release the MODE button to switch between Brake and Coast Mode.
- The STATUS LED will indicate which mode it is in. See the STATUS LED Colors and Patterns section for more information.
It is very important to have the SPARK MAX configured for the appropriate motor type. For example, operating in Brushed Mode with a brushless motor connected will permanently damage the motor!
- With power turned on, press and hold the MODE button for approximately 3 - 4 seconds.
- The STATUS LED will change and indicate which motor type is selected. See the STATUS LED Colors and Patterns section for more information.
- Release the MODE button.
SPARK MAX will respond to a standard 1ms - 2ms RC Servo PWM Pulse to drive both brushed and brushless motors. The received pulses correspond to the following behaviors:
|Pulse p in ms||p = 1.0||1.0 < p < 1.5||p = 1.5||1.5 < p < 2.0||p = 2.0|
|Motor Behavior||Full Reverse||Proportional Reverse||Neutral (stopped)||Proportional Forward||Full Forward|
More information coming soon!
More information coming soon!
SPARK MAX will indicate important status information on its multi-colored STATUS LED located on the top of its case. The following table shows each state and the corresponding LED color pattern.
|Operating Mode||Idle Mode||State||Color/Pattern|
|Brushed||Brake||No Signal||Blue Blink|
|Valid Signal||Blue Solid|
|Coast||No Signal||Yellow Blink|
|Valid Signal||Yellow Solid|
|Brushless||Brake||No Signal||Cyan Blink|
|Valid Signal||Cyan Solid|
|Coast||No Signal||Magenta Blink|
|Valid Signal||Magenta Solid|
|Partial Forward||-||-||Green Blink|
|Full Forward||-||-||Green Solid|
|Partial Reverse||-||-||Red Blink|
|Full Reverse||-||-||Red Solid|
|Forward Limit||-||-||Green/White Blink|
|Reverse Limit||-||-||Red/White Blink|
|Firmware Update Mode||-||-||Dark (LED off)|
|12V Missing||-||-||Orange/Blue Slow Blink|
|Brushless Encoder Error||-||-||Orange/Magenta Slow Blink|
|Gate Driver Fault||-||-||Orange/Cyan Slow Blink|
|CAN Fault||-||-||Orange/Yellow Slow Blink|