ESP32-Based Environmental Sensing Station with Hall Effect Sensors and Logic Level Conversion
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit integrates various sensors and modules with an ESP32 microcontroller to perform a range of sensing and signal processing tasks. The ESP32 serves as the central processing unit, interfacing with a BMP280 sensor for atmospheric pressure and temperature measurements, an LTR390 for UV and ambient light sensing, and a DHT22 for humidity and temperature readings. Additionally, the circuit includes multiple 3144 Hall effect sensors for detecting magnetic fields. Bi-Directional Logic Level Converters are used to interface devices operating at different voltage levels with the ESP32. The circuit is designed to be powered by a 5V supply, which is regulated down to 3.3V for components requiring a lower voltage.
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
BMP280
- Description: A digital barometric pressure and temperature sensor.
- Pins: SDO, CSB, SDA, SCL, GND, VCC
LTR390
- Description: A UV and ambient light sensor.
- Pins: V In, 3V, GND, SCL, SDA, INT
DHT22 (Wokwi Compatible)
- Description: A digital temperature and humidity sensor.
- Pins: VCC, SDA, NC, GND
Bi-Directional Logic Level Converter
- Description: A device that safely steps down 5V signals to 3.3V and steps up 3.3V to 5V.
- Pins: HV1, HV2, HV, GND, HV3, HV4, LV1, LV2, LV, LV3, LV4
3144 Hall Effect Sensor
- Description: A sensor that detects the presence of a magnetic field.
- Pins: +5, GND, Signal
Wiring Details
ESP32 38 PINS
- G23 connected to Bi-Directional Logic Level Converter HV1
- G22 connected to BMP280 SCL and LTR390 SCL
- G21 connected to BMP280 SDA and LTR390 SDA
- GND connected to common ground net
- G19 connected to Bi-Directional Logic Level Converter HV2
- G4 connected to DHT22 SDA
- 3V3 connected to BMP280 VCC, DHT22 VCC, LTR390 3V, and Bi-Directional Logic Level Converter LV
- 33 connected to Bi-Directional Logic Level Converter HV4
- G25 connected to Bi-Directional Logic Level Converter HV3
- G26 connected to Bi-Directional Logic Level Converter HV2
- G27 connected to Bi-Directional Logic Level Converter HV1
- 5V connected to 3144 Hall Effect Sensor +5 and Bi-Directional Logic Level Converter HV
BMP280
- SCL connected to ESP32 G22
- SDA connected to ESP32 G21
- GND connected to common ground net
- VCC connected to ESP32 3V3
LTR390
- SCL connected to ESP32 G22
- SDA connected to ESP32 G21
- GND connected to common ground net
- 3V connected to ESP32 3V3
DHT22 (Wokwi Compatible)
- SDA connected to ESP32 G4
- VCC connected to ESP32 3V3
- GND connected to common ground net
Bi-Directional Logic Level Converter
- HV1 connected to ESP32 G23 and G27
- HV2 connected to ESP32 G19 and G26
- HV3 connected to ESP32 G25
- HV4 connected to ESP32 33
- GND connected to common ground net
- LV connected to ESP32 3V3
- HV connected to ESP32 5V
3144 Hall Effect Sensor
- +5 connected to ESP32 5V
- GND connected to common ground net
- Signal connected to Bi-Directional Logic Level Converter LV1, LV2, LV3, or LV4 depending on the instance
Code Documentation
No code has been provided for the microcontrollers in the circuit. The ESP32 would typically be programmed to initialize and read data from the connected sensors, process the data as required, and perform actions or communications based on sensor readings. The code would include setup routines for each sensor, main loop code to periodically read the sensors, and possibly interrupt service routines for handling events such as sensor threshold crossings or communication requests.