Fire!

Well of course there’s fire in the burner that’s how it works. After today however the Arduino should be able to sense the fire since I added a photo resistor,  commonly known as a flame sensor, bought at a furnace supply store. With the Arduino’s ability to sense flame, the addition of automatic self starting should be enabled.  The ability to determine if fuel is building up should also add safety to an already proven safe unit.

The sensor I obtained is a flame sensor used in a normal oil or gas fired burner.  The flame sensor allows me to sense the light corresponding to a fire currently burning. The sensor cannot determine if the fire went out or if the flame sensor can no longer see it but functionally it makes no difference to me.  I am interested in either condition and the response is the same to both conditions, turn off the fuel feed.    If the fire went out, no need to keep feeding fuel, that will simply clog the  feed chute and make a mess.  If the fuel has backed up the feed chute so much as to shield the flame sensor, there is excess fuel, turn off the fuel feed.  Physically the sensor is mounted to “look” through the back of the feed slide.  This positions was chosen purposefully to determine if fuel was backing up.

Because the flame sensor is a resistor, I am using a voltage divider circuit to measure the voltage and then using the software to check the voltage with a if – then statement.  The software determines if the voltage is high enough to indicate flame or too low indicating dark.  I have been  recording various sensor data to the micro SD over the heating season, so I will record the voltage overnight and we can see the range of data tomorrow.  If anything this should be a good time of year for the test since the fire is needed to maintain the temperature in the building, it is mid 30’s F here today, but the fire is not required to be too vigorous since the temperature is not extremely cold.

Pictures and data to follow.


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


The view from April, Daylight savings time adjustment for your RTC

The boiler has worked flawless all winter, I am happy with the software and hardware but with all things mechanical there is room for improvement. I have just started my 7th ton of pellets. And I really don’t want to get into my 8th and don’t think I will have to, especially if I institute some energy conservation in the software. This is the time of year that I would normally burn what my grandmother called a “trash fire”. In her case it was some cardboard boxes from the trash and maybe an odd shaped piece of wood or two. Just enough for 3-4 hours in the evening, letting it burn out overnight since the days get up to 40°F or 50°F there’s no need for more fire than that. Later in the month most of the nights will be above freezing. But I still want to light the boiler in the evening mostly for the hot water and then turn it off at 2-3 am, so I wrote that into the software and it has gotten the consumption down to 1-2 bags per day. I also added a function in the software to change the real time clock for Daylight savings time and back automatically. It’s not fully tested but I think it will work OK.

void DaylightSavingsSchedule(){//start function
if (Year ==2013 && Month ==11 && Day ==2 && hour ==2&&DaylightTest ==0)//fall back an hour
FallBack();
if (Year ==2013 && Month ==11 && Day ==4 && hour ==2&&DaylightTest ==1)//reset flag
DaylightTest =0;
if (Year ==2014 && Month ==3 && Day ==9 && hour ==2&&DaylightTest ==0)//spring forward an hour
SpringForward();
if (Year ==2014 && Month ==3 && Day ==10 && hour ==2&&DaylightTest ==1)//reset flag
DaylightTest =0;
if (Year ==2014 && Month ==11 && Day ==2 && hour ==2&&DaylightTest ==0)//fall back an hour
FallBack();
if (Year ==2014 && Month ==11 && Day ==3 &&DaylightTest ==1)//reset flag
DaylightTest =0;
if (Year ==2015 && Month ==3 && Day ==8 && hour ==2&&DaylightTest ==0)//spring forward an hour
SpringForward();
if (Year ==2015 && Month ==3 && Day ==9 && hour ==2&&DaylightTest ==1)//reset flag
DaylightTest =0;
if (Year ==2015 && Month ==11 && Day ==1 && hour ==2&&DaylightTest ==0)//fall back an hour
FallBack();
if (Year ==2015 && Month ==11 && Day ==2 &&DaylightTest ==1)//reset flag
DaylightTest =0;
if (Year ==2016 && Month ==3 && Day ==13 && hour ==2&&DaylightTest ==0)//spring forward an hour
SpringForward();
if (Year ==2016 && Month ==3 && Day ==14 && hour ==2&&DaylightTest ==1)//reset flag
DaylightTest =0;
if (Year ==2016 && Month ==11 && Day ==6 && hour ==2&&DaylightTest ==0)//fall back an hour
FallBack();
if (Year ==2016 && Month ==11 && Day ==7 &&DaylightTest ==1)//reset flag
DaylightTest =0;
}//end function

void SpringForward(){//start function
DateTime now = RTC.now(); //get the data from the RTC
now =now.unixtime()+3600; //subtracts an hour from the time
RTC.adjust(DateTime(now.unixtime())); //resets the time to an hour earlier
DaylightTest =1; //flag variable so it won’t go back in time continously
}//end function

void FallBack(){//start function
DateTime now = RTC.now(); //get the data from the RTC
now =now.unixtime()-3600; //subtracts an hour from the time
RTC.adjust(DateTime(now.unixtime())); //resets the time to an hour earlier
DaylightTest =1; //flag variable so it won’t go back in time continously
}//end function