Hey guys, finally got my esp32 properly controlling my 6" AC Infinity Cloudline EC motor fans and figured I would lay it all out for you. As the title suggests I'm an idiot and just getting back into electronics, so be kind if i'm off on terminology haha. Most of the hard lifting for this stuff was not done by myself. Big thanks to the posters in the following threads that put me on the right track. Just had to have a few bowls to make it all come together
Particular thanks to @Kervork and @juanmaria of whose images I will most graciously borrow for this post.
For starters, this guide is for the EC motor cloudline fans, you can quickly determine which one you have by opening the panel and looking at the wires, if you have a 7 wire connections, you're good. 4 and you have the other DC motor. Other guides cover this I'm sure. Not 100% sure if this method will work or not. YMMV
We will be using ESPhome on the esp32 with home assistant controlling the fan. Won't be covering automation at this time because that part is next on the figure this shit out list. Assuming you have esphome addon configured and working in HA.
Parts required.
esp32
MOSFET Trigger Switch Driver Module x how ever many fans
pc817 optocoupler x how ever many fans *
100ohm resister x how ever many fans *
4 pin male molex connector x how ever many fans **
breadboard
various jumpers
* not 100% sure whether an optocoupler is required for the pwm circuit coming from the cloudline motor. I've wired it up both ways and it works both ways.
** I just molested some old PCs I had kicking around for their 4 pin molex power connectors. That's what you're looking for. The old kind of power connector.
Wiring up the fan
Here is a pic of the stock wiring diagram
Backside of the mosfet for pin reference
And here is my slightly modified version of Kervorks original design. For our application, disregard the fact that it's going to a pi and whatever pins. Just know that the only wires you care about are the yellow (pwm) and black (gnd). We'll get back to those on the other esp side.
And here is a pic of it all wired up.
Inside the panel, with it oriented like above, disconnect red, yellow and black wires on the right hand side. The 3 bottom right wires in this pic. Run the red wire to VOUT+ on the mosfet, run the yellow wire to VOUT- on the mosfet. I made a jumper from the ground wire on the terminal block, connected it and the black wire to gnd pin on the mosfet. Only had white hookup wire, but you can see the ground pin on the mosfet has 2 wires coming out of it. Make sure you're jumpers are long enough so the mosfet will tuck into the corner nicely. I dabbed some hot glue on the live points on the backside of the mosfet pcb.
Leave the fan aside for bench testing or roll the dice and seal er up!
Wiring up the esp32
Depending on if you want to run an optocoupler or not, the esp side is pretty dead simple. You just need to make sure you're working with the correct wires on the control connector coming from the cloudline.
Here is a shot of the 2 wires you will be using from the cloudline, from the female side we will be providing from a pc or whatever you have.
The yellow wire is the pwm signal from the fan, and black is the ground. Note the notches in the connector for pin orientation. Looking at the pic now, the connector housing is female, but the pins are male. So I may have misgendered this connector. I'll monitor twitter for someone educate me on gender, I'm sure it will trend hahaha Anyhow, knocking these pins out and moving the wires around is easy enough with a precision screwdriver if you're color anal.
And I managed to bang out a fritzing diagram for the esp side, don't judge, first one In the diagram I've included both a circuit with the optocoupler (yellow wire coming from esp) or just straight wired to the gpio (green wire). Of note the resister in the opto circuit is 100ohm. The dpi settings on my desktop frigged up the pin labels in the image, but red is the 3.3v rail, blacks are grounds and yellow is GPIO4 and green is GPIO5 (but use whatever pwm applicable pins you want, use esp32 pinout ref to find out what will work for you.
And that should wrap it up hardware wise.
ESPHome and Home Assistant
* Again, assuming you know you to add esphome add on, and create a new blank esp32 device. I find it convienent to build the empty config and upload right away just to enable OTA updates going forward.
On the esp32 we will be using the ledc output to control the pwm duty cycle. That it's called ledc might seem a little off, but just know it's essentially a library for controlling pwm signals.
Edit your esp32 device to bring up the yaml editor, and paste the following
of note: make sure inverted reads true, or as it sounds 100% will be off, and 0 will be full speed. Make sure id is unique. frequency of 1000 seemed to work well enough for me.
speed_count will give you X amount of steps between 0 and 100, 10 seems to match up pretty well with what AC infinity was using before. Make sure output in the fan section matches the id from the output section. name is the display name you'll see in HA, id is it's internal name essentially.
change the pin to whatever you're using.
validate then upload to your esp.
Now head into Configuration->Integrations in Home Assistant. You should see your esphome device listed as a newly discovered device. Follow the configure prompts for that device. When your're done you should have the name of your esp device listed in the ESPHome integrations box. When you click on it, it should have 1 device and 1 entity.
Now head back into overview, depending on how you have your areas setup the control may be in that area. I haven't done much ui massaging yet and just use the default overview with everything. I added my esp device to my tent area so it shows up in there for me
Clicking on the fan name takes you to the speed control screen, you can't tell by the screenshot, but the slider on the bottom does in fact increment in 10s, so 0,10,20...80,90,100. And the software toggle will turn on and off the fan.
I _think_ thats it? I've been typing a long time now and the boss just got home from work so I have to go put some time in. Let me know what you guys think I may have fucked up haha. And again thanks to all the original posters for their skills.
Particular thanks to @Kervork and @juanmaria of whose images I will most graciously borrow for this post.
Cloudline AI-CLS6 (S6) PWM control with RPI
After seeing another users mods I bought one of these fans because I need exact control over air flow. In this case I'm connecting a software pid controller to the fan to maintain temperature. Hotter it gets, faster the fan goes. Much to my surprise the wiring was nothing like depicted...
rollitup.org
DIY EC Fan controller?
Can anyone confirm whether 0-10v pwm is the standard for EC fan speed control? I'm in the market for an EC fan. Probably go with a Mountain Air 8in, as that's what's best available locally. It comes with a basic speed controller, but I'd like to craft up something with more flexibility. I...
www.rollitup.org
How I hooked up PWM singals to ACInfinity Cloudline T6 and Hyperfan 8" from an Open source Software
I thought I would share this info for the RUI comunity. For literally a couple of dollars I am able to control both T6 and Hyperfan Gen 1 8" independently. This is easily done by "intercepting" the PWM signal to the fans. Check the pictures to see how stupid simple this is. For the hyper fan...
www.rollitup.org
For starters, this guide is for the EC motor cloudline fans, you can quickly determine which one you have by opening the panel and looking at the wires, if you have a 7 wire connections, you're good. 4 and you have the other DC motor. Other guides cover this I'm sure. Not 100% sure if this method will work or not. YMMV
We will be using ESPhome on the esp32 with home assistant controlling the fan. Won't be covering automation at this time because that part is next on the figure this shit out list. Assuming you have esphome addon configured and working in HA.
Parts required.
esp32
MOSFET Trigger Switch Driver Module x how ever many fans
pc817 optocoupler x how ever many fans *
100ohm resister x how ever many fans *
4 pin male molex connector x how ever many fans **
breadboard
various jumpers
* not 100% sure whether an optocoupler is required for the pwm circuit coming from the cloudline motor. I've wired it up both ways and it works both ways.
** I just molested some old PCs I had kicking around for their 4 pin molex power connectors. That's what you're looking for. The old kind of power connector.
Wiring up the fan
Here is a pic of the stock wiring diagram
Backside of the mosfet for pin reference
And here is my slightly modified version of Kervorks original design. For our application, disregard the fact that it's going to a pi and whatever pins. Just know that the only wires you care about are the yellow (pwm) and black (gnd). We'll get back to those on the other esp side.
And here is a pic of it all wired up.
Inside the panel, with it oriented like above, disconnect red, yellow and black wires on the right hand side. The 3 bottom right wires in this pic. Run the red wire to VOUT+ on the mosfet, run the yellow wire to VOUT- on the mosfet. I made a jumper from the ground wire on the terminal block, connected it and the black wire to gnd pin on the mosfet. Only had white hookup wire, but you can see the ground pin on the mosfet has 2 wires coming out of it. Make sure you're jumpers are long enough so the mosfet will tuck into the corner nicely. I dabbed some hot glue on the live points on the backside of the mosfet pcb.
Leave the fan aside for bench testing or roll the dice and seal er up!
Wiring up the esp32
Depending on if you want to run an optocoupler or not, the esp side is pretty dead simple. You just need to make sure you're working with the correct wires on the control connector coming from the cloudline.
Here is a shot of the 2 wires you will be using from the cloudline, from the female side we will be providing from a pc or whatever you have.
The yellow wire is the pwm signal from the fan, and black is the ground. Note the notches in the connector for pin orientation. Looking at the pic now, the connector housing is female, but the pins are male. So I may have misgendered this connector. I'll monitor twitter for someone educate me on gender, I'm sure it will trend hahaha Anyhow, knocking these pins out and moving the wires around is easy enough with a precision screwdriver if you're color anal.
And I managed to bang out a fritzing diagram for the esp side, don't judge, first one In the diagram I've included both a circuit with the optocoupler (yellow wire coming from esp) or just straight wired to the gpio (green wire). Of note the resister in the opto circuit is 100ohm. The dpi settings on my desktop frigged up the pin labels in the image, but red is the 3.3v rail, blacks are grounds and yellow is GPIO4 and green is GPIO5 (but use whatever pwm applicable pins you want, use esp32 pinout ref to find out what will work for you.
And that should wrap it up hardware wise.
ESPHome and Home Assistant
* Again, assuming you know you to add esphome add on, and create a new blank esp32 device. I find it convienent to build the empty config and upload right away just to enable OTA updates going forward.
On the esp32 we will be using the ledc output to control the pwm duty cycle. That it's called ledc might seem a little off, but just know it's essentially a library for controlling pwm signals.
Edit your esp32 device to bring up the yaml editor, and paste the following
of note: make sure inverted reads true, or as it sounds 100% will be off, and 0 will be full speed. Make sure id is unique. frequency of 1000 seemed to work well enough for me.
speed_count will give you X amount of steps between 0 and 100, 10 seems to match up pretty well with what AC infinity was using before. Make sure output in the fan section matches the id from the output section. name is the display name you'll see in HA, id is it's internal name essentially.
change the pin to whatever you're using.
YAML:
output:
- platform: ledc
pin: GPIO5
id: intake_fan_op
inverted: true
frequency: 1000
fan:
- platform: speed
output: intake_fan_op
name: "Tent intake fan"
speed_count: 10
id: intake_fan
Now head into Configuration->Integrations in Home Assistant. You should see your esphome device listed as a newly discovered device. Follow the configure prompts for that device. When your're done you should have the name of your esp device listed in the ESPHome integrations box. When you click on it, it should have 1 device and 1 entity.
Now head back into overview, depending on how you have your areas setup the control may be in that area. I haven't done much ui massaging yet and just use the default overview with everything. I added my esp device to my tent area so it shows up in there for me
Clicking on the fan name takes you to the speed control screen, you can't tell by the screenshot, but the slider on the bottom does in fact increment in 10s, so 0,10,20...80,90,100. And the software toggle will turn on and off the fan.
I _think_ thats it? I've been typing a long time now and the boss just got home from work so I have to go put some time in. Let me know what you guys think I may have fucked up haha. And again thanks to all the original posters for their skills.