Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Installing a Vortex Shaft is simple and requires the following materials and tools:
NEO Vortex (docked or undocked)
Desired Vortex Shaft
#10-32 Shaft End Screw
5/32 in Hex Key
Follow these steps to ensure a secure shaft installation:
Insert the shank of the desired shaft into the Vortex Spindle from the front mounting face of the motor.
While inserting, you may need to rotate the shaft or rotor slightly to align the hexagonal portion of the shank with the hexagonal bore of the spindle.
Once the shaft is fully inserted, install the Shaft End Screw through the back side of the spindle and thread into the shank.
Tighten the Shaft End Screw with the 5/32 in hex key to draw the taper into a locked and centered position. If you have a torque wrench, the ideal torque is 25 ±5 in-lb (2.8 ±0.6 Nm).
Visually check for concentricity by rotating the motor rotor. If the shaft is not concentric, remove it, rotate its orientation, and reseat in the spindle.
Remove the Shaft End Screw with the 5/32 in hex key.
Remove the Vortex Shaft from the motor.
While the Vortex Shaft taper is designed to self release, it may still need a gentle tap to help it along. Be sure to tap the shaft itself and not the rotor. You can partially back out the Shaft End Screw and tap it to push the shaft out.
DC Motors consist of two major parts, the part that rotates, or the “rotor”, and the part that is stationary, or the “stator”. A DC motor uses these parts to convert electrical energy into rotational mechanical energy using electricity and permanent magnets. Two types of DC motors are used in FIRST Robotics Competition: Brushed DC Motors and Brushless DC motors. Both types are useful in various robot applications, and both have their trade-offs.
Operating a brushed DC motor is simple; provide DC electrical power and the motor spins. In a brushed motor, the rotor consists of electrical winding wires and the stator consists of permanent magnets. Since the electrical part is spinning, there needs to be a way to connect the external power wires to the spinning rotor. This is accomplished through conductive “brushes” that make contact with the stator, automatically sequencing the power to make the rotor spin. Brushes make it easy on us, but they produce extra friction which reduces the efficiency of the motor.
Brushless DC motors don’t have brushes. They still have both electrical winding wires and permanent magnets, but the locations are flipped. The stator now consists of the electrical parts, and the spinning rotor consists of the magnets. This means there is no more brush friction within the motor, making a brushless motor more power-efficient. However, you can’t just give it DC power and expect it to spin. Without the brushes doing the sequencing for us, you must use a specialized motor controller that is designed for brushless motors to properly sequence the power and get the rotor spinning.
The REV NEO Brushless Motor runs an 8mm keyed output shaft which allows for an easy transition from CIM-style brushed motors into brushless.
Swap a set of NEO Brushless Motors into your drivetrain or use one in an elevator to save weight and maintain peak performance. When paired with the SPARK MAX, you can use the integrated hall-effect sensors to calculate incremental position or speed from the NEO.
Stall Torque is measured when the motors RPM is zero and the motor is drawing its full Stall Current. This value is the maximum torque the motor is ever capable of outputting. Keep in mind the motor is not capable of outputting this torque for an indefinite period of time. Waste energy will be released into the motor as heat. When the motor is producing more waste heat than the motor body is capable of dissipating the motor will eventually overheat and fail.
Stall Current is the maximum amount of current the motor will draw. The stall current is measured at the point when the motor has torque that the RPM goes down to zero. This is also the point at which the most waste heat will be dissipated into the motor body.
Free Speed is the angular velocity that a motor will spin at when powered at the Operating Voltage with zero load on the motor’s output shaft. This RPM is the fastest angular velocity the motor will ever spin at. Once the motor is under load its angular velocity will decrease.
Operating Voltage is the expected voltage that the motor will experience during operation. If a robot is built using a 12 volt battery the Operating Voltage of the motor will be 12 volts. When controlling the RPM of the motor the DC speed controller will modulate the effective voltage seen by the motor. The lower the voltage seen by the motor the slower it will spin. DC motors have a maximum rated voltage if this voltage is exceeded the motor will fail prematurely.
The key metrics defined above are interrelated. Take some time to familiarize yourself with the definitions and how they connect together.
In order to ensure that an electric motor lasts as long as possible a few rules of thumb should be kept in mind:
Smooth loading - large torque spikes or sudden changes in direction can cause excess wear and premature failure of gearbox components. This is only an issue when the torque spike exceeds the rated stall torque of the motor. When shock loading is necessary, it is best to utilize mechanical braking or a hard stop that absorbs the impact instead of the motor.
Overheating - when a motor is loaded at near its maximum operating torque it will produce more waste heat than when operating at a lower operating torque. If this heat this allowed to build up the motor can wear out prematurely or fail spontaneously.
Poorly supported output shaft, most motor output shafts are not designed to take large thrust forces or forces normal to the shaft. Bearings need to be used to support the axle when loads in these directions are expected.
The following tables provide the operating and mechanical specifications for the SPARK Flex Motor Controller.
DO NOT exceed the maximum electrical specifications. Doing so will cause permanent damage to the SPARK Flex and will void the warranty.
Input Voltage (Nominal)
-
12
-
V
Operating Voltage Range †
6
-
24
V
Absolute Maximum Supply Voltage
-
-
30
V
Continuous Output Current ††
-
-
60
A
Peak Current (2 second surge)
-
-
100A
A
†
6 V minimum for 5 V Data Port output. 4.5 V minimum before full brownout.
††
Continuous current duration tested at 3 minutes.
Full-reverse Input Pulse
-
1000
-
μs
Neutral Input Pulse †
-
1500
-
μs
Full-forward Input Pulse
-
2000
-
μs
Valid Input Pulse Range
500
-
2500
μs
Input Frequency
50
-
200
Hz
Input Timeout ††
-
50
-
ms
Default Input Deadband †††
-
5
-
Hz
Input High Level
0.5
0.7
0.9
V
†
Neutral corresponds to zero output voltage (0 V) and is either braking or coasting depending on the current idle behavior mode.
††
If a valid pulse isn't received within the timeout period, the SPARK Flex will disable its output.
†††
Input deadband is added to each side of the neutral pulse width. Within the deadband, output state is neutral. The deadband value is configurable using the REV Hardware Client or through the CAN interface.
5V Supply Output Voltage (Vout)
V
5V Supply Output Current †
-
-
500
mA
Digital Input Voltage Range
0
-
5
V
Digital Input High Voltage
1.85
-
-
V
Digital Input Low Voltage
-
-
1.36
V
Analog Input Voltage Range
0
-
Vout
V
†
Available output current may be reduced when the SPARK Flex is powered only by USB and not main power.
Power Wire Gauge
12 AWG
Power Wire Length
450 mm (17.72in)
Control Wire Gauge
26 AWG
Control Wire Length
450 mm (17.72in)
Through Bore Diameter
16.5 mm (0.649 in)
Mounting Footprint Narrow Side Width
2 in
Mounting Footprint Rounded Side Diameter
60 mm
Mounting Holes
#10-32 on 2 in bolt circle
Mounting Hole Maximum Depth
0.25 in
Body Length (Not Docked)
28.2mm
Docking Hardware
M3 SHCS x 25mm
Weight (with Wires & Docking Screws)
130g (0.29lb)
When docked with a SPARK Flex the NEO Vortex's phase and sensor connections are kept securely together. This eliminates intermediate wiring that can fail if not secured properly.
Docking the NEO Vortex with the SPARK Flex is simple and only requires the following materials and tools:
NEO Vortex Brushless Motor
SPARK Flex Motor Controller
Docking Hardware
4 - M3 x 25 mm Socket Head Screws (included with SPARK Flex)
2.5 mm Hex Key
Follow these steps to ensure a secure and proper docking:
Ensure that power is disconnected from the SPARK Flex.
Align the motor phase bullets between the NEO Vortex and SPARK Flex.
Allowing the bullets to guide the two together, press the NEO Vortex and SPARK Flex together until their bodies meet. There may be a small gap between the motor and the controller opposite the bullets. This is normal.
Insert the included docking screws into the counterbored Docking Screw Clearance Holes on the SPARK Flex.
Using the 2.5 mm Hex Key, tighten the four screws evenly in a crisscross pattern until the screws are tight and secure. The screw heads should be sub-flush from the mounting face of she SPARK Flex. If you have a torque wrench, the ideal torque is 11.5 ±0.9 in-lb (1.3 ±0.1 Nm).
DO NOT run the motor without the docking screws installed. These screws ensure a robust and secure electrical connection, and doing so may cause damage to the system.
Follow these steps to undock the NEO Vortex and SPARK Flex:
Ensure that power is disconnected from the SPARK Flex.
Completely remove the four docking screws from the assembly.
Gently pull the NEO Vortex and SPARK Flex apart until the bullets release. Try to maintain their relative orientation to each other while pulling them apart.
In the fall of 2018, the NEO Brushless Motor and SPARK MAX Motor Controller became the first brushless motor and compatible ESC (Electronic Speed Controller) designed to meet the unique demands of the FRC community. Since then, REV Robotics has been working to continue the Brushless Revolution by releasing products and software features based on our customer's most popular feedback.
The NEO Vortex Brushless Motor is a high-power, high-performance, and high-resolution sensored brushless motor from REV Robotics. It features a dockable controller interface that can be mounted directly to a SPARK Flex Motor Controller or a NEO Vortex Solo Adapter allowing control from any brushless motor controller, like the SPARK MAX. Its through-bore rotor is the heart of its unique interchangeable shaft system, facilitating easy integration with various robot mechanisms.
The SPARK Flex Motor Controller is a new smart motor controller from REV Robotics. Its dockable form factor allows direct mounting onto a NEO Vortex to simplify wiring and maintain flexibility. Improving upon the foundation of the SPARK MAX, new features of the SPARK Flex Motor Controller include 3-phase current sensing, reverse polarity protection, and an expanded data port with additional interfaces. When docked to an adapter, the SPARK Flex can control any existing NEO or compatible brushless/brushed DC motor.
The SPARK MAX Motor Controller is your first step for getting advanced brushed and brushless DC motor control in a small, easy-to-use package. SPARK MAX is a true all-in-one controller that will push the envelope for FRC teams. Test prototypes and tune parameters without needing the full control system, only using a computer running the REV Hardware Client and a USB C Cable!
The NEO V1.1 Brushless Motor offers an incredible power density due to its compact size and reduced weight. As it is designed to have similar performance characteristics and matching mounting features, NEO V1.1 can be a drop-in replacement for CIM-style motors. This motor is perfect for your FRC Robot, Industrial platform or Warehouse robot, Electric skateboards, and more! The NEO V1.1 has been optimized to work with the SPARK MAX Motor Controller to deliver best-in-class performance and feedback.
The NEO 550 Brushless Motor is the smallest member of the NEO family of brushless motors. Its output power and small size are designed to make NEO 550 the perfect motor for intakes and other non-drivetrain robot mechanisms. Mounting holes and pilot match a standard 550 series motor, making it natively compatible with many existing off-the-shelf gearboxes.
If there is a question that is not answered by this space, send our support team an email; support@revrobotics.com. We are always happy to help point you in the right direction!
NEO Vortex Shaft Features
Vortex shafts feature a 1/2 in hex section for transferring torque, and a locating taper section for effortless self-centering. When the shaft is secured with a #10-32 Shaft End Screw, the taper keeps your shaft perfectly centered as it's drawn in and locked into place within the NEO Vortex Spindle.
The NEO Vortex's 1/2in hex through-bore motor spindle is compatible with any length hex shaft.
The Vortex Shaft - 20 DP Gear - 7 T is addendum shifted to an 8 T pitch diameter. This allows you to calculate center-to-center distances as if it were an 8 T gear rather than a 7 T.
Vortex Shaft - MAXPlanetary Input Kit
NEO V1.1 (REV-21-1650)
1 - 10-32 x 3/8in long Socket Head Screw
Press Fit Pinion
Arbor Press
1) Take a 10-32 x 3/8in long socket head screw and screw it into the back of the motor finger tight.
DO NOT USE AN ALLEN WRENCH OR POWER TOOL The screw is intended to support the end of the NEO's shaft while pressing on the pinion. Tightening the support screw with an Allen wrench or power tool may damage the motor and/or shaft.
2) Using a flat arbor press plate, balance the motor with that screw down on the arbor press
3) Proceed with pressing the pinion as usual. When complete, ensure that you remove the 10-32 socket head screw from the back of the NEO.
Do not attempt to run the NEO while a screw is still attached to the back of the motor. Not removing the screw will damage the motor and/or shaft.
NEO V1.0 (REV-21-1650)
A high-quality 1.5mm Allen Key (i.e. WERA Tools, Bondhus)
Loctite 242
Arbor Press
1) Locate the first of three screws holding the back can to the front plate of the motor.
2) Using a high-quality 1.5mm Allen Key, remove the bolt and set aside. Repeat this for the other two bolts around the back can. Make sure the Allen Key is fully seated in the bolt head during removal.
3) Remove the back can. Set it and the three bolts aside for reassembly after pressing on the pinion.
4) Place the NEO upright in the arbor press. Make sure to hold the bottom of the motor flat against the press plate, supporting the bottom of the shaft.
5) Press on pinion. After pinion is pressed on reattach the back can. We recommend using Loctite 242 to complete the reassembly.
The data for Motor Curves provided in our documentation is generated with an inertia-type dynamometer, or dyno, and then further analyzed by our engineers.
The dynamometer REV Robotics uses consists of the following major components mounted directly to the main shaft:
Flywheel - A weighted flywheel supported by ball bearings
Encoder - An encoder that collects data during the test
Motor Mount - An adjustable system where the motor is equipped with a coupling so its output lines up with the rotational axis of the dynamometer
Motor and ESC - The motor and ESC (Electronic Speed Controller or Motor Controller) are always tested as a unit. Some examples of this are the SPARK MAX and NEO or the Falcon 500 Motor and Talon FX ESC
Power Supply - A high current power supply system capable of supplying 12V at 200A with minimal voltage sag while handling voltage spikes and braking conditions.
A test starts at rest and consists of applying a constant throttle setting to the motor and motor controller. Generally, this value is 100%, but any value can be used. The motor is allowed to accelerate the flywheel while data is recorded with timestamps.
The data recorded during testing includes:
The speed and position of the flywheel encoder
The DC current at the input of the ESC
The bus voltage at the input of the ESC
Any data provided by the ESC, this may vary from controller to controller
This is generally collected over CAN
Using the speed and position data, the acceleration of the flywheel can be calculated throughout the timespan of the test. The moment of inertia of the rotating portion of the dyno is known to a high degree of precision. This includes the flywheel, shaft, hub, motor rotor, couplings, etc. Using the acceleration and moment of inertia, the torque produced by the motor can be calculated.
At thousands of RPM, the flywheel and shaft system can generate enough drag to affect the results of the test significantly. To determine the drag in the system from air movement and viscous friction, the dyno is spun up to a very high speed and allowed to freely rotate until it comes to a stop. During this process, speed and position data are recorded and then used to calculate the drag torque. The drag torque is added to the motor torque calculated from each acceleration measurement during a motor test so that our results are calibrated for our specific dyno setup.
At low speeds, a motor will typically draw more current than the set current limit on its ESC. Current limiting may affect the duty cycle and commutating of the motor, causing the data to deviate from “raw” motor performance. Current limiting processes within an ESC's software can also cause excess noise in current, voltage, and acceleration data collected by the dyno. For these reasons, the low-speed section where current limiting is in effect is usually removed from the data set before characterizing the motor.
Characterization is accomplished by correlating torque and current with velocity. These relationships are usually extremely linear and a best fit can be used to approximate and extrapolate the motor’s performance outside of the test region. Additional processing can be applied to compensate for voltage drop in the power supply lines at high currents.
REV Robotics has designed a dynamometer that we are working to make open source and available to the public. In creating this dynamometer, we have focused on using as many off-the-shelf components as possible in an effort to make this design easy for members of the community to build.
Below are some photos of our progress!
The REV NEO 550 Brushless Motor (REV-21-1651) is the newest member of the NEO family of brushless motors. Its output power and small size are specifically designed to make NEO 550 the perfect motor for intakes and other non-drivetrain robot mechanisms. Mounting holes and pilot match a standard 550 series motor, allowing it to natively mount to many existing off-the-shelf gearboxes.
The REV NEO 550 Brushless Motor runs a 0.12in output shaft which, when combined with its 550-style mounting features, allows for easy installation in many off-the-shelf gearboxes.
Its small size and weight make it easy to put power where you need it, whether that is on intakes, end-effectors, or other weight-sensitive mechanisms. However, keep in mind that this motor has a lower thermal mass than a NEO, CIM, or Mini CIM, and thus it may not be ideal for some drivetrain applications.
Connecting the NEO 550 Brushless motors is fairly straightforward. Follow the guide at Wiring the Spark Max, and don't forget to connect your sensor wire; the motor will not spin without it!
CAUTION: Improperly wiring the connectors can cause severe motor damage and is not covered by the warranty. DO NOT connect the motor directly to the battery.
Mounting features match other 550 series DC motors
Front and rear ball bearings
High-temperature neodymium magnets
High-flex silicone motor wires
Integrated motor sensor (3-phase hall sensors)
Motor temperature sensor
Nominal Operating Voltage
12 V
Motor Kv
917 Kv
Free Speed`
11000 RPM
Free Running Current
1.4 A
Stall Current
100 A
Stall Torque
0.97 Nm
Peak Output Power
279 W
Hall-Sensor Encoder Resolution
42 counts per rev.
Output Shaft Diameter
0.125in (3.175mm)
Output Shaft Length
0.267in (7mm)
Output Pilot
0.512in (13mm)
Body Length
1.752in (44.5mm)
Body Diameter
1.378in (35mm)
Weight
0.142 kgs (0.313 lbs)
Phase Wire Length
5.91in (150mm)
Phase Wire Gauge
14AWG
Sensor Cable Length
11.81in (300mm)
Sensor Cable Gauge
24AWG
Updated testing from our in-house dynamometer coming soon!
Check out the NEO 550 Motor Data Sheet for additional specifications and charted motor curves. Please read the NEO 550 Motor Locked Rotor Testing and ensure you understand how to set an appropriate Smart Current Limit before using your NEO 550 Brushless Motor.
The NEO Vortex Brushless Motor (REV-21-1652) is a high-power, high-performance, and high-resolution sensored brushless motor from REV Robotics. It features a dockable controller interface that can be mounted directly to the SPARK Flex Motor Controller (REV-11-2159) or a NEO Vortex Solo Adapter (REV-11-2828) allowing control from any brushless motor controller, like the SPARK MAX. Its through-bore rotor is the heart of its unique interchangeable shaft system, facilitating easy integration with various robot mechanisms.
High-resolution encoder
Integrated motor parameter and calibration memory
Through-hex bore with taper for numerous quick-change shafts
No motor wires - reliable and robust docking connections for motor phases and sensor
Dual sensor, direct contact winding temperature sensing
560KV (RPM per volt)
640 Watts (375 @ 40A)
#10-32 threaded holes on a 2in bolt circle
The motor and motor controller's silhouette fits behind a standard 2in rectangular tube
1/2in hex through-bore rotor compatible with any length hex shaft or application-specific Vortex Shafts:
8mm keyed
Falcon compatible spline
MAXSwerve with integrated key
7-tooth 20DP gear
MAXPlanetary input
Others to be announced
Nominal Operating Voltage
12 V
Motor Kv
565 Kv
Free Speed
6784 RPM
Free Running Current
3.6 A
Stall Current
211 A
Stall Torque
3.6 Nm
Peak Output Power
640 W
Typical Output Power at 40 A
375 W
Pole Pairs
7
Encoder Resolution with SPARK MAX
42 Counts per rev.
Encoder Resolution with SPARK Flex †
7168 Counts per rev.
†
A firmware update will be required to access higher resolution encoder data.
Docked Body Length †
79.7 mm
Docked Mounting Footprint - Narrow Side Width
2 in
Docked Mounting Footprint - Rounded Side Diameter
60 mm
Docked Spindle Offset Depth
19.7 mm
Docking Hardware ‡
M3 SHCS x 25 mm
Rotor Diameter
50 mm
Spindle Bore
1/2 in hex with 7.5° half-angle taper
Shaft Retention Counter Bore Diameter
17.75 mm
Shaft Retention Counter Bore Depth
4 mm
Weight
447 g (0.99 lbs)
†
When docked with SPARK Flex Motor Controller or NEO Vortex Solo Adapter.
‡
Docking hardware included with SPARK Flex or Vortex Solo Adapter.
All of our motor testing was performed on our in-house dynamometer.
Press Fit Pinion
Arbor Press
1) Place the NEO 550 upright in the arbor press. Make sure to hold the bottom of the motor flat against the press plate, supporting the bottom of the shaft.
2) Place the pinion on the shaft and press. Take care to not over-press on the NEO 550 shaft!
The NEO Vortex Solo Adapter (REV-11-2828), allows teams to seamlessly integrate the NEO Vortex Brushless Motor with a SPARK MAX. This adapter breaks out the motor sensor connector and phase wire connections for simple backward compatibility.
While the NEO Vortex Solo Adapter allows you to use the motor independently, it may not fully support certain advanced functionalities of the NEO Vortex Brushless Motor.
Phase Wire Gauge
12 AWG
Encoder Port Connector
JST PH 6-pin
Through Bore Diameter
16.5 mm (0.649 in)
Mounting Footprint Narrow Side Width
2 in
Mounting Footprint Rounded Side Diameter
60 mm
Mounting Holes
#10-32 on 2 in bolt circle
Mounting Hole Maximum Depth
0.25 in
Body Length (Not Docked)
28.2 mm
Docking Hardware
M3 SHCS x 25 mm
The following items are included with each NEO Vortex Solo Adapter
REV-21-2828
NEO Vortex Solo Adapter
1
REV-21-3204-PK4
M3 x 25mm Socket Head Screw - 4 Pack
1 Pack, 4 Screws
6-Pin JST Cable
1
1/2 in Hex Shaft - Any Length ()
Vortex Shaft - 8 mm () The 8mm Vortex Shaft, compatible with the , empowers you to utilize the NEO Vortex Brushless Motor with any 8mm keyed shaft component. This interchangeability also means that the NEO Vortex matches the output of a , making it a seamless drop-in replacement for your designs.
Vortex Shaft - MAXSwerve Integrated Key () The Vortex Shaft - MAXSwerve Integrated Key gives users the ability to drive a MAXSwerve Module without the need for the MAXSwerve Key. This eliminates a potential point of failure in the MAXSwerve since the key is machined directly into the 8mm shaft.
Vortex Shaft - 20 DP Gear - 7 T () The Vortex Shaft - 20 DP Gear - 7 T offers users the unique ability to achieve substantial gear reductions directly from the motor. This gear features a 7 T 20 DP design that is typically too small for an 8mm keyed input. However, it becomes possible when integrated into the motor shaft.
() Working seamlessly with the MAXPlanetary Vortex Input Stage, the Vortex Shaft - MAXPlanetary Input Coupler reduces gearbox length for more efficient designs. Note that the MAXPlanetary Vortex Input Stage is required for this setup.
Vortex Shaft - Falcon Compatible Spline () The Vortex Shaft - Falcon Compatible Spline gives users the ability to drive components that have a falcon spline bore.
SPARK Flex has many operating modes that can be configured through its CAN and USB interfaces.
Coming soon!
SPARK Flex is designed to drive 12V brushed and brushless DC motors at current up to 60A continuously. It features a unique Docking Interface that ensures secure and reliable motor phase and sensor connections, reducing the chance of intermittent or poor connections affecting the commutation of the attached motor.
Power input wires are labeled as + and - with red and black wires, respectively, and consist of two 12 AWG ultra-flexible silicone-coated wires extending 45 cm from the motor controller case.
SPARK Flex is intended to operate in a 12 V DC robot system, however it is compatible with any DC power source between 4.5 V and 24 V.
Please note that the 5 V power output of the Data Port requires a 6 V minimum input voltage.
DO NOT exceed the maximum supply voltage of 30 V. Doing so will cause permanent damage to the SPARK Flex and will void the warranty.
When used in high power applications, it is recommended to use a power source that is capable of handling large surge currents, e.g. a 12V lead-acid battery. If the supply voltage drops below 4.5 V the SPARK Flex will brown out, which can result in unexpected behavior. It is also highly recommended to add a fuse or circuit breaker in between your SPARK Flex and its power source to prevent exceeding the maximum current rating.
DO NOT exceed the maximum current ratings:
60A for 3 minutes
100A for 2 seconds
Doing so will cause permanent damage to the SPARK Flex and will void the warranty.
SPARK Flex is specifically designed to dock with the NEO Vortex Brushless Motor. Docking eliminates the extra connections between the motor and motor controller that are prone to fail due to assembly issues and rough environments.
When docked into a SPARK Flex Dock (coming soon), the motor controller can also drive virtually any 12 V brushed DC motor and the existing NEO & NEO 550 brushless motors.
Instruction on how to dock a SPARK Flex can be found within the documentation of the applicable device:
SPARK Flex Dock Instructions - Coming Soon
Be sure to fully install the Docking Screws when docking the SPARK Flex. These screws ensure a robust and secure electrical connection. Operating the SPARK Flex and its attached motor or dock without these screws can cause unintended behavior and damage to the system.
Always dock and undock the SPARK Flex with both main power and USB power disconnected.
The SPARK Flex Motor Controller is a fully featured smart motor controller designed to be robust and easy to use yet fully capable of advanced motion control. The following sections describe each feature in detail.
Allows for seamless firmware updates and code uploads, facilitating quick and efficient software management through the REV Hardware Client
Allows for integration of additional sensors such as the Through Bore Encoder, analog sensors, absolute encoders, and limit switches.
Supply Input Power and Control Signals through 45cm long high-quality wires. Twisted Control wires also feature two standardized connectors to make wiring the SPARK Flex easy for PWM or CAN control.
Displays the operational status and error codes, ensuring easy troubleshooting and real-time monitoring
Precisely engineered clearance holes for docking screws provide stable and secure attachment of the SPARK Flex and NEO Vortex to your Mechanism
High-current Bullet Connectors facilitate quick and secure connections to the NEO Vortex's phases, ideal for high-performance and high-power applications
Robust Motor Interface Connector mates to the NEO Vortex's control systems to ensure efficient, secure, and reliable electrical connections and communication
The SPARK Flex features six #10-32 threaded mounting holes on a 2 in bolt circle
The SPARK Flex (REV-11-2159) is a new smart motor controller from REV Robotics. Its dockable form factor allows for direct mounting onto a NEO Vortex (REV-21-1652), simplifying wiring while maintaining flexibility. Improving upon the foundation of the SPARK MAX, new features include 3-phase current sensing, reverse polarity protection, and an expanded Data Port with additional interfaces. When docked to an adapter, the SPARK Flex can control any existing NEO or compatible brushless/brushed DC motor.
Docking interface for motor phases and sensors
USB type C configuration and control
PWM and CAN communication
Fully integrated power and control wires
Enhanced data port with more power, latching connector, and additional serial interfaces
Advanced motor control modes include:
Velocity
Position
Current
New modes with future firmware updates
#10-32 threaded holes on a 2in bolt circle
Motor and motor controller's silhouette fits behind a standard 2in rectangular tube
The REV NEO Brushless Motor (REV-21-1650) is the first brushless motor designed to meet the unique demands of the FRC community. Offering an incredible power to weight ratio along with it's compact size it's designed to be a drop-in replacement for CIM-style motors as well as an easy install with mounting options.
Drop-in replacement for CIM-style motors
Shielded out-runner construction
Front and rear ball bearings
High-temperature neodymium magnets
High-flex silicone motor wires
Integrated motor sensor
3-phase hall sensors
Motor temperature sensor
Connecting the NEO V1.1 Brushless motor is fairly straightforward. Follow the guide at Wiring the Spark Max, and don't forget to connect your sensor wire; the motor will not spin without it!
CAUTION: Improperly wiring the connectors can cause severe motor damage and is not covered by the warranty. DO NOT connect the motor directly to the battery.
Nominal Operating Voltage
12 V
Motor Kv
473 Kv
Free Speed`
5676 RPM
Free Running Current
1.8 A
Stall Current
105 A
Stall Torque
2.6 Nm
Peak Output Power
406 W
Typical Output Power at 40 A
380 W
Hall-Sensor Encoder Resolution
42 counts per rev.
Output Shaft Diameter
8mm (keyed)
Output Shaft Length
35mm (1.38in)
Output Pilot
19.05mm (0.75in)
Body Length
58.25mm (2.3in)
Body Diameter
60mm (2.36in)
Weight
0.938 lbs (0.425 kg)
The only difference between the NEO V1 and NEO V1.1 are external changes to the motor's housing.
All of our motor testing was performed on our in-house dynamometer.
Check out the NEO Motor Data Sheet for additional information! Please read the NEO Motor Locked Rotor Testing and ensure you understand how to set an appropriate Smart Current Limit before using your NEO Brushless Motor.
The REV NEO Brushless Motor V1.1 (REV-21-1650) is the initial update on the first brushless motor designed to meet the unique demands of the FIRST Robotics Competition community. NEO V1.1 offers an incredible power density due to its compact size and reduced weight, and it's designed to be a drop-in replacement for CIM-style motors, as well as an easy install with many mounting options. The built-in hall-effect encoder guarantees low-speed torque performance while enabling smart control without additional hardware. NEO V1.1 has been optimized to work with the SPARK MAX Motor Controller (REV-21-2158) to deliver incredible performance and feedback.
Drop-in replacement for CIM-style motors
Shielded out-runner construction
Front and rear ball bearings
High-temperature neodymium magnets
High-flex silicone motor wires
Integrated motor sensor
3-phase hall sensors
Motor temperature sensor
A tapped #10-32 hole on the end of the shaft, allowing teams to retain pinions on the shaft without using external retaining rings
A tapped #10-32 hole on the back housing of the motor, making it no longer necessary to remove the motor housing to press pinions
Additional holes on the front face of the motor for added mounting flexibility
Connecting the NEO V1.1 Brushless motor is fairly straightforward. Follow the guide at Wiring the Spark Max, and don't forget to connect your sensor wire; the motor will not spin without it!
CAUTION: Improperly wiring the connectors can cause severe motor damage and is not covered by the warranty. DO NOT connect the motor directly to the battery.
Nominal Operating Voltage
12 V
Motor Kv
473 Kv
Free Speed`
5676 RPM
Free Running Current
1.8 A
Stall Current
105 A
Stall Torque
2.6 Nm
Peak Output Power
406 W
Typical Output Power at 40 A
380 W
Hall-Sensor Encoder Resolution
42 counts per rev.
Output Shaft Diameter
8mm (keyed)
Output Shaft Length
35mm (1.38in)
Output Pilot
19.05mm (0.75in)
Body Length
58.25mm (2.3in)
Body Diameter
60mm (2.36in)
Weight
0.938 lbs (0.425 kg)
Phase Wire Length
5.91in (150mm)
Phase Wire Gauge
12AWG
Sensor Cable Length
11.81in (300mm)
Sensor Cable Gauge
24AWG
All of our motor testing was performed on our in-house dynamometer.
Check out the NEO Motor Data Sheet for additional information! Please read the NEO Motor Locked Rotor Testing and ensure you understand how to set an appropriate Smart Current Limit before using your NEO Brushless Motor.
This page is intended to highlight the relative comparison between REV ION motors and similar motors from other vendors.
For more information please see the section below - Interpreting this Data
KV
565
523
rpm/V
Free Load Speed
6784
6271
rev/min
Free Load Current
3.62
2.32
A
Stall Current
211
233
A
Stall Torque
3.6
4.21
Nm
Nominal Voltage
12
12
V
Peak Efficiency
77
82
%
Peak Power
640
691
W
Power @ 40 Amps
361
378
W
All of our motor testing was performed on our in-house dynamometer.
KV
565
541
rpm/V
Free Load Speed
6784
6489
rev/min
Free Load Current
3.62
2.39
A
Stall Current
211
191
A
Stall Torque
3.6
3.46
Nm
Nominal Voltage
12
12
V
Peak Efficiency
77
83.06
%
Peak Power
640
588
W
Power @ 40 Amps
361
376
W
All of our motor testing was performed on our in-house dynamometer.
The data shown for NEO V1.1 is also valid for the NEO V1
KV
565
485
rpm/V
Free Load Speed
6784
5820
rev/min
Free Load Current
3.62
2.065
A
Stall Current
211
160
A
Stall Torque
3.6
3
Nm
Nominal Voltage
12
12
V
Peak Efficiency
77
76.54
%
Peak Power
640
456
W
Power @ 40 Amps
361
333
W
All of our motor testing was performed on our in-house dynamometer.
The data shown for NEO V1.1 is also valid for the NEO V1
KV
485
523
rpm/V
Free Load Speed
5820
6271
rev/min
Free Load Current
2.065
2.32
A
Stall Current
160
233
A
Stall Torque
3
4.21
Nm
Nominal Voltage
12
12
V
Peak Efficiency
76.54
82
%
Peak Power
456
691
W
Power @ 40 Amps
333
387
W
All of our motor testing was performed on our in-house dynamometer.
KV
485
541
rpm/V
Free Load Speed
5820
6489
rev/min
Free Load Current
2.065
2.39
A
Stall Current
160
191
A
Stall Torque
3
3.46
Nm
Nominal Voltage
12
12
V
Peak Efficiency
76.54
83.06
%
Peak Power
456
588
W
Power @ 40 Amps
333
376
W
All of our motor testing was performed on our in-house dynamometer.
KV
485
565
rpm/V
Free Load Speed
5820
6784
rev/min
Free Load Current
2.065
3.62
A
Stall Current
160
211
A
Stall Torque
3
3.6
Nm
Nominal Voltage
12
12
V
Peak Efficiency
76.54
77
%
Peak Power
456
640
W
Power @ 40 Amps
333
361
W
All of our motor testing was performed on our in-house dynamometer.
Values of motor data may vary from manufacturer to manufacturer because of variances in the dynamometer used to test each motor and how that data is analyzed. With each motor shown on this page, REV Robotics performed the same dynamometer testing and analysis of the data collected.
Absolute Values for a specification are determined independently of each similar motor made by other manufacturers. Each of the specifications are determined by a manufacturer's individual testing procedures and methods of analyzing test data.
Relative Values for a specification are found by running the same test and analysis on a motor. While the values provided may not match a motor's listed Absolute Values for a given specification, this kind of data helps us compare the motors as fairly as possible.
The SPARK Flex is a motor controller with many features allowing it to control a host of brushless and brushed motor controllers. Out of the box, the Flex can be docked directly with a NEO Vortex Brushless Motor and drive it with the Flex's PWM interface. This Getting Started guide will assume that you are driving NEO Vortex and includes steps to get the motor spinning using the REV Hardware Client as well as information on how to configure your SPARK Flex. Driving other motors requires the SPARK Flex Dock (coming soon) and will be covered in its own separate guides.
Before following this guide, the REV Hardware Client should be installed before continuing. It is the best way to verify that the device up to date and configured correctly. Configuration through the Hardware Client is required before using the CAN interface.
When the SPARK Flex is receiving a neutral command the idle behavior of the motor can be handled in two different ways: Braking or Coasting.
When in Brake Mode, the SPARK Flex will effectively short all motor wires together. This quickly dissipates any electrical energy within the motor and brings it to a quick stop.
When in Coast Mode, the SPARK Flex will effectively disconnect all motor wires. This allows the motor to spin down at its own rate.
The Idle Mode can be configured using the Mode Button, CAN, and USB interfaces.
Follow the steps below to switch the Idle Mode between Brake and Coast with the Mode Button.
Use a small screwdriver, straightened paper clip, pen, or other small implement to press the button. Do not use any type of pencil as the pencil lead can break off inside the SPARK Flex.
Connect the SPARK Flex to main power, not just USB Power.
The Status LED will indicate which Idle Mode is currently configured by blinking blue or cyan for Brake and yellow or magenta for Coast depending on the motor type.
Press and release the Mode Button.
You should see the Status LED change to indicate the selected Idle Mode.
Please see the guide for information on how to identify the Idle Behavior configuration by the color of the Status LED!
Follow the steps below to switch the Idle Mode between Brake and Coast with the USB and the REV Hardware Client application. Be sure to application before continuing.
Connect the SPARK Flex to your computer using a USB-C cable.
Open the REV Hardware Client application and verify that the application is connected to your SPARK MAX.
On the Basic tab, select the desired mode with the Idle Mode switch.
Click Burn Flash and confirm the change.
This mode is only compatible with the SPARK Flex Dock (coming soon). More information about this mode will be available once the dock is available.
When the SPARK Flex is receiving a neutral command the idle behavior of the motor can be handled in two different ways: Braking or Coasting.
When in Brake Mode, the SPARK Flex will effectively short all motor wires together. This quickly dissipates any electrical energy within the motor and brings it to a quick stop.
When in Coast Mode, the SPARK Flex will effectively disconnect all motor wires. This allows the motor to spin down at its own rate.
The Idle Mode can be configured using the Mode Button, CAN, and USB interfaces.
Follow the steps below to switch the Idle Mode between Brake and Coast with the Mode Button.
Please follow the before continuing.
Use a small straightened paper clip or other small blunt tool to press the button. Never use a sharp tool or any type of pencil, as the pencil lead can break off inside the SPARK Flex.
Connect the SPARK Flex to main power, not just USB Power.
The Status LED will indicate which Idle Mode is currently configured by blinking blue or cyan for Brake and yellow or magenta for Coast depending on the motor type.
Press and release the Mode Button
You should see the Status LED change to indicate the selected Idle Mode.
Follow the steps below to switch the Idle Mode between Brake and Coast with the USB and the REV Hardware Client application. Be sure to download and install the REV Hardware Client application before continuing.
Connect the SPARK Flex to your computer using a USB-C cable.
Open the REV Hardware Client application and verify that the application is connected to your SPARK Flex.
On the Basic tab, select the desired mode with the Idle Mode switch.
Click Update Configuration and confirm the change.
Please see the API Information for information on how to configure the SPARK Flex using the CAN interface.
In the rare case where a firmware update has been interrupted or corrupted, it may be necessary to boot the SPARK Flex into Recovery Mode. This can be done by following the steps below. Have a computer running the REV Hardware Client and a USB cable ready in order to reload the device firmware once the device is in Recovery Mode.
Use a small straightened paper clip or other small blunt tool to press the button. Never use a sharp tool or any type of pencil, as the pencil lead can break off inside the SPARK Flex.
Start with all power disconnected from the SPARK Flex.
Press and hold the Mode Button.
While still holding the Mode Button, connect power by either turning on main power or connecting the USB cable between the SPARK Flex and the computer.
Once powered, you may release the Mode Button. The LED should stay dark. The SPARK Flex is now in Recovery Mode.
If the firmware is not booting properly, it may not be easy to know if the device has entered Recovery Mode since the LED will be dark in both cases. To confirm that the SPARK Flex is in Recovery Mode:
Connect the USB cable between the SPARK Flex and computer if not already connected.
In the REV Hardware Client, the SPARK Flex should show up as a Recovery Mode Device when scanning for devices.
If the device doesn't show up, please repeat the process, ensuring that the power and button holding sequence is followed exactly. If the device still doesn't show up, please contact REV Support.
The REV Robotics is an all-in-one USB, CAN, and PWM enabled motor controller that can drive both 12 V brushed and 12 V brushless DC motors. SPARK MAX is designed for use in the FIRST Robotics Competition (FRC), incorporating advanced motor control in a small, easy-to-use, and affordable package. Configure and run the SPARK MAX through its built-in USB interface without needing a full control system.
Brushed and sensored-brushless motor control
PWM, CAN, and USB control interfaces
PWM/CAN - Locking and keyed 4-pin JST-PH
USB - USB type C
USB configuration and control
Rapid configuration with a PC
Smart control modes
Closed-loop velocity control
Closed-loop position control
Follower mode
Encoder port
Locking and keyed 6-pin JST-PH
3-phase hall-sensor encoder input
Motor temperature sensor input
Data port
Limit switch input
Quadrature encoder input with index
Multi-function pin
Mode button
On-board motor type and idle behavior configuration
RGB status LED
Detailed mode and operation feedback
Integrated power and motor wires
12 AWG ultra-flexible silicone wire
Passive cooling
The following items are included with each SPARK MAX Motor Controller
1 - SPARK MAX Motor Controller
1 - USB-A male to USB-C cable
1 - 4-pin JST-PH to CAN cable
1 - 4-pin JST-PH to single PWM cable
1 - PWM/CAN cable retention clip
1 - Data port protection cap
The SPARK Flex can be controlled by three different interfaces: servo-style PWM, Controller Area Network (CAN), and USB. The following sections describe the operation and protocols of these interfaces. For more details on the physical connections, see .
The SPARK Flex can accept a standard servo-style PWM signal as a control for the output duty cycle. Even though the PWM port is shared with the CAN port, SPARK Flex will automatically detect the incoming signal type and respond accordingly. For details on how to connect a PWM cable to the SPARK Flex, see .
The SPARK Flex responds to a factory default pulse range of 1000 µs to 2000 µs. These pulses correspond to full-reverse and full-forward rotation, respectively, with 1500 µs (±5% default input deadband) as the neutral position, i.e. no rotation. The input deadband is configurable with the REV Hardware Client or the CAN interface. The table below describes how the default pulse range maps to the output behavior.
If a valid signal isn't received within a 60 ms window, the SPARK Flex will disable the motor output and either brake or coast the motor depending on the configured Idle Mode. For details on the Idle Mode, see Idle Mode - Brake/Coast Mode.
The SPARK Flex can be connected to a robot CAN network. CAN is a bi-directional communications bus that enables advanced features within the SPARK Flex.
SPARK Flex must be connected to a CAN network that has the appropriate termination resistors at both endpoints. Please see the FIRST Robotics Competition Robot Rules for the CAN bus wiring requirements.
Even though the CAN port is shared with the PWM port, SPARK Flex will automatically detect the incoming signal type and respond accordingly.
Each device on the CAN bus must be assigned a unique CAN ID number. Out of the box, SPARK Flex is assigned a device ID of 0. This ID is considered "unconfigured" and must be assigned to a unique number from 1 to 62. CAN IDs can be changed by connecting the SPARK Flex to a Windows computer and using the REV Hardware Client.
Additional information about the CAN accessible features and how to access them can be found in the SPARK Flex API Information section.
The SPARK Flex can be configured and controlled through a USB connection to a computer running the REV Hardware Client.
More information coming soon!
Many issues can be solved by systematic troubleshooting without needing to contact REV Support. Take a look at the troubleshooting tips below for help in determining the cause of the issue you are seeing. Should you need to contact us, describing the steps you've taken in detail will help us get you up and running quickly.
The key to effective troubleshooting is isolating the issue. Many issues can show the same symptom, so eliminating failure points one at a time is critical to finding the root cause.
If possible, try to eliminate a section of the system when troubleshooting. For example:
Rule out a code or control wiring issue:
Use the REV Hardware Client to run the SPARK Flex over USB.
Please be aware of the CAN lockout feature of the SPARK Flex. If it has been connected to the roboRIO's CAN bus, a safety feature within the SPARK Flex will lock out USB communication. Disconnecting from the CAN bus and power cycling the MAX will release the lock.
If this is your first time running the REV Hardware client, see the for a tour of the software and its features.
Rule out a code issue:
Create a simple test program using our SPARK Flex Example Code.
Rule out a mechanical issue:
Remove the motor from the mechanism or use a different, free-spinning motor.
An extremely useful set of tools can be found on the Driver Station:
Look at the PDP channel current draw:
Higher than expected current on a channel can indicate both mechanical and electrical issues.
Look at the battery voltage:
Large dips in the battery voltage around the time of an issue can indicate battery health issues that cause brownouts.
Look at the CAN Bus Utilization.
Look at CAN Faults.
Look at Comms Faults:
Comms faults can affect the SPARK Flex. If it loses communication with the roboRIO, it will go to its safe disabled state. This can look like a momentary glitch in a motor spinning if the comms faults are infrequent and irregular.
It is also very useful to log or plot operating values internal to the SPARK Flex. These values can be accessed using the SPARK Flex APIs. Useful values to log:
getAppliedOutput()
This value will show what the SPARK Flex is actually applying to the motor output. This can illuminate issues with closed-loop control tuning.
getOutputCurrent()
This value will show the output current going to the phases of the motor. Output current won't always be the same as the Input current measured by the PDP. Knowing the output current is useful to diagnose current-limit issues if motors are overheating.
getBusVoltage()
A way to measure the input voltage right at the controller.
getStickyFaults()
A sticky fault indicates if a fault has occurred since the last time the faults were reset. Checking these can provide a lot of insight into what the controller is experiencing.
Sometimes, when updating the firmware on a SPARK Flex, it is possible for the process to be interrupted or for the firmware to be corrupted by a bad download or other type of interruption in data transfer. In this state, the Status LED will be dark or dim and the device will fail to operate. There is a built-in recovery mode that can force your device to accept new firmware even if the controller seems to be bricked and the procedure is outlined below:
Please note, that performing this procedure will erase all data and settings on the device. To perform the procedure a small tool, like a straightened paper clip, is necessary to press the Mode Button (located to the right of the Status LED), the orange USB-C cable that came with the unit (or a DATA capable USB-C cable), and a native Windows based computer with the REV Hardware Client installed:
With the SPARK Flex disconnected from power, press and hold the Mode Button.
While still holding the Mode Button, connect the Device to the computer using the USB-C cable - the Status LED will not illuminate - this is expected.
With the REV Hardware Client running on the computer, wait a few seconds for the audible tone or icon for the device to be recognized in recovery mode then release the Mode Button - no lights will be present on the SPARK Flex during this stage of the process, this is expected.
Select the SPARK Flex in Recovery Mode from the REV Hardware Client window.
From the "Choose a Device" type dropdown, choose - SPARK Flex.
Choose the latest version of the firmware from the dropdown and then click update.
Wait for the software update to complete.
Power cycle unit (unplug and plug in USB-C) click on the SPARK Flex icon, and clear any sticky faults - the recovery should be complete!
SPARK Flex will indicate important status information on its multi-colored Status LED visible through the frosted plastic near the USB port. The following tables shows each state and the corresponding LED color pattern.
The mounting face of the SPARK Flex features six #10-32 threaded mounting holes on a 2 in bolt circle. Each hole has an absolute maximum depth of 0.25 in.
DO NOT exceed the maximum mounting screw depth of 0.25 in when mounting the SPARK Flex. Doing so will result in permanent damage to the SPARK Flex and will void the warranty.
Depth gauges are laser-etched into each side of the SPARK Flex body to make it easy to check that the chosen screw length will not violate the maximum depth.
Simply check the screw length against the intended stack-up of structure and motor controller, and verify that it does not violate the maximum depth.
The mode button can be used to activate basic operating modes within the SPARK Flex. For information on those modes, please see the section.
The Mode Button is specifically designed to be difficult to press inadvertently. Therefore, please follow the steps below to press the mode button successfully.
Using a small and blunt tool, like a straightened paper clip, gently press the Mode Button. You should feel and hear a soft click. If you are in a noisy environment, you may only be able to feel the click through the tool.
DO NOT use a sharp tool to press the Mode Button.
Safety pins, thumbtacks, pinbacks buttons, and other sharp tools will cause damage to the Mode Button's material.
If you do not feel the click, ensure the tool is aligned with the button.
DO NOT press with excessive force.
You should feel the click of the button with relatively gentle pressure. Pressing with excessive force can permanently damage the button.
Some early batches of SPARK Flex Motor Controllers have variances in the alignment of the Mode Button and the case hole. Misaligned buttons can still be pressed and the alignment does not affect the functionality of the SPARK Flex Motor Controller as a whole.
If your button is misaligned, please pay close attention and avoid the gap between the button and the printed circuit board (PCB):
Again, DO NOT use a sharp tool to press a misaligned Mode Button. It can easily be inserted into the indicated gap above, and permanently damage the button. Generally, a sharp tool should never be used to press the Mode Button.
Please reach out to us at support@revrobotics.com if you are still having difficulty pressing your Mode Button after following this guide.
The SPARK Flex can be controlled by three different interfaces: servo-style PWM, Controller Area Network (CAN), and USB. The following sections describe the physical connections to these interfaces. For details on the operation and protocols of the PWM, CAN, or USB interfaces, please see .
CAN and PWM control connections share a set of four integrated 26 AWG twisted wires extending 45 cm from the case of the motor controller. Each wire is color coded according to its function:
The wires are terminated with two 1 x 3, 0.1 in pitch, rectangular connectors, both excluding the center pin. One connector is pinned and the other socketed to facilitate daisy-chaining between multiple CAN devices on the bus when using the CAN interface.
Each matching wire pair is physically connected to its functional counterpart within the device. Even if the SPARK Flex loses power, the CAN bus remains unbroken, leaving downstream devices unaffected.
Pay close attention when daisy-chaining devices, and make sure that the colors match from connector-to-connecter along the entire CAN bus. Mismatched connections can cause difficult-to-diagnose communications issues along the entire bus.
When using the PWM interface, only one of the two connectors should be used. In most systems this will be the socketed connector. Therefore, it is best practice to secure the unused wires and protect the exposed pins by covering them with electrical tape.
The USB-C Port is located above the CAN/PWM wires of the SPARK Flex. It supports USB 2.0 and can provide 5 V power for the SPARK Flex's internal microcontroller.
While you can configure the SPARK Flex under USB-only power, you will not be able to spin a motor unless main power is also connected.
More information about what can be configured and operated through the USB port can be found in the USB Interface section.
The following tables provide the operating and mechanical specifications for the SPARK MAX Motor Controller.
DO NOT exceed the maximum electrical specifications. Doing so will cause permanent damage to the SPARK MAX and will void the warranty.
*Continuous operation at 60A may produce high temperatures on the heat sink. Caution should be taken when handling the SPARK MAX if it has been running at higher current level for an extended period of time.
If using a battery to power SPARK MAX, make sure the fully charged voltage is below 24V allowing for sustained operation. Some battery chemistries and configurations, including 6S LiPo packs, have a charge voltage above the maximum operating voltage for SPARK MAX.
The SPARK MAX can be controlled by three different interfaces, servo-style PWM, controller area network (CAN), and USB. The following sections describe the physical connections to these interfaces in detail. For details on the operation and protocols of the PWM, CAN, and USB interfaces, please see the .
The CAN/PWM Port is located on the power input side of the SPARK MAX. This port can be connected to either a servo-style PWM signal or a CAN bus with other devices. Connector details can be found below.
Identical-function pins are electrically connected inside the SPARK MAX, therefore the CAN daisy-chain is completed internally and any two signal and ground pairs can be used for PWM.
The USB-C Port is located on the power input side of the SPARK MAX. It supports USB 2.0 and 5V power for the SPARK MAX's internal microcontroller. While you can configure the SPARK MAX without main power, you will not be able to spin a motor.
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. Included in this section are the basic steps to get a motor spinning using the REV Hardware Client as well as information on how to configure your SPARK MAX.
We recommend following this guide in its entirety at least once to understand the key features of the SPARK MAX. This guide can also serve as a fallback in case of any issues faced.
Before following this guide, the before continuing. The client is the best way to verify that the device is configured correctly, and is required before using the CAN interface.
SPARK MAX is designed to drive 12V brushed and brushless DC motors at currents up to 60A continuously. Power and motor connections are made through the two sets of wires built into the SPARK MAX. The wires are 12AWG ultra-flexible silicone-coated wire. Each wire runs approximately 15cm from the end faces of the controller. Be sure to take care when cutting and stripping the wires as not to cut them too short. The figure below shows these connections in detail.
As with any electrical component, make all connections with the power turned off. Connecting the SPARK MAX to a powered system may result in unexpected behavior an may pose a safety risk.
Motor output wires are labeled as A, B, and C with red, black, and white wires. Brushed motors must be connected to the A and B wires, while brushless motors must be connected to all three. It is critical that the order of the brushless motor wires match the SPARK MAX or the motor will not spin and could be damaged. Additional details are below.
Power input wires are labeled as V+ and V- with red and black wires. The SPARK MAX is intended to operate in a 12 V DC robot system, however, it is compatible with any DC power source between 5.5 V and 24 V.
DO NOT reverse V+ and V- or swap motor and power connections. Doing so will cause permanent damage to the SPARK MAX and will void the warranty.
DO NOT exceed the maximum supply voltage of 30V. Doing so will cause permanent damage to the SPARK MAX and will void the warranty.
When using high-current motors, it is recommended to use a power source that is capable of handling large surge currents, e.g. a 12V lead-acid battery. If the supply voltage drops below 5.5V the SPARK MAX will brown out, resulting in unexpected behavior. It is also highly recommended to incorporate a fuse or circuit breaker in series with the SPARK MAX between it and the power source to prevent exceeding the maximum current rating.
DO NOT exceed the maximum current ratings:
60A for 3 minutes
100A for 2 seconds
Doing so will cause permanent damage to the SPARK Flex and will void the warranty.
Please see the for information on how to configure the SPARK Flex using the CAN interface.
Please see the for information on how to identify the Idle Behavior configuration by the color of the Status LED!
Please follow the before continuing.
We appreciate the assistance from the community for feedback, contributions, and testing the SPARK MAX, especially .
Use the
Use the
When daisy-chaining or extending the connections, use the included to secure the two mating connectors together to prevent unintended disconnections.
SPARK MAX cannot detect which motor type it is connected to. Be sure to configure the SPARK MAX to run the type of motor you have connected. See the section for more details on configuring the appropriate motor type.
Yellow
CAN High (CANH)
Signal
Green
CAN Low (CANL)
Ground
Operating Voltage Range
5.5
12
24
V
Absolute Maximum Supply Voltage
-
-
30
V
Continuous Output Current
-
-
60*
A
Maximum Output Current (2 second surge)
-
-
100
A
Output Frequency
-
20
-
kHz
Full-reverse Input Pulse †
-
1000
-
μs
Neutral Input Pulse ††
-
1500
-
μs
Full-forward Input Pulse †††
-
2000
-
μs
Valid Input Pulse Range
500
-
2500
μs
Input Frequency
50
-
200
Hz
Input Timeout ‡
-
50
-
ms
Default Input Deadband ‡‡
-
5
-
%
Input High Level
0.5
0.7
0.9
V
Input Voltage Max
12
-
-
V
†
Brushed: between A and B outputs at 100% duty. Brushless: A->B->C direction at 100% duty.
††
Neutral corresponds to zero output voltage (0 V) and is either braking or coasting depending on the current idle behavior mode.
†††
Brushed: between A and B outputs at 100% duty.
Brushless: C->B->A direction at 100% duty.
‡
If a valid pulse isn't received within the timeout period, the SPARK MAX will disable its output.
‡‡
Input deadband is added to each side of the neutral pulse width. Within the deadband, output state is neutral. The deadband value is configurable using the REV Hardware Client or through the CAN interface.
Parameter
Min
Typ
Max
Units
Digital input voltage range †
0
-
5
V
Digital input-high voltage †
1.85
-
-
V
Digital input-low voltage †
-
-
1.36
V
Analog input voltage range ††
0
-
3.3
V
Analog input (12bit)
-
81
-
μV
5V supply current (I5V) ‡
-
-
100
mA
3.3V supply current (I3.3V)
-
-
30
mA
Total supply current (I5V + I3.3V)
-
-
100
mA
†
See the Data Port documentation for more details on the digital pins on the Data Port.
††
See the Analog Input documentation for more details on the Data Port's analog pin.
‡
The 5V supply is shared between the Data Port and Encoder Port.
Parameter
Min
Typ
Max
Units
Digital input voltage range †
0
-
5
V
Digital input-high voltage †
1.85
-
-
V
Digital input-low voltage †
-
-
1.36
V
Analog input voltage range ††
0
-
3.3
V
5V supply current (I5V) ‡
-
-
100
mA
3.3V supply current (I3.3V)
-
-
30
mA
Total supply current (I5V + I3.3V)
-
-
100
mA
†
See the Data Port documentation for more details on the digital pins on the Data Port.
††
See the Analog Input documentation for more details on the Data Port's analog pin.
‡
The 5V supply is shared between the Data Port and Encoder Port.
Parameter
Min
Typ
Max
Units
Body length
-
70
-
mm
Body width
-
35
-
mm
Body height
-
25.5
-
mm
Weight
-
113.3
-
g
Power and motor wire gauge
-
12
-
AWG
Power and motor wire length
-
15
-
cm
Connector Pin
CAN Function
PWM Function
1
CAN High
Signal
2
CAN Low
Ground
3
CAN High
Signal
4
CAN Low
Ground
Description
Manufacturer
Part Number
Vendor
Vendor P/N
JST-PH 4-pin Housing
JST
PHR-4
DigiKey
JST-PH Contact
JST
SPH-002T-P0.5L
DigiKey
Recommended Crimping Tool
IWISS
SN-2549
Amazon
Brushed and brushless DC motors require different motor control schemes based on the differences in their technology. It is possible to damage the SPARK MAX, the motor, or both if the appropriate motor type isn't configured properly. At the moment, the NEO Brushless Motor and the NEO 550 Brushless Motor are the only FRC-legal brushless motors compatible with the SPARK MAX, so choosing the correct operating mode should be straightforward.
Brushed or brushless motor types can be configured using the Mode Button, CAN, and USB interfaces.
Follow the steps below to switch motor types with the Mode Button. It is recommended that the motor be left disconnected until the correct mode is selected.
Use a small screwdriver, straightened paper clip, pen, or other small implement to press the button. Do not use any type of pencil as the pencil lead can break off inside the SPARK MAX.
Connect the SPARK MAX to the main power, not just USB Power.
The Status LED will indicate which motor type is configured by blinking yellow or blue for Brushed Mode or blinking magenta or cyan for Brushless Mode.
Press and hold the Mode Button for approximately 3 seconds.
After the button has been held for enough time, the Status LED will change and indicate the different motor configuration.
Release the mode button.
Please see the Status LED Patterns guide for information on how to identify the Motor Type configuration by the color of the Status LED!
Follow the steps below to switch motor types with the USB and the REV Hardware Client application. Be sure to download and install the REV Hardware Client application before continuing.
Connect the SPARK MAX to your computer using a USB-C cable.
Open the REV Hardware Client and verify that the application is connected to your SPARK MAX.
On the Basic tab, select the appropriate motor type under the Select Motor Type menu.
Click Burn Flash and confirm the change.
Please see the API Information for information on how to configure the SPARK MAX using the CAN interface.
When the SPARK MAX is receiving a neutral command the idle behavior of the motor can be handled in two different ways: Braking or Coasting.
When in Brake Mode, the SPARK MAX will effectively short all motor wires together. This quickly dissipates any electrical energy within the motor and brings it to a quick stop.
When in Coast Mode, the SPARK MAX will effectively disconnect all motor wires. This allows the motor to spin down at its own rate.
The Idle Mode can be configured using the Mode Button, CAN, and USB interfaces.
Follow the steps below to switch the Idle Mode between Brake and Coast with the Mode Button.
Use a small screwdriver, straightened paper clip, pen, or other small implement to press the button. Do not use any type of pencil as the pencil lead can break off inside the SPARK MAX.
Connect the SPARK MAX to main power, not just USB Power.
The Status LED will indicate which Idle Mode is currently configured by blinking blue or cyan for Brake and yellow or magenta for Coast depending on the motor type.
Press and release the Mode Button
You should see the Status LED change to indicate the selected Idle Mode.
Please see the Status LED Patterns guide for information on how to identify the Idle Behavior configuration by the color of the Status LED!
Follow the steps below to switch the Idle Mode between Brake and Coast with the USB and the REV Hardware Client application. Be sure to download and install the REV Hardware Client application before continuing.
Connect the SPARK MAX to your computer using a USB-C cable.
Open the REV Hardware Client application and verify that the application is connected to your SPARK MAX.
On the Basic tab, select the desired mode with the Idle Mode switch.
Click Burn Flash and confirm the change.
Please see the API Information for information on how to configure the SPARK MAX using the CAN interface.
Below is a list of all the configurable parameters within the SPARK MAX. Parameters can be set through the CAN or USB interfaces. The parameters are saved in a different region of memory from the device firmware and persist through a firmware update.
Name
ID
Type
Default
Description
kCanID
0
uint
0
CAN ID This parameter persists through a normal firmware update.
kInputMode
1
Input Mode
0
Input mode, this parameter is read only and the input mode is detected by the firmware automatically. 0 - PWM 1 - CAN 2 - USB
kMotorType
2
Motor Type
BRUSHLESS
Motor type: 0 - Brushed 1 - Brushless This parameter persists through a normal firmware update.
Reserved
3
-
Reserved
kSensorType
4
Sensor Type
HALL_EFFECT
Sensor type: 0 - No Sensor 1 - Hall Sensor 2 - Encoder This parameter persists through a normal firmware update.
kCtrlType
5
Ctrl Type
CTRL_DUTY_CYCLE
Control Type, this is a read only parameter of the currently active control type. The control type is changed by calling the correct API. 0 - Duty Cycle 1 - Velocity 2 - Voltage 3 - Position
kIdleMode
6
Idle Mode
IDLE_COAST
State of the half bridge when the motor controller commands zero output or is disabled. 0 - Coast 1 - Brake This parameter persists through a normal firmware update.
kInputDeadband
7
float32
%0.05
Percent of the input which results in zero output for PWM mode. This parameter persists through a normal firmware update.
Reserved
8
-
-
Reserved
Reserved
9
-
-
Reserved
kPolePairs
10
uint
7
Number of pole pairs for the brushless motor. This is the number of poles/2 and can be determined by either counting the number of magnets or counting the number of windings and dividing by 3. This is an important term for speed regulation to properly calculate the speed.
kCurrentChop
11
float32
115/Amps
If the half bridge detects this current limit, it will disable the motor driver for a fixed amount of time set by kCurrentChopCycles. This is a low sophistication 'current control'. Set to 0 to disable. The max value is 125.
kCurrentChopCycles
12
uint
0
Number of PWM Cycles for the h-bridge to be off in the case that the current limit is set. Min = 1, multiples of PWM period (50μs). During this time the current will be recirculating through the low side MOSFETs, so instead of 'freewheeling' the diodes, the bridge will be in brake mode during this time.
kP_0
13
float32
0
Proportional gain constant for gain slot 0.
kI_0
14
float32
0
Integral gain constant for gain slot 0.
kD_0
15
float32
0
Derivative gain constant for gain slot 0.
kF_0
16
float32
0
Feed Forward gain constant for gain slot 0.
kIZone_0
17
float32
0
Integrator zone constant for gain slot 0. The PIDF loop integrator will only accumulate while the setpoint is within IZone of the target.
kDFilter_0
18
float32
0
PIDF derivative filter constant for gain slot 0.
kOutputMin_0
19
float32
-1
Max output constant for gain slot 0. This is the max output of the controller.
kOutputMax_0
20
float32
1
Min output constant for gain slot 0. This is the min output of the controller.
kP_1
21
float32
0
Proportional gain constant for gain slot 1.
kI_1
22
float32
0
Integral gain constant for gain slot 1.
kD_1
23
float32
0
Derivative gain constant for gain slot 1.
kF_1
24
float32
0
Feed Forward gain constant for gain slot 1.
kIZone_1
25
float32
0
Integrator zone constant for gain slot 1. The PIDF loop integrator will only accumulate while the setpoint is within IZone of the target.
kDFilter_1
26
float32
0
PIDF derivative filter constant for gain slot 1.
kOutputMin_1
27
float32
-1
Max output constant for gain slot 1. This is the max output of the controller.
kOutputMax_1
28
float32
1
Min output constant for gain slot 1. This is the min output of the controller.
kP_2
29
float32
0
Proportional gain constant for gain slot 2.
kI_2
30
float32
0
Integral gain constant for gain slot 2.
kD_2
31
float32
0
Derivative gain constant for gain slot 2.
kF_2
32
float32
0
Feed Forward gain constant for gain slot 2.
kIZone_2
33
float32
0
Integrator zone constant for gain slot 2. The PIDF loop integrator will only accumulate while the setpoint is within IZone of the target.
kDFilter_2
34
float32
0
PIDF derivative filter constant for gain slot 2.
kOutputMin_2
35
float32
-1
Max output constant for gain slot 2. This is the max output of the controller.
kOutputMax_2
36
float32
1
Min output constant for gain slot 2. This is the min output of the controller.
kP_3
37
float32
0
Proportional gain constant for gain slot 3.
kI_3
38
float32
0
Integral gain constant for gain slot 3.
kD_3
39
float32
0
Derivative gain constant for gain slot 3.
kF_3
40
float32
0
Feed Forward gain constant for gain slot 3.
kIZone_3
41
float32
0
Integrator zone constant for gain slot 3. The PIDF loop integrator will only accumulate while the setpoint is within IZone of the target.
kDFilter_3
42
float32
0
PIDF derivative filter constant for gain slot 3.
kOutputMin_3
43
float32
-1
Max output constant for gain slot 3. This is the max output of the controller.
kOutputMax_3
44
float32
1
Min output constant for gain slot 3. This is the min output of the controller.
Reserved
45
-
-
Reserved
Reserved
46
-
-
Reserved
Reserved
47
-
-
Reserved
Reserved
48
-
-
Reserved
Reserved
49
-
-
Reserved
kLimitSwitchFwdPolarity
50
bool
0
Forward Limit Switch polarity. 0 - Normally Open 1 - Normally Closed
kLimitSwitchRevPolarity
51
bool
0
Reverse Limit Switch polarity. 0 - Normally Open 1 - Normally Closed
kHardLimitFwdEn
52
bool
1
Limit switch enable, enabled by default
kHardLimitRevEn
53
bool
1
Limit switch enable, enabled by default
Reserved
54
-
-
Reserved
Reserved
55
-
-
Reserved
kRampRate
56
float32
V/s 0
Voltage ramp rate active for all control modes in % output per second, a value of 0 disables this feature. All APIs take the reciprocal to make the unit 'time from 0 to full'.
kFollowerID
57
uint
0
CAN EXTID of the message with data to follow
kFollowerConfig
58
uint
0
Special configuration register for setting up to follow on a repeating message (follower mode). CFG[0] to CFG[3] where CFG[0] is the motor output start bit (LSB), CFG[1] is the motor output stop bit (MSB). CFG[0] - CFG[1] determines endianness. CFG[2] bits determine sign mode and inverted, CFG[3] sets a preconfigured controller (0x1A = REV, 0x1B = Talon/Victor style as of 2018 season)
kSmartCurrentStallLimit
59
uint
80A
Smart Current Limit at stall, or any RPM less than kSmartCurrentConfig RPM.
kSmartCurrentFreeLimit
60
uint
20A
Smart current limit at free speed
kSmartCurrentConfig
61
uint
10000
Smart current limit RPM value to start linear reduction of current limit. Set this > free speed to disable.
Reserved
62
-
-
Reserved
Reserved
63
-
-
Reserved
Reserved
64
-
-
Reserved
Reserved
65
-
-
Reserved
Reserved
66
-
-
Reserved
Reserved
67
-
-
Reserved
Reserved
68
-
-
Reserved
kEncoderCountsPerRev
69
uint
4096
Number of encoder counts in a single revolution, counting every edge on the A and B lines of a quadrature encoder. (Note: This is different than the CPR spec of the encoder which is 'Cycles per revolution'. This value is 4 * CPR.
kEncoderAverageDepth
70
uint
64
Number of samples to average for velocity data based on quadrature encoder input. This value can be between 1 and 64.
kEncoderSampleDelta
71
uint
200 per 500us
Delta time value for encoder velocity measurement in 500μs increments. The velocity calculation will take delta the current sample, and the sample x * 500μs behind, and divide by this the sample delta time. Can be any number between 1 and 255
Reserved
72
-
-
Reserved
Reserved
73
-
-
Reserved
Reserved
74
-
-
Reserved
kCompensatedNominalVoltage
75
float32
0 V
In voltage compensation mode mode, this is the max scaled voltage.
kSmartMotionMaxVelocity_0
76
float32
0
kSmartMotionMaxAccel_0
77
float32
0
kSmartMotionMinVelOutput_0
78
float32
0
kSmartMotionAllowedClosedLoopError_0
79
float32
0
kSmartMotionAccelStrategy_0
80
float32
0
kSmartMotionMaxVelocity_1
81
float32
0
kSmartMotionMaxAccel_1
82
float32
0
kSmartMotionMinVelOutput_1
83
float32
0
kSmartMotionAllowedClosedLoopError_1
84
float32
0
kSmartMotionAccelStrategy_1
85
float32
0
kSmartMotionMaxVelocity_2
86
float32
0
kSmartMotionMaxAccel_2
87
float32
0
kSmartMotionMinVelOutput_2
88
float32
0
kSmartMotionAllowedClosedLoopError_2
89
float32
0
kSmartMotionAccelStrategy_2
90
float32
0
kSmartMotionMaxVelocity_3
91
float32
0
kSmartMotionMaxAccel_3
92
float32
0
kSmartMotionMinVelOutput_3
93
float32
0
kSmartMotionAllowedClosedLoopError_3
94
float32
0
kSmartMotionAccelStrategy_3
95
float32
0
kIMaxAccum_0
96
float32
0
kSlot3Placeholder1_0
97
float32
0
kSlot3Placeholder2_0
98
float32
0
kSlot3Placeholder3_0
99
float32
0
kIMaxAccum_1
100
float32
0
kSlot3Placeholder1_1
101
float32
0
kSlot3Placeholder2_1
102
float32
0
kSlot3Placeholder3_1
103
float32
0
kIMaxAccum_2
104
float32
0
kSlot3Placeholder1_2
105
float32
0
kSlot3Placeholder2_2
106
float32
0
kSlot3Placeholder3_2
107
float32
0
kIMaxAccum_3
108
float32
0
kSlot3Placeholder1_3
109
float32
0
kSlot3Placeholder2_3
110
float32
0
kSlot3Placeholder3_3
111
float32
0
kPositionConversionFactor
112
float32
1
kVelocityConversionFactor
113
float32
1
kClosedLoopRampRate
114
float32
0 DC/sec
kSoftLimitFwd
115
float32
0
Soft limit forward value
kSoftLimitRev
116
float32
0
Soft limit reverse value
Reserved
117
-
-
Reserved
Reserved
118
-
-
Reserved
kAnalogPositionConversion
119
float32
1 rev/volt
Conversion factor for position from analog sensor. This value is multiplied by the voltage to give an output value.
kAnalogVelocityConversion
120
float32
1 vel/v/s
Conversion factor for velocity from analog sensor. This value is multiplied by the voltage to give an output value.
kAnalogAverageDepth
121
uint
0
Number of samples in moving average of velocity.
kAnalogSensorMode
122
uint
0
0 Absolute: In this mode the sensor position is always read as voltage * conversion factor and reads the absolute position of the sensor. In this mode setPosition() does not have an effect. 1 Relative: In this mode the voltage difference is summed to calculate a relative position.
kAnalogInverted
123
bool
0
When inverted, the voltage is calculated as (ADC Full Scale - ADC Reading). This means that for absolute mode, the sensor value is 3.3V - voltage. In relative mode the direction is reversed.
kAnalogSampleDelta
124
uint
0
Delta time between samples for velocity measurement
Reserved
125
-
-
Reserved
Reserved
126
-
-
Reserved
kDataPortConfig
127
uint
0
0: Default configuration using limit switches 1: Alternate Encoder Mode - limit switches are disabled and alternate encoder is enabled. This parameter persists through a normal firmware update.
kAltEncoderCountsPerRev
128
uint
4096
Number of encoder counts in a single revolution, counting every edge on the A and B lines of a quadrature encoder. (Note: This is different than the CPR spec of the encoder which is 'Cycles per revolution'. This value is 4 * CPR.
kAltEncoderAverageDepth
129
uint
64
Number of samples to average for velocity data based on quadrature encoder input. This value can be between 1 and 64.
kAltEncoderSampleDelta
130
uint
200
Delta time value for encoder velocity measurement in 500μs increments. The velocity calculation will take delta the current sample, and the sample x * 500μs behind, and divide by this the sample delta time. Can be any number between 1 and 255.
kAltEncoderInverted
131
bool
0
Invert the phase of the encoder sensor. This is useful when the motor direction is opposite of the motor direction.
kAltEncoderPositionFactor
132
float32
1
Value multiplied by the native units (rotations) of the encoder for position.
kAltEncoderVelocityFactor
133
float32
1
Value multiplied by the native units (rotations) of the encoder for velocity.
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.
Configuring the idle behavior and motor type using the mode button is a quick way to set up a SPARK MAX without using a computer. This is most useful when you are controlling the SPARK MAX through its PWM interface or when testing the affect of Braking or Coasting on a mechanism.
Whenever the SPARK MAX receives 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 idle behavior 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.
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.
12 V battery
120 A circuit breaker
Power Distribution Hub
SPARK Flex
NEO Vortex
Associated wiring and a "test bed" described below
USB type-C cable
A Computer Running the REV Hardware Client
Using a "test bed" is an easy way to get started with the SPARK Flex and to verify connections and code. For the initial bring-up of the SPARK Flex, a test bed with a single Flex, NEO Vortex, and a properly wired Power Distribution Hub with a breaker is recommended.
Wiring the SPARK Flex to the Power Distribution Hub is just like wiring a SPARK MAX.
Dock the SPARK Flex on the NEO Vortex by following the NEO Vortex Docking Instructions.
Be sure to fully install the Docking Screws when docking the SPARK Flex. These screws ensure a robust and secure electrical connection. Operating the SPARK Flex and its attached motor or dock without these screws can cause unintended behavior and damage to the system.
Mount the docked SPARK Flex and NEO Vortex assembly to a piece of structure to keep it secured when it spins up. The motor has a lot of inertia and upon spin-up it can jump off the table.
The SPARK Flex's mounting face includes six #10-32 threaded mounting holes that are on a 2 in bolt circle. This bolt pattern is compatible with many structure types available, including REV ION System. However, two 0.196 - 0.201 in holes, spaced 2 in apart can easily be drilled into a piece of wood to rigidly mount the assembly.
DO NOT exceed the 0.25 in mounting screw depth of the SPARK Flex. Doing so can permanently damage the SPARK Flex and will void the warranty. See the Mounting Holes section for more details before mounting your SPARK Flex for the first time.
The power wires are permanently connected to the SPARK Flex and are not replaceable. Take care not to cut these wires too short. It is highly recommended to install connectors on these wires to allow for reconfiguration as you experiment and design your robot. WAGO 221 Inline Splicing Connectors (REV-19-2491-PK50) and Anderson Power Pole connectors are commonly used for this purpose.
Make sure the power is disconnected or turned off before making any electrical connections on your test bed or robot.
Connect the integrated SPARK Flex power leads labeled + (red) and - (black) to an available channel on the Power Distribution Hub. If you need to extend the length of the integrated wires, it is recommended to use 12 AWG wire or larger (a lower gauge number).
Only SPARK MAX and SPARK Flex are affected by the REVLib 2025 release. Color Sensor V3 is unaffected.
The 2025 version of REVLib introduced a series of breaking changes from the previous year. These changes include:
An overhauled configuration system
Updated import paths
Renamed classes
For a more complete changelog, please see our 2025 beta release notes on GitHub.
Below shows how to migrate certain common tasks from previous versions of REVLib to the 2025 release.
In the 2025 version, all SPARK related classes moved to a spark
package in Java and a spark
namespace in C++.
In addition, some of the classes were renamed:
CANSparkMax
is now SparkMax
CANSparkFlex
is now SparkFlex
CANSparkLowLevel
is now SparkLowLevel
SparkPIDController
is now SparkClosedLoopController
Instead of imperatively configuring parameters of the SPARK by calling methods directly on it and its auxiliary objects (sensors, closed loop controller, etc.), configuration parameters are set in a more declarative way through configuration objects and applying that configuration to the SPARK.
A more complete guide on the new configuration system will soon be available.
For simplicity, only an example for SPARK MAX is provided. The following will still be valid for a SPARK Flex object.
With the new configuration system, parameter getters moved to a configAccessor
field in the SparkMax
and SparkFlex
.
For simplicity, only an example for SPARK MAX is provided. The following will still be valid for a SPARK Flex object.
Previously, setting status periods required the user to know which periodic status frame a signal belonged to. Now, status signals' periods can be individually configured, and REVLib will handle figuring out which status frame to adjust.
These values can be configured through the new configuration system.
For simplicity, only an example for SPARK MAX is provided. The following will still be valid for a SPARK Flex object.
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
Device Identify
White/Magenta Fast Blink
CAN Bootloader Firmware Updating
White/Yellow Blink
CAN Bootloader Firmware Retry
White/Blue Blink
USB DFU (Device Firmware Update)
Dark (LED off)
Recovery Mode
Dark (LED off)
12V Missing
The motor will not drive if powered only by USB. This blink code warns the user of this condition.
Orange/Blue Slow Blink
Sensor Fault
This can occur if the sensor type is misconfigured, the sensor cable is not plugged in or damaged, or if a sensor other than the motor sensor is plugged in.
Orange/Magenta Slow Blink
Gate Driver Fault
A fault reported by the core internal electronic circuitry. If this code persists after power cycling the controller, contact REV.
Orange/Cyan Slow Blink
CAN Fault
The CAN fault will be shown after the first time the device is plugged into the CAN port and a fault later occurs. Check your CAN wiring if you see this fault.
Orange/Yellow Slow Blink
Temperature Cutoff Fault
The motor or motor controller has gotten too hot to continue running. This fault will clear automatically after the system cools down enough to run again.
Orange/Green Slow Blink
Corrupt Firmware (recover using Recovery Mode)
Firmware failed to load.
Dark (LED off)
Many issues can be solved by systematic troubleshooting without needing to contact REV Support. Take a look at the troubleshooting tips below for help in determining the cause of the issue you are seeing. Should you need to contact us, describing the steps you've taken in detail will help us get you up and running quickly.
The key to effective troubleshooting is isolating the issue. Many issues can show the same symptom, so eliminating failure points one at a time is critical to finding the root cause.
If possible, try to eliminate a section of the system when troubleshooting. For example:
Rule out a code or control wiring issue:
Use the REV Hardware Client to run the SPARK MAX over USB.
Please be aware of the CAN lockout feature of the SPARK MAX. If it has been connected to the roboRIO's CAN bus, a safety feature within the SPARK MAX will lock out USB communication. Disconnecting from the CAN bus and power-cycling the MAX will release the lock.
If this is your first time running the REV Hardware client, see the Getting Started with the REV Hardware Client for a tour of the software and its features.
Rule out a code issue:
Create a simple test program using our SPARK MAX Example Code.
Rule out a mechanical issue:
Remove the motor from the mechanism or use a different, free spinning motor.
An extremely useful set of tools can be found on the Driver Station:
Use the Driver Station Log File Viewer
Look at the PDP channel current draw:
Higher than expected current on a channel can indicate both mechanical and electrical issues.
Look at the battery voltage:
Large dips in the battery voltage around the time of an issue can indicate battery health issues that cause brownouts.
Use the CAN/Power Tab
Look at the CAN Bus Utilization.
Look at CAN Faults.
Look at Comms Faults:
Comms faults can affect the SPARK MAX. If it loses communication with the roboRIO, it will go to its safe disabled state. This can look like a momentary glitch in a motor spinning if the comms faults are infrequent and irregular.
It is also very useful to log or plot operating values internal to the SPARK MAX. These values can be accessed using the SPARK MAX APIs. Useful values to log:
getAppliedOutput()
This value will show what the SPARK MAX is actually applying to the motor output. This can illuminate issues with closed loop control tuning.
getOutputCurrent()
This value will show the output current going to the phases of the motor. Output current won't always be the same as the Input current measured by the PDP. Knowing the output current is useful to diagnose current-limit issues if motors are overheating.
getBusVoltage()
A way to measure the input voltage right at the controller.
getStickyFaults()
A sticky fault indicates if a fault has occurred since the last time the faults were reset. Checking these can provide a lot of insight into what the controller is experiencing.
Below you will find some troubleshooting steps for some common faults and issues related to operating the SPARK MAX.
Measure the continuity between each of the motor phase wires and the sensor wire, as pictured here. Also, check the resistance between wires of the sensor cable and motor wires. Reach out to support@revrobotics.com with results for each phase wire.
Sometimes, when updating the firmware on a SPARK MAX, it is possible for the process to be interrupted or for the firmware to be corrupted by a bad download or other type of interruption in data transfer. In this state, the Status LED will be dark or dim and the device will fail to operate. There is a built-in recovery mode that can force your device to accept new firmware even if the controller seems to be bricked and the procedure is outlined below:
Please note, performing this procedure will erase all data and settings on the device. To perform the procedure a small tool, like a straightened paper clip, is necessary to press the Mode Button (located to the right of the Status LED), the orange USB-C cable that came with the unit (or a DATA capable USB-C cable), and a native Windows based computer with the REV Hardware Client installed:
With the SPARK MAX disconnected from power, press and hold the Mode Button
While still holding the Mode Button, connect the Device to the computer using the USB-C cable - the Status LED will not illuminate - this is expected.
With the REV Hardware Client running on the computer, wait a few seconds for the audible tone or icon for the device to be recognized in recovery mode then release the Mode Button - no lights will be present on the SPARK MAX during this stage of the process, this is expected
Select the SPARK MAX in Recovery Mode from the REV Hardware Client window
From the "Choose a Device" type dropdown, choose - SPARK MAX
Choose the latest version of the firmware from the dropdown and then click update
Wait for the software update to complete
Power cycle unit (unplug and plug in USB-C) click on SPARK MAX icon, clear any sticky faults - the recovery should be complete!
SPARK MAX will indicate important status information on its multi-colored STATUS LED located on the top of its case. The following tables shows each state and the corresponding LED 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
Device Identify
White/Magenta Fast Blink
CAN Bootloader Firmware Updating
White/Yellow Blink (v1.5.0) Green/Magenta Blink (v1.4.0)
CAN Bootloader Firmware Retry
White/Blue Blink
USB DFU (Device Firmware Update)
Dark (LED off)
Recovery Mode
Dark (LED off)
12V Missing
The motor will not drive if powered only by USB. This blink code warns the user of this condition.
Orange/Blue Slow Blink
Sensor Fault
This can occur if the sensor type is misconfigured, the sensor cable is not plugged in or damaged, or if a sensor other than the motor sensor is plugged in.
Orange/Magenta Slow Blink
Gate Driver Fault
A fault reported by the core internal electronic circuitry. If this code persists after power cycling the controller, contact REV.
Orange/Cyan Slow Blink
CAN Fault
The CAN fault will be shown after the first time the device is plugged into the CAN port and a fault later occurs. Check your CAN wiring if you see this fault.
Orange/Yellow Slow Blink
Corrupt Firmware (recover using Recovery Mode)
Firmware failed to load.
Dark (LED off)
12V Battery
120A Circuit Breaker
Power Distribution Panel
SPARK MAX
Brushed or Brushless Motor
USB Type-C Cable
Using a test bed is an easy way to get started with using the SPARK MAX and verify connections and code. For the initial bring up of the SPARK MAX a test bed with a single SPARK MAX, a brushless or brushed motor, and a properly wired Power Distribution Panel with breaker is recommended.
The power and motor wires are permanently connected to the SPARK MAX and are not replaceable. So take care not to cut these wires too short. It is highly recommended to install connectors on these wires to simplify both the power and motor connections. A common connector used for this purpose is the Anderson Power Pole connector. Follow our Anderson Power Pole guide for tips on how to properly crimp these connectors.
Make sure the power is disconnected or turned off before making any electrical connections on your test bed or robot.
Connect the integrated SPARK MAX power leads labeled V+ (red) and V- (black) to an available channel on the Power Distribution Panel. If you need to extend the length of the integrated wires, it is recommended to use 12AWG wire or larger (lower gauge number).
The first step is determining the type of motor you wish to connect. The SPARK MAX supports two types of motors: brushed DC and brushless DC. An easy way to determine the motor type is to look at the number of primary (larger) motor wires. Brushed motors only have 2 primary motor wires, while brushless motors have 3 primary wires and additional smaller sensor wires.
Connect the three 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 or NEO 550's encoder cable to the port labeled ENCODER just above the output wires.
The encoder sensor cable is required for the operation of brushless motors with SPARK MAX. The motor will not spin without it.
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. Do not cut this wire in case you wish to use a brushless motor in the future. In the example below the extra unused motor wire is insulated by the white connector and secured in the block.
Carefully check all connections before continuing and verify that all colors match. The SPARK MAX can be permanently damaged if the power connection is reversed.
Leave the CAN cable disconnected for now, we will wiring this up later.
Located on the motor output side of the SPARK MAX is a 6-pin Encoder Port. This port is designed to accept the built-in hall-encoder from the NEO Brushless Motor, but it can also connect to other external encoders when running in Brushed Mode. The connector details can be found below.
The SPARK MAX can be configured to run in Alternate Encoder Mode, which reconfigures the Data Port on the top of the controller to accept an alternative quadrature encoder in addition to the Encoder Port.
Connector Pin
Pin Type
Pin Function
1
Power
Ground
2
Digital
Encoder C / Index
3
Digital
Encoder B
4
Digital
Encoder A
5
Analog
Motor Temperature
6
Power
+5V
Description
Manufacturer
Part Number
Vendor
Vendor P/N
JST-PH 6-pin Housing
JST
PHR-6
DigiKey
JST-PH Contact
JST
SPH-002T-P0.5L
DigiKey
Recommended Crimping Tool
IWISS
SN-2549
Amazon
The SPARK MAX can be controlled by three different interfaces, servo-style PWM, controller area network (CAN), and USB. The following sections describe the operation and protocols of these interfaces. For more details on the physical connections, see Control Connections.
The SPARK MAX can accept a standard servo-style PWM signal as a control for the output duty cycle. Even though the PWM port is shared with the CAN port, SPARK MAX will automatically detect the incoming signal type and respond accordingly. For details on how to connect a PWM cable to the SPARK MAX, see CAN/PWM Port.
The SPARK MAX responds to a factory default pulse range of 1000µs to 2000µs. These pulses correspond to full-reverse and full-forward rotation, respectively, with 1500µs (±5% default input deadband) as the neutral position, i.e. no rotation. The input deadband is configurable with the REV Hardware Client or the CAN interface. The table below describes how the default pulse range maps to the output behavior.
If a valid signal isn't received within a 60ms window, the SPARK MAX will disable the motor output and either brake or coast the motor depending on the configured Idle Mode. For details on the Idle Mode, see Idle Mode - Brake/Coast Mode.
The SPARK MAX can be connected to a robot CAN network. CAN is a bi-directional communications bus that enables advanced features within the SPARK MAX. SPARK MAX must be connected to a CAN network that has the appropriate termination resistors at both endpoints. Please see the FIRST Robotics Competition Robot Rules for the CAN bus wiring requirements. Even though the CAN port is shared with the PWM port, SPARK MAX will automatically detect the incoming signal type and respond accordingly. SPARK MAX uses standard CAN frames with an extended ID (29 bits), and utilizes the FRC CAN protocol for defining the bits of the extended ID:
ExtID [28:24]
ExtID [23:16]
ExtID [15:10]
ExtID [9:6]
ExtID [5:0]
Device Type
Manufacturer
API Class
API Index
Device ID
Each device on the CAN bus must be assigned a unique CAN ID number. Out of the box, SPARK MAX is assigned a device ID of 0. It is highly recommended to change all SPARK MAX CAN IDs from 0 to any unused ID from 1 to 62. CAN IDs can be changed by connecting the SPARK MAX to a Windows computer and using the REV Hardware Client. For details on other SPARK MAX configuration parameters, see Configuration Parameters.
Additional information about the CAN accessible features and how to access them can be found in the SPARK MAX API Information section.
The SPARK MAX sends data periodically back to the roboRIO. Frequently accessed data, like motor position and temperature, can be accessed using several APIs. Data is broken up into several CAN "frames" which are sent at a periodic rate. This rate can be changed manually in code, but unlike other parameters, this setting does not persist through a power cycle. The rate can be set anywhere from a minimum 1ms to a maximum 32767ms period. The table below describes each status frame and its available data.
Available Data
Description
Applied **** Output
The actual value sent to the motors from the motor controller. The frame stores this value as a 16-bit signed integer, and is converted to a floating point value between -1 and 1 by the roboRIO SDK. This value is also used by any follower controllers to set their output.
Faults
Each bit represents a different fault on the controller. These fault bits clear automatically when the fault goes away.
Sticky Faults
The same as the Faults field, however the bits do not reset until a power cycle or a 'Clear Faults' command is sent.
Is Follower
A single bit that is true if the controller is configured to follow another controller.
Available Data
Description
Motor Velocity
32-bit IEEE floating-point representation of the motor velocity in RPM using the selected sensor.
Motor Temperature
8-bit unsigned value representing:
Firmware version 1.0.381 - Voltage of the temperature sensor with 0 = 0V and 255 = 3.3V. Current firmware versions - Motor temperature in °C for the NEO Brushless Motor.
Motor Voltage
12-bit fixed-point value that is converted to a floating point voltage value (in Volts) by the roboRIO SDK. This is the input voltage to the controller.
Motor Current
12-bit fixed-point value that is converted to a floating point current value (in Amps) by the roboRIO SDK. This is the raw phase current of the motor.
Available Data
Description
Motor Position
32-bit IEEE floating-point representation of the motor position in rotations.
Available Data
Description
Analog Sensor Voltage
10-bit fixed-point value that is converted to a floating point voltage value (in Volts) by the roboRIO SDK. This is the voltage being output by the analog sensor.
Analog Sensor Velocity
22-bit fixed-point value that is converted to a floating point voltage value (in RPM) by the roboRIO SDK. This is the velocity reported by the analog sensor.
Analog Sensor Position
32-bit IEEE floating-point representation of the velocity in RPM reported by the analog sensor.
Available Data
Description
Alternate Encoder Velocity
32-bit IEEE floating-point representation of the velocity in RPM of the alternate encoder.
Alternate Encoder Position
32-bit IEEE floating-point representation of the position in rotations of the alternate encoder.
Available Data
Description
Duty Cycle Absolute Encoder Position
32-bit IEEE floating-point representation of the position of the duty cycle absolute encoder.
Duty Cycle Absolute Encoder Absolute Angle
16-bit integer representation of the absolute angle of the duty cycle absolute encoder.
Available Data
Description
Duty Cycle Absolute Encoder Velocity
32-bit IEEE floating-point representation of the velocity in RPM of the duty cycle absolute encoder.
Duty Cycle Absolute Encoder Frequency
16-bit unsigned integer representation of the frequency at which the duty cycle signal is being sent.
A user wants to implement their own PID loop on the roboRIO to hold a position. They want to run this loop at 100Hz (every 10ms), but the motor position data in Periodic Status 2 is sent at 20Hz (every 50ms).
The user can change this rate to 10ms by calling:
Pseudocode
setPeriodicFrameRate(PeriodicFrame.kStatus2, 10);
A user has many connected CAN devices and wishes to minimize the CAN bus utilization. They do not need any telemetry feedback, and have several follower devices that are only checked for faults.
The user can set the telemetry frame rates low, and set the Periodic Status 0 frame rate low on the follower devices:
Pseudocode
leader.setPeriodicFrameRate(PeriodicFrame.kStatus1, 500); leader.setPeriodicFrameRate(PeriodicFrame.kStatus2, 500); follower.setPeriodicFrameRate(PeriodicFrame.kStatus0, 100); follower.setPeriodicFrameRate(PeriodicFrame.kStatus1, 500); follower.setPeriodicFrameRate(PeriodicFrame.kStatus2, 500);
The user wants the follower devices to update at a faster rate: 200Hz (every 5ms).
The Periodic Status 0 frame can be increased to achieve this.
Pseudocode
leader.setPeriodicFrameRate(PeriodicFrame.kStatus0, 5);
The SPARK MAX can be configured and controlled through a USB connection to a computer running the REV Hardware Client. The USB interface utilizes a standard CDC (USB to Serial) driver. The command interface is similar to CAN, using the same ID and data structure, but always sends and receives a full 12-byte packet. The CAN ID is omitted (DNC) when talking directly to the device. However, the three MSB of the ID allow selection of alternate commands:
0b000 - Standard command - CAN ID omitted (DNC)
0b001 - Extended command - USB specific
All commands sent over USB receive a response. In the case that the corresponding CAN command does not receive a response, the USB interface receives an Ack command.
ExtID [31:29]
ExtID [28:24]
ExtID [23:16]
ExtID [15:10]
ExtID [9:6]
ExtID [5:0]
USB Command Type
Device Type (2)
Manufacturer (0x15)
API Class
API Index
Device ID
Command
API Class
API Index
Enter DFU Bootloader (will also disconnect USB interface)
0
1
Located next to the SPARK Flex's power and control input wires, the Data Port allows for extra sensor input and future feature expansion. Connector details can be found below.
1
Digital
Reserved
2
Power
+5V
3
Analog
Analog Input
4
Digital
Forward Limit Switch Input
5
Digital
External Encoder - B Input
6
Digital
Absolute Encoder - Duty Cycle Input
7
Digital
External Encoder - A Input
8
Digital
Reverse Limit Switch Input
9
Digital
External Encoder - Index Input
10
Power
Ground
The SPARK Flex Data Port Breakout Cable (REV-11-2853) breaks out the default pin functions of the SPARK Flex Data Port into commonly used connectors for external sensors.
The keyed and locking Data Port connector ensures a secure and aligned fit when plugged into the SPARK Flex Motor Controller. Its JST-PH 6-pin connector is designed to plug directly into the REV Through Bore Encoder, connecting both the quadrature and absolute encoder outputs to the appropriate SPARK Flex Data Port pins. Additional inputs, like Limit Switch and Analog inputs, are broken out to shrouded, 1 x 3 pinned, 0.1in pitch, PWM-style connectors that provide both power and ground in addition to the input signal.
The SPARK Flex Data Port Pigtail Cable (REV-11-2852) breaks out the SPARK Flex Data Port to individual unterminated wires and is useful for connecting custom circuits or sensors without a standard connector. It features the keyed and locking Data Port connector to ensure a secure and aligned fit when plugged into the SPARK Flex Motor Controller. Each wire is uniquely color coded for easy identification.
The SPARK Flex Data Port is a 0.05 in pitch, 2 x 5 pin, keyed and locking connector. Custom cables can be made with the following parts:
Latching Housing
Samtec
ISDF-05-D-M
Contact (28 - 30 AWG)
Samtec
CC03R-2830-01-GF CC03R-2830-01-G
Now that the device is wired, and the connections carefully checked, power on the robot. You should see the SPARK Flex slowly blinking its for a new device the color will be Magenta. If the LED is dark, or you see a different blink pattern, refer to the Status LED guide for troubleshooting.
If you are using a brushed motor, you may see a sensor error. This is expected until you configure the device to accept a brushed motor in the following steps.
Plug in the USB cable and start the REV Hardware Client. Select the SPARK Flex from the Connected Hardware
If you cannot see the SPARK Flex, make sure that the SPARK Flex is not being used by another application . Then unplug the SPARK Flex from the computer and plug it back in.
Before any parameters can be changed, you must first assign a unique CAN ID to the device. This can be any number between 1 and 63. After setting a unique CAN ID, the user interface will refresh and allow you to change other parameters.
Eventually you may set up a CAN network on your test bench or robot. Be sure each device on the network has a unique CAN ID. It is helpful to label each device with its ID number to aid in troubleshooting.
If you are using a NEO Vortex, NEO, or NEO 550, verify that the motor type is set to REV NEO Brushless, Sensor Type is Hall Effect, and the LED is blinking Magenta or Cyan.
If you see a Sensor Fault blink code, make sure the Motor Interface Connector is properly seated.
The ability to run a Brushed motor using a SPARK Flex will not be available until the release of the SPARK Flex Dock.
Your ideal current limit may vary based on your specific application, but these values can be used as a starting point to reduce the chance of an overload on your motor as you begin tuning your specific mechanism's Smart Current Limit.
NEO Vortex
80A
40A - 60A
20A - 40A
Warning: Setting current limits outside of the suggested ranges listed above may cause unintended overload and severe damage to components that are not covered by warranty.
The settings must be saved for the SPARK Flex to remember its new configuration through a power cycle. To do this, press the Burn Flash button at the bottom of the page. It will take a few seconds to save, indicated by the loading symbol on the button.
Any settings saved this way will be remembered when the device is powered back on. You can always restore the factory defaults if you need to reset the device.
Before running any motor, make sure all components are in a safe state, that the motor is secured, and that anyone nearby is aware. FRC motors are very powerful and can quickly cause damage to people and property.
Keep the CAN cable disconnected throughout the test. For safety reasons, the REV Hardware Client will not run the motor if the roboRIO is connected. If the roboRIO was connected, power cycle the SPARK Flex.
To spin the motor, go to the Run tab, keep all of the default settings and press Run Motor. The setpoint is 0 by default, meaning that the motor is being commanded to idle (0% power). When you press Run you should see the LED go from slow blinking to solid, indicating that the motor is idling.
Slowly ramp the setpoint slider up. The motor should start to spin and you should see a green blink pattern proportional to the speed you have set to the motor. Slowly ramp the slider down. The motor should spin in reverse, and you should see a red blink pattern proportional to the speed you have set to the motor.
If you are unable to spin the motor, visit our troubleshooting guide.
The SPARK MAX can be configured to run in Alternate Encoder Mode, which reconfigures the Data Port on the top of the controller to accept an alternative quadrature encoder, separate from the default encoder inputs shared between the front Encoder Port and the default quadrature encoder Data Port pins. Analog input is not affected by Alternate Encoder Mode.
This feature is designed for use in low-RPM mechanisms such as drivetrains, arms, and other manipulators. For high RPM applications, it is recommended to use the built-in motor sensor for brushless motors or the default encoder inputs for brushed motors.
Encoder Output Voltage Level
3.3V or 5.0V
Encoder Type Supported
Quadrature†
Maximum Counts per Second
165000
†
Index pulses are not currently supported
Before connecting a sensor with 5V output, the SPARK MAX must first be updated to firmware version 1.5.0 or later, or damage may occur. This can be done through the REV Hardware Client.
Encoder
Counts per Revolution
Max RPM
8192
1200
CTRE SRX Mag Encoder
4096
2400
Greyhill 63R256
1024
9600
When configured for Alternate Encoder Mode, a quadrature encoder connected to the reconfigured Data Port pins can be used as a feedback device by the SPARK MAX. Please note, the limit switch inputs cannot be used at the same time as an alternate encoder. The limit switch pins are repurposed for the alternate encoder and are thus disabled. Please see Connecting an Alternate Encoder for for more information.
Connecting an alternate encoder will likely require a custom wiring harness to connect the necessary encoder power, ground, and signals to the reconfigured Data Port. When configured in Alternate Encoder Mode, the Data Port has the following pinout:
Connector Pin
Pin Type
Pin Function
1
Power
+3.3V
2
Power
+5V
3
Analog
Analog Input
4
Digital
Alternate Encoder Index†
5
Digital
Encoder B
6
Digital
Alternate Encoder A
7
Digital
Encoder A
8
Digital
Alternate Encoder B
9
Digital
Encoder C / Index
10
Ground
Ground
†
The Alternate Encoder Index pin is reserved but not currently supported
Use an Alternate Encoder Adapter (REV-11-1881) to connect a REV Through Bore Encoder directly to the SPARK MAX Data Port. This adapter has a JST PH 6-pin connector that is compatible with the Through Bore Encoder's pinout and a selection switch to change the signal that is connect to pin 4 of the data port.
Check out our documentation of the Through Bore Encoder.
Another option is the SPARK MAX Data Port Breakout Board. This board can be used to wire an alternate encoder to the Data Port. The following table describes which pads on the breakout should be used for which signals coming from the alternate encoder.
Breakout Board Pad Label
Alternate Encoder Function
Limit - F
Index†
P6 (P5 in older batches)
A
Limit - R
B
3.3V or 5.0V
Encoder Power
GND
Encoder Ground
†
The Alternate Encoder Index pin is reserved but not currently supported
Below you will find the steps required to set up and use the Alternate Encoder Mode on the SPARK MAX, starting with configuration through either the REV Hardware Client or the SPARK MAX APIs.
Using the REV Hardware Client, select your SPARK MAX, then navigate to the Advanced Tab and scroll to the Alternate Encoder parameter section. Enable the alternate encoder by setting the kDataPortConfig parameter to 'Alternate Encoder' via the drop down menu. You can also set the other Alternate Encoder parameters at this time.
If using the SPARK MAX APIs, the Alternate Encoder is automatically configured when the Alternate Encoder object is instantiated. An Alternate Encoder is created the same as a CANEncoder, either by directly using the constructor or calling GetAlternateEncoder() on a previously constructed CANSparkMax.
Currently, quadrature is the only available type of configuration for an alternate encoder. This is differentiated from the other types of encoder configurations available for an encoder connected through the front facing Encoder Port on the SPARK MAX.
Since the alternate encoder inputs and the default digital inputs are shared on the Data Port, the user cannot use both the alternate encoder and a digital inputs in code. Therefore, a std::invalid_argument (C++), IllegalArgumentException (Java), or an Error on the Error Out terminal (LabVIEW) will be thrown if a user tries to construct both types objects in code simultaneously.
The alternate encoder can be used with the different closed-loop control modes available on the SPARK MAX. The feedback device used by a CANPIDController must be set to use the alternate encoder through SetFeedbackDevice().
Unlike the built-in sensor on the NEO Brushless motors, the 'phase' of the alternate encoder is unknown to the SPARK MAX. Before enabling any closed-loop control, it is critical that the phase is configured correctly. To verify:
Configure and connect the sensor as a quadrature alternate encoder, but do not run a closed-loop mode.
Plot the output signal of the motor using GetAppliedOutput() and the output of the encoder using altEncoder.GetVelocity(). Confirm that the sensor is behaving as expected. This can be done on the SmartDashboard:
frc::SmartDashboard::PutNumber("Alt Encoder Velocity", m_alternateEncoder.GetVelocity());
frc::SmartDashboard::PutNumber("Applied Output", m_motor.GetAppliedOutput());
Verify that the sign of the sensor is correct relative to the motor direction when driving it forward and backward. If it is not, the sensor must be inverted by calling altEncoder.SetInverted(true).
The Encoder Adapters and SPARK MAX Data Port Breakout Boards can be secured to a SPARK MAX in two ways.
1) To use a SPARK MAX Mounting Bracket to secure your Encoder Adapter or Breakout Board you will need to remove the middle tab of plastic
2) Cut this piece of plastic with a pair of snips, or remove it by twisting the plastic until it breaks
3) Once the middle piece of plastic has been removed, remove any sharp edges with a file or some sandpaper
4) The SPARK MAX Mounting Bracket will fit over the board as shown in this image. Attach the mounting bracket to your surface as you normally would after this step
A zip-tie can be secured around the SPARK MAX's zip-tie notches and over the board to securely attach it to the motor controller as well.
November 5th Update: REVLib Beta for the 2025 FRC Season is out now! Be aware this has resulted in changes to our CodeDocs with more documentation coming soon!
Below you will find information on how to download and install REVLib for LabVIEW, Java, and C++.
2024.2.0
Embedded (Press Ctrl-H)
2024.2.4
2024.2.4
Download the latest REVLib LabVIEW package from the download link above.
Make sure LabVIEW for FRC 2024 is installed and updated.
Open the REVLib LabVIEW Package. The NI Package Manager should automatically open.
Click Next:
Once the installation is complete, you will be able to access the REVLib VIs at LabVIEW Functions Pallet -> WPI Robotics Library -> Third Party -> REV Robotics.
You can use the online method to install REVLib C++/Java if your development machine is connected to the internet:
Open your robot project in VSCode.
Click on the WPI icon in the corner to open the WPI Command Pallet.
Select Manage Vendor Libraries.
Select Install new library (online).
Enter the following installation URL and press ENTER:
Download and unzip the latest REVLib into the C:\Users\Public\wpilib\2024 directory on Windows and ~/wpilib/2024 directory on Unix-like systems.
Follow the WPILib instructions for Adding Offline Libraries.
For a list and description of all classes:
For a list and description of all classes:
Located on the top of the SPARK MAX, the Data Port allows for extra sensor input and future feature development. The connector details can be found below.
Connector Pin
Pin Type
Pin Function
1
Power
+3.3V
2
Power
+5V
3
Analog
Analog Input
4
Digital
Forward Limit Switch Input
5
Digital
Encoder B
6
Digital
Multi-function Pin
7
Digital
Encoder A
8
Digital
Reverse Limit Switch Input
9
Digital
Encoder C / Index
10
Ground
Ground
Using the SPARK MAX Data Port Breakout Board (REV-11-1278) makes interfacing with the SPARK MAX Data Port easier.
SPARK MAX has two limit switch inputs that, when triggered, can independently prevent motion in both the forward and reverse directions. By default, when the pin for the corresponding direction is grounded, SPARK MAX will override any input commands for that direction and force the output into the neutral state. Input commands for the opposite direction will still be processed unless the corresponding limit signal is also triggered.
The default polarity is compatible with Normally Open (NO) style limit switches, who's contacts are shorted together when the switch is pressed. The Limit Switch Inputs can be configured for the opposite polarity using the USB or CAN interfaces. When configured for the opposite polarity, Normally Closed (NC), the limit will be triggered when the pin is left disconnected from ground. In other words, connecting the pin to ground will release the limit. The following table shows these configurations in detail:
The Quadrature Encoder Input on the Data Port is compatible with standard quadrature encoder signals, usually labeled as channel A, channel B, and Index. SPARK MAX shares these signals with the Encoder Port on the output side of the controller, therefore the Index signal is shared with the third brushless encoder signal C. When in Brushless Mode, these Data Port pins cannot be used with an external encoder. See Alternate Encoder Mode for information on how to configure the SPARK MAX to accept an alternative encoder source when running in Brushless Mode.
When in Brushed Mode, an external encoder can be connected through either the Data Port or the Encoder Port.
The SPARK MAX encoder signals are not pulled high internally. This is to ensure the maximum compatibility with different types of encoders.
The Analog Port on the SPARK MAX can measure voltages up to 3.3V with 12-bit resolution. The SPARK MAX Data Port Breakout includes a 5V to 3.3V amplifier circuit so that 5V signals can be sensed with the Analog Input pin.
Analog input is supported on firmware versions 1.4.0 and newer.
This pin is reconfigured when the SPARK MAX is configured in Alternate Encoder Mode.
The SPARK MAX Data Port can provide both 3.3V and 5V power to connected devices. Please check Data Port Specifications for details on the supply current capabilities of both rails.
The SPARK MAX Data Port Breakout Board (REV-11-1278) makes it easy to connect external sensors to the SPARK MAX Data Port.
Solder pads for every Data Port pin
Analog input 5V to 3.3V converter
Built-in amplifier maps 0V - 5V analog signals to the native 0V - 3.3V range of the SPARK MAX Analog Input
Configurable resistors can bypass the amplifier (move R3 to R4 position)
Pass-through Data Port connector
Connect other sensors with data port compatible cables while using this breakout
Mounts directly to SPARK MAX
No need for a data port cable
Securely mounts to the SPARK MAX zip-tie notches
A Closed-Loop Control System in its most basic form is a process that uses feedback to improve the accuracy of its outputs. Closed-Loop Control Systems, sometimes referred to as Feedback Controllers, are frequently used when maintaining or reaching a steady output is important or if the system may have outside influences that could affect the system's output.
A simple example using this type of Control is an automatic coffee maker. In its Closed-Loop Control System, the output is hot coffee and the process we are getting feedback on is the heating of the water. If the coffee maker receives feedback that the water is cold, it will start to heat the pot. When the water is almost hot enough to brew the coffee, the control algorithm will continue to heat the water until the correct goal temperature has been reached. Once the water reaches it's goal temperature, or if it gets too hot, the system will stop heating the water and wait until it receives feedback that the heater needs to begin again.
With a PID loop onboard a SPARK Motor Controller, the setup is simple, doesn't clutter your code, and the loop is updated every 10ms, doubling the responsiveness and precision of the controller. Even when using a more complex controller on the roboRIO, it's still recommended to put as much processing on the motor controller as possible.
Both the SPARK MAX and SPARK Flex can operate in several closed-loop control modes, using sensor input to tightly control the motor velocity, position or current. The internal control loop follows a standard PID algorithm with a feed-forward (F) term to compensate for known system offsets. This allows the motor to follow precise and repeatable motions, useful for complex mechanisms.
Below is a diagram of the firmware implementation of the internal PIDF.
Smart Motion Control is a complex control mode that allows for smoother and more controlled movements from one position to another. By configuring the maximum velocity and acceleration, as shown in , this control mode will create a motion that accelerates, holds a constant "cruise" velocity, and then decelerates to a stop at the setpoint.
Tuning the PID Controller for Smart Motion may be difficult on mechanisms with a very limited range of motion.
This control mode takes a setpoint in units of rotations, but the underlying implementation executes a Velocity PID controller, so the PID tuning process will be more like a Velocity controller.
The is a good tool for tuning this control loop, as it allows you to toggle between Smart Motion and Velocity control to fine-tune the constants and parameters.
Smart Motion's function is the same as that of , which uses an underlying position-based PID controller which may be easier to tune and can sometimes provide better results.
Running Smart Motion Control is as easy as any other control mode: configure the constants, pick your setpoints, and set it as the mode when you apply the position target, as seen below:
API Docs:
API Reference:
Using the Velocity Control mode will rotate your mechanism continuously. Please exercise caution while tuning. Utilize hard and soft limits to protect your robot.
Current Control uses a PID controller to run the motor at a consistent current providing a consistent torque. The PID controller is run using the setpoint, in Amps, and the internally measured current draw.
It is called as shown below:
API Docs:
API Reference:
Current Control mode will turn your mechanism continuously and will speed up to maximum velocity if unloaded. Use caution when running this mode and avoid using it on mechanisms with a limited range of motion.
Position Control is used to point the motor in a specific direction. It takes a setpoint in rotations and uses the PID loop to move to that position. The Position control mode pipes directly into a PID controller with the configured encoder.
Position Control is a great tool for simple but consistent motions, and can be paired with a to create smoother, more complex motions.
A properly tuned Position control loop should respond quickly and accurately to a setpoint change and should not oscillate around the target.
To run the motor in Position control mode, set the PID Controller setpoint as shown below.
API Docs:
API Reference:
Velocity Control uses the PID controller to run the motor at a set speed in RPM. An FF gain, as detailed in , is your friend in finding consistency when tuning this mode.
It is called in the same way as Position Control:
API Docs:
API Reference:
Velocity Control mode will turn your motor continuously,. Be sure your mechanism does not have any hard limits for rotation.
Velocity Loop constants are often of a very low magnitude, so if your mechanism isn't behaving as expected, try decreasing your gains.
For a detailed technical and mathematical description of each term and its effect, the is a good resource.
In FRC, PID loops are used in many types of mechanisms, from flywheel shooters to vertical arms. These need to be tuned to different constants, depending on the units they use and the physical design of the mechanism, however the process to find these constants is roughly the same.
Most teams find success using controllers tuned primarily with and , using a to account for .
P, the proportional gain, is the primary factor of the control loop. This is multiplied by the error and that gain is added to the output. This does the heavy lifting of the motion, pushing the motor in the direction it needs to go.
I, the integral gain, is not often recommended in FRC. It is useful for eliminating steady-state error, or error that the other gains leave behind and cannot address. It accumulates the error over time and multiplies it by the I gain, gradually increasing the power it supplies until that has evened out. If it is needed, it's recommended to use a limited to prevent .
The derivative gain, D, is used to tune out oscillation and dampen the motion. It resists motion, decreasing power when the mechanism is moving. A good balance of P and D is needed to make a smooth motion with no oscillation.
To then tune a basic PID loop, follow the steps below:
Set all constants (P, I, D, F, arb Feed Forward, etc) to 0
Ensure the mechanism is safe to actuate. This process will spin the motor, potentially at unexpected speeds and in unexpected directions
Check the direction of the motor, and invert it if needed so that positive output is in the desired direction
Set P to a very small number, relative to the units you are working in
Set a target for the motor to move to. Ensure this is within the range of your mechanism.
Gradually increase P until you see movement, by small increments
Once you see motion, increase P by small increments until it reaches the target at the desired speed
If you see oscillation, decrease P or begin to increment D by a small amount
Continue to adjust these parameters until the motion is quick, precise, and repeatable
The SPARK Flex and SPARK MAX do not have any support for more complex physics-based Feed Forward models, but do include a means of applying an arbitrary voltage which can be calculated in your team code and passed to the API.
It can be applied with the setpoint as seen below:
Closed-loop control in REVLib is accessed through the SPARK's PID Controller object. This object is specific to each motor and tracks the PID gains and closed-loop constants. It also contains all the methods needed to configure and control your motor. It can be accessed as shown below:
API Docs: ,
API Docs: ,
To drive your motor in a Closed-Loop control mode, address the PID Controller object and give it a set point (a target in whatever units are required by your control mode: , , or ) and a control mode as shown below:
This will run your motor in the provided mode, but it won't move until you've configured the
API Docs: ,
API Docs: ,
The provided example above runs the motor in position control mode, which is just a conventional PID loop reading the motor's current position from the configured encoder and taking a setpoint in rotations.
Use caution when running motors in Closed-Loop modes, as they may move very quickly and unexpectedly if improperly tuned.
To run a PID loop, several constants are required. For a more advanced controller, even more parameters need set and tuned.
The SPARK MAX and SPARK Flex each have 4 closed-loop slots, each with their own set of constants. These slots are numbered 0-3. You can pass the slot number as an argument to each of the parameter setting methods. When applying the setpoint, pass the slot number and the motor controller will switch to the appropriate config.
These gains can be configured on the SparkPIDController
object as shown below:
The SPARK family of motor controllers also offer an F term, which is a velocity feed-forward. This is unique to each type of motor, and can be calculated by taking the reciprocal of the motor's velocity constant (Kv), in other words 1/Kv.
For a NEO Vortex, this value is 1/565. This is only needed when running a velocity-based control loop (velocity mode, Smart Motion, and Smart Velocity). The F parameter can be set as seen below:
The F parameter should only be set when using a velocity-based PID controller, and should be set to zero otherwise to avoid unwanted behavior.
There are another set of parameters available for the SparkPIDController
, which only apply to Smart Motion and Smart Velocity. These allow you to configure and tune the motion profiles generated by Smart Motion. They can be set as seen below:
Maximum Velocity is in units of Revolutions per Minute (RPM)
Maximum Acceleration is in units of RPM per Second (RPM/s)
These parameters have no effect on modes other than Smart Motion and Smart Velocity
Now that the device is wired, and the connections carefully checked, power on the robot. You should see the SPARK MAX slowly blinking its for a new device the color will be Magenta. If the LED is dark, or you see a different blink pattern, refer to the guide for troubleshooting.
If you are using a brushed motor, you may see a sensor error. This is expected until you configure the device to accept a brushed motor in the following steps.
Plug in the USB cable and start the REV Hardware Client. Select the SPARK MAX from the Connected Hardware
If you can not see the SPARK MAX, make sure that the SPARK MAX is not being used by another application . Then unplug the SPARK MAX from the computer and plug it back in.
Before any parameters can be changed, you must first assign a unique CAN ID to the device. This can be any number between 1 and 63. After setting a unique CAN ID, the user interface will refresh and allow you to change other parameters.
Eventually you may set up a CAN network on your test bench or robot. Be sure each device on the network has a unique CAN ID. It is helpful to label each device with its ID number to aid in troubleshooting.
If you are using a NEO or NEO 550, verify that the motor type is set to REV NEO Brushless, Sensor Type is Hall Effect, and the LED is blinking Magenta or Cyan.
If you see a Sensor Fault blink code, make sure the encoder cable is plugged in completely.
If you are running brushed motor, set the motor type to Brushed, sensor type as No Sensor, and verify that the LED is blinking Yellow or Blue.
There are two ways to protect your robot’s motors from electrical damage in high-current situations: Circuit Breakers and the SPARK MAX’s Smart Current Limit Setting. To protect your motors from currents that are too high, it is a best practice to limit your current both with the SPARK MAX’s Smart Current Limit and an appropriately rated circuit breaker.
Circuit breakers, while an extremely important part of a robot's wiring and safety, are only designed to trip at a specific temperature, after a set amount of time, to protect the electrical system from fire or other electrical hazards. Due to this, we recommend setting a Smart Current Limit to protect your motors from damage due to high currents.
The SPARK MAX Motor Controller includes a Smart Current Limit feature that can adjust the applied output to the motor to maintain a constant phase current.
Remember that some settings, like Smart Current Limit, must be burned to flash via code or the Hardware Client in order to be retained through a power cycle of the SPARK MAX.
Your ideal current limit may vary based on your specific application, but these values can be used as a starting point to reduce the chance of an overload on your motor as you begin tuning your specific mechanism's Smart Current Limit.
Warning: Setting current limits outside of the suggested ranges listed above may cause unintended overload and severe damage to components that are not covered by warranty.
The settings must be saved for the SPARK MAX to remember its new configuration through a power cycle. To do this, press the Burn Flash button at the bottom of the page. It will take a few seconds to save, indicated by the loading symbol on the button.
Any settings saved this way will be remembered when the device is powered back on. You can always restore the factory defaults if you need to reset the device.
Before running any motor, make sure all components are in a safe state, that the motor is secured, and that anyone nearby is aware. FRC motors are very powerful and can quickly cause damage to people and property.
Keep the CAN cable disconnected throughout the test. For safety reasons, the REV Hardware Client will not run the motor if the roboRIO is connected. If the roboRIO was connected, power cycle the SPARK MAX.
To spin the motor, go to the Run tab, keep all of the default settings and press Run Motor. The setpoint is 0 by default, meaning that the motor is being commanded to idle (0% power). When you press Run you should see the LED go from slow blinking to solid, indicating that the motor is idling.
Slowly ramp the setpoint slider up. The motor should start to spin and you should see a green blink pattern proportional to the speed you have set to the motor. Slowly ramp the slider down. The motor should spin in reverse, and you should see a red blink pattern proportional to the speed you have set to the motor.
The SPARK MAX can accept data from encoders through both the Encoder Port and the Data Port on the top of the motor controller. Encoders have a different method of connecting to the SPARK MAX that depends on what motor you are using and what type of encoder it is. When preparing your encoders, be sure to set up your SPARK MAX correctly for the type of devices you are using.
Incremental encoders measure a change in position as a mechanism rotates while absolute encoders will report an exact position at any time, including at startup. A common analogy to help with knowing the difference is that incremental encoders are like a stopwatch that measures a change in time and absolute encoders are like a clock where you can know exactly what time it is.
With Versions 1.6.0 and newer, absolute encoders are compatible with the SPARK MAX Data Port.
To connect an encoder to your SPARK MAX, start by identifying what type of encoder you are using. Below is a flowchart to help generally identify the method you should use.
Running a brushless motor, like the NEO and NEO 550, without the integrated encoder plugged into the SPARK MAX's Encoder Port can damage your motor.
Absolute encoders will work with the default pinout of the SPARK MAX Data Port if the latest firmware has been installed. When using an absolute or duty cycle encoder it is recommended to use one of the following methods to connect your encoder to the SPARK MAX.
Use the Data Port Pinout to match the signals from your encoder
Absolute Encoders are only supported through the SPARK MAX Data Port at this time
Easily connect a Through Bore Encoder to your SPARK MAX with an Absolute Encoder Adapter and a 6-Pin JST PH Cable.
For encoders that need a custom wiring harness, you can use the following solder pads on a SPARK MAX Data Port Breakout Board with any generic absolute encoder.
If you are using an Incremental Encoder with a brushed motor you can plug your encoder into the SPARK MAX's front Encoder Port directly. If you are driving a NEO or NEO 550 brushless motor with your SPARK MAX, you will need to configure Alternate Encoder Mode to accommodate the additional encoder input from the Data Port. When using an incremental or quadrature encoder it is recommended to use one of the following methods to connect your encoder to the SPARK MAX.
With brushed motor: Connect to the Encoder Port
Other Incremental Encoder
Easily connect a Through Bore Encoder to your SPARK MAX with an Alternate Encoder Adapter and a 6-Pin JST PH Cable. When using the Alternate Encoder Adapter make sure the switch is set to "index".
A Through Bore Encoder, or any incremental encoder with the same pinout, can be plugged in directly to the SPARK MAX's Encoder Port.
For encoders that need a custom wiring harness, you can use the following solder pads on a SPARK MAX Data Port Breakout Board with any generic incremental encoder.
Receiving both Incremental and Absolute encoder feedback from a single encoder through the SPARK MAX directly is not currently supported. To do this you will need to wire the encoder directly to your roboRIO or robot controller.
Currently, Limit Switch inputs are only supported when using an absolute encoder or an incremental encoder run through the SPARK MAX's Encoder port. Please note, the limit switch inputs cannot be used at the same time as an Alternate Encoder Mode. The limit switch pins are repurposed for the alternate encoder and are thus disabled.
NEO ()
NEO 550 ()
Closed-Loop Control is a staple of complex FRC mechanism programming. WPILib offers to allow teams to run PID loops on the roboRIO, but they require setup in your team's code and can only update every 20ms.
Additionally, an arbitrary feedforward signal is added to the output of the control loop after all calculations are done. The units for this signal can be selected as either voltage or duty cycle. This feature allows more advanced feedforward calculations to be performed by the controller. More details about the types of feedforward calculations can be found on the . Using the voltage units for arbitrary feedforward allows the user to send the calculated feedforward voltage from the WPILib API directly to the control loop.
Several guides for PID tuning are available, such as . It may be useful to consult multiple, especially those available that reference your specific mechanism.
Any method for PID tuning will start with the same concept, however, regardless of mechanism. Before you can tune your mechanism, you should setup a graph of the setpoint and that measured value, either through the or a similar utility. This will allow you to analyze each test and properly evaluate the changes to make.
If you are operating in Velocity Control Mode (or a velocity-based control mode), set F to the motor's value as discussed in
API Docs: ,
API Docs: ,
WPILib offers
A PID controller has 3 core parameters or gains. For more information on these gains and how to tune them, see .
API Docs:
API Docs:
The Kv values for the NEO family of Brushless Motors are documented within each motor's specifications table: , ,
API Docs:
API Docs:
API Docs:
API Docs:
Out of the box, the SPARK MAX's Smart Current Limit default setting is 80A for any motor that you use. We recommend utilizing our locked-rotor testing data or the table below to decide what to set your Smart Current Limit to for your robot: Locked-Rotor Testing for the and .
If you are unable to spin the motor, visit our .
Check out our documentation of the
: Connect with
Other Absolute Encoder: Connect with
Check out our documentation of the
or Internal Encoder: MUST be connected to the SPARK MAX Encoder Port
With brushless motor: Connect with . You will need to configure Alternate Encoder Mode.
With a brushless motor: Connect the encoder with . Use the Alternate Encoder Mode Data Port Pinout to match the signals from your encoder. You will need to configure Alternate Encoder Mode.
With brushed motor: Connect to the Encoder Port with a using the Encoder Port pinout
With a brushed motor: Connect the encoder with or a similar custom cable. Use the Data Port Pinout to match the signals from your encoder.
NEO (REV-21-1650)
40A - 60A
NEO 550 (REV-21-1651)
20A - 40A
Beginning in 2022, The SPARK MAX API and the Color Sensor V3 API have been merged into a unified library called REVLib. You need to make sure that you have uninstalled those old libraries before you install REVLib.
Ensure that the old SPARK MAX API and/or Color Sensor V3 API packages are uninstalled.
Opening a project that used the old APIs should work fine. When it is loading, it may show that there are some missing VIs, but eventually LabVIEW should find the new VIs automatically.
Open your robot project in VSCode.
Click on the WPI icon in the corner to open the WPI Command Pallet.
Select Manage Vendor Libraries.
Select Manage Current Libraries.
Check the REVRobotics
and/or REVColorSensorV3
items (whichever ones are present)
Click the OK
button to uninstall them.
Install REVLib for C++ and Java.
Many teams have been using various CTRE motor controllers such as the Talon SRX and Talon SPX, and have concerns about porting software between platforms. Fortunately the feature set and code required is similar between the two, and porting from one to the other is easy. Below shows the common tasks and the changes required to convert from the code for CTRE Phoenix devices to the SPARK MAX.
This is a brushed motor feature and not needed for using brushless motors with SPARK MAX
For this example velocity is set at 500 RPM
This example runs a position control loop for 10 rotations.
This example assumes a 4" wheel on a 15:1 reduction
This example assumes a 4" wheel on a 15:1 reduction to move 2 feet (24 inches).
This is a brushed motor feature and not needed for using brushless motors with SPARK MAX.
For this example velocity is set at 500 RPM
This example runs a position control loop for 10 rotations.
This example assumes a 4" wheel on a 15:1 reduction
This example assumes a 4" wheel on a 15:1 reduction to move 2 feet (24 inches).
This is legacy documentation for our discontinued SPARK MAX Client Software. If you are interested in running a SPARK MAX via a computer, please see our newer documentation: Getting Started with the REV Hardware Client.
If this is the first time installing the SPARK MAX Client or connecting a SPARK MAX in Recovery Mode, you may see an error the first time you try to update firmware on your computer. The DFU driver is one of two drivers installed by the Client and is used for updating firmware. It may not install completely until a SPARK MAX in DFU Mode (Recovery Mode) is plugged into the computer.
If you see an error during your first firmware update, please do the following:
Close the Client application.
Unplug the SPARK MAX from the computer.
Plug the SPARK MAX back into the computer.
Open the Client application.
Alternatively, you can preemptively finalize the DFU driver installation by following the Recovery Mode steps before using the Client for the first time.
We are aware of this issue and will release a fix in a future update of the SPARK MAX Client.
As we get feedback from users and identify exact causes for issues, please look back here for troubleshooting help. If you are running into issues running the SPARK MAX Client try the following BEFORE contacting support@revrobotics.com:
Try running the SPARK MAX Client as an Administrator
Make sure that Windows is fully up-to-date. Some computers have Windows Update disabled and need to be updated manually.
Check the Device Manager and verify that the SPARK MAX shows up as one of the following two devices with no caution symbols:
Normal operating mode: Device Manager -> Ports (COM & LPT) -> USB Serial Device (COMx)
Recovery mode: Device Manager -> Universal Serial Bus Controllers -> STM Device in DFU Mode
If the device shows up with errors or as STM32 BOOTLOADER, try installing the DFU drivers separately.
It is recommended to keep your SPARK MAX up-to-date with the latest firmware. The REV Hardware Client application will automatically download the latest firmware, but you can also download the firmware manually below:
This firmware will not work with SPARK MAX beta hardware units distributed by REV to the SPARK MAX Beta testers. It is only compatible with units received after 12/20/2018.
Improves filtering of invalid PWM signals
Previously, noise on the signal wires could be occasionally be erroneously interpreted as a PWM signal, causing the motor to spin unexpectedly
Moves the IAccum value to periodic status frame 7
Periodic status frame 7 is new to this release, and by default is sent every 250ms.
Allows changing the CAN ID of a SPARK MAX connected directly via USB without affecting other SPARK devices on the CAN bus with the same CAN ID
Makes changes towards improving the reliability of saving and persisting parameters
Fixes alternate encoder position accuracy
Fixes the main quadrature encoder position jumping in brushed mode
Fixes issue where changing the inversion mode of the duty cycle absolute encoder with a zero offset specified would cause the physical zero position to change
Fixes critical issue where new parameters introduced in 1.6.0 were not being burned to flash correctly
Fixes issue where new parameters were not being read back correctly despite being set correctly
Fixes duty cycle offset to match the inverted setting
Fixes parameters being NaN after updating to 1.6.0
Fixes burn flash command response
Adds new parameters for configuring hall sensor velocity measurement
Adds support for duty cycle absolute encoders
Adds new parameters to enable and configure position PID rollover
Fixes issue with the kDataPortConfig parameter not enabling Alternate Encoder Mode on a power cycle after it has been configured and saved to flash.
Improves Gate Driver Fault recovery.
Improvements to BLDC commutation timing.
Most noticeable at high RPMs only achievable by the NEO 550.
Fixes rare case where the SPARK MAX Status LED shows normal driving but no actual output is occurring until a reboot of the controller.
Adds a unique hash key to the firmware. This key is a hashed value based on the unique 96-bit device ID guaranteed to be unique for every STM32 device. The hash value itself is 32-bits to make transmission/reception and on-board comparison easier. It is unlikely for a key collision especially since most buses have only a small number of devices.
Adds ID Query command to have all devices which match the CAN ID sent to return their unique hash key. This is typically used to identify all devices with CAN ID 0 but can be used to identify devices with conflicting CAN IDs.
Adds ID Assign command, which sends a unique hash key and a CAN ID, which is received by any device whose CAN ID matches the ID field. The device whose unique hash matches has their own CAN ID set to the desired value. This is for initial or automatic provisioning, or to re-address devices with the same CAN ID.
Adds identify command which flashes the LED blue/magenta. This command uses the CAN ID, or the unique hash if CAN ID = 0.
Complete overhaul of USB interface, creating a generic USB-to-CAN driver connection to act as the bridge to the interface.
Adds Alternate Encoder Mode for BLDC external encoder support.
Adds device manufacturing info to firmware frame.
Adds retry frame to CAN bootloader if there is an issue.
Fixes issue where creating a CANSparkMax object would cause the SensorType parameter to be set to NoSensor.
Adds non-competition heartbeat command when not used with a roboRIO.
Adds Raspbian support using official WPILib tools.
Adds locking mechanism to prevent simultaneous USB and CAN commands.
Proportional blink codes now match inversion settings (i.e. positive input is always green, and negative input is always red).
Limit switch and soft limits now follow inversion settings.
Motor controller inversion now in the firmware instead of the API.
Adds a configurable range for absolute feedback devices (currently only applicable to an absolute mode analog sensor), which also prevents users from setting a setpoint out of range.
Adds ability to use both absolute and relative analog sensors as feedback devices
Adds filtering for Analog sensor with settings for velocity moving average filter
Adds ability to configure how errors are tracked and handled by the user.
Calls can be automatically registered and tracked, with any errors displayed to the DriverStation or users can use the GetLastError() after calls to determine if an error has been thrown. This is done by changing the error timeout through SetCANTimeout(), where a timeout of 0 means that the calls are non-blocking, and errors are checked in a separate thread and sent through to the driver station.
Other minor improvements and bug fixes.
Ability to configure the feedback device for the PIDController.
Addition of CANAnalog which will function as a possible feedback device.
Added API for using encoders with brushed DC motors.
Adds API to enable and set soft limits.
All control modes now reset integrator on limit switch activation for long as the limit switch is held.
Smart Motion now honors acceleration rate after limit switch changes from triggered to not triggered.
Fixes issue where sticky faults can be cleared incorrectly when a new fault is set and the old fault is no longer present.
Adds status 3 periodic frame for analog sensor.
Other minor improvements and bug fixes.
Adds initial CAN bootloading functionality.
Requires continuous power during update and requires USB recovery if the update fails after erasing the flash (i.e. power is lost during update).
This is not yet integrated into a formal tool, but is exposed in the API. Future versions will allow recovery over CAN.
Fix to bus voltage measurement, previous version reported a lower value.
Additional accuracy improvements to all ADC measurements.
Adds additional filtering to bus voltage.
Fix for Follow settings not being reapplied after power cycle.
Adds ability to change units for arbFF between voltage and percent bus voltage (or percent compensated voltage).
Fixes issue that causes a Gate Driver Fault if the NEO is spinning at a certain speed during power up.
e.g. while still moving after a breaker trips for more than ~1.4s after breaker recovery.
Fixes issue where configuration data can be corrupted under a unique set of conditions, including loss of power while configuration settings are being saved to flash memory.
Issue symptoms: Controller cannot be controlled by a normal address and would report a firmware version of 0.0.0 in the Client, even after a successful firmware update. Updating a controller that is in this state to 1.1.33 will recover the controller.
Adds new Smart Velocity mode - uses same constrains as the Smart Motion mode but outputs velocity instead of position. This is not a motion profiling mode, but rather provides acceleration limiting as opposed to simple ramp rates.
Improvements to heartbeat implementation.
CAN ID of 0 now considered 'unconfigured' and will not be enabled.
Changes the default output range for all PID slots to be [-1,1] instead of [0,0]
Changes setpoint commands to 'stick' instead of relying on periodic frames from the controller.
Follow mode can now persists through a power-cycle.
Periodic Status 2 (position data) frame rate default changed from 50ms to 20ms.
Watchdog changed to 220ms.
Proportional blink codes while driving now have a minimum blink rate (minimum is same as 10% applied output blink rate).
Fault flag 'over voltage' replaced with 'IWDT Reset'.
Velocity and Position conversion factors are now used for all internal PID calculations.
This firmware update requires an API update. Please see the API Information section for the latest updates. The table below outlines the compatibility between firmware versions and API versions:
Adds new Smart Motion mode utilizing trapezoidal motion profiling
Improvements to velocity decoding for low speeds and associated PID control loops requiring control at low speeds
Improvements to gate driver fault handling
Adds voltage compensation mode
Adds ability to set the stored sensor position
Adds ability to set the maximum PID integral accumulator value to prevent integral windup
Adds ability to set the PID I accumulator value
Adds filter function to PID derivative value
Adds closed-loop current control
Adds closed-loop ramp rate separate from open-loop
Adds ability to follow Phoenix 4.11 motor controllers
Note: This feature depends on the firmware of the Phoenix controllers, and is not controlled by REV. We will do our best to build this functionality, but this is not an officially supported feature.
Adds ability to set a unit conversion for both velocity and position units
Adds ability to reset to factory defaults
Improvements to smart current limits
Improvements to current data sent over CAN
Improvements to internal settings table implementation
Calling the constructor no longer resets the encoder count. This must be done manually by running CANEncoder.setPosition()
Fixes PWM control issue introduced by version 1.0.384.
Fixes GetPosition() randomly returning 0.
Fixes momentary velocity spike when accelerating from 0 speed.
Fixes issue related to rapid control mode switching by the user.
Fixes issue related to extreme low voltage CAN bus operation.
Adds conversion for motor temperature.
Improvement to "Has Reset" flag.
Improvements to brownout fault indicator.
Improvements to brownout behavior.
When updating the SPARK MAX Firmware we recommend using the REV Hardware Client and the latest firmware file listed in the firmware changelog. When updating normally, key configuration parameters, such as the CAN ID, will be preserved through an update, preventing the need to reconfigure every time you update. In some rare instances it may be beneficial to completely reinstall the factory firmware and reset all configuration parameters. Factory images can be found below:
It is recommended to keep your SPARK Flex up-to-date with the latest firmware. The REV Hardware Client will automatically download the latest firmware, but you can also download the firmware manually below:
If notified by the REV Hardware Client, you may need to install your SPARK Flex Motor Controller's first firmware update via Recovery Mode.
Fixes bug in velocity calculation when changing the encoder average depth
Fixes issue causing motor EEPROM to occasionally reload fully after disabling the motor, causing brief dropout of status frames
Adds parameters for status frame periods
Performs contextual validation on the sensor type parameter
Always keeps the hall sensor active when in brushless mode, in addition to the specified sensor type
Recalculates the hall angle more frequently to prevent lockup
Fixes issue where an invalid sensor type for a given motor type can cause a sensor fault
Improves handling of errors on the CAN bus
Fixes incorrect EEPROM faults appearing
Reduces boot time
Properly handles the case where a CAN device sends a payload longer than 8 bytes
Improves internal watchdog
Fixes issue where SPARK Flex constantly disables itself while running when certain third-party commands are being sent to the CAN bus
Fixes position data inaccuracy when the position conversion factor is not 1
Improves filtering of invalid PWM signals
Previously, noise on the signal wires could be occasionally be erroneously interpreted as a PWM signal, causing the motor to spin unexpectedly
Fixes issue where CAN errors would cause the device to switch between brake mode and coast mode, resulting in a clicking sound if you manually turned the motor
Moves the IAccum value to periodic status frame 7
Periodic status frame 7 is new to this release, and by default is sent every 250ms.
Adds Orange/Green blink code to indicate temperature cutoff
Refuses to run in brushed mode when connected to a NEO Vortex
Improves the precision of the main encoder
Previously, the higher the position value was, the less precise the value would be
For the NEO Vortex's internal encoder, this change starts making a difference after only ~1,000 rotations
Requires REVLib 2024.2.0 or later or REV Hardware Client 1.6.2 or later to take advantage of the additional precision
Allows changing the CAN ID of a SPARK Flex connected directly via USB without affecting other SPARK devices on the CAN bus with the same CAN ID
Makes changes towards improving the reliability of saving and persisting parameters
Fixes analog sensor values when it is configured to be inverted
Fixes setting the NEO encoder's position to values other than zero
Fixes the NEO encoder's position when the motor is inverted
Adds support for updating the firmware via CAN and USB (without Recovery Mode)
Setting the NEO encoder's position always resets the position to 0, regardless of the specified value
When the analog sensor is configured to be inverted, its reported values will be incorrect
Initial version with intent to support equivalent features to SPARK MAX
Features requiring the SPARK Flex Dock (coming soon) are not yet supported, e.g. brushed motor driving and NEO/NEO550 brushless motor driving
Alternate Encoder Mode is not necessary for SPARK Flex, therefore it is replaced by the External Encoder Data Port feature:
Can be used simultaneously with the internal encoders in NEO class motors
Can be used simultaneously with an absolute encoder and limit switches
Virtually no RPM limit
No special configuration
We are currently in the process of updating our Code Examples! While the links below still work, please see our new repository for examples compatible with REVLib 2025: REVLib Code Examples
Alternate encoder
Analog Feedback Device
-
Arcade Drive With CAN
-
Arcade Drive With PWM
-
Bus Measurements
Encoder Feedback Device
-
Get and Set Parameters
Limit Switch
MAXSwerve Template
-
Mecanum Drive with CAN
-
-
Motor Follower
-
-
Position Closed Loop Control
Read Encoder Values
Smart Motion Example
-
Soft Limits
-
Tank Drive With CAN
-
-
Velocity Closed Loop Control
Anderson Powerpole connectors are a popular choice in the FIRST community for electrical connections. Ensuring that these connectors are crimped properly and the contact is fully inserted into the housing is key to having a good electrical connection.
Anderson Powerpole Connectors consist of two major parts: the housing and contact. There are a number of different housings and contacts depending on the power requirements of the system. The most common housing and contact used with the SPARK MAX is the 1327 series housing paired with the 45 amp contacts.
The housings for the connectors are genderless allowing all powerpole connectors to mate with themselves. The 1327 series housing can utilize contacts rated for 15-45 amps. Housings come in a variety of colors allowing for easy pairings with the wire color.
Dovetails on each housing allow them to slide together. Do not attempt to snap the housings together as they can break. After the housings are mated together adding a roll pin prevents the housings from become detached during operation. Each housing is fitted with a spring to retain the contacts after they are inserted
1327 series housings can use contacts rated for between 15 and 45 amps. The 45 amp contacts are used with the SPARK MAX. When striping wire for the contact, make sure the stripped wire is the length of the large flap. No wire should extend past the large flap into the gap between the large and small flaps on the contact. Utilize a proper crimping tool when crimping on the connector.
Having too much wire exposed can cause issues with proper placement of the contact in the housing. This can lead to bad connections. If the contacts are not fully inserted into the housing the contact connection issues can arise. The images above are examples of good crimps with the proper amount of wire inserted into the contact.
Having improper placement of the contact in the housing can lead to intermittent brownouts of the SPARK MAX, the contact dislodging from the housing, or have cause problems with one or more of the phases of a brushless motor.
For more information on powerpole assembly see the Powerwerx instructions.
The Original SPARK Motor Controller has been discontinued and will not be re-stocked.
The SPARK Motor Controller (REV-11-1200) is a 12V 60A PWM-controlled brushed DC motor controller designed for FIRST Robotics Competition robots. It features 60A continuous current with passive cooling, bi-directional limit switch inputs for smart mechanism control, an RGB LED status indicator, and a button-activated brake/coast mode.
Passive cooling
No fans required
Synchronous rectification
Reduces heat generation
Limit switch inputs
Stops forward and/or reverse motion automatically
No programming required
Compatible with normally open (NO) limit switches
Calibration
Factory calibrated to 1ms – 2ms input signal
User calibratable
Integrated cable retention for PWM port
Clamping screw terminals
Better contact area and retention
RGB status LED
Detailed mode and operation feedback
Input Voltage (Nominal)
12 V
Continuous Current
60 A
Peak Current (2 second surge)
100 A
Input Pulse Width Range (Nominal)
1ms-2ms
Input Resolution
1μs
Input Deadband
40μs
Output Frequency
15.625 kHz
Output Voltage Range
0 V - ±Vin
Maximum Output Voltage Resolution
0.001 x Vin
Dimensions
2.860in x 1.875in x 0.868in
Weight
74g or 2.61oz
The Smart Velocity control mode utilizes the Smart Motion parameters to improve upon velocity control. Honoring the maximum acceleration, Smart Velocity will speed up and slow down your flywheel or rotary mechanism in a controlled way, reducing power draw and increasing consistency.
It is called as seen below:
API Docs: setReference
API Reference: SetReference
Smart Velocity Control mode will turn your motor continuously. Be sure your mechanism does not have any hard limits for rotation.
The SPARK MAX does not need to be configured to a specific mode to accept input from an absolute encoder as long as the encoder is connected to the SPARK MAX Data Port.
Encoder Output Voltage Level
5.0V
Encoder Type Supported
Duty Cycle or PWM
Absolute encoder input is supported by SPARK MAX Firmware Version 1.6.0 and newer,
Connecting an absolute encoder that is not a Through Bore Encoder will likely require a custom wiring harness or SPARK MAX Data Port Breakout Board to connect the necessary encoder power, ground, and signals to the SPARK MAX Data Port. When using an Absolute Encoder use the following pinout information for the Data Port:
Connector Pin
Pin Type
Pin Function
1
Power
+3.3V
2
Power
+5V
3
Analog
Analog Input
4
Digital
Forward Limit Switch Input
5
Digital
Encoder B
6
Digital
Absolute/PWM Input
7
Digital
Encoder A
8
Digital
Reverse Limit Switch Input
9
Digital
Encoder C / Index
10
Ground
Ground
Before using the MAXSwerve Java or C++ Templates, be sure to calibrate your swerve modules using the REV Hardware Client by following the steps below:
Verify you have completely assembled your MAXSwerve Module and have the Steering Motor’s (NEO 550) SPARK MAX connected to the MAXSwerve’s Through Bore Encoder with an Absolute Encoder Adapter.
Install and Open the Latest version of the REV Hardware Client onto a Windows computer
Connect the Steering Motor’s (NEO 550) SPARK MAX directly to your computer via the included USB-C to USB-A cable
Select the Steering SPARK MAX and navigate to the Update Tab to verify your SPARK MAX has the latest SPARK MAX Firmware (the latest version may be different than what is shown in the image below)
Select The Steering SPARK MAX in the sidebar, and select the AbsoluteEncoder Tab
Steps 6-9 are also included in the REV Hardware Client AbsoluteEncoder Tab under the “MAXSwerve Module Calibration” drop-down shown below
Put the Calibration Tool on the MAXSwerve module.
The Calibration Tool needs to be placed on the MAXSwerve module with the lip facing the module.
The MAXSwerve Wheel will only fit in one orientation because of the placement of the wheel's bevel gear. The Calibration tool is not symmetrical, so you will need to align the bevel gear with the side of the cutout indicated with the orange dot in this image.
Rotate the wheel along with the Calibration Tool until the tool's lip firmly drops into place around the MAXSwerve module's edges. Once this happens, the wheel and Calibration Tool will be unable to rotate freely until the tool's lip has been lifted above the edges of the module.
Ensure that the Direction parameter is set to Inverted in the Duty Cycle Absolute Encoder Settings section above.
Click the Set Zero Offset button to calibrate the zero-position of the absolute encoder to this position.
Start driving your MAXSwerve Modules by loading our code templates onto your robot!
This is legacy documentation for our discontinued SPARK MAX Client Software. If you are interested in running a SPARK MAX via a computer, please see our newer documentation: Getting Started with the REV Hardware Client.
Update, configure, and test your SPARK MAX Motor Controller with the SPARK MAX Client application.
For instructions on how to access this legacy software, please email support@revrobotics.com
The SPARK MAX Client will not work with SPARK MAX beta units distributed by REV to the SPARK MAX beta testers. It is only compatible with units received after 12/21/2018.
Windows 10 64-bit
Windows 7 64-bit might work but it is not supported.
Internet connection for automatic updates
Download the SPARK MAX Client installer above.
Run the installer. Windows may require approval to install the application.
During the installation process, separate driver installation windows may appear. Some driver installations may fail if you already have the driver installed from a previously installed Client, this is expected.
Once installed, run the application. If prompted, be sure to grant network access. Without network access, the client software won't be able to download the latest SPARK MAX firmware and client updates.
This is legacy documentation for our discontinued SPARK MAX Client Software. If you are interested in running a SPARK MAX via a computer, please see our newer documentation: Getting Started with the REV Hardware Client.
Follow the steps below to update the firmware on your SPARK MAX:
Connect your SPARK MAX Motor Controller to your computer with a USB-C cable.
Open the REV SPARK MAX Client application.
The Client should automatically scan and connect to your SPARK MAX. If your SPARK MAX is running outdated firmware, you will be notified with a pop-up window like the one pictured below:
If your SPARK MAX is running firmware older than 1.4.0, you may not see a pop-up and will need to proceed directly to the Network tab and click Scan Bus manually.
Click Open Network Tab & Scan Bus and proceed to the next step.
Your SPARK MAX should now be listed in the device list. Click the checkbox next to the SPARK MAX you wish to update, and click Load Firmware.
If your SPARK MAX is listed and you are unable to click the checkbox next to it, you must put your SPARK MAX into Recovery Mode.
Select the latest firmware file in the firmware directory that the client created on startup. If there isn't a firmware directory, you can also navigate to a file that was downloaded manually. Click Open once the appropriate firmware file is selected:
Click Yes to confirm the update.
Once complete, the Client will rescan the bus and display the updated controllers.
SPARK MAX Firmware Version 1.5.0 includes a USB-to-CAN Bridge feature that allows a single USB-connected SPARK MAX to act as a bridge to the entire CAN bus it is connected to. This allows for configuration and simultaneous updating of multiple SPARK MAX controllers without having to connect to each one individually. Using this feature requires the following:
A USB-connected SPARK MAX that is updated to firmware version 1.5.0 or newer to act as the Bridge.
Other SPARK MAXs connected on the CAN bus must be individually updated to firmware version 1.4.0 before they are able to receive mass-updates from the Bridging SPARK MAX.
Once these requirements are satisfied, navigate to the Network tab, select the controllers you wish to update, and follow the same firmware update procedure described above starting at Step 4.
When complete, the Client will display the number of successfully updated controllers.
If a controller fails to update it is usually due to the process being interrupted by a bad power or CAN connection. Severe interruptions can cause the firmware update to be corrupted. A corrupted controller can no longer be updated over the USB-to-CAN Bridge, however, it can be recovered by connecting to the controller directly over USB and putting it in Recovery Mode.
This is legacy documentation for our discontinued SPARK MAX Client Software. If you are interested in running a SPARK MAX via a computer, please see our newer documentation: Getting Started with the REV Hardware Client.
The Navigation bar is visible on all tabs of the SPARK MAX Client and allows you to select with SPARK MAX the Client is connected to.
Identify Device: The status LED of a selected device will blink. This is helpful when troubleshooting or configuring multiple devices.
Device Selection: See each SPARK MAX connected to the SPARK MAX Client. This includes other devices connected via CAN if running firmware 1.4.0 or later.
Rescan: Looks for additional SPARK MAX devices connected to the SPARK MAX Client. This includes other devices connect via CAN if running firmware 1.4.0 or later.
Connect/Disconnect: After selecting a device connecting to the device pulls all the configuration parameters set on the device.
Tabs: Select one of the five tabs to gain access to configure, update, and run SPARK MAX.
The Basic Tab is used to set the most common parameters for the SPARK MAX
Configurations: This drop down allows you to select pre-existing configurations store on the Windows machine running the SPARK MAX Client or to pull the existing parameters stored on in RAM on the SPARK MAX. This is helpful when configuring multiple motor controllers to the same settings.
CAN ID: This assigns a SPARK MAX a CAN ID for identification over the CAN BUS. Any configured SPARK MAX must have a CAN ID.
Configured Parameters: Change the motor type, sensor type, idle mode behavior, and more.
The Advanced Tab allows for changing all configurable parameters of the SPARK MAX without needing to set them in code.
Search Parameters: Allows for easy look up of a specific parameter for editing.
Parameter Table: Select the arrow to show all configurable parameters within a specific group. For more information on each parameter type see Configuration Parameters.
The Run Tab allows for the SPARK MAX to operate over USB or a USB to CAN Bridge without the need for a full control system. This is helpful for testing mechanisms and tuning their control loops.
Bar Select: Select from either run, parameters, or signals to provide information and feedback when operating SPARK MAX.
Signal Chart: Shows any added signals in graph form when running a SPARK MAX. This is helpful when tuning control loops.
PIDF: Update PIDF parameters on the fly to tune control loops on the SPARK MAX.
Run: Choose setpoints to run a motor connected to a SPARK MAX using various modes, including position, velocity, and duty cycle.
The three icons for bar select change the bottom third of the Run Tab for configuration. Once signals and other parameters are configured selecting the run bar icon will allow for running of a motor with the SPARK MAX Client.
The Network Tab shows all connected devices via USB and the USB to CAN interface. From the Network Tab each device can be identified and firmware updated.
Device Select: Select a device to update firmware.
Load Firmware: Select what firmware to update onto selected devices.
For more information on the firmware updating process see Updating Device Firmware for both single device and multiple device updates.
This is legacy documentation for our discontinued SPARK MAX Client Software. If you are interested in running a SPARK MAX via a computer, please see our newer documentation:
When updating the firmware on the SPARK MAX, it is possible for the process to be interrupted or for the firmware to be corrupted by a bad download. In this state, the Status LED will be dark and the SPARK MAX will fail to operate. SPARK MAX has a built-in recovery mode that can force it to accept new firmware even if the controller seems to be bricked. The following procedure requires a small tool, like a straightened paper clip, to press the Mode Button, a USB C cable, and a computer with the installed:
With the SPARK MAX powered off completely, press and hold the Mode Button.
While still holding the Mode Button, connect the SPARK MAX to the computer using the USB cable. The Status LED will not illuminate, this is expected.
Wait a few seconds for the computer to recognize the connected device, then release the Mode Button.
Open the SPARK MAX Client Application. The SPARK MAX will remain dark and it will not connect to the Client, this is expected.
Navigate to the Network tab and click the Rescan arrows at the top of the window.
The SPARK MAX will be listed under Devices in Recovery Mode. Click the checkbox next to the device.
Click the Load Firmware button.
Select the latest firmware file and click Open.
The firmware should load successfully and the SPARK MAX will now connect to the Client.