ESP32-Based Smart Fan Controller with Temperature Sensing and I2C LCD Display
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit integrates various components including a power module, an ESP32 microcontroller, sensors, a display, a motor driver, and passive components like resistors and a diode. The circuit is designed to interface with an I2C LCD screen, read data from a DHT11 temperature and humidity sensor, and control a fan motor based on sensor inputs. The ESP32 microcontroller serves as the central processing unit, managing data from the sensors and controlling the output devices accordingly.
Component List
Breadboard Power Module (3.3/5V)
- Provides selectable 3.3V or 5V power supply to the circuit.
ESP32 - 38 pins
- A microcontroller with Wi-Fi and Bluetooth capabilities, featuring a wide range of GPIO pins.
KY-015 DHT11
- A basic, ultra-low-cost digital temperature and humidity sensor.
Square FSR
- A force-sensitive resistor with analog output.
Fan Motor L9110
- A motor driver module suitable for driving small DC motors.
1N4007 Rectifier Diode
- A general-purpose diode used for rectification and protection.
Resistor (10k Ohms)
- A passive component used to limit current or divide voltages.
Resistor (1k Ohms)
- Another passive component with a lower resistance value for current limiting or voltage division.
NPN Transistor (CBE)
- A bipolar junction transistor used for switching or amplification.
I2C LCD 16x2 Screen
- A liquid crystal display capable of showing 16 characters per line, with 2 lines, interfaced via I2C.
Wiring Details
Breadboard Power Module (3.3/5V)
+: Connected to the VCC of the fan motor, DHT11 sensor, and I2C LCD screen.-: Common ground for the circuit.VCC (5V): Not connected.GND: Not connected.VCC (3.3V): Not connected.
ESP32 - 38 pins
3V3: Powers the Square FSR.GND: Common ground for the circuit.G34: Connected to the Square FSR A0 pin.G35: Not connected.G32: Not connected.G33: Not connected.G25: Not connected.G26: Not connected.G27: Not connected.G14: Not connected.G12: Not connected.G13: Not connected.SD2: Not connected.SD3: Not connected.CMD: Not connected.5V: Not connected.G23: Not connected.G22: Connected to the SCL pin of the I2C LCD screen.TXD: Not connected.RXD: Not connected.G21: Connected to the SDA pin of the I2C LCD screen.G19: Connected to the INB pin of the fan motor L9110.G18: Connected to the INA pin of the fan motor L9110.G5: Connected to one end of the 1k Ohm resistor.G17: Not connected.G16: Not connected.G4: Connected to the signal pin of the DHT11 sensor.G0: Not connected.G2: Not connected.G15: Not connected.SD1: Not connected.SD0: Not connected.CLK: Not connected.
KY-015 DHT11
5V: Powered by the Breadboard Power Module.S: Connected to the G4 pin of the ESP32.GND: Common ground for the circuit.
Square FSR
A0: Connected to the 3V3 pin of the ESP32.A1: Connected to the G34 pin of the ESP32 and one end of the 10k Ohm resistor.
Fan Motor L9110
INB: Controlled by the G19 pin of the ESP32.INA: Controlled by the G18 pin of the ESP32.VCC: Powered by the Breadboard Power Module.GND: Common ground for the circuit.
1N4007 Rectifier Diode
Cathode: Connected to the VCC of the fan motor L9110.Anode: Connected to the collector of the NPN transistor.
Resistor (10k Ohms)
pin1: Connected to the A1 pin of the Square FSR.pin2: Connected to the ground.
Resistor (1k Ohms)
pin1: Connected to the emitter of the NPN transistor.pin2: Connected to the G5 pin of the ESP32.
NPN Transistor (CBE)
collector: Connected to the anode of the 1N4007 diode and GND of the fan motor L9110.base: Not connected.emitter: Connected to one end of the 1k Ohm resistor.
I2C LCD 16x2 Screen
SCL: Connected to the G22 pin of the ESP32.SDA: Connected to the G21 pin of the ESP32.VCC (5V): Powered by the Breadboard Power Module.GND: Common ground for the circuit.- Other pins are not connected.
Documented Code
No code was provided for the microcontroller. The documentation of the code would typically include descriptions of the functions, the main loop, and any interrupt service routines, along with comments explaining the logic and purpose of each section of the code. Since no code is available, this section cannot be completed.