Raspberry Pi 4B and DRV8825 Stepper Motor Controller with AS5600 Magnetic Encoder for Precision Motor Control
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit involves a Raspberry Pi 4B, multiple DRV8825 stepper motor drivers, AS5600 magnetic encoders, Nema 17 stepper motors, power supplies, and electrolytic capacitors. The Raspberry Pi 4B serves as the central controller, interfacing with the encoders and motor drivers to control the stepper motors. The power supplies provide the necessary voltages to the components.
Component List
Raspberry Pi 4B
- Pins: 3V3, 5V, GPIO2, GPIO3, GND, GPIO4, GPIO14, GPIO15, GPIO17, GPIO18, GPIO27, GPIO22, GPIO23, GPIO24, GPIO10, GPIO9, GPIO25, GPIO11, GPIO8, GPIO7, ID_SD, GPIO5, GPIO6, GPIO12, GPIO13, GPIO19, GPIO16, GPIO26, GPIO20, GPIO21, ID_SC, TR01_TAP, TR00_TAP, TR03_TAP, TR02_TAP, RUN, GLOBAL_EN
- Description: Single-board computer used as the central controller.
- Purpose: Controls the stepper motors and reads data from the encoders.
DRV8825 Stepper Motor Driver
- Pins: ENABLE, MS1, MS2, MS3, RESET, SLEEP, STEP, DIR, GND, FAULT, 1B, 1A, 2A, 2B, VMOT
- Description: Stepper motor driver.
- Purpose: Drives the Nema 17 stepper motors.
AS5600 Magnetic Encoder
- Pins: DIR, SCL, SDA, GP0, VCC, OUT, GND
- Description: Magnetic rotary position sensor.
- Purpose: Provides position feedback to the Raspberry Pi.
Nema 17 42-STH48 Stepper Motor
- Pins: A2 (black), A1 (Green), B2 (Red), B1 (Blue)
- Description: Stepper motor.
- Purpose: Provides precise motor control.
POWER SUPPLY 12V 5AMP
- Pins: 220V Positive Pole (AC), 220V Negative Pole (AC), GND, GND (DC), 12V-24V Output (DC)
- Description: Power supply.
- Purpose: Provides 12V power to the circuit.
POWER SUPPLY 5V 5AMP
- Pins: 220V Positive Pole (AC), 220V Negative Pole (AC), GND, GND (DC), 12V-24V Output (DC)
- Description: Power supply.
- Purpose: Provides 5V power to the circuit.
Electrolytic Capacitor
- Pins: -, +
- Description: Capacitor with 0.0001 Farads capacitance.
- Purpose: Stabilizes voltage supply.
AC Source
- Pins: +, -
- Description: AC power source.
- Purpose: Provides AC power to the power supplies.
Wiring Details
Raspberry Pi 4B
5V is connected to:
- VCC of AS5600 magnetic encoder
- VCC of another AS5600 magnetic encoder
- RESET and SLEEP of DRV8825 stepper motor driver
- RESET and SLEEP of another DRV8825 stepper motor driver
GPIO2 is connected to:
- SDA of AS5600 magnetic encoder
- SDA of another AS5600 magnetic encoder
GPIO3 is connected to:
- SCL of AS5600 magnetic encoder
- SCL of another AS5600 magnetic encoder
GND is connected to:
- GND of AS5600 magnetic encoder
- GND of another AS5600 magnetic encoder
- GND (DC) of POWER SUPPLY 5V 5AMP
- GND of DRV8825 stepper motor driver
- GND of another DRV8825 stepper motor driver
- - of Electrolytic Capacitor
GPIO17 is connected to:
- STEP of DRV8825 stepper motor driver
GPIO27 is connected to:
- DIR of DRV8825 stepper motor driver
GPIO22 is connected to:
- STEP of another DRV8825 stepper motor driver
GPIO10 is connected to:
- DIR of another DRV8825 stepper motor driver
DRV8825 Stepper Motor Driver
1B is connected to:
- B1 Blue of Nema 17 stepper motor
1A is connected to:
- A1 Green of Nema 17 stepper motor
2A is connected to:
- A2 (black) of Nema 17 stepper motor
2B is connected to:
- B2 Red of Nema 17 stepper motor
VMOT is connected to:
- + of Electrolytic Capacitor
- 12V-24V Output (DC) of POWER SUPPLY 12V 5AMP
AS5600 Magnetic Encoder
VCC is connected to:
- 5V of Raspberry Pi 4B
SDA is connected to:
- GPIO2 of Raspberry Pi 4B
SCL is connected to:
- GPIO3 of Raspberry Pi 4B
GND is connected to:
- GND of Raspberry Pi 4B
Nema 17 42-STH48 Stepper Motor
A2 (black) is connected to:
- 2A of DRV8825 stepper motor driver
A1 (Green) is connected to:
- 1A of DRV8825 stepper motor driver
B2 (Red) is connected to:
- 2B of DRV8825 stepper motor driver
B1 (Blue) is connected to:
- 1B of DRV8825 stepper motor driver
POWER SUPPLY 12V 5AMP
220V Positive Pole (AC) is connected to:
- 220V Positive Pole (AC) of POWER SUPPLY 5V 5AMP
- + of AC source
220V Negative Pole (AC) is connected to:
- 220V Negative Pole (AC) of POWER SUPPLY 5V 5AMP
- - of AC source
GND (DC) is connected to:
- GND of Raspberry Pi 4B
- - of Electrolytic Capacitor
- GND of DRV8825 stepper motor driver
- GND of another DRV8825 stepper motor driver
12V-24V Output (DC) is connected to:
- + of Electrolytic Capacitor
- VMOT of DRV8825 stepper motor driver
- VMOT of another DRV8825 stepper motor driver
POWER SUPPLY 5V 5AMP
- GND (DC) is connected to:
- GND of Raspberry Pi 4B
- GND of AS5600 magnetic encoder
- GND of another AS5600 magnetic encoder
Electrolytic Capacitor
- is connected to:
- GND of Raspberry Pi 4B
- GND (DC) of POWER SUPPLY 12V 5AMP
+ is connected to:
- VMOT of DRV8825 stepper motor driver
- VMOT of another DRV8825 stepper motor driver
- 12V-24V Output (DC) of POWER SUPPLY 12V 5AMP
Code
No code is provided for this circuit.