Circuit Documentation
Summary
The circuit in question is designed to control a servo motor using an ESP32 microcontroller and an Adafruit PCA9685 PWM Servo Breakout board. The ESP32 is responsible for communicating with the PCA9685 via I2C to set the PWM signal for the servo. The circuit is powered by a 12V battery, which is stepped down to 5V by a power converter to supply the ESP32, PCA9685, and the servo motor.
Component List
ESP32 (30 pin)
- Description: A microcontroller with WiFi and Bluetooth capabilities, featuring a wide range of GPIO pins.
- Pins: EN, VP, VN, D34, D35, D32, D33, D25, D26, D27, D14, D12, D13, GND, Vin, D23, D22, TX0, RX0, D21, D19, D18, D5, TX2, RX2, D4, D2, D15, 3V3
12v to 5v Step Down Power Converter
- Description: A voltage regulator that steps down the input voltage from 9-36V to a stable 5V output.
- Pins: VIN 9v-36v, VIN+, VIN-, USB OUTPUT 5V, 5v OUTPUT, GND
Battery 12v
- Description: A 12V battery providing the power source for the circuit.
- Pins: +, -
Adafruit PCA9685 PWM Servo Breakout
- Description: A 16-channel, 12-bit PWM Fm+ I2C-bus LED controller optimized for driving servos.
- Pins: 5.0V, GND, PWRIN, PWM7 to PWM0, VCC, SDA, SCL, OE, PWM15 to PWM8
Servo
- Description: An actuator that can be precisely controlled for angular or linear position, velocity, and acceleration.
- Pins: GND, VCC, PWM
Wiring Details
ESP32 (30 pin)
- GND connected to the common ground net.
- Vin connected to the 5V output from the step-down converter.
- D22 (SCL) connected to SCL on the Adafruit PCA9685 for I2C communication.
- D21 (SDA) connected to SDA on the Adafruit PCA9685 for I2C communication.
12v to 5v Step Down Power Converter
- VIN+ connected to the positive terminal of the 12V battery.
- VIN- connected to the negative terminal of the 12V battery.
- 5v OUTPUT connected to the 5V power rail supplying the ESP32 and Adafruit PCA9685.
- GND connected to the common ground net.
Battery 12v
- + connected to VIN+ on the step-down converter.
- - connected to VIN- on the step-down converter.
Adafruit PCA9685 PWM Servo Breakout
- 5.0V and VCC connected to the 5V power rail from the step-down converter.
- GND connected to the common ground net.
- SCL connected to D22 on the ESP32 for I2C communication.
- SDA connected to D21 on the ESP32 for I2C communication.
- PWM0 connected to the PWM pin on the servo.
Servo
- GND connected to the common ground net.
- VCC connected to the 5V power rail from the PCA9685.
- PWM connected to PWM0 on the Adafruit PCA9685.
Documented Code
There is no code provided for the microcontroller. The ESP32 would typically be programmed to initialize I2C communication with the Adafruit PCA9685 and send PWM signals to control the servo's position. Without the code, we cannot document the specific functionality or provide examples of usage. However, the expected code would include setup of the I2C interface, initialization of the PCA9685, and a loop to update the PWM signal based on some input or sensor data.
