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

factorygrows

New Member
WhatsApp Image 2024-02-26 at 18.17.20.jpeg
Looks like there is a few of us working on these! This is the V1 and we are just working on a separate dosing station for ph/ec/temp and pumps along with embedded ESP32 etc.
 

sle118

Member
I just added two PMIC chips as well. They will be bound to a 5V output and a 3.3v output. The idea being that you can power down/power up sensors that shouldn't be on an the time, for example dust sensors
 

sle118

Member
View attachment 5373491
Looks like there is a few of us working on these! This is the V1 and we are just working on a separate dosing station for ph/ec/temp and pumps along with embedded ESP32 etc.
Niiiice

Embedded esp32 is cool, but your initial approach was probably the most cost effective. I found that the usb to serial bridge chip is a bitch that can cost 5x at times. So next time I see these at a reasonable cost, I'll buy a bunch to future proof myself.

Alternatively, I'll start looking into alternatives like the esp32-s2, which has a built in usb interface and is relatively cheap and doesn't require to much components on a board to work.
 
Last edited:

Garog

New Member
Hello,
i was looking for a way to control my CLOUDLINE PRO T6 with an esp8266 or esp32 and found your post.
The first few posts are about the old motors that have the molex plug. but i do have usb c connector.
as far as i understand, its the same pwm signal, just another connector.
i do have a lot of electronic components, like pwm power modules and esp boards.

before i try stuff with my fan (not easy to get here in EU) i would like to get some more infos about the pinout and the needed signals to control the fan motor.
the board from factorygrows looks very simple. esp board with pwm moduls connected to the gpios?
could you share some infos about your wiring please?

would like to create a pcb on my own, but just for one usb-c connection (i have just one motor to control)
before i create and order a pcb, i would like to test the basic functions with stuff i have here, but for this, i would like to ask for your knowledge about the motor control.
like what pwm frequences are you using for the "original" steps 1-10 from the controller 69 pro. or did you measure them ?

thanks a lot and great work here :)
 

sle118

Member
before i try stuff with my fan (not easy to get here in EU) i would like to get some more infos about the pinout and the needed signals to control the fan motor.
the board from factorygrows looks very simple. esp board with pwm moduls connected to the gpios?
could you share some infos about your wiring please?

would like to create a pcb on my own, but just for one usb-c connection (i have just one motor to control)
before i create and order a pcb, i would like to test the basic functions with stuff i have here, but for this, i would like to ask for your knowledge about the motor control.
like what pwm frequences are you using for the "original" steps 1-10 from the controller 69 pro. or did you measure them ?

thanks a lot and great work here :)
The core of the PWM circuit is this:
1709602224018.png
1709602240470.png

where FAN1_PWM_OUT is the output from the ESP32's pwm going though a level shifter. the 10V is taken from the fan itself (the wires are typically documented inside of the fan's control box cover). Also note here that I32 is connected to the fan's tachometer output which needs to be pulled up. I am using 4156Hz as the frequency for the PWM output and it is working perfectly.
 

Garog

New Member
The core of the PWM circuit is this:
View attachment 5375398
View attachment 5375399

where FAN1_PWM_OUT is the output from the ESP32's pwm going though a level shifter. the 10V is taken from the fan itself (the wires are typically documented inside of the fan's control box cover). Also note here that I32 is connected to the fan's tachometer output which needs to be pulled up. I am using 4156Hz as the frequency for the PWM output and it is working perfectly.
Thank you very much.
I found some infos where they say its ~5khz -> https://ledgardener.com/forum/viewtopic.php?t=6700&start=10
Also some interesting infos there
 

sle118

Member
For the record, I am confirming the PWM Frequency of my fan to be 4,156KHz. Below are some measurements taken at min speed, 50% and 75%. I didn't bother going to 100%, as this is equivalent of an open circuit with no PWM as documented already in previous posts. Note that the rise time ramp likely does not match real-life, as the measurements were taken across a 10K resistor between +10V and the PWM output of the original controller for practical reasons.

Hope this helps.

Min
Min_Speed.png

50%
50_pct_Speed.png

75%
75_pct_Speed.png
 

sle118

Member
Any restrictions on which version of AC Infinity inline fans this would work with? IIRC there have been 4, 2 DC & EC.
I wouldn't be able to tell for sure. The one I am controlling is a S4, but I suspect that it would work with all models having the following controler
1710357251965.png

The basic thing to determine is if the fan has similar connectors internally as shown in here (https://www.rollitup.org/t/idiots-guide-to-getting-an-esp32-to-control-ac-infinity-cloudline-ec-fans-esphome-ha.1053910/post-16334990). Some forum users noted that some models have a USB connector instead of the 4 pins molex, but having a look inside of the electrical box (unplug first for safety) should confirm if it's the same type of pins or not.
 

sle118

Member
I could not resist the urge to cook more boards!

You are seeing the 2 units on the left running a modified lvgl demo. I was using it to test that the rotary knob and displays were working as expected. The one on the right is running my esphome config, albeit without any sensor which makes the screen look rather empty.

1000003232.jpg
 

Kommkat

New Member
I could not resist the urge to cook more boards!

You are seeing the 2 units on the left running a modified lvgl demo. I was using it to test that the rotary knob and displays were working as expected. The one on the right is running my esphome config, albeit without any sensor which makes the screen look rather empty.

View attachment 5378056
Ha, that looks absolutely wild. The boards have come out beautifully though! The sensor logging is definitely a nice tough. Are you using the rotary to navigate the interface?
 

sle118

Member
Ha, that looks absolutely wild. The boards have come out beautifully though! The sensor logging is definitely a nice tough. Are you using the rotary to navigate the interface?
In the lvgl demo (2 boards on the left), rotary control is used to navigate. But my original thought is to use it to increase/decrease the speed of the fan or toggle power
 

Kommkat

New Member
In the lvgl demo (2 boards on the left), rotary control is used to navigate. But my original thought is to use it to increase/decrease the speed of the fan or toggle power
I don't know why you couldn't use it for both and use an encoder with a push detent as well.
 

sle118

Member
I don't know why you couldn't use it for both and use an encoder with a push detent as well.
From there, what you do is up to your imagination. That being said, I'm more and more leaning towards coding a project outside of esphome. If it was just for me, I'd go for a native esp-idf project since I'm very familiar with the environment, but I might also go with the Arduino framework. It does add a massive amount of bloat and can be frustrating to work with, but it's more accessible to a broader audience I think.

Nonetheless, you are right; the UI could be built with lvgl and speed control could be supported as a slider. Something to think about.

Oh and the button there is a rotary encoder with push button, so a good clicking feeling and no limits on number of turns
 
Last edited:

Kommkat

New Member
From there, what you do is up to your imagination. That being said, I'm more and more leaning towards coding a project outside of esphome. If it was just for me, I'd go for a native esp-idf project since I'm very familiar with the environment, but I might also go with the Arduino framework. It does add a massive amount of bloat and can be frustrating to work with, but it's more accessible to a broader audience I think.

Nonetheless, you are right; the UI could be built with lvgl and speed control could be supported as a slider. Something to think about.

Oh and the button there is a rotary encoder with push button, so a good clicking feeling and no limits on number of turns
Mmmm... That's excellent to hear. Clicky encoders are always a great time. Can't wait to get my mitts on one of these, ha.
 
Top