Raspberry Pi 4B-Controlled Bipolar Stepper Motor with tb6600 Driver and Level Shifting
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary of the Circuit
This circuit is designed to control a bipolar stepper motor using a Raspberry Pi 4B as the main controller. The Raspberry Pi interfaces with a tb6600 Micro Stepping Motor Driver, which directly drives the stepper motor. A level shifter is used to match the voltage levels between the Raspberry Pi and the motor driver. The circuit is powered by a switching power supply, which is connected to an AC supply and a 12V 5A power supply unit. The Raspberry Pi is powered through a Micro USB to Cable (2 Pin) connected to the 12V 5A power supply.
Component List
Raspberry Pi 4B
- A single-board computer with multiple GPIO pins for interfacing with various peripherals and components.
tb6600 Micro Stepping Motor Driver
- A motor driver capable of driving a bipolar stepper motor with micro-stepping control.
Switching Power Supply
- Converts AC voltage to a stable DC output, used to power the motor driver.
POWER SUPPLY 12V 5AMP
- Provides a 12V to 24V DC output from an AC input, used to power the Raspberry Pi through the Micro USB cable.
Adafruit TXB0104 4-channel Bi-Directional Level Shifter
- A device that safely steps down 5V signals to 3.3V and steps up 3.3V to 5V at the same time.
Stepper Motor (Bipolar)
- A bipolar stepper motor for precision control of motion.
Ac Supply
- The main AC power source for the circuit.
Micro USB to Cable (2 Pin)
- Provides power to the Raspberry Pi from the 12V 5A power supply.
Wiring Details
Raspberry Pi 4B
3V3connected to LV (Low Voltage) on the level shifter.5Vconnected to HV (High Voltage) on the level shifter.GPIO2connected to A1 on the level shifter.GPIO3connected to A2 on the level shifter.GPIO4connected to A3 on the level shifter.GNDconnected to various GND pins on the level shifter and motor driver.
tb6600 Micro Stepping Motor Driver
ENA-,DIR-,PUL-connected to GND on the Raspberry Pi.ENA+connected to B1 on the level shifter.DIR+connected to B2 on the level shifter.PUL+connected to B3 on the level shifter.B-,A-connected to corresponding pins on the stepper motor.B+,A+connected to corresponding pins on the stepper motor.GNDconnected to -V on the switching power supply.VCCconnected to +V on the switching power supply.
Switching Power Supply
ACconnected to the 220V Positive Pole (AC) on the 12V 5A power supply and +ve on the AC supply.GNDconnected to the 220V Negative Pole (AC) on the 12V 5A power supply and -ve on the AC supply.-Vconnected to GND on the motor driver.+Vconnected to VCC on the motor driver.
POWER SUPPLY 12V 5AMP
220V Positive Pole (AC)connected to AC on the switching power supply.220V Negative Pole (AC)connected to GND on the switching power supply.GND (DC)connected to-on the Micro USB to Cable (2 Pin).12V-24V Output (DC)connected to+on the Micro USB to Cable (2 Pin).
Adafruit TXB0104 4-channel Bi-Directional Level Shifter
LVconnected to 3V3 on the Raspberry Pi.HVconnected to 5V on the Raspberry Pi.A1,A2,A3connected to corresponding GPIO pins on the Raspberry Pi.GNDconnected to GND on the Raspberry Pi.OEconnected to GND on the Raspberry Pi (enabling the device).B1,B2,B3connected to corresponding + pins on the motor driver.
Stepper Motor (Bipolar)
D,B,C,Aconnected to corresponding - and + pins on the motor driver.
Ac Supply
+veconnected to AC on the switching power supply.-veconnected to GND on the switching power supply.
Micro USB to Cable (2 Pin)
Micro USBconnected to the Raspberry Pi.+connected to 12V-24V Output (DC) on the 12V 5A power supply.-connected to GND (DC) on the 12V 5A power supply.
Documented Code
No code was provided for the microcontrollers in the circuit. The Raspberry Pi would typically be programmed using a language like Python, C++, or another suitable language to control the GPIO pins and hence the motor driver. The code would be responsible for generating the appropriate signals (ENA, DIR, PUL) to control the stepper motor's movements.