Getting started¶
Where to buy¶
You can buy a STEPFOC starter kit or a single STEPFOC driver in the Source Robotics shop.
Recommended hardware¶
- Diametrically magnetized magnet
- Stepper motor; see the tested motors
- Programming adapter
- Serial adapter
- CAN adapter
- Thermistor
- CAN wires and power wires
Hardware setup¶
Mounting PCB to Motor¶
Some hardware considerations:
- Distance between motor encoder and magnet should be around 1 mm.
- Hole spacing of STEPFOC is 31 mm (NEMA 17)
Electrical connections¶
Reversing the polarity on DC+ and DC- will destroy the board.
- Solder the motor phases to A+, A-, B+, B-: one coil of the stepper to A+ and A-, the other coil to B+ and B-. Find the two coils with a multimeter (the two wires of a coil have a few ohms between them, the two coils have no connection). Keep the wires long enough to swap them: if calibration reports a wrong phase order, swap A+ and A-, which reverses the direction of that coil.
- Connect motor power to one of the Power connectors terminals
- If you are using UART comms. Connect Uart adapter to UART connector
- If you are using thermistor, connect it to Thermistor connector
- If you are using CAN comms. Connect CAN adapter to one of CAN connectors
- When uploading code connect JTAG adapter to JTAG connector
Cable orientation
ALL cables used for daisy chain (CAN and power) need to to follow orientation as shown on the image below! Failing to follow that will destroy your motor controller! All correct cables can be bought here: https://source-robotics.com/pages/connectors-and-cables
Connecting multiple motors (daisy chaining)¶
Multiple STEPFOC stepper drivers or Spectral BLDC drivers and nodes can be connected to single CAN bus using daisy-chaining. First and last nodes on can bus should have termination resistors. You can flip the CAN switch to "ON" position to enable termination resistor.
Power connectors can handle max 4 A DC. It is recommended to have at most 6 motor controllers (STEPFOC or Spectral micro) in one daisy chain.
Thermistor connection¶
Solder the thermistor like shown in the image.
Thermistor is disabled by default. To enable it use command #Term 1
Thermistor needs to be placed on the housing of the stepper motor. Another option is remove one of the 4 stepper screws on the bottom and place thermistor inside that hole. Apply thermal cement on the thermistor to secure it in place and improve thermal conductivity.
Status¶
| Normal operation | Calibration | Error mode |
|---|---|---|
| 3 short flashed and a pause | Flashing every 0.5 seconds | Solid LED, no flashing. |
If you have STEPFOC firmware uploaded on your STEPFOC, LEDs will be in one of 3 states.
STEPFOC controllers come PRELOADED with STEPFOC firmware
- Normal operation is when motor controller has no active errors and is calibrated
- Error mode is active if any error on the motor driver is active. List of possible errors:
- Temperature error
- Drv error
- Encoder error
- Vbus error
- Velocity error
- Current error
- Not calibrated
- Received ESTOP
- Watchdog error
- Calibration will flash when in calibration routine
What next?¶
- Optional - > Flash the latest firmware to your driver (Note that drivers arrive with preflashed firmware)
- You will need to calibrate your motor
- Tune your PID loops
- Follow one of the guides or examples to start using your STEPFOC driver
Found a mistake on this page? Edit it on GitHub ยท Report it






