Home › Projects › ESP32 temperature-controlled fan: DS18B20 and a MOSFET

ESP32 temperature-controlled fan: DS18B20 and a MOSFET

by Zen Circuit Lab · published today · 0 opened in the lab · 0 page views

ESP32 temperature-controlled fan: DS18B20 and a MOSFET: the circuit on the lab bench

Open in the lab ▸Make my own copy

A DS18B20 probe reads the temperature every 2 s and the ESP32 sets the fan speed with 25 kHz PWM through a logic-level MOSFET: off below 26 °C, rising to full at 34 °C, and full speed if the probe stops answering. A diode across the fan catches its kick when the MOSFET turns off. Open it and press Run: the sketch is inside the board (click the board, then Code). Every part, pin and resistor matches what you would build on a real breadboard; the guided build of the same name has the test sheet and hidden faults.

What is on the bench

11 parts, 19 wires, with a sketch (the program runs in the lab). Boards: ESP32 DevKit.

Resistor3
Bench power supply1
ESP32 DevKit1
USB charger / port1
DS18B20 temperature sensor1
N-channel MOSFET1
DC motor1
Signal diode1

Put it on your page

The project runs live inside the frame: readers can press buttons, turn knobs and read the meters.

<iframe src="https://zencircuitlab.com/embed/zclcfan" width="100%" height="560" style="border:1px solid #2f363a;border-radius:10px" loading="lazy" title="ESP32 temperature-controlled fan: DS18B20 and a MOSFET on Zen Circuit Lab"></iframe>

Link

https://zencircuitlab.com/p/zclcfan

Published by its author under the lab's community terms: it may be opened, copied and changed by anyone. Simulation results are for learning; check a real build against the parts' datasheets.