Logging is working, tank hot

  • Active since 1995, Hearth.com is THE place on the internet for free information and advice about wood stoves, pellet stoves and other energy saving equipment.

    We strive to provide opinions, articles, discussions and history related to Hearth Products and in a more general sense, energy issues.

    We promote the EFFICIENT, RESPONSIBLE, CLEAN and SAFE use of all fuels, whether renewable or fossil.
Status
Not open for further replies.

free75degrees

New Member
Apr 6, 2008
430
Boston Area
I finally have my temp logging working. The tank got wicked hot today while I was at work. Top was at 187, mid was at 184, bottom was at 174! I really didn't think it would get that hot. I'm either going to have to figure out how to add some submersible insulation to prevent the epdm in the top half of the tank from getting as hot as the bulk of the water, or I'll have to program some limits into how high I keep charging the tank.

In the chart, the red/blue band represents the tank temps. Top of tank is top of red band, bottom of tank is bottom of blue band. The thicker the red band the hotter the middle temp. The white line is the tank input temp. Vertical background bands are the system state: blue=tank heating the house, green=tarm heating the tank, brown=tarm heating the house, black = idle, gray = oil heating the house (happily absent from the graph).
 

Attachments

  • tarmchart.GIF
    tarmchart.GIF
    17.6 KB · Views: 618
Nice graph, can you tell what system your using to generate it? Is it hardware based or software on a PC??

~ Phio
 
mpilihp said:
Nice graph, can you tell what system your using to generate it? Is it hardware based or software on a PC??

~ Phio
I'm using a ts7800 single board computer running linux, similar to the one that nofo uses (same manufacturer, Technologoc Systems). I get the temps using Dallas Semi ds18s20 sensors. The sensors interface directly to a dio24 pc104 board that is also made by Technologic and plugs right into the ts7800. I wrote the C code to read from the sensors. A separate Perl script runs once a minute and calls the sensor program to get the temps. It then uses the temp data to decide which state the system should be in and calls another C program that sets some I/Os that control relays that control the valves and circs in the system. The Perl program also logs the temps and state info and a separate Perl cgi script parses the log and produces the graph that I showed above. The graph is entirely html (shown as a gif screenshot above).
 
I'm impressed! From a software point of view, that might even be more complicated than what I'm doing, and that takes some serious work.

I've not done as much in Perl, and I'm using the jpgraph package to create my graphs. Still working on finding the best presentation for the data. That graph looks nice.
 
nofossil said:
I'm impressed! From a software point of view, that might even be more complicated than what I'm doing, and that takes some serious work.

I've not done as much in Perl, and I'm using the jpgraph package to create my graphs. Still working on finding the best presentation for the data. That graph looks nice.
Thanks, a compliment from the guru means a lot. I would have never gone this route without having been inspired by your system.

The software isn't too complicated. Perl is very compact and the script that runs once a minute and sets the system state is only about a page of code. The C code to read the sensors and set the relays is probably a few pages. The hardest part by far was getting the sensors to work and to work with long wires. I gave up on putting all of the sensors on one bus and am now using a dedicated I/O for each sensor. This may be better anyway because it saves cpu time because I don't have to send the unique rom code for each device and read out the temps one at a time.
 
free75degrees said:
nofossil said:
I'm impressed! From a software point of view, that might even be more complicated than what I'm doing, and that takes some serious work.

I've not done as much in Perl, and I'm using the jpgraph package to create my graphs. Still working on finding the best presentation for the data. That graph looks nice.
Thanks, a compliment from the guru means a lot. I would have never gone this route without having been inspired by your system.

The software isn't too complicated. Perl is very compact and the script that runs once a minute and sets the system state is only about a page of code. The C code to read the sensors and set the relays is probably a few pages. The hardest part by far was getting the sensors to work and to work with long wires. I gave up on putting all of the sensors on one bus and am now using a dedicated I/O for each sensor. This may be better anyway because it saves cpu time because I don't have to send the unique rom code for each device and read out the temps one at a time.

Very Nice Job!
I have been inspired by both of you, The thread on the 1 wire sensors is what really got me thinking that this is something I could do without much hardware though.
So I bought a ds9490 USB adapter and started playing, and found out that I am indeed no programmer. LOL
After thoroughly confusing myself and being disappointed I decided to go back to the library and trade in the C,C++, and java books(yes I read some of each,had to see what its all about.talk about brain overload) for
A Visual Basic book(I know, kid stuff) and now things are starting to make sense anyway.


I started with some of the software examples from dallas and have had great success after learning the basics. I found that with parasite power readings were a bit erratic and read that external power may help at higher temps, It did. Temp conversion seemed to take forever with six sensors until I discovered you can convert all at once and then read them.

Now I am not ready for graphs and logging yet but this is what I have so far. Sensors in place(system is currently controlled with aqua-stats and relays) and a few ds2406 switches on a breadboard with LED's for testing.
Question I have, how often should I read the sensors every 1 second, 5 , 30? I think I read Nofossil was reading every second, If I do skip rom and convert all at once they can be read every second but this seems like overkill.

Next Q you guys are using DIO boards to drive relays, anyone want to comment on the reliability of using 1 wire switches(such as ds2406,2408) for driving relays?(with a buffer of some sort)
I am running this on a windows machine that is always on anyway. It may be the weak point of the setup but it runs for months without a reboot and then usually only for updates so it is stable.
I already have aqua-stats in place that could act as a fail-safe, May not be efficient but would keep from freezing or boil-over

If nothing else I have educated myself so it won't be for not. I could very easily be talked into an NFCS!! ;-) need any beta testers?
 
well your graphing is very cool, I dont have the time or the programming knowledge to do such a setup. I do have a program I use at work that gleans data via SNMP which Im planning on using with a networked device that gathers sensor data and makes it available via snmp, much more canned solution for me. The device is a weathergoose by ItWatchdog, uses the 1 wire sensors too.

This program is also written in pearl, did you write the graphing engine or is that a module you are using from a shareware type source??

~ Phil
 
kabbott said:
A Visual Basic book(I know, kid stuff) and now things are starting to make sense anyway.
Don't worry about code snobs who tell you that Visual Basic is kid's stuff. If it does the job to your requirements then that is all that matters.

kabbott said:
Temp conversion seemed to take forever with six sensors until I discovered you can convert all at once and then read them.
That's cool, I went through that same learning process.

kabbott said:
Now I am not ready for graphs and logging yet but this is what I have so far. Sensors in place(system is currently controlled with aqua-stats and relays) and a few ds2406 switches on a breadboard with LED's for testing.
Question I have, how often should I read the sensors every 1 second, 5 , 30? I think I read Nofossil was reading every second, If I do skip rom and convert all at once they can be read every second but this seems like overkill.
I have been doing every minute for the last couple weeks. The last few days have been a great test as the temperatures outside have been much closer to mid-winter temps and every minute has been working fine. I'd like to reserve some cpu time on my ts7800 for stuff like the web server, irrigation control, and pulling temp forecasts from the noaa weather forecast web service, etc, etc.


kabbott said:
Next Q you guys are using DIO boards to drive relays, anyone want to comment on the reliability of using 1 wire switches(such as ds2406,2408) for driving relays?(with a buffer of some sort)
I didn't even know they existed so I can't say for sure. It might make sense if you want to stick with just using usb as your only i/o from the pc. The nice thing about those 1 wire devices is that they are cheap (in case it doesn't work)

Have you ever used linux? If so you might want to consider an nfcs. It sounds like you could do a lot with it if you already got the single wire sensors working with vb.
 
mpilihp said:
well your graphing is very cool, I dont have the time or the programming knowledge to do such a setup. I do have a program I use at work that gleans data via SNMP which Im planning on using with a networked device that gathers sensor data and makes it available via snmp, much more canned solution for me. The device is a weathergoose by ItWatchdog, uses the 1 wire sensors too.

This program is also written in pearl, did you write the graphing engine or is that a module you are using from a shareware type source??

~ Phil

I wrote the graphing stuff myself. it is pretty simple actually... I'll post it later tonight when I get a chance...
 
While us Linux guys like to be snobs, Visual Basic on a PC is a very capable environment with a lot of support and examples. I've done a fair amount myself.

Because I'm a hardcore controls guy, I wanted a controller with no moving parts and extremely low power consumption. The boards that free75 and I are using are VERY low power (a couple of watts) and have some performance limitations such as no floating point math hardware. Programs in C are no problem, but they aren't going to run Windows.

I do sampling at once per second because I'm running 99% idle even at that rate. I'm not using 1-wire, though. I do most of my control logic on a 35 second interval, and logging happens every 30 seconds (all inputs and outputs to an SQL database for subsequent analysis and graphing).

Boards like the TS7260 or TS7800 are not for the faint of heart, but they are great solutions. I'm happy to see more people working with them. I've always made all my code available to anyone who is interested, and there are a few people working on variations of my mad-scientist system.
 
Sheesh, I thought this site was supposed to be about wood heat. You know, low-tech stuff that even guys like me could understand.

Apparently we're going to have some kind of a run-off for who gets to be the Boiler Room Alpha Geek for 2009.
 
nofossil said:
I'm impressed! From a software point of view, that might even be more complicated than what I'm doing, and that takes some serious work.

I've not done as much in Perl, and I'm using the jpgraph package to create my graphs. Still working on finding the best presentation for the data. That graph looks nice.

I was thinking of just sticking my finger in the tank and see if it's hot. That's about as complicated as I get. :)
 
Eric Johnson said:
Sheesh, I thought this site was supposed to be about wood heat. You know, low-tech stuff that even guys like me could understand.

Apparently we're going to have some kind of a run-off for who gets to be the Boiler Room Alpha Geek for 2009.

It's all about tools - the more the better. You start with an axe and a splitting maul. Pretty soon you have a moisture meter and an infrared thermometer. From there it's a short step to cross-compilers and lookup tables.

For those who are contemplating the next step in boiler control system intelligence, contemplate this URL - it gives data for the next 48 hours in three hour increments for temperature, cloud cover, and wind speed. This is my latitude and longitude, and the time period is the next 48 hours from right now, but generating the URL on the fly is easy, as is parsing XML.....
 
nofossil said:
That's pretty cool. I'm trying to figure out how I could use forecasts to run my system more efficiently. The best use I can come up with is to use it to determine how much wood i should load at a given time based on future temps, wind, sun, and current system energy storage. This way I could avoid putting too much or too little wood in the boiler. Since my routine is to load and then either go to bed or to work, knowing the right amount of wood is important as I am not able to throw in another log or two late in the fire.

Can you think of any other ways to use forecasts to run the system more efficiently?
 
free75degrees said:
That's pretty cool. I'm trying to figure out how I could use forecasts to run my system more efficiently. The best use I can come up with is to use it to determine how much wood i should load at a given time based on future temps, wind, sun, and current system energy storage. This way I could avoid putting too much or too little wood in the boiler. Since my routine is to load and then either go to bed or to work, knowing the right amount of wood is important as I am not able to throw in another log or two late in the fire.

Can you think of any other ways to use forecasts to run the system more efficiently?

I'm thinking pretty much the same thing. Since my system is marginal in terms of storage capacity for skipping days, I'd also like to get a better idea of whether that's likely to be possible. If I can skip a day by throwing in a third load I'd do it, but I'd rather not bother if that wouldn't be enough.

I don't yet know how accurately temp/wind/cloud cover would allow you to predict heat loss, but I'll bet you can come pretty close. Looking forward to building self-adjusting correlation matrices. Since the system knows how much heat is being used at any point in time, it can learn the correlations if it also knows the forecast. I've got an old neural network program lying around that should do nicely.....
 
Status
Not open for further replies.