Version 2 of my homebrew controller


 

Bob Hruska

TVWBB Fan
It's been a long time! There's been some pretty cool advancements in the hobbiest embedded controller market, and I decided to upgrade things.

I have built a new controller based on the Arduino board and using the temperature probes from the Maverick ET-73. The web info is brand new and I am still in the process of getting it all documented, but the basics are there right now:

Homebrew Temperature Monitor / Controller
 
Originally posted by RobM (YankeeRob):
Nice work Bob! Is it Ethernet off the shelf?? What is the software written in?

-rob

The ethernet is optional - you can add the WiShield to the stack or not, it is simply plug and play.

The Arduino programming environment is mostly C++ but I tend to just use straight C code.

As for features, the sky is the limit....I simply have a PID control loop running right now keeping the temperature stable and a web server that lets you get the data and change parameters.
 
I haven't programmed in C since '96 ~ Been doing mostly Java and .NET (C#,VB) since then. I remember blue screening a few NT4 servers in my time. gotta love those pointers ;-}

Looks like a cool project though.

-rob
 
Bob, Thanks for posting this. I've printed out the info on your website.
We'll see if I ever get around to doing anything with it. LOL
 
Hey Bob,

First off, many thanks for you r work on this project. I'm intrigued at the idea of homebrewing a smoker controller. Couple of questions.

1. Is it possible to PWM the fan output to allow for finer temp control over simple on/off?

2. This is actually why I did this entire reply. Is it possible to use any other software language than C?? I have no desire whatsoever to learn that gibberish. I'm thinking Visual Basic or something equally simple.

3. Can the Arduino board communicate to a PC in real time? My thought is to use the controller as a simple sensor and use something like LabView (which I have access to) to do the intelligence.

Thanks much!

Russ
 
OK, it's amazing what one can learn with a little reading and experimentation. Please disregard my entire prvious message.

Instead, I'll ask a new question. Did you write the version 2 controller code in C or in Arduino? If it's Arduino, would you be willing to share?

Russ
 
Did you write the version 2 controller code in C or in Arduino? If it's Arduino, would you be willing to share?

Russ

The Arduino environment is 99.99% C/C++. It gives you a lot simpler access to the features of the board by providing libraries to call.

My preferred environment is to use Eclipse and build all the C/C++ code outside of the Arduino GUI. However, the code with only a few very minor tweaks will build in the Arduino GUI.

I will be posting the current state of the code in the next couple days as there is another forum member who is building one. I'm also trying to put together a step by step buildup.
 
I'm having a little trouble with writing the code. Not a huge surprise as I'm a hardware engineer, not software. Mainly with the display. I have gotten the fans up and going pretty well. I've got a couple of optical rotary encoders to use for the set temps but I don't have them wired in yet. My biggest problem right now is that I haven't gotten the probes from Maverick yet. I'm really hoping that they show up today. I'll need the weekend to get them written into the code.

For the competition on Nov 13,14 I'm just going to hard code the set temp at 250 and not worry about the display too much. Mainly I just want to be able to sleep through the night for once. After the comp I'll get back into it and get it finished out.

I would really LOVE to get a look at your code if for nothing else than to use it as a reference.

Russ
 
I've been working with someone building one of my controllers and in doing so made a big code cleanup and added some important documentation to the code. If you have the old version, you want to check out the latest.
 
Excellent work Bob. The code looks like a great start indeed! Fine job... I think this might be my next little electronics project. Almost looks too easy with the modules too.
 
Originally posted by Russ Sylvester:
Hey Bob,

First off, many thanks for you r work on this project. I'm intrigued at the idea of homebrewing a smoker controller. Couple of questions.

1. Is it possible to PWM the fan output to allow for finer temp control over simple on/off?

2. This is actually why I did this entire reply. Is it possible to use any other software language than C?? I have no desire whatsoever to learn that gibberish. I'm thinking Visual Basic or something equally simple.

3. Can the Arduino board communicate to a PC in real time? My thought is to use the controller as a simple sensor and use something like LabView (which I have access to) to do the intelligence.

Thanks much!

Russ

I use Phidgets hardware (www.phidgets.com) which are a bit more expensive than the Arduino's Bob is working with. But, they can be programmed using VB and VB.Net (and VBS for that matter) which is much easier on lazy coders like myself. I use their servo and motor controllers to operate fans and damper motors for full PWM functionality. Also, the devices have to (for the most part) be tethered to a computer, as apposed to the Arduino which can run on it's own.

Not selling anything, so I hope this is OK. Here's my web site:
www.geekwithfire.com

Perhaps it will give you some ideas on a DIY of your own.
 
I'm getting closer with his thing!

I took the thermocouple into work and verified the data sheet to within 1%. I thought that I had the software 'algorithm' figured out but after trying an actual smoke, I've found that I really don't.

After looking at your code I think I would like to try your software and see if I can adapt it to my hardware.

My first step was to simply try to "verify" (which I suspect is really a compile) which didn't work. It complained that the 'WiServer.h" was missing. Any idea where I can find this file?

Russ
 
Arduino development environment is a little weird - you can't put #ifdef around include files. If you are trying to use the software with wishield not defined, make sure you comment out #define USE_WISHIELD and just delete the #include "WiServer.h" line.
 
Thanks Bob. I tried what you said but it ran into a lot of other troubles so I sort of 'punted'. I simply copied the time and temperature stuff out to a seperate file. It compiles alright and I was able to upload it to the board. The display came up and said that the thermocouple was at 200 degs. Interesting, considering that the thermocouple was laying on the table next to me.

So then I stripped out all of the time stuff and deleted the fan control and pared it down to simply read the thermocouple, do the algorithm, and display the temperature. It still showed 200+ degrees.

I tried to figure out the two lines where the 'R' & 'T' are derived and I can't make heads or tails of it. I'm assuming that 'R' refers to the resistance of the thermistor, 22200 refers to the fixed value resistor, and 1024 refers to the 10 bits of the A/D converter. Obviously 'aval' is the reading from the A/D converter.

The part that I really don't get is the math for deriving 'T'. What are the 'A', 'B', and 'C' values. I reread the data sheet and I don't see anything referring to these values. Also, what is 273.25??

Sorry this is so long but I'm stumped as to how to proceed. I'm also up against the clock as I have a competition Dec. 11&12 and I REALLY need this to work.

Russ
 
OK, a lot of information to cover....I hope I can cover it all for you. If something is missing, feel free to keep asking.

First things first - you keep mentioning a thermocouple. Do you really have a thermocouple, or are you using the Maverick ET-73 probes? The ET-73 probes are actually thermistors, not thermocouples. My original controller used thermocouples, the second version switched to the simpler, cheaper ET-73 probes.

I'm going to assume you have the ET-73 thermistors, and I will explain what's going on in the code and where things come from.

All thermistors have a known resistance at any given temperature. That data is generally published in a data sheet (I have attached the one for the ET-73 that I got from their customer service department) It is also possible to model a thermistor using an equation called the Steinhard-Hart equation. It has a few constants (A, B, C) that can be calculated by using the data sheet. I calcluated A, B, and C from the data sheet and applied them to the equation (for more info see http://en.wikipedia.org/wiki/T...inhart-Hart_equation and http://en.wikipedia.org/wiki/Steinhart-Hart_equation)

The 22200 is the value of the resistor that is used in conjunction with the thermistor in the voltage divider circuit in my schematic. I had a 22KOhm resistor that I measured to be 22000 ohms. Using the 5V source, the 22200 ohm resistor will take up a percentage of the voltage and the thermistor will take up the other percentage. The thermistor's percentage depends on the temperature.

You are correct - the 1024 is used to convert from the A/D converter reading to a fraction. The 273.25 is used to convert from degrees Kelvin (which the Steinhart-Hart equation uses) to degrees C. Then it is converted to degrees F.

Making any sense now? Hope I am helping more than adding confusion.
 
There's the missing piece of the puzzle! I thought 'T' was in degrees Centigrade not Kelvin. That explains a lot!

I keep calling it a thermocouple but it is the Maverick ET-73 probe. Bad habit of mine.

I put together an Excel spreadsheet last night that calculates a temperature (in F) for each A/D data point (0-1023) based on the datasheet. I then copied the temperature list into a constant array. That way the result of the A/D converter reading directly indexes the array and returns the temperature reading. I'll re-write the code tonight to use the array and see how that works out. Yeah, I know, it's cheating but I'm somewhat desperate to get this finished so I can get back to my rub/injection recipes. If nothing else, it will follow the non-linearity of the curve exactly and make it more accurate.

After the competition I'll go back and work on the equation some more to see what I'm doing wrong. I've never heard of the Steinhart-Hart equation before. Interesting.

I really appreciate your patience. If it works out right then I'll share the code.
 

 

Back
Top