Fuel savings built into the software
Posted: April 16, 2013 Filed under: Arduino | Tags: Arduino, Arduino boiler control, DIY, Green Energy, homeade chip boiler, Pellet Boiler, Software Leave a commentI added a function to check for the time of year and hour of day to shut the boiler down automatically, I mentioned this in the last post. But as the days get warmer I wanted to make additional changes. I probably ought to be calculating the HDD and comparing to the present outside temperature to calculate a dynamic time needed for adequate heat, however that seemed too complicated so I wrote a simple function to check for date and time. At this time of year it shuts the boiler off at midnight. In March it ran until 3 am.
void FuelSavingsDateCheck() {//start function
DateTime now = RTC.now(); //get the data from the RTC
Month =now.month(),DEC; //get the month from the RTC
Day =now.day(),DEC; //get the day from the RTC
hour = now.hour(),DEC; //get the hour from the RTC
if (Month ==12 && Day <15) //month of December before the 15th
{//start if section
if (hour >3 && hour <9) //shut off time of 3 am
FuelTest =0;
else
FuelTest =1;
}// end if section
if (Month == 3 && Day >15) //after March 15th
{//start if section
if (hour >3 && hour < 9) //at 3am shutoff burner
FuelTest =0;
else
FuelTest=1;
}// end if section
if (Month == 4) //month of April
{//start if section
if (hour ==0 && hour < 9) //midnight shutoff
FuelTest =0;
else
FuelTest=1;
}// end if section
}//end function