Stepper Motors
To use Cambridge Digital Technology's stepper motors you need a controller and a motor driver to translate low-power signals into the high-power pulses required to turn the motor's coils in sequence. Unlike standard DC motors, stepper motors do not rotate continuously when power is applied; they move in discrete, precise increments (steps) for every pulse received.

HOW TO USE:
1. Identify Your Motor and Driver
- Motor Type: Most common are Bipolar (4 wires) and Unipolar (5-6 wires). Bipolar motors generally offer more torque but require an H-bridge driver.
- Driver Matching: Choose a driver that can handle the motor's current rating
2. Standard Wiring Setup
- Logic Connections: Connect the driver's control pins to your microcontroller. For many drivers, you only need two pins: STEP (to trigger a movement) and DIR (to set the direction).
- Motor Power: Use an external power supply (typically 12V or 24V) connected to the driver's power input (VMOT/GND).
- Common Ground: Ensure the ground (GND) of your external power supply is connected to the ground of your microcontroller.
3. Basic Control Sequence
To make the motor move, your code must send a sequence of high/low pulses to the driver:
- Set Direction: Pull the DIR pin HIGH for clockwise or LOW for counter-clockwise.
- Send Pulses: Send a pulse to the STEP pin. Each pulse causes the motor to move exactly one step (usually or 200 steps per revolution).
- Control Speed: The faster you send these pulses (shorter delay between them), the faster the motor rotates.
4. Safety and Tuning
- Current Limiting: Most modern drivers have a small potentiometer. You must adjust this to match the motor's rated current before use to prevent overheating or damage.
- Avoid Hot-Plugging: Never disconnect a motor while the driver is powered; this can instantly blow the driver chip.
- Microstepping: Many drivers allow you to divide one full step into 1/2, 1/4, or 1/16 steps for smoother, quieter motion
Servo Motors
To use a servo motor, you provide it with power, ground, and a control signal. Unlike standard DC motors, a hobby servo typically rotates to a specific angle (usually between 0 deg and 180 deg) based on the "pulse width" of the signal it receives.
Choosing the Right Type
- Positional (Standard) Servo: Best for robotic arms, steering, or camera gimbals where you need precise angle control.
- Continuous Rotation Servo: Hacked to rotate indefinitely. You control speed and direction instead of position
