vitotai / BrewManiacEsp8266

BrewManiac on ESP8266. Only ESP8266 needed.
156 stars 71 forks source link

Branch PWM #26

Closed allthepies closed 6 years ago

allthepies commented 6 years ago

Vito, what's being developed on the PWM branch ? Replacing PID with PWM ?

vitotai commented 6 years ago

A friend from homebrewtalk.com asked about using PWM to control gas valve via servo. It's easier for me to modify the code than to explain. Therefore, I just create a branch for illustration.

BTW, there does exist a PWM mode for distilling. Some said power is controlled while temperature is an indication of stages in distilling. It was a branch but now merged into main branch. I never try that, but it seems to work.

BTW again, the PWM for servo is not the same as PWM for distilling. The later PWM is just like PWM during boiling, which is percentage of duty cycle in "window time". The window time is the setting in PID-PWM, ranged from 4000ms to 7500ms. The PWM to control servo is signal generated by ESP8266. It is software PWM controlled by timer interrupt. The frequency is higher, up to 4kHz.

allthepies commented 6 years ago

Ah, OK, thanks.