Circuit Documentation
Summary
This document provides a detailed overview of a circuit that integrates an ESP32C3 Supermini microcontroller with a BH1750 light sensor. The ESP32C3 Supermini is responsible for controlling the sensor and processing the data it collects. The BH1750 sensor is used to measure ambient light intensity, which can be utilized in applications such as adjusting screen brightness or in smart lighting systems. The circuit is designed to communicate with the BH1750 sensor via the I2C protocol, using dedicated SCL and SDA lines.
Component List
ESP32C3 Supermini
- Description: A compact microcontroller module based on the ESP32-C3 chip, which is suitable for a wide range of IoT applications.
- Pins: GPIO05, GPIO06, GPIO07, GPIO08, GPIO09, GPIO10, GPIO20, GPIO21, GPIO00, GPIO01, GPIO02, GPIO03, GPIO04, 3.3V, GND, +5V
- Purpose: Acts as the central processing unit of the circuit, interfacing with the BH1750 light sensor and executing the embedded code.
BH1750 Light Sensor
- Description: A digital ambient light sensor that provides an I2C interface for light intensity measurement.
- Pins: VCC, GND, SCL, SDA, ADDR
- Purpose: Measures the ambient light intensity and sends the data to the microcontroller for processing.
Wiring Details
ESP32C3 Supermini
- GPIO20 connected to BH1750 SCL
- GPIO21 connected to BH1750 SDA
- 3.3V connected to BH1750 VCC
- GND connected to BH1750 GND
BH1750 Light Sensor
- SCL connected to ESP32C3 Supermini GPIO20
- SDA connected to ESP32C3 Supermini GPIO21
- VCC connected to ESP32C3 Supermini 3.3V
- GND connected to ESP32C3 Supermini GND
Documented Code
ESP32C3 Supermini Code (sketch.ino)
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
BH1750 Light Sensor Code
The BH1750 light sensor does not have embedded code as it is a sensor device that communicates via I2C with the microcontroller.
This documentation provides a basic framework for understanding the circuit's components, their connections, and the initial code structure for the ESP32C3 Supermini microcontroller. Further development of the code is required to initialize the I2C communication, read data from the BH1750 sensor, and process the light intensity measurements.
