Ultimate Fan Project V3.1 - Home Assistant ESPHome Sonoff

Тәжірибелік нұсқаулар және стиль

The Ultimate Fan Project (V3.1) uses a Sonoff Basic and a few extra components to take a basic 'dumb' 3 Speed desk fan and make a Wi-Fi enabled 'smart' Fan.
This Step-by-Step tutorial will take you through everything you need make your own 'Smart Fan' - Which can also be used for most ceiling fans too!
Programmed in ESPHome it can be added to Home Assistant AND controlled by Automation and Alexa Voice, as well as keeping the original fan buttons functional... Oh yeah, I also add some speed indicator LEDs!!!
🎁ESPHome Code ↪ github.com/3ative/ultimate-fa...
🎬 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 #tutorial #UltimateFan
Chapters:
00:00 Intro
0:12 1 - Preparing the Fan
02:13 2 - Preparing the Relays
03:12 3 - Preparing the LEDs
04:38 4 - Building the Controller Board
11:03 5 - ESPHome and Programming the Sonoff
13:07 6 - Connecting the Controller to the Sonoff
14:14 7 - Bench Testing
16:48 8 - Putting it all together
23:03 9 - Final Function Testing / Demo
23:54 10 - Alexa Control and Node-Red
26:41 Outro
~-~~-~~~-~~-~
Check out: "IKEA Air Quality Sensor: 7-in-1 ESPHome Update Hack"
• Hack the IKEA Air Qual...
~-~~-~~~-~~-~

Пікірлер: 105

  • @3ATIVE
    @3ATIVE2 жыл бұрын

    Check the video description for links to the ESPHome and Custom Button Card Code.

  • @SimonKing1969
    @SimonKing19694 ай бұрын

    Found this video a few weeks ago, it inspired me to change my son's dumb fan to smart. I used ESPHome via Home Assistant, D1 Mini and three relays instead of a Sonoff Basic and two relays, linked into Alexa via Home Assistant. Son loves it as he doesn't need to get out of bed to change fan speed now :-) I've taken a few pictures and can share code if anyones interested.

  • @3ATIVE

    @3ATIVE

    4 ай бұрын

    That's great to hear. I too enjoy controlling my Fans with Alexa. But also Home Assistant automation. Check out my Thermostat project to have the fan change speed on its own! :)

  • @muktheo

    @muktheo

    4 ай бұрын

    Yes please for the code for reference 😍

  • @blakadders
    @blakadders2 жыл бұрын

    Nice work. I am amazed Sonoff Basic manages to power all that reliably

  • @3ATIVE

    @3ATIVE

    2 жыл бұрын

    Wow, I'm honoured - I got a comment from @blakadder ! Firstly, thank you for your work on device compatibility, lists and templates - they're v/useful. 👏 So yeah, the Sonoff is an ESP8266 at heart (shame there's not more GPIO's available) However, it'll run an I²C bus well enough, so.... 😉

  • @lmamakos
    @lmamakos2 жыл бұрын

    I'm new to your channel, and I really, really like and appreciate the style and presentation of your "project" video. Plenty of detail to be able to follow along, and graphic showing the connections as you go is a very nice touch. You clearly invested a lot of effort in the production of the video and it shows! Thanks for doing all this and sharing your work. Well done!

  • @3ATIVE

    @3ATIVE

    2 жыл бұрын

    💖Dude, thank you so much for these immensely kind words. It's comments like yours that make the whole thing worth-while. I try to make my little tutorials as accessible as possible. My mind-set is, what would I want to see in a step-by-step guide. This is the 2nd iteration of this particular video, the first one wasn't "good enough" so I re-filmed the whole thing from scratch. 😁 I hope I can honour your subscription with more quality content, thank you again for your wonderful support. 👍

  • @JesseG2573
    @JesseG25732 жыл бұрын

    Nice project. As always you are very descriptive.

  • @3ATIVE

    @3ATIVE

    2 жыл бұрын

    Thank you! 👍 👀 I do my best to make sure everything is covered in the hope it's as useful and easy to follow as possible.

  • @Rottweilerz
    @Rottweilerz2 жыл бұрын

    Very cool little project!

  • @3ATIVE

    @3ATIVE

    2 жыл бұрын

    Thank you. I hope you find it useful. 👍

  • @NickWattts
    @NickWattts Жыл бұрын

    This was awesome, i think I'll end up watching this a few hundred times while i try to do one myself... Unless you fancy selling your fan 😊

  • @3ATIVE

    @3ATIVE

    Жыл бұрын

    Thank you, glad you think so. Take your time when you follow along, it shouldn't be super hard to replicate. LOL You really DON'T want to buy one of mine. 😁

  • @MrLapomme972
    @MrLapomme972 Жыл бұрын

    Done with athom-relay-board-x4, thanks for the tips !

  • @3ATIVE

    @3ATIVE

    Жыл бұрын

    I just got some of those myself and was thinking of the same "updated" tutorial.👍

  • @MrLapomme972

    @MrLapomme972

    Жыл бұрын

    ​@@3ATIVE So road to "ultimate fan project v4" great idea, for exemple you can use the "fan" "speed" esphome component.

  • @evertidema3338
    @evertidema33382 жыл бұрын

    HI, Many thanks for the video. I have build the automated fan for indoor biking. Together with node red it is now linked with my heartrate during exercise. I did have to watch the video quite a few times to figure out the electrical diagram. Many thanks

  • @3ATIVE

    @3ATIVE

    2 жыл бұрын

    Thank you Evert Idema, I'm glad it was useful for ya. 'Cool' application ! 😉

  • @MrLapomme972
    @MrLapomme972 Жыл бұрын

    Incredible, thanks for this vidéo, verry well explain for any noob. Will try it soon.

  • @3ATIVE

    @3ATIVE

    Жыл бұрын

    Why thank you for the feedback. *** PLEASE BE CAREFUL When working with Mains Powered Devices... *** Remember to ALWAYS Unplug when working on them. Enjoy.

  • @MrLapomme972

    @MrLapomme972

    Жыл бұрын

    @@3ATIVE appreciate the kind reminder, I will be focus as much as usual when I work with AC 220V.

  • @simonburke6681
    @simonburke66812 жыл бұрын

    Nice work, thanks for sharing :) I've read it's good practice to add a 0.1uF ceramic decoupling capacitor between Vcc and GND on just about any IC to prevent interference with the clock ;-)

  • @3ATIVE

    @3ATIVE

    2 жыл бұрын

    Thanks Simon... it took a while to get right. 😉 Indeed, decoupling capacitors are used everywhere, it's not something I've used much in the past - But, they do have a huge effect on stability. 👍

  • @gepettoautomobile
    @gepettoautomobile2 жыл бұрын

    As always a very nice project, very detailed with stsp by step. I wonder how many hours you work for half hour movie. All respect for the work you are doing

  • @3ATIVE

    @3ATIVE

    2 жыл бұрын

    Thank you sir for your support. I hope it was useful, I do my best to profile every step. This has been an on-going project and I've been improving it for some time - Hence the "3.1" version. 😁

  • @TravisPickle
    @TravisPickle Жыл бұрын

    thx

  • @3ATIVE

    @3ATIVE

    Жыл бұрын

    You are welcome.

  • @NicksStuff
    @NicksStuff6 ай бұрын

    Have you taken it apart to see how the speed are achieved? If it's with a triac, you could add a continuous variation

  • @3ATIVE

    @3ATIVE

    6 ай бұрын

    Yes, of course.... It's a simple design. It uses three coils, one per speed. So energising each wire (shown) selects the speeds 1-2 or 3. ... No Triacs or anything complected LOL

  • @matthewbennett7693
    @matthewbennett76932 ай бұрын

    Hi, just came across this video and think it will be perfect project to get started in DIY tinkering. I have a 2 speed fan (off, speed 1, speed 2) any recommendations for hardware to achieve similar results? As only need 2 relays. Massive thanks in advance have watched a lot of your videos now great content

  • @3ATIVE

    @3ATIVE

    2 ай бұрын

    Thank you for the feedback and the support. I'm glad you're finding my content use/help full. As for your 2-Speed fan version: I think the easiest option would be simply to use single relay module, instead of the 2 relay module. With a little bit of code tweaking, you'll be good to go.

  • @mlmunro
    @mlmunro Жыл бұрын

    Hi, great project by the way. I was wondering what the point of the old off button (black wire) was. Is there any functionality in that button?

  • @3ATIVE

    @3ATIVE

    Жыл бұрын

    Hi Mark, _HEY EVERYONE, Mark's here! LOL_ Ok, so there's two things: 1. The Black wire is the Common for the Buttons (Electrically). 2. The Black Button itself is the release for the other Buttons (Physically) Normally, all buttons latch (stay down / on) and the Black button releases any of the buttons to turn off the fan. Latching is not needed anymore, my project does that in the code - So, I remove the latching mechanism from the button (that's those metal plates)

  • @lundgren44
    @lundgren444 ай бұрын

    Thanks for a great tutorial! Have just got a similar setup to work, it’s awesome ☺️ maybe a noon question though, what is the purpose of the 4.7k resistors? Are they needed?

  • @3ATIVE

    @3ATIVE

    4 ай бұрын

    Those keep the I2C data lines pulled High, which is needed to maintain a proper signal level.

  • @lundgren44

    @lundgren44

    4 ай бұрын

    @@3ATIVE thanks for quick reply! Is it only during boot or is it needed all the time? Just for my understanding :)

  • @3ATIVE

    @3ATIVE

    4 ай бұрын

    @@lundgren44 "...needed to maintain" - So, all the time. LOL

  • @brunosalerno3578
    @brunosalerno35782 жыл бұрын

    resistance and 4.7K crazie

  • @3ATIVE

    @3ATIVE

    2 жыл бұрын

    You'll have to be more specific :)

  • @thebatu89
    @thebatu892 жыл бұрын

    Hi, any plans for a follow up for stand fan with oscillation control?

  • @3ATIVE

    @3ATIVE

    2 жыл бұрын

    No real plans, thoughts yes... I had an idea for X & Y control (Up/Down & Left/Right) using either Steppers or Servos but, realised it probably a bit niche. 😊

  • @EngineerK
    @EngineerK2 жыл бұрын

    This was awesome but being an electronics noob I was left with more questions. Any interest in breaking down some of the electronics logic (i.e. MCP008) works a bit more? Totally understand conceptually what you are doing but lost on the low level electronics and basic things like why a capacity cleans up the power. Any websites or YT channels you can point me too?

  • @3ATIVE

    @3ATIVE

    2 жыл бұрын

    Thanks. As for basics - TBH, I wouldn't know where to start and it's certainly not something my channel can provide, sorry. I'll do my best to address any specific questions tho, for instance Capacitors: Let's imagine electricity through a wire (or around a circuit) is the flow of water through pipes and this 'water' has two properties: 1. It's Pressure - Which would be electrical 'Voltage' 2. The speed at which it travels - Is like electrical 'Current' Also note unlike water in a pipe, electricity is not 'pushed', rather it is drawn from the supply So, in this system there is a supply (5 volts coming from the Sonoff) and a load (The Relay board). Sometimes the relays draw more current, remember this is the speed of the water, than the Sonoff can supply. So in order to meet this extra loads and keep the water flowing at the same or higher speed, some of the pressure is used. This drops the pressure (the 'voltage' drops) and if the Sonoff looses too much pressure (Voltage) than its ESP chip likes, it can cause chip to reboot... and we don't want that. Adding a Capacitor in the circuit is like added a bottle of water on top of the pipe. So when the pressure (Voltage) starts to drop, the weight of the water in this bottle can keep the pressure up! However, the bottle is small and can only inject its water for a short period... So it's just a short extra burst and in this case is enough to handle the short burst the relays need to more their contacts - once moved they don't need as much. Finally, after the extra demand is no longer needed, the bottle can refill ready for the next short high demand.

  • @muktheo
    @muktheo8 ай бұрын

    Hi, good day! First of all i want to say thanks for your basic speed fan convert. Ive been use it since 6 month ago. And now i have plan to upgrade became the ultimate version 😂 Unfortunately its very hard in my country to find io expanded mcp23008, the one that available is PCF8574.. May I ask you about the RESET PIN in MCP23008? it is necessary? Because the PCF8574 didnt have RESET PIN. For the rest is similar i think. Please kindly help. Thank you

  • @3ATIVE

    @3ATIVE

    8 ай бұрын

    Hi there, I don't use the Reset pin in any, it's just held high for the MCP Chip to work. If your's doesn't have one, there's nothing to worry about. Please check out the Datasheet for your chip for more info.

  • @AcidSleeper
    @AcidSleeper2 жыл бұрын

    Great video! Question: 1K and 4.7K resistors, what watts and % are they?

  • @3ATIVE

    @3ATIVE

    2 жыл бұрын

    Thank you, I hope you find it helpful. As for the resistors - In this install anything will do, as there's little current being used. However, I used 0.25W but, I don't know about the tolerance sorry.

  • @AcidSleeper

    @AcidSleeper

    2 жыл бұрын

    @@3ATIVE Thanks

  • @clintAdventures
    @clintAdventures2 жыл бұрын

    awesome project! any chance you can share the nodered code online to download though?

  • @3ATIVE

    @3ATIVE

    2 жыл бұрын

    LOL You do like your Copy&Paste ! - No worries, I've uploaded the "Function Node Code" to the GitHub Page for ya. 😎

  • @rkllj
    @rkllj Жыл бұрын

    Hello! Thanks for the video, I watched it in awe. I'm afraid the crown coronated the wrong king, it should've been you. I have some questions, if you don't mind. I'm a software developer by trade and have hardly touched any hardware in my life. I have a dumb fan which I took upon myself to remove the parts and inspected it to the degree that it looked very similar to yours. I really want this dumb fan to be turned into something controllable. Given that I have absolutely no background in setting up electronics, is this doable? How do you even get started to know about the electronics behind all of this? I feel so lost, do you have any hint where someone can learn about this? I've set up home assistant with ease, but these gadget(for lack of a better term) like the sonoff, that relay and the controller board are a bit way above my head. But I do wish to learn it. Is this possible to do with only a raspberry PI and its GPIO connectors? Or is that something completely different? Erik

  • @3ATIVE

    @3ATIVE

    Жыл бұрын

    👋 Hi Erik, Thank you for the kind words. I think for such an epic occasion, I would have learnt my script and not relied on reading my lines from people holding folders. 😉 As for the Fan. I don't know about yours... although, most seem to work the same way... The buttons I show in the video simply switch the Mains Live between the 3 wires that go to different coils in the Motor. Obviously I went the whole way by adding LEDs and wiring the original Buttons all back the ESP8266 (in the Sonoff) via a "Port Expander" chip, which added all the extra GPIO pins needed for them. For a more basic setup, the first video I made about converting a 3-Speed Fan, just concentrated on switching the 3 speed wires with relays. You can watch that here: kzread.info/dash/bejne/qKR3rLqImq6akrg.html My best advise to learn this sort of thing, is to start small with low-power boards and just build stuff. Sure you will make mistakes, break things and destroy components... but, that's where we all started. 💯 I'd be happy to answer any specific questions you have or point you in the right direction... of course I can highly recommend any of my other tutorials. LMAO As for using a RPi, sure you can, BUT... that will need 5V to power it. I used a Sonoff as it is also Mains powered, so making the whole conversion simpler. 🚩🚩🚩Please Take Care when working with Mains voltages 🚩🚩🚩 If you are not completely happy with your skills and/or in anyway nervous, please seek help and advise from a trained professional. #StaySafe.

  • @grommet20002000
    @grommet200020002 жыл бұрын

    I used a sonoff4 channel and set tasmota to interlock

  • @3ATIVE

    @3ATIVE

    2 жыл бұрын

    Were you able to add the speed indicator LEDs and make the fan buttons work again?

  • @grommet20002000

    @grommet20002000

    2 жыл бұрын

    @@3ATIVE the sonoff 4ch has led but i was not able to use the original buttons no.

  • @philharris9631

    @philharris9631

    2 жыл бұрын

    @@grommet20002000 - it was having the local control that made me decide to try this project ... it would have been a total no-go with the family if they'd had to get out a phone or a tablet to control them and only my stepdaughter will use Alexa to control things - my other half and my stepson simply won't use Alexa to control things.

  • @coryhyatt2035
    @coryhyatt2035 Жыл бұрын

    Is this an EC motor or AC motor? Im wondering about trying to integrate an 8 inch inline AC Infinity duct fan into home assistant. It has an 8 speed fan controller and an EC motor. Thank you.

  • @3ATIVE

    @3ATIVE

    Жыл бұрын

    Typically these are AC motors with multiple coils for the speeds.

  • @coryhyatt2035

    @coryhyatt2035

    Жыл бұрын

    @@3ATIVE thank you

  • @3ATIVE

    @3ATIVE

    Жыл бұрын

    @@coryhyatt2035 You are welcome.

  • @philharris9631
    @philharris96312 жыл бұрын

    Superb project there good sir! I'm out of work at the moment so - as I have most of the bits floating around anyway - I'm about to have a go at this project as it won't need much else buying (I don't have the decoupling caps in my stash) but I've already been having quite a bit of fun making up 3D printed carriers and stacking mezzanines for the different boards to fit securely in the bottom tray of the fan housing so it all looks nice and tidy (yes I'm that OCD) including one that mounts along with the switches (using the same screws) that will take the LEDs ... Anyway, do you know what version of Sonoff Basic you used? The Sonoff Basic case you have there looks the same as mine do but the board layout is different ... wondering whether your Basic is an R2 and mine are R1's perhaps? Do you know if your code is specific to a particular Sonoff Basic version?

  • @3ATIVE

    @3ATIVE

    2 жыл бұрын

    Hey Phil, thank you for the feedback. 👍 😢Sorry to hear about your work situation. Still, Silver-lining - More tinker-time! LOL But, I hope you find something soon thou. 🎁 Like you, my OCD would have preferred a set of 3D printed mounts but, I had to make it as accessible as poss. My Sonoff's were recently brought and I think that means they are the R3. Either way all Sonoff Basics have the pins (Tx / Rx / 0v) and you should be able to find the +5v (relay pin) in the same way I've shown. As for the code, yes... All Sonoff Basics are an ESP8266- ish and so the code I provided will work on all of them. Have fun and stay safe. 👌

  • @philharris9631

    @philharris9631

    2 жыл бұрын

    @@3ATIVE - yeah, the 3D mounts do tie it to a specific brand and model of fan but I have a few identical ones here so it's worth the effort. Thank you so much for the very speedy reply ... I didn't even know you existed before I saw the fan video so I'm now subscribed. :-)

  • @3ATIVE

    @3ATIVE

    2 жыл бұрын

    @@philharris9631 Indeed... I got my 3D printer last year, in the 11.11 sales from Aliexpress. It's the best gadget EVER!! I call it my "New Toy" that prints "New Toys!" LOL 💖You are welcome. I try and answer every comment within a reasonable time, sometimes I sleep so, there's a delay LMAO Welcome to my channel and thank you for the sub, I hope I can continue to make your support worthwhile. 😎

  • @philharris9631

    @philharris9631

    2 жыл бұрын

    @@3ATIVE - I bought this CR-6 SE last year on an Amazon Black Friday deal and as it was heading towards Xmas they had the extended returns thing in place so I sat on it (not literally) for several weeks trying to decide whether to keep it or not before opening it. I'd had a couple of other 3D printers previously - a TronXY and an ANET and to be honest they were both so bad that I never used them. This one however seems to be constanly in use - even the other half has said that it was a worthwhile purchase - shame that the kids have absolutely no interest... :-( Recently I've been doing inline housings for the Sonoff Basics including ones that have earth terminal passthrough (for IEC cables) and trailing socket outlets... :-)

  • @3ATIVE

    @3ATIVE

    2 жыл бұрын

    @@philharris9631 Nice 💕 I've only got the ENDER 3 V2 - Although for my first printer I've had zero issues. It's been upgraded with a BL Touch and is running on OctoPrint which is SOOOO cool. Being able to send stuff to it and watch everything in Home Assistant. I got the whole thing on a Sonoff Basic and a script that waits for the bed temp to drop below 55c, send a shutdown command to the Rpi before shutting off the power to everything.... I can even Alexa voice control it now! LOL I was debating whether to get a printer for over a year. Questioning if i'd use it enough. Since getting it though, it's printing a couple of things week. It's so handy to have, I can print stuff faster than Amazon takes for a next day delivery! 🤣 Cool idea for you Sonoffs - Have you shared the STL on-line anywhere??

  • @androx5883
    @androx5883 Жыл бұрын

    I need help sir, when i put a relay the voltage always drop, i use 220uf 16 volt capacitor then change it to 220uf 35 volt but still dropping. Should it's 220uf 25 volt exactly? do you have any suggestions? Thx..

  • @3ATIVE

    @3ATIVE

    Жыл бұрын

    Have you tried a different Relay Module ?

  • @androx5883

    @androx5883

    Жыл бұрын

    @@3ATIVE yes one chanel relay, when it turns on, voltage drop immediately

  • @androx5883

    @androx5883

    Жыл бұрын

    Solved, moved ground to the next 5v pin. Somehow my device just got 4 volt at the ground pin. Thank you sir for this great tutorial, really helpful. Great chanel!! Thx..

  • @3ATIVE

    @3ATIVE

    Жыл бұрын

    @@androx5883 That's great new, glad you got it sorted. 👍 Also - Thank you for the kind words about my content, it means a lot to me. 🙏

  • @3ATIVE

    @3ATIVE

    Жыл бұрын

    @@androx5883 And you have defo connected it correctly and to the 5V pin, as shown?

  • @ooslum
    @ooslum2 жыл бұрын

    Hi, I use Tasmota and node-red in a very amateur way, when your using Alexa on this is that through Home Assistant or direct to ESPhome. Also this is not a critisim but why did you not use a 4 relay board/8266/12v psu combo for 7 quid. Good video as usual, cheers.

  • @3ATIVE

    @3ATIVE

    2 жыл бұрын

    See my Playlist of "Home Assistant Alexa": kzread.info/head/PLWRTMby105biP9gE08iGLab1FP6n7_mka - It'll show you how to set it up and how to use it to control devices, etc. Good point - The reason for the Sonoff and a two relay board is: 1. The Sonoff has a relay already and runs off the Mains. (So no other PSU needed) 2. I had the Port Expander Chips and wanted to use them! LOL

  • @ooslum

    @ooslum

    2 жыл бұрын

    @@3ATIVE I'll have a look, I've got a new pi to have a go at Home Assistant without breaking the existing setup. I thought you may have done that for the PSU of the Sonoff but when I went to chech some of the 4 relay boards have a 22v switch mode PSU on board and £7 including the ESP12F but as you say, sometimes it's just good to get stuff out of those Poundland boxes.

  • @3ATIVE

    @3ATIVE

    2 жыл бұрын

    @@ooslum LOL

  • @philharris9631

    @philharris9631

    2 жыл бұрын

    @@3ATIVE - I hadn't ever seen the port expander ICs so from my perspective it's been another little school day finding out that they exist and how they can be used...

  • @3ATIVE

    @3ATIVE

    2 жыл бұрын

    @@philharris9631 Indeed, V/Handy. They're not fast enough for sensors (they're just simple on/off) But you can daisy-chain them and (I think) you can go to 128 extra I.O's !

  • @brunosalerno3578
    @brunosalerno35782 жыл бұрын

    resistance and 4.7K Razie

  • @3ATIVE

    @3ATIVE

    2 жыл бұрын

    You'll have to be more specific, if you want a proper response or help.

Келесі