Author Topic: Controlling Multiple Heaters with UNO  (Read 909 times)

0 Members and 1 Guest are viewing this topic.

OperaHouse

  • Hero Member
  • *****
  • Posts: 1075
  • Country: us
Controlling Multiple Heaters with UNO
« on: October 24, 2016, 12:15:45 PM »
Standard heating elements are designed for 120 or 240 operation.  To save costs we have to use multiple heaters at lower voltage to get the wattage needed.  For example, a 1,000W 240V heating element used at half the voltage is 1/4 of the power or 250W.  This is because power is volts times amps. Dividing power by the voltage gives the amps, 1000W / 240V = 4.17A.  The resistance is voltage divided by amps, 240 / 4.17 = 57.6 ohms. lower that voltage to 120V and the current becomes 120V / 57.6 ohms = 2.08A. So 120V X 2.08A = 250W with a 1000W heater operated at half the voltage.  You need four heaters to get that same wattage when the voltage is halved.

If you have a lot of wattage to dump, chances are you will need to have multiple heating elements in parallel. The UNO has six PWM ports that can be used.  Instead of parallel FETs or a a very big FET for higher current, you can drive multiple elements separately using a smaller cheaper FET.  This also reduces heating as each transition generates some heat as it changes state.  A FET in the saturated on state generates very little heat. Instead of 255 power levels, there can now be 510, 765 or more power levels. The following demonstrator code is for three heater drives.  There is an overall heater count of 765. That count is prevented from going over that or below zero. The first 255 counts drive the first heater.  The count is prevented from making pulses below 5. It will just jump from a PWM of zero to five. Counts above 250 become just solid on of 255.  This is to prevent short pulses heating the FET. This same process continues with each successive heater up to a maximum of six.  Each heater increases the count by 255.


// ***********************************************************************************
// Calculate what heater count should be.  This is the overall count for all heaters.

if (blah blah blah)  PWMheater = PWMheater + 1;     // If whatever is too high

if (blah blah)  PWMheater = PWMheater - 1;             // If whatever is too low


if (PWMheater >= 765) PWMheater = 765;                // Limit upper boundary of count
                                                                           // a multiple of 255 for each heater

if (PWMheater <= 0) PWMheater = 0;                      // Limit Lower boundary of count

 
                             
// Now calculate limits for heater # 1 and don't allow short on or off pulses                                 

if (PWMheater >= 250) PWM3drv = 255;                   // Limit upper boundary of PWM heater #1
 
if (PWMheater < 5) PWM3drv = 0;                            // Limit Lower boundary of PWM heater #1


analogWrite(3, PWM3drv);                                       // write to heater #1, from 0 to 255



// Now calculate limits for heater # 2 and don't allow short on or off pulses                                 

if (PWMheater >= 505) PWM10drv = 255;                  // Limit upper boundary of PWM heater #2
 
if (PWMheater < 260) PWM10drv = 0;                       // Limit Lower boundary of PWM heater #2


analogWrite(10, PWM10drv);                                  // write to heater #2, from 0 to 255


// Now calculate limits for heater # 3 and don't allow short on or off pulses                                 

if (PWMheater >= 760) PWM5drv = 255;                  // Limit upper boundary of PWM heater #3
 
if (PWMheater < 515) PWM5drv = 0;                       // Limit Lower boundary of PWM heater #3


analogWrite(5, PWM5drv);                                     // write to heater #3, from 0 to 255

// ***********************************************************************************




ontfarmer

  • Full Member
  • ***
  • Posts: 124
  • Country: ca
Re: Controlling Multiple Heaters with UNO
« Reply #1 on: October 24, 2016, 03:37:16 PM »
When time permits I'm going to try this for some zone heating.  Disconnect water heater
element and hook to baseboard heater.   Then start with just one more to see if that will work for me.  Heating water is going to take quite a bit of time to plumb and get all the controls in place,  so may have to wait for a while. The heat the wind turbine is providing
certainly feels good,  it is that time off year.