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
The view from April, Daylight savings time adjustment for your RTC
Posted: April 3, 2013 Filed under: Arduino | Tags: Arduino, Arduino boiler control, Cheap green heat, Energy conservation, Heating, pellets, RTC, Software Leave a commentThe 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
All is well here in NH
Posted: January 24, 2013 Filed under: Homemade Boiler, Testing | Tags: Arduino, cheap heat, cheap heating, HDD, Heating Degree Days Leave a commentI went out on a customer issue the other day, I had to meet a locksmith at a customer’s house. After the job was done the locksmith who I have done business with for years and is a friend came back to the shop for a check and a beer. Naturally I showed him my home built boiler. He rent’s so he wasn’t particularly interested but mentioned he buys a 5 gallon can of off road diesel to bring home to heat his house every day. The price is about $3.77 per gallon which is about what the local oil company would charge to deliver. So if it’s the same price why not have it delivered? Because he doesn’t want to, or can’t tie up the $471.25 the fuel company would want for a minimum sale. That amount of fuel would last him about 25 days at his 5 gallon a day rate, maybe less time if the 10 gallon nights are accounted in as well. Since it was quite cold he was planning on buying two cans that night. He said the normal 5 gallons cost him $19/day. Rounding this to $20 for ease of math and multiplying by 30 days per month this is approx. $600 per month for fuel oil. We bought our third ton of of pellets for the heating season for $209 at Tractor supply last week. So our total fuel costs for the year are approx. $800 from November to mid February. What a difference! Not to mention I can’t imagine going to the gas station every day for fuel. What a pain. Having diesel trucks and fueling up at the same pumps I see many different people filling five gallon cans every time I fuel my trucks. I’m not the best at budgeting in the world, but I realize my blessings when I witness first hand how the paycheck to paycheck underemployed crowd deals with winter.
I’ve started calculating the Heating degree days with the Arduino program. It’s a pretty accurate look at the day’s heating requirements. I want to correlate those temperatures to fuel usage. I also have updated the CNC plasma cutter to the 5 start lead screw. Before I made the upgrades I needed to limit the cutter to a linear travel rate of 13 inches per minute to avoid vibration issues. After reassembly I tested the machine to 40 inches per minute with no problems. It may be even better than that I just got so giddy I quit testing. I am hoping this will significantly reduce the slag produced by the plasma cut. Not much motivation to take anything apart at this point. It’s just too damn cold out. It was -5°F this morning here, the HDD days yesterday was 65.5. Stay warm out there. I could back the tractor out of the shop and do some woodworking, maybe build the chip dryer…..
Mid January cabin fever and progress report
Posted: January 18, 2013 Filed under: Homemade Boiler, Testing | Tags: Arduino, for sale, for sale DIY boiler, homebuilt boiler, homemade chip boiler, welding project Leave a commentIt may not be cabin fever, more just a general malaise. That midwinter everything is working and I don’t want to take it apart feeling. But I have several projects half done at this point. I am waiting for headers to install the Ethernet card so the Ethernet update project is on hold. The CNC plasma cutter is apart awaiting a new lead screw for the y-axis. This is to remove the vibration issues I have been experiencing. I am changing from a single start to a five start lead screw. I will lose one fifth of the resolution I have presently but that will still be plenty of resolution for this application. But the big news is I am finally going to move on building a new firebox. It’s time to retire the over the road fuel tank turned boiler. Well maybe not retire, just move onto a new home. Anyone want to buy this working boiler? I would consider selling the auger and burner feed as well as a combination. The unit is located in Newport, NH if you would like to see it working. It won’t be available until it’s replacement is built. It is after all heating the house, shop and hot water. But I am hoping to have the replacement built before the end of the heating season for some testing. If you are interested drop me an email at: clarkcontr@gmail.com
A quick reminder of what the combination looks like, this has successfully burned pellets, chips and to a limited degree sawdust. Ideally you would be a person who can tinker as this is a prototype unit.
The software, Arduino and LCD display all very solid and work very well.
I am considering adding Ethernet capability
Posted: January 14, 2013 Filed under: Arduino, Ethernet, Testing | Tags: Arduino, Arduino boiler control, data logger, Ethernet Leave a commentBy adding Ethernet capability I can write the data I am currently collecting on the micro SD card to a browser directly. This means I could pull up Firefox and go to my Arduino’s IP Address and see the data. This will give me the ability to read the data from anywhere on my home network as well as anywhere I can get internet connectivity, potentially allowing me to review data from a smart phone remotely. Additionally I could control relays from a remote location as well. But for now the ability to ease the data collection and monitor the process remotely will be a great first step. First I have to buy an Ethernet shield. For those of you not familiar with Arduino this means an additional plug-in board that will stack on top of the Arduino pins.
Here’s a picture of just the Ethernet shield, the connection point you see on the front is the plug-in point for the Ethernet connection. This is a RJ-45 connector. I was able to get a 100 foot Cat 5 with installed RJ-45 connectors for $27 at Home Depot.
At present I have already have a prototype shield plugged into my Arduino Uno. This allows me to easily disconnect and update the Uno without disturbing any wiring connections. There are quite a few wiring connections for the RTC or Real Time Clock, the LCD display, the outside temperature thermister, the boiler water tank thermister, the Auger Feed pipe thermister as well as Relays to turn on the Auger motor and boiler tank water circulator. But when I attempted to plug in a prototype shield into the Ethernet shield there was interference with the RJ-45 connection point. The prototype shield would have grounded itself on the metal so I have ordered Stacking headers to extend the height above the shield. More when the headers arrive.
Deja Vu (it got really cold again), Test Plan
Posted: January 3, 2013 Filed under: Testing | Tags: Arduino, Arduino boiler control, auger feed, Data collection, Software, Testing 2 CommentsAfter writing a similar post on 1/15/2012 I find myself saying basically the same thing, after a -10F night the boiler has kept up. Additionally except for a 12 hour period when I made some boiler modifications the boiler has run continuously for 14 days. There are several differences however. The software is 100% better and controlling the temperature to within a few degrees. The burner is now a waterfall type burner that is much safer and runs more consistently. The hopper and auger setup is much more consistent and dependable as a worm and worm gear than the chain and sprocket setup from last year. Most significantly the burner has proved it can run on chips as well as pellets. During these colder nights it is more difficult for the burner to keep up with chips because of the density differences. The chips are much less dense and because of this the auger must feed significantly more of them. The auger motor may need to be changed to accommodate this burning however during weather that does not require so much energy the chips will burn just fine. I could have easily burned chips for most of December with no issues if they had been dry enough. Which brings me to my second topic.
A test plan. I have taken the Holidays off but it is now the new year and time to make some constant progress. To facilitate the test plan I want to make some incremental improvements in the software. The first change in the software is to gather more data to make better decisions. To do this I am going to first add the date and outside temperature readings to both the LCD display and the data collected. By knowing these I can correlate the feed times to temperature and see how close a relationship between them exists. Next I would like to total the run time of the auger per minute and correlate that to both outside temperature and fuel usage. Armed with this additional data I can then make various burner modifications and see the differences if any graphically. The data is good now but could be better. As you can see from the data below the software is not working properly now. The derivative portion of the formula is not contributing at all. This needs to be fixed in the software.
PID continues to works great, efficiency measured
Posted: December 24, 2012 Filed under: Testing | Tags: Arduino, Burn test, homemade chip boiler Leave a commentThe PID control continues to work great, after 3 1/2 days the PID seems to be in good control. The graph shows a bit of variation but within 10 degrees which seems within bounds.
During this time period I used an average of 2.15 bags of pellets per day. At 40 lbs. per bag this is 86 lbs per day or 39.09 kg/day. At a cost of $216/ton. this is $9.28/day. I am hoping to reduce this to less than a dollar with chips but before I do, I intend to implement some more mechanisms to reduce fuel usage. More to come with the new year, Merry Christmas, Happy Holidays everyone.
PID works!
Posted: December 20, 2012 Filed under: Testing | Tags: Arduino, Arduino boiler control, RTC, Software Leave a commentAfter tweaking the Kp and making the Ki work in the software the graph speaks for itself. The software is controlling the temperature to the set point of 140°F within a fraction of a degree for the most part. This was the last difficult piece of puzzle. I did not use the PID function in the Arduino language, instead I wrote my own with a large part of the understanding of the code coming from the excellent description by Brett Bueargard who wrote the PID library, as well as assistance from a friend who helped me understand the problem better in a spreadsheet. I now have a burner that works dependably and is modular so that I can make changes and see if I can further improve the efficiency. I now have software which will hold the temperature without worry. I plan to add a proof of fire sensor next for the mechanical part of the project, and add the ability to set the Real Time clock in the software. Onward, ever onward, but for today I think I will have a beer!
Thinking about PID control
Posted: December 19, 2012 Filed under: Testing | Tags: Arduino, Arduino boiler control, auger feed, Software, test burn Leave a commentProportional, Integrative, Differential control. There is a function in Arduino that implements this and I started thinking about how I would do this and if it would be appropriate. The function, really an algorithm is all based on error and time. In this case the error is the difference between the set point and the actual tank temperature.
All three functions Proportional, Integrative and Differential have a factor, Kp, Ki and Kd. For example let’s calculate each portion of the formula starting with the proportional contribution Kp, if the current temperature of the tank is 100°F and the set point is 140°F the error is 40. The integrative portion of the formula adds the contribution of the error over time. This would be the Ki factor multiplied by 40 and added to the previous Ki*error for every time period. The differential portion is the Kd multiplied by the difference in the tank temperatures or in other words the tank temperature at the beginning of the time period minus the tank temperature at the end of the time period. Let’s take some of the data collected by the OpenLog microSD card and take a stab at this in Excel. We’ll assume Kp=6, Ki=.6 and Kd =.2. The time period is one minute.
Now in practical terms how is the the fire being controlled now? The auger time is being controlled. Of course practically the fire must not go out so there is a minimum time the auger must run, since in this program the auger is on a fixed time of 5 secs this really means that all of the control comes from varying the time the auger is not running. But again the fire can’t go out so I figure the max amount of time between the fixed auger feeds of five seconds is forty seconds. So that is the slowest the fire can go. How fast can it go? Well theoretically the feed could run continuously but again we are dealing with a chemical process that cannot simply absorb 100% fuel feed. In this case the auger motor added a practical aspect by limiting the feed to a duty cycle of 50%, so the maximum time that the feed can be on is half the time.
Since the PID control is based on time periods and the data collection time period is one minute,lets choose a time of 1 minute for argument. In one minute at max run the feed will be on 30 seconds and off 30 seconds. In one minute at min run the feed will be on for 5 secs, off for 40 secs, on for 5 secs and then off for the remaining 10 seconds of the minute. So again we don’t control the on time only the off time and the difference between the max on time (min off time) and min on time (max off time) is 30 secs on, 30 secs off for the max and 10 secs on and 50 secs off for the min. So the only control between full bore and idle is the difference between 50secs and 30 secs or 20 secs per minute.
This explains some of the challenge, the other challenge is the inertial effect of the combustion reaction especially if unburned fuel has built up. So now that the PID output has been calculated I’m having a hard time wrapping my mind around how this would translate to control of the time, I know I could set up a simple proportion between the PID output and the 0-20 scale of auger off time dwell. However in this example the PID output increases as the error decreases. I guess that’s the beauty of a spreadsheet I will play around with Kp, Ki and Kd to see if I can get this to work a little better.
Software changes to control underdamped Setpoint control
Posted: December 18, 2012 Filed under: Testing | Tags: Arduino, Arduino boiler control, C++, self correcting C++, Software Leave a commentAfter running for a few days I have been happy with the amount of holes in the bottom of the burner, the ash level when running does not get higher or lower. However the fuel usage is a little higher than I thought it would be and the program does not hold the set point temperature as well as I would like. The graph shows the interaction of the excess fuel usage and the set point. At times the boiler should be idling along with very little fuel feed, the program should be able to determine the fuel usage needed to control the temperature to the set point.
You can see the 140°F horizontal grid line, the set point is currently 140°F. The integral of the area over that line is excessive fuel usage. However that’s not the only issue, the second issue is the amplitude seems to grow larger until approx. 121 minutes. At that point I shut down and started a new software change. You can see the slow recovery as I had to relight the fire and then the software starting correcting earlier, so in short more software changes are in order. The challenge is to build self correcting software since the whole goal of this project is to burn chips and that will require the software to deal with different energy densities. I’ll make a few more software changes and post another graph soon.