Tutorial - How to control a PWM fan with an ESP32 and Home Assistant
A quick tutorial on how to remotely control a regular computer PWM fan with Home assistant and an ESP32 Micro-Controller.
Components:
ESP32: https://amzn.to/3PL4nPS
USB Power Adapter: https://amzn.to/46F9WFS
PWM Fan: https://amzn.to/3PL4nPS
Breadboard: https://amzn.to/3Q3AT07
Jumper Wires: https://amzn.to/43l8hSF
DC Connector: https://amzn.to/3XEDKhu
CODE:
sensor:
- platform: pulse_counter
pin: GPIO13
name: PWM Fan RPM
id: fan_pulse
unit_of_measurement: 'RPM'
filters:
- multiply: 0.5
count_mode:
rising_edge: INCREMENT
falling_edge: DISABLE
update_interval: 3s
output:
- platform: ledc
pin: GPIO12
frequency: 10000 Hz
id: fanhub_pwm
fan:
- platform: speed
output: fanhub_pwm
name: "PWM Fan"
🔥These links support my madness🔥
💲 NordVPN: http://www.bmbsucks.com
💲 Members-Only Punishment: https://bit.ly/bmbmembers
💲Amazon Bookmark: https://amzn.to/2f8LWDt
(Save as bookmark to use if you buy anything)
💯These are my other Socials💯
🔹Twitter: https://bit.ly/BMBTw
🔹Instagram: https://bit.ly/bmbinstagram
🔹Tik-Tok: https://bit.ly/bmbtock
🔹Discord: http://bit.ly/BMBDISCORD
📷This is the gear I use🎥
💲Studio Camera: https://amzn.to/3itlHdT
💲Mobile Camera: https://amzn.to/3UjtHuX
💲Primary Mic: https://amzn.to/34qv2Hw
💲Secondary Mic: https://amzn.to/2qMipHW
💲Audio Recorder: https://amzn.to/3gOIfFn
✉️P.O. Box for Mail✉️
Byte My Bits
P.O. Box 77
Haysville, KS 67060
00:00 Intro
00:17 Components
01:01 Need to know
01:24 Plug In ESP32
02:46 Edit Code
03:46 Wire 12v Power
04:32 3rd Pin Tach
05:02 4th Pin PWM
05:19 ESP32 Power
05:53 Pre-Flight Check
06:39 Plug In and control
07:42 Can add more sensors