ESP32-Based Color Sorting Machine with IR Detection and LCD Feedback
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
The circuit in question is designed to interface an ESP32 microcontroller with a variety of sensors and output devices, including a TCS3200 color sensor, multiple IR sensors, a servomotor, and an LCD display with I2C communication. The ESP32 serves as the central processing unit, reading sensor inputs, controlling the servomotor, and displaying information on the LCD. The IR sensors are likely used for detecting objects or motion, while the TCS3200 color sensor can be used for color recognition tasks. The servomotor is controlled by the ESP32 and can be used for precise positioning. The LCD display provides a user interface to display data or messages.
Component List
ESP32 38 PINS
- Description: A microcontroller with Wi-Fi and Bluetooth capabilities, featuring a wide range of GPIO pins.
- Pins: GND, G23, G22, TXD, RXD, G21, G19, G18, G5, G17, G16, G4, G0, G2, G15, SDI, SD0, CLK, 3V3, EN, SP, SN, G34, G35, G32, 33, G25, G26, G27, G14, G12, G13, SD2, SD3, 5V
TCS3200 Color Sensor
- Description: A color sensor that can detect a wide spectrum of colors.
- Pins: GND, OUT, S2, S3, VCC, LED, S0, S1
Servomotor MG90S
- Description: A small-sized servomotor capable of precise control.
- Pins: SIG, VCC, GND
IR Sensors
- Description: Sensors used for detecting obstacles or measuring distances using infrared light.
- Pins: out, gnd, vcc
LCD Display 16x4 I2C
- Description: A 16x4 character LCD display with an I2C interface for displaying text and numbers.
- Pins: SCL, SDA, VCC, GND
Wiring Details
ESP32 38 PINS
- GND connected to the ground pins of all other components.
- G22 connected to S1 of TCS3200 and SCL of LCD Display.
- G21 connected to S0 of TCS3200 and SDA of LCD Display.
- G5 connected to the output of one IR sensor.
- G16 connected to the signal pin of Servomotor MG90S.
- G4, G0, G2, G15 connected to the output of four different IR sensors.
- 5V connected to the VCC pins of all other components.
TCS3200 Color Sensor
- GND connected to the ground network.
- S1 connected to G22 of ESP32.
- S0 connected to G21 of ESP32.
- VCC connected to the 5V network.
Servomotor MG90S
- SIG connected to G16 of ESP32.
- VCC connected to the 5V network.
- GND connected to the ground network.
IR Sensors
- out connected to G5, G4, G0, G2, G15 of ESP32 (one sensor per pin).
- gnd connected to the ground network.
- vcc connected to the 5V network.
LCD Display 16x4 I2C
- SCL connected to G22 of ESP32.
- SDA connected to G21 of ESP32.
- VCC connected to the 5V network.
- GND connected to the ground network.
Documented Code
No code has been provided for the microcontrollers in the circuit. The code would typically include initialization routines for each of the peripherals (sensors, servomotor, and LCD), as well as the main application logic for reading sensor data, controlling the servomotor, and updating the display on the LCD. It would also handle communication protocols such as I2C for the LCD display.