Circuit Documentation
Summary
This circuit is designed to control multiple Nema 17 stepper motors using DRV8825 stepper motor drivers. The control signals for the drivers are provided by an ESP32 microcontroller. A step-down buck converter is used to regulate the voltage from a LiPo battery to power the ESP32. The DRV8825 drivers are responsible for powering and controlling the stepper motors based on the signals from the ESP32.
Component List
Microcontrollers
- ESP32 (30 pin): A microcontroller with WiFi and Bluetooth capabilities, used for controlling the DRV8825 drivers and managing the stepper motors.
Motors
- Nema 17 42-STH48: Stepper motors used for precision movement in applications such as 3D printers, CNC machines, and robotics.
Motor Drivers
- DRV 8825: Stepper motor driver modules that control the Nema 17 stepper motors. They receive step and direction signals from the ESP32.
Power Supply
- Step down Buck converter: A voltage regulator that steps down the voltage from the LiPo battery to a suitable level for the ESP32.
- LiPo battery 2200mAh 30C: A rechargeable battery that provides power to the circuit.
Wiring Details
ESP32 (30 pin)
- GND: Connected to the GND of the step-down buck converter and the GND LOGIC of the DRV8825 drivers.
- Vin: Connected to the OUT + of the step-down buck converter.
- D23: Connected to the RST pin of all DRV8825 drivers.
- D22: Connected to the SLP pin of all DRV8825 drivers.
- D21: Connected to the EN pin of all DRV8825 drivers.
- D19: Connected to the DIR pin of all DRV8825 drivers.
- D18: Connected to the STEP pin of all DRV8825 drivers.
Nema 17 42-STH48
- A2 (black): Connected to the A2 pin of the corresponding DRV8825 driver.
- A1 (Green): Connected to the A1 pin of the corresponding DRV8825 driver.
- B2 (Red): Connected to the B2 pin of the corresponding DRV8825 driver.
- B1 (Blue): Connected to the B1 pin of the corresponding DRV8825 driver.
DRV 8825
- RST: Connected to D23 on the ESP32.
- SLP: Connected to D22 on the ESP32.
- EN: Connected to D21 on the ESP32.
- DIR: Connected to D19 on the ESP32.
- STEP: Connected to D18 on the ESP32.
- GND LOGIC: Connected to GND on the ESP32.
- A1, A2, B1, B2: Connected to the corresponding pins on the Nema 17 stepper motors.
Step down Buck converter
- IN +: Connected to VCC of the LiPo battery.
- IN - GND: Connected to GND of the LiPo battery.
- OUT +: Connected to Vin on the ESP32.
- OUT - GND: Connected to GND on the ESP32.
LiPo battery 2200mAh 30C
- VCC: Connected to IN + on the step-down buck converter.
- GND: Connected to IN - GND on the step-down buck converter.
Documented Code
ESP32 (30 pin) - sketch.ino
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
ESP32 (30 pin) - documentation.txt
(No additional documentation provided for the code)
This concludes the documentation for the circuit. The code provided for the ESP32 is a template and does not contain any specific functionality. Additional code would be required to initialize and control the DRV8825 drivers and the stepper motors.
