MicroHTR (Part 9)

Part 1, 2, 3, 4, 5, 6, 7, 8, 9

Here is an update of the MicroHTR (aka micro heater application) topic. Guy is a former marine pilot and his hobby is flying his touring-motor-glider wrote to me a very interesting message:
When flying close to cloudbase, the air becomes cold and the relative humidity becomes very high, this induces formation of ice in the carburetors; the so-called ” carburetor icing”.

In order to prevent carburetor icing and the resulting shut-down of the engine, i have installed electric heaters and a thermistor in each carburetor to heat up the carb’s body and prevent the icing. My intention is to install Brett Beaureguard’s PID control on an Arduino and control the power to the heaters via PWM for the two carburetors seperately ( so a PID loop running for each carburetor ). Interface is a 20×4 LCD with SPi and a rotary encoder KY-040. While reading and learning about the Arduino Atmega2560 programming , the LCD and rotary control I have come across your articles on the subject. ” … The following of the message contains some sort of a detailed description of the requirements.

This is typically the type of message that I like and that moves me forward to helping ;-). As a consequence, I reviewed my code (multiple libraries are involved in this project), and even reworked the PID library in order to take a interesting point into consideration.

The carburators may “start at a lower temperature than the setpoint and the PID kicks in right from the beginning to bring the carbs temp up to the setpoint. Without limiting the PWM they can both pull full Amperage until the setpoint is reached :Bad, this situation is to be avoided since power is limited. “

“The generator delivers 14 Amps at 12 Volts. The heaters are each 40 Watts, so 80 Watts pulls almost 7 Amps. This leaves only 7 Amps to recharge the battery ( 12 V -30 AH) and to power the avionics

Very important notice: This post describes an experimental setup, to be used at own risk and by no way approved for installation in Certified Aircraft

Starting with my earliest version of PlainPID , I tweaked this library so that the current version is now able to report the status of the controller: is it ramping to get to the set point or is it running under normal conditions ? In an application code, this feature translates as shown below:

 /* manage temperature */
float actualTemperature = TMP.getTemperature();
int16_t computedPwm = (int16_t)PID.getOutput(actualTemperature);
/* get stats from the PID */
stats_t stats;
/* manage output */
_pwm = computedPwm;
int16_t _currentMaxPwm = DEF_MAX_PWM;
if ((!stats.firstRampCompleted && (_maxPwmOnRamp == YES)) || (_maxPwmAlways == YES))
    _currentMaxPwm = _maxPwm;
if (_pwm > _currentMaxPwm)
    _pwm = _currentMaxPwm;
/* set duty cycle to the driver */

From the next plot (blue trace = set-point, red trace = actual temperature, green trace = PWM), we can clearly see the original ramp up using a limited power (half the full range in this case), then the PID controller uses as much power it needs. Then we have an illustration of how the PID controller behaves when the set-point is lowered and setback to the original set point. Once again, the power is limited during the ramp up. You may also recognize the efficient management of the overshoot.

Next is an illustration of the information displayed on a 16×2 LCD: the first line contains the actual temperature and the bracketed temperature set-points; the second line contains the actual PWM and the bracketed maximum allowed PWM which depends upon the choosen mode (Limited on ramps or limited always)

If necessary, the power may be limited always to the cost of broader temperature control as shown below .

Leave a Reply

You must be logged in to post a comment.