Skip to content

Felix-MoBu/esp32-fan-controller

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ESP32 standalone fan controller with BMP180 temperature sensor

This project is inspired by ESP 32 fan controller with MQTT support by KlausMu. I have no need to use MQTT or a TFT Display so i went with a web interface. Here we are using the ESP32 to setup a simple web page to controll 4 pin cooling fans by the room temperature

Main features are:

  • Setting minimum and maximum fan speed and temperature
  • Fan is reacting to the change of temperature
  • Disabling / enabling via webpage
  • Showing current temperature on the web page
  • Simple API readout -> easy to integrate in Home Assistant
  • Secured with a random 32 char API-Key to prevent manipulation
  • Mobile device friendly interface

Control Panel Control Panel

Setup

  1. Get all your components from the parts list
  2. Setup the wiring accoring to the wiring diagram
  3. Follow the steps for PlatformIO (VS-Code) or Adruino IDE
  4. Check the terminal or your router to get the ESP32 IP-Address
  5. Open a browser, navigate to the IP-Address and setup your API-Key

Control Panel

Parts list

mandatory

Function Parts Remarks approx. price
microcontroller ESP32 e.g. from AZ-Delivery 8 EUR
fans 4 pin fan (4 pin means pwm controlled), 12V tested with standard CPU fans like ARCTIC P8 and P10
e.g from Amazon
27 EUR for 5pcs
power supply 12V for fan (depending on fan)
and step down module
e.g. with 5.5×2.5 mm coaxial power connector 12 EUR
voltage regulator LM2596S DC-DC step down e.g. from AR-Delivery 5 EUR
temperature sensor - BMP180
- 2 pullup resistors 3.3 kΩ (for I2C)
e.g. from AZ-Delivery 5 EUR

optional

Function Parts Remarks approx. price
measuring tacho signal of fan - pullup resistor 10 kΩ
- RC circuit: resistor 3.3 kΩ; ceramic capacitor 100 pF
< 1 EUR
duepon connectors 1x1 and 2x1 female e.g. Set from Amazon 10 EUR
for 620pcs

Wiring diagram

Wiring diagram

Flash with PlatformIO

There is a quide for installing PlatformIO

  1. Open the project folder in VSCode and locate main.cpp
  2. Change the WiFi name and password to your data (maybe hostname too)
  3. Select your board type and COM port
  4. Flash to your board
  5. In the serial terminal there will be the address of your ESPs web side

Flash with Arduino IDE

ToDo

Testing

Simply open a browser window and navigate to the IP-address thats given in the serial terminal. The first time you will get your API-Key displayed here too.

You can also use programs like curl so interact with the webserver. E.g. curl http://YOUR_IP/YOUR_API_KEY/json to read out current temperature and fan speed. The response sould look something like this: {"temperature": "28.40","speed": 120}

ToDo list

  • Add flashing with Arduino IDE instructions
  • Supprot for BME280 over SPI
  • Receive JSON commands via simple API

About

ESP32 fan controller with BMP180 temperature sensor

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages