Home Assistant 4-Wire PWM Fan Controller Prt 1 - PCB
HTML-код
- Опубликовано: 3 июл 2024
- My How-To on building a fully automatic, stand-alone ESPHome / D1 Mini based 5-24V PWM PC Fan Controller - Ideal for keeping any equipment cabinet or WLED controller cases cool.
Using a DALLAS temperature sensor it'll control the fan speed, from 0 to 100% automatically - based on a threshold temperature you set in Home Assistant.
This project also features an ALARM Function that will alert you if the fan has been running at MAX speed for longer than 10 seconds!
🎬 Part 2: ESPHome Flash and Code Breakdown: • Home Assistant 4-Wire ...
🎬 Bonus: Custom Dashboard Button: • Custom Button Card 7: ...
🎁Schematic and ESPHome Code ↪ github.com/3ative/PWM-Fan-con...
Parts List and Links: kit.co/3ative/pwm-fan-project
💖 I hope you like this Home Assistant setup guide for your smart home 💖
🎬 THE LINKS - Files / Help / Support:
- 🛒 Other files & Merch: store.3ative.com
- 💎 3ATIVE DISCORD: / discord
- ☕ Buy me a Coffee: www.buymeacoffee.com/3ative
- 💕 PATREON: / 3ative
- 💯 Get the Gadgets, Devices and Tools I use: Amazon UK: amzn.to/3uRw8fi
* As an Amazon Associate I earn from qualifying purchases. Using this link ⇈ provides small monetary support for my channel at no extra cost to you.💖
#homeassistant #Automatic #PWMFan
Chapters:
00:00 Intro
00:30 1.1 - Put a D1 Mini On It !
01:02 1.2 - Cutting the Tracks
01:36 1.3 - Jumper Wire (Blue)
02:54 1.4 - 1K Resistor
03:42 1.5 - The 5V PSU
04:31 1.6 - Adding the MOSFET
05:33 1.7 - Jumper Wire (Black)
06:41 1.8 - Drilling another Track
06:57 1.9 - The Fan Headers
07:56 1.10 - The Input Terminal Block
09:12 1.11 - Jumper Wire (Yellow)
10:37 1.12 - Trim the VeroBoard
11:23 2 Connecting the DALLAS Sensor
12:44 Outro
~-~~-~~~-~~-~
Check out: "IKEA Air Quality Sensor: 7-in-1 ESPHome Update Hack"
• Hack the IKEA Air Qual...
~-~~-~~~-~~-~ Хобби
This is great, thanks me!
This is great! I'd love to see you review the schematic on screen to explain what we're going to see in the assembly process.
I hear ya... But, it's such a simple circuit - I'm not sure there would be much benefit.
All the 'magic' of this project is in the ESPHome Automation(s). 😎
@@3ATIVE It would be great to have a schematic showing which pins connect to each of the parts. It's quite hard to follow from the video. sorry
Hi this is just what I’m looking for, great project. In my project I would like to have 3 temp sensors linked to 3 sets of fans, if this is at all possible? Im hoping to control each cabinet space separately but from one board maybe esp32. Any help with this would be appreciated.
This is great!
I've been looking for something similar.
My use-case is ventilating the ottoman storage in a sofa, to prevent blankets getting foisty.
So instead of temp, the environmental vairiable would be humidity.
Thank you. I'm glad to hear you found it useful. Nice use-case too 👍
_I heard from another viewer who's them in a similar manner... for his Cigar Collection cabinets._
@@3ATIVE I'll be doing both for sure.
Am I right in thinking I'll be fine without 5v psu the if I'm powering via usb? or am I likely to cause myself issues? That's there to step down 12v power right?
Parts List and Links: kit.co/3ative/pwm-fan-project
What would you use this for?
Great video, thanks for the effort, the Dallas sensor isnt on the parts list, will any dallas sensor do the job? DS18B20? want to use the ones with the metal tube end.
Thank you for the feedback.
Opps I forgot to add the sensor... But, yes - any DALLAS or DS18B20 sensor will work here.
Play at 0.75. Thank me later :)
Lmao 🤣
Thank you for this awesome video and plans!! I have learned a lot so far. What I can’t figure out is where the functions for map(), set_speed(), and process() are defined and how do you include them in the project. I’m guessing these are custom C++ functions you wrote and are included in the project somehow in the lambda section for setting the fan speed.
Can you explain how you did that please?
Hi Boss,
Thank you. I'm so happy to hear my little tutorial has helped you on your ESPHome / Home Assistant journey.
As for the coding...
It would have been better if i'd have commented and asked on the correct video - Part Two is all about the coding... and you kinda confused me for a second. I was like, Wait, What, there's no map / speed / process here! LOL
Basically:
A "Lambda" function tells the ESPHome compiler that what follows is C++ code. Therefore, you simple use C++ to program what's needed.
To break it down a bit more:
"map" is a standard function in programming - It takes a range of numbers and "MAPS" them to another range.
"set_speed(xxx)" and "call.perfom()" are standard functions in ESPHome. In this case they send, then execute values to the "fan:" component of ESPHome.
If you want more info on Lambdas, please take a look at this page: esphome.io/guides/automations.html#config-lambda
@@3ATIVE Thanks for the super fast reply!! I'll do some more studying and figure out how to include my own C++ code for the map function. ESPHome is new to me as I've only been using it for a few weeks.
I would like to add the ability to monitor the fan speed using the tachometer sensor built into the fan and display that speed in Home Assistant. I'd also like to display the fan output speed in percentage on the Dashboard.
I really like how you used the small 3 pin 5volt regulator and the MOSFET for the fan switch. Much smaller than the buck converter and relay I was originally planning on using.
@@bakercxj This may help: esphome.io/components/sensor/pulse_counter.html
I'd definitely like to build a few of these. Can you add a schematic please?
No worries: I've added a GitHub page link, in the description, there you'll find the schematic.
@@3ATIVE Awesome! Thank you.
Hi, and tanks for a great video! I dont have stp16 but irf520, can I use that instead?
I can't say for sure, I haven't tested an IRF520. However, the datasheet states it has a Gate-Source Voltage of 2-4V.
So... 'maybe' - When you test, please let me know if it works.
Hi, i've made several attempts to get this working, with no luck as yet. I only have a 3 wire fan....is THAT my problem ? As you stated in an earlier comment, you are only using 3 wires in your design, so I naturally assumed that a 3 wire fan would work......fell free to take the piss BIG TIME if I do need a 4 wire fan lol
All the code is doing as expected, it thinks the fan is 'ON', but it's not.
Thanks for any help you can offer.
So sorry fella, I don't know how I missed it. I did state I'm only using 3 of the 4 wires on my fans.
I forgot that even thou 3-wire fans have, well only 3 wires... NONE of them are a PWM input - which this project uses for speed control. So, no you've not missed anything - this won't be able to do anything other than turn your fan on/off - No Speed control.
Here's why:
* 4-Wire Fans:
1. 0V
2. +V
3. Sense Pin
4. PWM in
*3 Wire Fans:
1. 0V
2. +V
3. Sense Pin
@@3ATIVE ahh, thank you for clearing that up for me, I’ll have another look as my 3 wire noctua won’t even power on. I’ve ordered a 4 wire one to give that a try.
Thanks again 😀
Really sorry to be a PITA, BUT.....i got a new 5v 4wire noctua fan from amazon. I have tested it out on 2 boards but i've got some problems......the fan WILL NOT start without me giving it a nudge, and if i use the slider to increase the percentage the fan stops spinning when i get to about 80%.
While i move the slider the fan doesn't run any quicker....
If i hold the dallas sensor in my hand to warm it up the fan increases as it should.
My biggest problem tho is that the fan won't start without a 'nudge'
I have tried using several 5v psu's and i get the same result.
Hopefully you have a quick fix.
Thanks for reading this.
Really sorry to be a PITA, BUT.....i got a new 5v 4wire noctua fan from amazon. I have tested it out on 2 boards but i've got some problems......the fan WILL NOT start without me giving it a nudge, and if i use the slider to increase the percentage the fan stops spinning when i get to about 80%.
While i move the slider the fan doesn't run any quicker....
If i hold the dallas sensor in my hand to warm it up the fan increases as it should.
My biggest problem tho is that the fan won't start without a 'nudge'
I have tried using several 5v psu's and i get the same result.
Hopefully you have a quick fix.
Thanks for reading this.
Hey fella, no PITA perceived. Not sure what to advise here... I tested my setup with both 5V & 12V fans. Maybe those Noctua 5V fans will need a code tweak. The best I can do is get one to see what's happening.
- You won't be able to post the full link but, if you reply with the Amazon part number for the fan you brought, I can buy one to play with.
@@3ATIVE You're a star.....the fan i got was noctua NF-A4x10 5V PWM
is that the only info you need ?
Found another number.....B07DXS86G7
I think i'm being a bit thick here.....BUT what fan do i need for this ? Is it 3 wire or 4 ?
Errm... well... it's titled: "4-Wire PWM Fan Controller" LOL
However, I'm only using 3 of the wires, the 4th being an RPM pulse return. And I believe 3 & 4 wire fans have the same first 3 connections in the same order.
@@3ATIVE yeah yeah, ok, so i missed that part lolol
Thanks for getting back to me, it's appreciated
The name of the song in background?
Just Breathing - NEFFEX (3ATIVE REMIX)
@@3ATIVE Ty
Why have you sped up your speech, you sound like Bradley Walsh when he is reading the questions to the chaser in the final round for £100000. I don't know what is more sloppy your soldering or your video editing. Keep trying though you might get it right someday.
LMAO - Yeah soz about that. I had a lot of info to get through and I guess I got a bit carried away. _I do breathe honest_
@@3ATIVE Slow down and monetize