Idiots guide to getting an esp32 to control AC Infinity Cloudline EC fans esphome/HA

@illegalmexican sorry for the radio silence! Were you able to get it working?

The fan that we were using was the Cloudline Lite A6, which has a non-removable USB-C cable that is supposed to plug into an accompanying controller. We ended up getting the wrong adapter (the molex to male USB-C), so decided to get a female-to-female USB-C adapter to connect it all up.

I did this project for a friend, and don't have the actual circuit in front of me anymore. Here's a diagram of what I initially wired up--which turned out to be wrong. I don't have time to modify the photo right now, so I'll just explain what changes I made. Note that I have a component in here that taps into the 10VDC power, so the ESP32 is powered directly from the fan.

View attachment 5236250

When we first wired it up, it didn't work. Turns out we had the pin order reversed at the MOLEX connector. I'm not sure if the numbers I wrote on the diagram were incorrect, or if I had something else flipped...but the point is that when I reversed the order of the pins (swap 1<->4 and 2<->3), it started working.

To clarify, have you tried swapping your MOLEX pin 2 and 3 connections? So, MOSFET VIN- to MOLEX Pin 2, and MOSFET VOUT- to MOLEX Pin 3? It sounds like that what you said but I wanted to confirm.

If you change the wiring and the fan stops spinning, I believe that means that the MOSFET is either being driven HIGH constantly, or is being driven HIGH at a duty cycle that is sufficiently high that the fan stops spinning (note -- the fan speed control is inverted, so higher duty cycle = slower speed). Have you tried wiring up the fan in the configuration where it stops spinning, and then adjusted the speed in HA?

Based on your YAML, it also looks like you're controlling GPIO5 as the PWM signal, but you mentioned that the MOSFET is wired up to GPIO16. Are you sure you're programming the correct GPIO pin to be used for the PWM signal (ledc)?
Sorry i took time to reply i've been busy lately, and set aside this part of my project (growing culinary mushroom) has i've worked on other aspect of the project, but now im back on this part. I realize i have the S6 (NON lite) version sadly. Is there any solution out there for those models ? By this video from LED gardener:
i guess it should work. Here's the diagram he posted:



I'll try it on a breadboard My mushroom only need air circulation (in and out to create a positif pressure), so if there's no real solution i'll just hook them up with a smart plug.
 

Attachments

Last edited:
OMFG i had a faulty ZVNL120A...
I made it work using the diagram bellow.


Capture d’écran, le 2023-01-21 à 17.26.42.png

Heres my esphome (esp32) config in Home Assistant:

YAML:
output:
  #Exhaust Fan
  - platform: ledc
    pin: GPIO27 #Connects to the FAN PWM OUT in the diagram
    id: exhaust_fan_pwm
    inverted: true
    frequency: 1000 Hz

fan:
  #Exhaust Fan
  - platform: speed
    output: exhaust_fan_pwm
    name: "Exhaust Fan"
    speed_count: 10
    id: exhaust_fan
 
Joining the first post club!

So I've been messing around with making a custom ESP32 circuit board to control my two Cloudline fans, the goal being to design a board that:
  • just works - plug it in via USB, program it, then hook it up to your fan, no additional steps required (because I'm lazy)
  • I can order fully assembled (also because I'm lazy) for some sort of reasonable price
  • doesn't require any external modules or components
  • is fan-powered: I can plug one of my Cloudlines into it and it'll take its power from the fan
The original prototype used an M5Stack Atom Lite (neat little ESP32 dev board, I had a bunch of them laying around) + LD1117 to drop the voltage from 10v to 5v + BSS138 MOSFET in common gate configuration to do the 3.3v -> 10v level shifting (credit to Adafruit's level shifter board for the idea - it uses only one MOSFET per fan and has the advantage of being non-inverting) + ordinary 0.1" header to connect to a floppy-to-Molex adapter cable while I tried to find a Molex-compatible connector that would mount directly to a board and that JLCPCB had in their assembly library. Schematic and PCB layout here (use the tabs at the top to flip between the two).

It worked a treat, modulo the fact that the pin order on the 0.1" header is totally wrong - 10V and GND should be flipped :wall:

Anyway. I found Molex connectors today! So version 2 is now a thing - schematic and PCB layout here. It has an ESP32 baked onto the board + 3 individual Molex connectors for controlling 3 fans from a single board (I have 2 and might be getting a third) + polyfuses and Schottky diodes out the wazoo so that it can be powered either by the fans it's plugged into or via USB (or both) without any of the fans or USB trying to backfeed each other or anything exploding if something goes wrong + addressable RGB LEDs next to each port just for fun.

Ordered today, if all goes well I'll have my fans talking to my Home Assistant instance end of next week!

Comments welcome. Feel free to use/improve the designs to make your own boards (and let me know how they work if you do!) I could be convinced to throw the extras I ordered up on Tindie as well if there's enough interest.
 
Last edited:

shimbob

Well-Known Member
Joining the first post club!

So I've been messing around with making a custom ESP32 circuit board to control my two Cloudline fans, the goal being to design a board that:
  • just works - plug it in via USB, program it, then hook it up to your fan, no additional steps required (because I'm lazy)
  • I can order fully assembled (also because I'm lazy) for some sort of reasonable price
  • doesn't require any external modules or components
  • is fan-powered: I can plug one of my Cloudlines into it and it'll take its power from the fan
The original prototype used an M5Stack Atom Lite (neat little ESP32 dev board, I had a bunch of them laying around) + LD1117 to drop the voltage from 10v to 5v + BSS138 MOSFET in common gate configuration to do the 3.3v -> 10v level shifting (credit to Adafruit's level shifter board for the idea - it uses only one MOSFET per fan and has the advantage of being non-inverting) + ordinary 0.1" header to connect to a floppy-to-Molex adapter cable while I tried to find a Molex-compatible connector that would mount directly to a board and that JLCPCB had in their assembly library. Schematic and PCB layout here (use the tabs at the top to flip between the two).

It worked a treat, modulo the fact that the pin order on the 0.1" header is totally wrong - 10V and GND should be flipped :wall:

Anyway. I found Molex connectors today! So version 2 is now a thing - schematic and PCB layout here. It has an ESP32 baked onto the board + 3 individual Molex connectors for controlling 3 fans from a single board (I have 2 and might be getting a third) + polyfuses and Schottky diodes out the wazoo so that it can be powered either by the fans it's plugged into or via USB (or both) without any of the fans or USB trying to backfeed each other or anything exploding if something goes wrong + addressable RGB LEDs next to each port just for fun.

Ordered today, if all goes well I'll have my fans talking to my Home Assistant instance end of next week!

Comments welcome. Feel free to use/improve the designs to make your own boards (and let me know how they work if you do!) I could be convinced to throw the extras I ordered up on Tindie as well if there's enough interest.
Very cool!!!
Do be careful about powering things with the 10V from the fan, I was doing this originally to provide 3 channels of PWM signals (2 fans & 1 driver) but I found it was unstable. I'm not convinced the 10V supply can provide the current for this. I've added an external 10V power supply and no problems since. Maybe Version 3 should have a 10V barrel input?
 
Do be careful about powering things with the 10V from the fan, I was doing this originally to provide 3 channels of PWM signals (2 fans & 1 driver) but I found it was unstable. I'm not convinced the 10V supply can provide the current for this. I've added an external 10V power supply and no problems since. Maybe Version 3 should have a 10V barrel input?
Oh interesting, I'll have to keep my eye out for problems. The one-fan prototype has been working fine so far but who knows once multiple fans are involved...

What sort of stability issues did you run into?

Re barrel plug - yeah that'd be a breeze to add to V3. In the mean time, powering the board from a suitably beefy USB charger would work as well: V2 already has the necessary CC1/CC2 resistors on the USB C port to request 3 amps of power from whatever device/charger it's connected to, and the 750 mA polyfuse will kick in long before that limit gets hit.
 

shimbob

Well-Known Member
Oh interesting, I'll have to keep my eye out for problems. The one-fan prototype has been working fine so far but who knows once multiple fans are involved...

What sort of stability issues did you run into?

Re barrel plug - yeah that'd be a breeze to add to V3. In the mean time, powering the board from a suitably beefy USB charger would work as well: V2 already has the necessary CC1/CC2 resistors on the USB C port to request 3 amps of power from whatever device/charger it's connected to, and the 750 mA polyfuse will kick in long before that limit gets hit.
Basically the fan stopped making 10V until I un/replugged the AC line. It'd work for a while then drop again, I think it measured 0.8V when it tripped. The 10V supply from the fan is most likely not meant to be used for multiple fans at once, but your mileage may vary?

Oh, USB-C. You could conceivably get 12V, then buck down to 10V (and 5/3.3V for the esp). But that's more parts versus getting a 10V ac/DC wallwart.
 

shimbob

Well-Known Member
Once you add a 10V barrel input then you should go all out and use every available gpio (8?) to provide 8 pwm channels (evil cackle)! 4 molex for fans and 4 sets of terminals for drivers? Leave no gpio unused!
 
Once you add a 10V barrel input then you should go all out and use every available gpio (8?) to provide 8 pwm channels (evil cackle)! 4 molex for fans and 4 sets of terminals for drivers? Leave no gpio unused!
Hahaha I mean... I could be convinced!

I'm actually using my fans for something that has nothing to do with growing (venting laser cutters and 3D printers) so I've never had a need for the driver side of things. What sort of interface is that? Like are they just a bunch of N volt 2-wire connectors that need to be powered on and off with a MOSFET and external power supply or do they have a separate control line like the fans or what?
 

shimbob

Well-Known Member
Hahaha I mean... I could be convinced!

I'm actually using my fans for something that has nothing to do with growing (venting laser cutters and 3D printers) so I've never had a need for the driver side of things. What sort of interface is that? Like are they just a bunch of N volt 2-wire connectors that need to be powered on and off with a MOSFET and external power supply or do they have a separate control line like the fans or what?
There's a large thread here but the gist of it is exactly like the fan. Two wires DIM+ & DIM-, one has 10V on it. You can either apply PWM between the two wires or provide your own PMW'd 10V.
 

waring192

Active Member
Guys, I was just wondering…using the esp32, mosfet, etc way delivers a PWM signal to the AC Infinity EC fan.

Well just opened up the AC Infinity 6” clip on fan with UIS and inside it has a PMW and separate stepper driver chip which it’s it’s connected to the Bluetooth and Wi-Fi controllers via I2C or SPI.

There UIS cables are I think just USB-C form factor with 3 lines, 2 for power and 2 for data. This is how their port expanders dongles will work as they will be i2c multiplexers or similar.

Has anyone actually looked inside the EC Cloudline fans at what circuitry is inside the fan? I know are diy system works but there might be a i2c chip inside the fan?

I would open mine up but it’s use at the moment but I have a second one coming soon for an active intake.
 
Oh that's fascinating. Especially if it's just something off the shelf ish like I2C it'd be easy to interface to.

Ugh, I'm so tempted to drop my scope on my 6" Cloudline now and see, even though I've already solved my own problem with the Molex boards...
 
Last edited:
Speaking of...

The boards have arrived!

I'll post pictures later when I'm off work. They seem to work fine with two fans hooked up, no sign of the instability @shimbob was seeing, but I want to let them run for a few days before saying that with any certainty.

But yeah. They work perfectly. It's soooo nice to be able to just program them with ESPHome and have it just work.

Which so then the real question: if I threw the board up on Tindie (or even just gave away the ones I have left in the batch I ordered), would anyone be interested in one? Like is that a thing I should spend time doing?
 
Top