Fuel savings built into the software

I 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



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s