My New Control System

  • 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.
I was looking for code examples.


I posted a complete working arduino sketch in a thread called data logger ( page 2 ). That should give you a good feel for what they look like. It reads 4 sensors and controls a pump relay, as well as logs the data to USB.

https://www.hearth.com/econtent/index.php/forums/viewthread/48079/P15/

It is also included in a download file on the Hearthwiki I put some trending logic in it in preparation for a variable speed motor control. Trending hotter = increase speed by one, trending cooler decrease speed by one. Mostly tweaking the start/stop logic to get the most out of what I have.

Nice looking enclosure , this stuff is addicting.
 
Thanks for all the info. I am experimenting with the setup right now - having some trouble with the code. I am using the DS18B20 variant, and the temps are coming in at -198. What?
 
I though I had it in the download. I checked and NO I did not. I'll have to go back check the version of the library when I get home.
http://milesburton.com/index.php?title=Dallas_Temperature_Control_Library#Code.2FLibrary

Will take you to the Library and possibly the older versions. I was working at 11/09-12/09 timeframe so use what was availible then if the current one does not work.

Run the sample from the library to ensure that you are functional before trying my sketch.

From the install guide:

Very little in the way of "installation" is required. [Unrar] the contents of the library to arduino-0017hardwarelibraries. If you already have "OneWire" library, only copy over the DallasTemperature folder to libraries. Make sure you delete any old versions before you continue (or if you're testing a PRE version, move it out of the libraries directory so it doesn't conflict).

The IC itself has two modes, parasitism or powered mode. The latter can be found in the appropriate documentation. I commonly use the former as it reduces the number of wires I need to maintain.

You may power the IC using a technique known as a "Pull-up". You will need a pull-up resistor of about 5 KOhm between the 1-Wire data line and your 5V power. If you are using the DS18B20, ground pins 1 and 3. The centre pin is the data line ('1-wire').

Try out the example when you've loaded up the Arduino IDE
 
I have it working now. I found the same pages linked from the arduino forums. I just need to tweak the code a bit to get the display the way I want.

Am I right that the DS18B20's are polled from largest hex address to smallest? This info will help when physically locating them, i think. I will have to label them all with their individual hex addresses for now.
 
Ha, Good thought - I never paid attention. I put them on my breadboard and grabbed each one, when the temperature rose I wrote down the hex and labled it S1 .. S4. I made two more this morning ( I never connected pin 3, but I am not sure if I have the same version ).
Look at the log output on the wiki , I dump the startup to see if you are right.

D12302009_T204208 Device Address: 28 54 D6 5E 2 0 0 AC
D12302009_T204208 Device Address: 28 7C 2 5F 2 0 0 75
D12302009_T204208 Device Address: 28 C9 D6 5E 2 0 0 57
D12302009_T204208 Device Address: 28 F9 CB 5E 2 0 0 2A

It looks like you might be on to it that is right from the logfile produced by the sketch ( Well smallest to largest anyway )
 
No, they are not polled in order - not sure how they are polled.

I will have to label them as you have, but I will keep plugging along with them here.
 
Status
Not open for further replies.