Summer’s almost over, time to start thinking about heat

2013 Boiler design flow chart

I know it’s early on the calendar but my focus is starting to shift back to my heating hobby.  After two years of experimenting I have a proven performer with both the mechanical unit and the software I used last winter.  I could change nothing and go through the winter fairly smoothly but there is  always room for more improvement.   So this is my plan:  1) Build a new unit very similar to the proven unit I have been using but with greater feed range capability to allow the unit to feed wood chips as well as pellets.  By building a complete new unit I can always roll up the proven unit after the experiment is over and the data collected and resume heating without a hiccup.   2) Make slight modifications to the boiler to allow a larger interface plate between the feed unit and the boiler.  This will allow a greater range of experimentation with burner designs.  3) Continue making small experimental changes to the working pellet unit such as a vibrator for ash removal, different burner designs, different draft designs.  4)  Continue to make changes and improvements to the software.  To start I would like three modes of operation.  Continuous, run for some amount of time, and run until a set time.  I changed the software to run to a set time by calendar date last spring but it was built into the software by date not menu or button choice.  I would like to have the option of running for a few hours for both experimentation and also to occasionally heat hot water and be able to choose these options by menu.  This fall I am sure I would like the unit to be able to take the chill off and then shut down.    5) Build a chip dryer.  This is going to get to be a priority , I know the days are getting a little shorter and it is amazing how much less solar there is in the fall.  Time to giddy up on that one.

I know I have to prioritize the work, and work as time and cash flow allows.  But I think the first step will be to make a new interface plate and boiler opening.  This will allow standardization for the next design and this work can be done while there is no particular need for heat.  I went dumpster diving the other day and got a great new electrical box, so I guess I can get going on the that part of the new burner feed.  I like free stuff.  I may hit that dumpster again soon.

In the mean time it is still summer and there is still sailing weather.


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.


Work out the software bugs to test burn, Step 8 of a DIY Record

Over the summer and fall I have written and tested a number of programs to have the building blocks of a working program.  I knew the key this year would be the ability to log data.  Of course to log data and have it mean something you have to have good data.  So I spent several days working the bugs out of OpenLog, which works but I would not recommend.  I also spent some time figuring out a combination of moving averages which resultx in stable data.

Of course the integration process was a train wreck.  The arrays used for moving average data smoothing were declared wrong so that bug had to be found and fixed.  The Serial LCD needed to be replaced, and my soldering iron wouldn’t work.    A few of the functions are timed and there were some issues with those functions.  The code for Open Log was not robust enough, once I worked out all those issues, which took most of the weekend, it is finally ready to test.

I had a plow in the shop for repair and soaked up the spilled hydraulic fluid off the floor with some sawdust, actually pellets that got wet.  So the hydraulic oil soaked sawdust is in the hopper to be burned.  It’s burning now, so tomorrow I should have some excel data which will help me make decisions to improve the software.  At this point I am not sure it will be valid however, it is really taking a long time to come up to temperature with the sawdust.   Another data point.

Boiler hooked up and burning for the first time

Boiler hooked up and burning for the first time


OpenLog partially tested

Well I have to say, I am not particularly impressed with OpenLog’s documentation but I finally got a sketch to work with OpenLog based heavily on the OpenLog command sketch.  I soldered up a Yourduino.com  Real time clock kit and am waiting on some male to male jumper wires to breadboard up a thermistor and clock to fully test the OpenLog data logging in a closer to real world trial.  Of course until it is finally mounted in the boiler control box and mounted on the boiler this will only be the next step in testing.

Hard experience has taught me many things work on the desk that do not work in the field due often to poor electronic practice, missing diodes, filtering capacitors, missing resistors….

Here is the code which I intend to run when I get the project bread boarded, it compiles but is untested.

/*
RTC, Thermisoter, OpenLog test

One thermistor attached to analog pins 0
The Real time clock SDA pin is attached to analog 4, the RTC SCL pin is attached to analog pin 5

The circuit:
Inputs
* Thermister  Analog in 0
* RTC SDA, Analog pin 4
* RTC SCL, Analog pin 5
Outputs
* Arduino digital 0 (rx), OpenLog TX
* Arduino digital 1 (tx), OpenLog Rx
* Arduino digital 2, OpenLog Grn

Created 8/24/12

http://www.frugaltinker.com
*/

#include <math.h> // include the library code for thermsiter functions
#include <Wire.h>
#include “RTClib.h”

//section for time keeping
int hour;                //hour
int minute;              //minute

int Roomtemp;            //room temperature

int statLED = 13;        //flashes LED connected to pin 13 for troubleshooting
int resetOpenLog = 2;    //reset on OpenLog

long DataDwell = 60000;    //seperates the data readings by 1 minute
long prevmillis =0;        // previous millis
RTC_DS1307 RTC;

//define function to calculate the temperature in fahrenheit for Analog pin 0
double ThermisterRoom(int RawADC) {//beginning of function
double Temp;
Temp = log(((10240000/RawADC) – 10000));
Temp = 1 / (0.001129148 + (0.000234125 * Temp) + (0.0000000876741 * Temp * Temp * Temp));
Temp = Temp – 273.15;            // Convert Kelvin to Celcius
Temp = (Temp * 9.0)/ 5.0 + 32.0; // Convert Celcius to Fahrenheit
return Temp;
}//end of function

void TimeSection() {//start time function
DateTime now = RTC.now();
hour=now.hour(),DEC;       //get the hour from the RTC chip
minute=now.minute(),DEC;   //get the minute from the RTC chip
}// end time function

void OpenLogData(){//start OpenLogData function
int RoomTemp = ThermisterRoom(analogRead(0));  //read from the sensor
Serial.print (hour);
Serial.print (“:”);
Serial.print (minute);
Serial.print (“, “);
Serial.println (RoomTemp);
}// end OpenLog Data section

void setup()
{//Begin Setup section
pinMode(statLED, OUTPUT);        //set pin to output
pinMode(resetOpenLog, OUTPUT);   //set pin to output

Serial.begin(9600); // initiate serial communication
//Reset OpenLog
digitalWrite(resetOpenLog, LOW);
delay(100);
digitalWrite(resetOpenLog, HIGH);
//Wait for OpenLog to respond with ‘<‘ to indicate it is alive and recording to a file
while(1) {
if(Serial.available())
if(Serial.read() == ‘<‘) break;
}
//Send three control z to enter OpenLog command mode
//Works with Arduino v1.0
Serial.write(26);
Serial.write(26);
Serial.write(26);
//Wait for OpenLog to respond with ‘>’ to indicate we are in command mode
while(1) {
if(Serial.available())
if(Serial.read() == ‘>’) break;
}
//send the open file
Serial.print(“Templog.txt\r”); //\r in string + regular print works with older v2.5 Openlogs

//Wait for OpenLog to return to waiting for a command
while(1) {
if(Serial.available())
if(Serial.read() == ‘>’) break;
}
// send the command to append the file
Serial.print(“append Templog.txt\r”);

//Wait for OpenLog to indicate file is open and ready for writing
while(1) {
if(Serial.available())
if(Serial.read() == ‘<‘) break;
}

//start process of setting clock time
Wire.begin();
RTC.begin();
RTC.adjust(DateTime(__DATE__, __TIME__));

} //End setup section

void loop()
{//Begin Loop section
if (millis()-prevmillis> DataDwell)
{//start if sections
TimeSection();           //displays the time
OpenLogData();           //saves the time and solar temp to the SD card
prevmillis=millis();
}// end if section

}//End loop section

 

 


OpenLog Firmware updated and tested

OpenLog is a data logger from SparkFun electronics that is touted as being easy to use and a reliable writer to a microSd card.  I haven’t found that to be true, I think it is a pain in the a** but maybe that’s the experience more than the actual product.  I ordered the data logger in January and got busy and didn’t have the time to use it so I set it aside.

Really the only reason I ordered it was because I could not get GoBetwino, a Freeware Arduino Data logging software program to work.   The GoBetwino program uses a USB connection to a computer connected to the Arduino to log to a file on the PC.  A great concept that I tested and worked fine on the desktop machine.  However on the laptop that I was using to make changes to the Arduino controlling the boiler  in the shop it didn’t work.  It seemed easier to come up with a standalone solution rather than troubleshoot the USB connections, the power managment issues with the Laptop etc.  So I bought the data logger.

As I wrote in an earlier post since the time of my purchase of the OpenLog board it was recommended to update the firmware, this required updating the board with a FTDI board that accepts the USB connection from the PC to update the firmware, after 2-3 hours of frustration this task is finally completed.  The main problem being Windows XP didn’t seem to recognize the FTDI board and assign it a com port but finally was able to find the correct driver and download the firmware.

I ran the test sketch, pulled the micro SD card and reviewed the data.  The board  did log the data correctly so the next step is to write a function that writes temperature data to a file with a time stamp.  Since I have an Arduino on my desk with a real time clock chip that measures the outside temperature  as well as the temperature of a solar hot water storage tank this would seem like a perfect application to test.   After testing the function in that application it will be easy to modify the function for the monitoring of the boiler function.  I prefer to write the code in functions and call the functions from the main body of the loop.  This makes the code modular and easy to reuse.  I comment very carefully and probably over comment, but I personally prefer to make the code painfully simple to understand on the assumption I may not look at the code again for a few years.  I am hoping you will comment as well since your comments will no doubt improve the code.

I will post the function when I complete it.  Thanks for reading.