All is well here in NH

I 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

It 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.

Boiler and Feed Combination


I am considering adding Ethernet capability

By 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.

Ethernet Shield

Ethernet Shield

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.

Ethernet Shield stacked on an Arduino UNO, note upper connection is the RJ-45 Ethernet connection

Ethernet Shield stacked on an Arduino UNO, note upper connection is the RJ-45 Ethernet connection

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

After 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.

Data collected on SD card

Data collected on SD card


PID continues to works great, efficiency measured

The 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.

3 1/2 days of PID control

3 1/2 days of PID control

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!

122012PID

After 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

Proportional, 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.

Raw data imported into Excel with PID data calculated

Raw data imported into Excel with PID data calculated

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.