ESP32-Based Multi-Sensor Data Logger with Battery Management
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit integrates a variety of sensors and modules with an ESP32 microcontroller to perform multiple sensing and monitoring tasks. The ESP32 serves as the central processing unit, interfacing with a DS18B20 temperature sensor module, a capacitive soil moisture sensor, a force sensing resistor, and an ADXL345 accelerometer. Power management is handled by a TP4056 charging module connected to a 3.7V battery, ensuring a stable power supply for the system. The circuit is designed for applications that require environmental data collection, such as temperature, soil moisture, force, and acceleration.
Component List
ESP32
- Microcontroller with WiFi and Bluetooth capabilities.
- It has a variety of digital and analog pins for interfacing with sensors and modules.
DS18B20 Module
- A digital temperature sensor module that communicates over a one-wire interface.
Force Sensing Resistor
- A sensor that changes its resistance based on the force applied to its surface.
3.7v Battery
- Provides power to the circuit.
ADXL345
- A digital accelerometer that measures acceleration in three axes.
Capacitive Soil Moisture Sensor V1.2
- Measures the moisture content in soil using capacitive sensing.
TP4056
- A lithium battery charging module with battery protection.
Wiring Details
ESP32
D34connected to Capacitive Soil Moisture Sensor V1.2AOUTD32connected to Force Sensing Resistorpin 0GNDconnected to:- ADXL345
GND - TP4056
OUT- - Force Sensing Resistor
pin 1 - DS18B20 Module
GND - Capacitive Soil Moisture Sensor V1.2
GND
- ADXL345
VINconnected to TP4056OUT+3V3connected to:- DS18B20 Module
VCC - ADXL345
VCC - Capacitive Soil Moisture Sensor V1.2
VCC
- DS18B20 Module
D4connected to DS18B20 ModuleDQD21connected to ADXL345SDAD22connected to ADXL345SCL
DS18B20 Module
VCCconnected to ESP323V3DQconnected to ESP32D4GNDconnected to ESP32GND
Force Sensing Resistor
pin 0connected to ESP32D32pin 1connected to ESP32GND
3.7v Battery
+connected to TP4056B+-connected to TP4056B-
ADXL345
GNDconnected to ESP32GNDVCCconnected to ESP323V3SDAconnected to ESP32D21SCLconnected to ESP32D22
Capacitive Soil Moisture Sensor V1.2
GNDconnected to ESP32GNDVCCconnected to ESP323V3AOUTconnected to ESP32D34
TP4056
OUT-connected to ESP32GNDB-connected to 3.7v Battery-B+connected to 3.7v Battery+OUT+connected to ESP32VIN
Documented Code
No code has been provided for the microcontrollers in the circuit. To fully utilize the circuit's capabilities, embedded code for the ESP32 should be written to initialize and read data from the connected sensors, manage power, and handle communication if needed. The code should include setup for the I2C interface, one-wire interface, analog inputs, and any necessary libraries for interfacing with the specific sensors.