The SPARK MAX Motor Controller (Part ID: REV-11-2158) is a versatile and advanced motor controller designed by REV Robotics for use in robotics, particularly in the FIRST Robotics Competition. It is capable of controlling brushless and brushed DC motors, offering high performance and a wide range of features. Common applications include driving wheels, arms, lifts, and other robotic mechanisms.
Pin Number | Description | Notes |
---|---|---|
1 | PWM Signal | Standard servo-style PWM input |
2 | Forward Limit Switch (FWD) | Digital input, active low |
3 | Reverse Limit Switch (REV) | Digital input, active low |
4 | Quadrature Encoder A (ENC A) | Encoder input A |
5 | Quadrature Encoder B (ENC B) | Encoder input B |
6 | Analog Sensor (ANA) | Analog sensor input |
7 | Data Port (DATA) | CAN, I2C, UART, SPI |
8 | Power Input (+V) | Positive voltage supply |
9 | Power Input (GND) | Ground |
Power Connections:
Motor Connections:
Signal Connections:
Encoder and Sensor Connections:
Data Port Usage:
Q: Can the SPARK MAX be used with any brushless motor?
Q: How do I update the firmware?
Q: What is the maximum wire size that can be used for power connections?
#include <Servo.h>
Servo sparkMax;
void setup() {
// Attach the SPARK MAX Motor Controller to pin 9
sparkMax.attach(9);
}
void loop() {
// Set the motor speed to half throttle (0 is full reverse, 180 is full forward)
sparkMax.write(90); // Neutral position
delay(1000); // Wait for 1 second
// Full forward
sparkMax.write(180);
delay(1000); // Wait for 1 second
// Full reverse
sparkMax.write(0);
delay(1000); // Wait for 1 second
}
Note: The above example assumes the SPARK MAX is in PWM control mode and connected to an Arduino UNO on pin 9. Adjust the pin number and control logic as necessary for your specific setup.