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: email@example.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.
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.
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.
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.
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.
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.
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!
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.
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.
After 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.