Circuit Documentation
Summary
This circuit primarily consists of a Raspberry Pi 5, two stepper motors, a servo motor, two L298N DC motor drivers, two 12v batteries, a 12v power supply, a 2 channel relay module, a Micro USB to Cable (2 Pin), and a buck converter. The Raspberry Pi 5 serves as the central controller, interfacing with the servo motor and the L298N motor drivers, which in turn drive the stepper motors. The power supply and batteries provide the necessary power to the components, with the relay module and buck converter managing power distribution and voltage regulation.
Component List
Raspberry Pi 5
- A microcomputer with multiple GPIO pins, USB, Ethernet, HDMI, and power interfaces.
Stepper Motor (Bipolar)
- A type of electric motor that divides a full rotation into a number of equal steps.
Servo
- A rotary actuator or linear actuator that allows for precise control of angular or linear position.
L298N DC Motor Driver
- A high-power motor driver capable of driving DC and stepper motors.
12v Battery
- A power source providing 12 volts of DC power.
12v Power Supply
- A device that supplies electric power to an electrical load, providing 12 volts of DC power.
2 Channel Relay Module
- An electrically operated switch that allows you to turn on or off a circuit using voltage and/or current much higher than a microcontroller can handle.
Micro USB to Cable (2 Pin)
- A cable with a Micro USB connector on one end and two pins on the other, used for power connections.
Buck Converter
- A DC-to-DC power converter which steps down voltage from its input to its output.
Wiring Details
Raspberry Pi 5
- Type-C connected to Micro USB to Cable (2 Pin) Micro USB
- GPIO 2 connected to Servo PWM
- GPIO 5, GPIO 6, GPIO 0, GPIO 19 connected to L298N DC Motor Driver IN2, IN3, IN1, ENB respectively (Instance 1)
- GPIO 9, GPIO 22, GPIO 27, GPIO 17, GPIO 23, GPIO 25, GPIO 12, GPIO 16 connected to L298N DC Motor Driver ENB, IN3, IN2, IN1, IN4, ENA, IN4, ENA respectively (Instance 2)
- 5V connected to Servo VCC
- GND connected to Servo GND
Stepper Motor (Bipolar) (Instance 1)
- D, B, C, A connected to L298N DC Motor Driver OUT3, OUT1, OUT4, OUT2 respectively (Instance 1)
Stepper Motor (Bipolar) (Instance 2)
- D, B, C, A connected to L298N DC Motor Driver OUT4, OUT1, OUT3, OUT2 respectively (Instance 2)
Servo
- VCC connected to Raspberry Pi 5 5V
- GND connected to Raspberry Pi 5 GND
- PWM connected to Raspberry Pi 5 GPIO 2
L298N DC Motor Driver (Instance 1)
- IN1, IN2, IN3, IN4 connected to Raspberry Pi 5 GPIO 0, GPIO 5, GPIO 6, GPIO 19 respectively
- ENA, ENB connected to Raspberry Pi 5 GPIO 16, GPIO 12 respectively
- OUT1, OUT2, OUT3, OUT4 connected to Stepper Motor (Bipolar) B, A, D, C respectively (Instance 1)
- 12V connected to 12v Battery + (Instance 1) and 2 Channel Relay Module COM 2
- GND connected to 12v Battery - (Instance 1) and 2 Channel Relay Module N.O. 2
L298N DC Motor Driver (Instance 2)
- IN1, IN2, IN3, IN4 connected to Raspberry Pi 5 GPIO 17, GPIO 27, GPIO 22, GPIO 23 respectively
- ENA, ENB connected to Raspberry Pi 5 GPIO 25, GPIO 9 respectively
- OUT1, OUT2, OUT3, OUT4 connected to Stepper Motor (Bipolar) B, A, C, D respectively (Instance 2)
- 12V connected to 12v Battery + (Instance 2) and 2 Channel Relay Module COM 1
- GND connected to 12v Battery - (Instance 2) and 2 Channel Relay Module N.C. 1
12v Battery (Instance 1)
- connected to L298N DC Motor Driver 12V (Instance 1) and 2 Channel Relay Module COM 2
- connected to L298N DC Motor Driver GND (Instance 1) and 2 Channel Relay Module N.O. 2
12v Battery (Instance 2)
- connected to L298N DC Motor Driver 12V (Instance 2) and 2 Channel Relay Module COM 1
- connected to L298N DC Motor Driver GND (Instance 2) and 2 Channel Relay Module N.C. 1
12v Power Supply
- connected to 2 Channel Relay Module VCC+
- connected to 2 Channel Relay Module VCC- (GND)
2 Channel Relay Module
- COM 1, COM 2 connected to L298N DC Motor Driver 12V (Instances 1 and 2 respectively)
- N.O. 1, N.C. 1 connected to Buck Converter IN+ and 12v Battery - (Instance 2) respectively
- N.O. 2, N.C. 2 connected to Buck Converter IN- and 12v Battery - (Instance 1) respectively
- VCC+, VCC- (GND) connected to 12v Power Supply + and - respectively
Micro USB to Cable (2 Pin)
- Micro USB connected to Raspberry Pi 5 Type-C
- connected to Buck Converter OUT+
- connected to Buck Converter OUT-
Buck Converter
- IN+ connected to 2 Channel Relay Module N.O. 1
- IN- connected to 2 Channel Relay Module N.C. 2
- OUT+ connected to Micro USB to Cable (2 Pin) +
- OUT- connected to Micro USB to Cable (2 Pin) -
Documented Code
There is no code provided for the microcontrollers in the circuit. If code is later provided, it should be documented here with explanations of how it interfaces with the hardware components and any relevant algorithms or control structures used.