Skip to main content
This page provides connection diagrams and pinout references for both the official OSSM PCB and alternative wiring configurations.

Prerequisites

Before wiring your OSSM electronics, ensure you have:
  • An ESP32 development board (ESP32-DevKitC or compatible)
  • A motor driver compatible with step/direction control
  • Appropriate power supply for your motor
  • Basic electronics tools (wire strippers, multimeter)
The 3.3V logic level on most ESP32 boards can cause missed steps at high speeds. Use a level shifter to convert signals to 5V for reliable motor driver communication.

Prototyping Components

If you’re building a custom wiring setup without the official PCB, you’ll need these additional components:
ComponentPurposeNotes
Adafruit Level ShifterConverts 3.3V signals to 5VRequired for reliable high-speed operation
BreadboardSolderless prototyping400 tie-point minimum recommended
Dupont JumpersWire connectionsMale-to-male and male-to-female needed

Official OSSM Wiring

The official OSSM reference board provides standardized connections with built-in level shifting. This is the recommended approach for most builds.

Reference Board Layout

OSSM version 1 reference board showing ESP32 socket, level shifters, and JST connectors

OSSM reference board (version 1) - front view showing component placement

PCB Connection Diagram

OSSM PCB connection diagram with labeled motor driver output, encoder input, and power connections

Connection diagram showing motor driver and peripheral connections

GPIO Pinout Reference

The ESP32 GPIO assignments for the OSSM PCB are configured in the firmware. These are the default pin mappings:
SignalGPIO PinFunction
StepGPIO 14Step pulse output to motor driver
DirectionGPIO 27Direction signal to motor driver
EnableGPIO 26Enable/disable motor driver
Encoder AGPIO 36Quadrature encoder channel A
Encoder BGPIO 39Quadrature encoder channel B
OSSM GPIO pinout diagram showing step, direction, and enable pins on ESP32

ESP32 GPIO pinout showing control signal routing

JST connector header locations on the OSSM PCB showing motor output, encoder input, and auxiliary connections

JST header locations with pin labels for easy identification

Alternative Wiring Configurations

The following configurations are community-tested alternatives. Your specific hardware combination may require different pin assignments or wiring modifications.

TB6600 Stepper Driver

The TB6600 is a common stepper driver for OSSM builds using stepper motors instead of servos.
1

Connect power

Wire your stepper motor power supply (typically 24V) to the TB6600 DC+ and DC- terminals. Connect the motor phases to A+, A-, B+, B-.
2

Wire control signals

Connect the OSSM control signals through your level shifter:
  • Step (GPIO 14) → PUL+
  • Direction (GPIO 27) → DIR+
  • Enable (GPIO 26) → ENA+ (if used)
  • Ground → PUL-, DIR-, ENA-
3

Configure driver switches

Set the TB6600 DIP switches for your motor’s current rating and desired microstepping. Consult your motor’s datasheet for the appropriate current setting.
Connection diagram showing OSSM PCB signal outputs wired through level shifter to TB6600 stepper motor driver inputs

Wiring diagram for TB6600 stepper driver with OSSM controller

Servo Motor Wiring

For builds using servo motors with integrated drivers (such as the iHSV57 or 42AIM30):
Wiring diagram for closed-loop servo motor connection to OSSM controller via step/direction interface

Servo motor wiring configuration showing step/direction interface

Servo motors with integrated drivers often accept both 3.3V and 5V logic levels. Check your servo’s documentation—you may not need a level shifter.

Stepper Motor Wiring

For additional stepper driver configurations and archived designs, refer to the hardware files in the repository:
/ossm/Hardware/PCB Files/Archive/

Verifying Your Wiring

After completing your wiring, verify the connections before applying power:
1

Check continuity

Use a multimeter to verify that each signal wire connects the correct ESP32 pin to the corresponding motor driver input.
Step, direction, and enable signals each show continuity from ESP32 to driver.
2

Verify isolation

Confirm there are no shorts between signal lines or between signals and power rails.
No continuity between adjacent pins or between signal and power lines.
3

Check power connections

Verify the motor driver power supply polarity and voltage before connecting.
Reverse polarity can instantly destroy your motor driver. Double-check DC+ and DC- orientation.

Troubleshooting

This typically indicates a voltage level mismatch or signal integrity issue.Check the following:
  • Level shifter is receiving both 3.3V and 5V power supplies
  • All ground connections are common between ESP32, level shifter, and motor driver
  • Signal wires are short and routed away from motor power cables
Solution: If you’re not using a level shifter, add one. If you are, verify the 5V supply to the high-voltage side of the shifter.
The motor driver may not be receiving valid control signals.Check the following:
  • Enable pin state matches your driver’s requirements (some are active-low)
  • Step and direction pins match your firmware configuration
  • Motor driver has adequate power supply (check indicator LEDs if present)
Solution: Use an oscilloscope or logic analyzer to verify step pulses are present at the driver input.
Electrical noise or interference may be affecting the control signals.Check the following:
  • Signal wires are not bundled with motor power cables
  • Motor driver power supply is stable under load
  • Adequate decoupling capacitors are present near the motor driver
Solution: Add 0.1µF ceramic capacitors between signal pins and ground at the motor driver. Use shielded cable for longer signal runs.
The direction signal polarity may be inverted.Solution: Either swap the direction wire polarity at the level shifter, or invert the direction in firmware by changing the INVERT_DIRECTION setting.