ESP32-Based Interactive Light and Sound Controller with Touch Activation
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit integrates various components to perform multiple functions. It includes an ESP32 microcontroller for processing and control, an INMP441 microphone for audio input, WS2812 RGB LED strips for visual output, and a DFPlayer MINI module for audio playback. The circuit also features Adafruit PCA9685 PWM Servo Breakouts for controlling servos or LEDs, a set of potentiometers for analog input, and a SparkFun MOSFET Power Controller for managing power to external devices. Protection diodes and TVS diodes (P6KE6.8A) are used for voltage spike suppression, and a set of terminal PCBs are included for connecting external components. The circuit is powered through a DC female jack and voltage regulation is managed by an XL4016 module.
Component List
Microcontroller
- ESP32 (30 pin): A microcontroller with Wi-Fi and Bluetooth capabilities, featuring a variety of digital and analog pins for interfacing with other components.
Audio Components
- INMP441 FRONT MIC: A digital I2S output microphone for capturing audio signals.
- DFPlayer MINI: A small and low-cost MP3 module that can directly play MP3 files from a microSD card.
- Loudspeaker: An audio output device connected to the DFPlayer MINI for sound playback.
LED Strips
- WS2812 RGB LED strip: Addressable LED strips capable of displaying multiple colors with digital control.
PWM Controllers
- Adafruit PCA9685 PWM Servo Breakout: A 16-channel, 12-bit PWM controller used for driving servos or LEDs via I2C communication.
Power Management
- XL4016: A DC-DC converter module used for voltage regulation.
- SparkFun MOSFET Power Controller: A module for controlling high-power devices using a low-power control signal.
Sensors and Input Devices
- YL-40: An analog-to-digital converter module with multiple analog inputs.
- Potentiometer: A variable resistor used as an analog input device.
- Touch Sensor TTP233: A capacitive touch sensor module.
Protection Components
- P6KE6.8A: Transient voltage suppression diodes used to protect the circuit from voltage spikes.
- FR207: Fast recovery diodes used for general-purpose rectification.
- FR607: A fast recovery diode with a higher current rating.
Connectors
- Terminal PCB 2 Pin: A two-pin terminal block for making secure electrical connections.
- DC female jack: A power connector for supplying power to the circuit.
Miscellaneous
- TA6586: A component with unspecified functionality in the provided list.
Wiring Details
ESP32 (30 pin)
D33connected to INMP441 FRONT MICSDD25connected to INMP441 FRONT MICWSD26connected to INMP441 FRONT MICSCKD12connected to WS2812 RGB LED stripDIND13connected to WS2812 RGB LED stripDIND23connected to Adafruit PCA9685 PWM Servo BreakoutSCLD21connected to Adafruit PCA9685 PWM Servo BreakoutSDAD5connected to Touch Sensor TTP233I/OTX2connected to DFPlayer MINIRXRX2connected to DFPlayer MINITXD4connected to Touch Sensor TTP233I/OGNDconnected to various GND pins on other componentsVinconnected to various 5V pins on other components3V3connected to various VCC pins on other components
INMP441 FRONT MIC
SD,WS,SCKconnected to ESP32GNDconnected to GND netVDDconnected to 3V3 net
WS2812 RGB LED strip
DINconnected to ESP32D12andD135Vconnected to 5V netGNDconnected to GND net
Adafruit PCA9685 PWM Servo Breakout
SCL,SDAconnected to ESP32D23andD21GNDconnected to GND netVCCconnected to 3V3 netPWM0,PWM7,PWM15connected to TA6586PWM8connected to SparkFun MOSFET Power ControllerTRIG+
DFPlayer MINI
RXconnected to ESP32TX2TXconnected to ESP32RX2VCCconnected to 5V netGNDconnected to GND netSPK1,SPK2connected to Loudspeaker
Loudspeaker
pin1,pin2connected to DFPlayer MINISPK1andSPK2
Potentiometer
VCCconnected to 3V3 netGNDconnected to GND netOutputconnected to YL-40Ain0,Ain1,Ain3
Touch Sensor TTP233
I/Oconnected to ESP32D5andD4GNDconnected to GND netVCCconnected to 3V3 net
YL-40
VCCconnected to 3V3 netGNDconnected to GND netSDA,SCLconnected to Adafruit PCA9685 PWM Servo BreakoutAin0,Ain1,Ain3connected to PotentiometerOutput
SparkFun MOSFET Power Controller
TRIG+connected to Adafruit PCA9685 PWM Servo BreakoutPWM8GNDconnected to GND netOUT1+,OUT2-connected to Terminal PCB 2 Pin and FR607IN1+,IN2-connected to XL4016In+,In-GND
XL4016
In+,In-GNDconnected to SparkFun MOSFET Power ControllerIN1+,IN2-Out+,Out-GNDconnected to 5V net
Terminal PCB 2 Pin
- Connected to various components for external connections
FR207, FR607
Catode,Anodeconnected to Terminal PCB 2 Pin and other components
P6KE6.8A
Cathode,Anodeconnected to 5V and GND nets for protection
DC female jack
positive,negativeconnected to XL4016In+,In-GND
Documented Code
No code was provided for the microcontrollers in the circuit. If code is available, it should be documented here with explanations for each function and routine, including setup and loop functions, interrupt service routines, and any libraries or external modules used.