New project - Megamometer


 
Originally posted by Gary Graham:
What is the best way to pick and choose the related classes, functions and declarations and other code sections from all the files that I would need to use the TempProbe class stuff ?
The code is pretty hard-coded to the way HeaterMeter does things just because of the huge code size constraints imposed by having not a lot of space to work with. As such the aggregate objects are statically allocated and assigned to an array of pointer, which is suboptimal. Also instead of using polymorphism to create TempProbe subclasses that use virtual functions to do their work, it is all packed into one class. There's no dynamic memory management and therefore no "new" operator so you can't create the appropriate class at runtime.

With those restrictions in mind, you can just include the GrillPid.cpp/h file then instantiate it from your main file
<pre class="ip-ubbcode-code-pre">
static TempProbe probe0(PIN_PIT);
static TempProbe probe1(PIN_FOOD1);
static TempProbe probe2(PIN_FOOD2);
static TempProbe probe3(PIN_AMB);
GrillPid pid(PIN_BLOWER);

void setup()
{
pid.Probes[TEMP_PIT] = &probe0;
pid.Probes[TEMP_FOOD1] = &probe1;
pid.Probes[TEMP_FOOD2] = &probe2;
pid.Probes[TEMP_AMB] = &probe3;
}

void loop()
{
if (pid.doWork())
// do what you want with pid.Probes[x]->Temperature.
// fan speed is automatically regulated if manualfanmode = false
}
</pre>
 
Thanks Brian, some of that is over my head, but I was able to borrow some of your code and get it to work. I am using your temperature calculation and Matt's ABC profile. Doing a cook in the middle of a snowstorm too !

Ok, so the cook has been on about 4 hrs now, I have 30 lbs of brisket and 30 lbs of butts on the lower 3 racks. Recovery times seem to be better than before, and the Megamometer is really helping keep an eye on the cooker temps without opening the door except to put meat in.
megamometer_102911_a.jpg

This shot is showing the Megamometer project in action. The top line is showing 4 temperature probes inside the cooker. From left to right, these are :
drip_pan, rack_5, brisket_rack1, brisket_rack2
The bottom line is the time and heat transfer tube temp measured with a thermocouple.
I am still using a separate PID controller as before, but I upgraded the fan to get a few more CFM and built an aluminum mounting shield/bracket that protects it better from the heat. Everything is going good.

fridge_102911b.jpg

Here is a shot when I was about to add the 4 butts. The insulation on the cooker is working good because the cooker has been up to temp for a few hours now, and there is still snow on the top.
 
The morning after...
103011_loaded.jpg

Cooking with the meat all wired up is a bit of a hassle when it is time to move something around or to wrap in foil.

Here are some shots of the meat as I brought it out.

103011_brisket.jpg

Briskets were on the small side and pretty lean, the thin edges were a bit dry. It was spicy like jerky and a good smoke ring but had little bark... may try some brown sugar in my rub, or a mop after foil.

103011_butts.jpg

The butts were nice and 3 out of 4 bones pulled clean, and I had to tug one of them a little then pick some meat out of it. The fattest butt literally fell apart taking it off the rack.

103011_turkey.jpg

This is a "hotel style turkey breast (no legs) I cut out the rib cage before cooking so it would fit between the 6" rack spacing. There were a few drips on the skin - a feat in meat stacking... this was cooked on the bottom rack with 2 racks of ribs above and foiled briskets above that. The thermo popped nicely, and the bird was not dry.

103011_ribs.jpg

Ribs looked good. I used the 3-2-1 and placed them on rack 2 and 3 so they would not drip on the turkey.

103011_turkeylegs.jpg

Turkey legs were ok - did not look too special though. I think cooking in foil would make them juicier.

... and here is where it all had to spend the night.
103011_packed.jpg

The irony is that the snow that cancelled the event was used to help do a rapid cool of the meat once I had it cut and in the pans.

Here is a temperature log for the cook. I marked it up with notes after reading the post about "the stall" or "plateau" and evaporation.
102911_cook_3.jpg

The temp in the transfer tube was about 950F with the new fan running flat out during the warmup or after loading meat. The tube drops to around 450 when the chamber settles to 225.

So you can see the stall is certainly visible on the brisket and butt traces... seems like the temperature just hits the wall and stays there for a looooong time (like more than 4 hrs, which would seem like forever if you were watching this). However, I was not going to get up at 3AM to wrap the meat just because it was stalling... I had already planned to do most of the foil work in one shot out of convenience - wrapping brisket and butts when I put on the ribs for the first 3 hrs. Then after 3 hrs, I unwrapped the butts and briskets and wrapped the ribs for 2 hrs, then about that time I started pulling whatever was ready....
 
That is just amazing. I am just shocked at the amount of food you've got there and the amount of data too! The fact that the thing is covered in snow at the same time is like icing on the BBQ. What does one do with 100lbs of food, do you do catering or do you just have some really happy friends?
 
Once the word gets out that you know BBQ, there is an increase in opportunity to do larger cooks. The hardware I have will handle 2x that, and I have maxed it out a couple of times in the past. I am using the Megamometer to learn hot to cook better to make sure I dont pull any "rubbery" meat although the temp may be good.
I did not keep the meat - it is gone to the happy friends now.
 
You seem to have a pretty good idea of what you're doing. Your graph reads to me like a how-to on how to load food to have it all done at the same time. One of the things I've mused about (because we're collecting so much data) is to be able to come up with some sort of formula where you could enter the meat type and weight, target temperature, pit temperature and when you want it done and it would give you a graph before you've even fired up the grill. It is just fascinating to me, which is why the graphs were so important.
 
I agree. It was a blast to use the MM with the LCD able to show all 8 probes, the time and the firebox temps. My dream come true.
I am still handling the charting the old fasioned way - in a spreadsheet, but after looking at a few of these charts, I am starting to see patterns.

I am just applying what I have learned about cook times from the rule of thumb that is out there. Typically about 1.25 hr/lb for the biggest chunk of meat at 225. That scales up to a point, but in a larger capacity cooker the meats closest to the fire will cook even faster because the stoker is blowing the coals to try to get all that meat up to temp. I get some really good bark with that 1,000F breeze blowing by. I am sure that I am onto something that will help design better cookers and now have a way to do some real testing and show the cook profile on all 8 racks of a vertical cabinet. Planning a pork loin test because I can cut up one loin into enough pieces so that all the probes are buried in basically the same piece of meat, except on different racks, then cook it and see what the logs show.

Check this out.
102911_cook.jpg

This graph shows the heat that is coming out of the firebox as well (thats what the thermocouple is for). It will be interesting to compare that to a light load. I wanted to compute BTU, etc, but the most practical measurement I am able to use is something like "28 lbs of charcoal for 14 hrs of operation" .

I think a stall detector would be cool - it would send a signal to a tri-color LED to tell me the meat is ready to wrap or unwrap based on the temp rise over time. Would be easy to do using your moving average code.

Remember the traders adage "The trend is your friend until it bends or it ends".
 
Originally posted by Gary Graham:
This graph shows the heat that is coming out of the firebox as well (thats what the thermocouple is for). It will be interesting to compare that to a light load. I wanted to compute BTU, etc, but the most practical measurement I am able to use is something like "28 lbs of charcoal for 14 hrs of operation" .

I think a stall detector would be cool - it would send a signal to a tri-color LED to tell me the meat is ready to wrap or unwrap based on the temp rise over time. Would be easy to do using your moving average code.
I had never thought about the BTU thing too, having only done up to 15lbs of meat before. But it does make sense that you should be able to add Xoz of charcoal for each pound of meat or something in addition to the baseline amount to keep the temperature up vs the ambient (accounting for snowfall of course!).

Have you played with your PID coefficients at all? I'm wondering how much of the spikeyness of the firebox exit temperature can be flattened by adjusting the parameters. I'm guessing not a whole lot considering how close your control probe stays to the setpoint.

I've goofed around with detecting plateau phase. The moving averages inside HeaterMeter aren't much help though because they only track over 30ish seconds. That works well for the pit probe but not for the food where it may take 10 minutes to move 1 degree. The web interface is better in that it looks over an hour but shortcuts the calculation. The big problem with doing it on the HeaterMeter was storing the amount of data needed to generate a proper moving average on 4 probes and only having 2KB of RAM. Saving the temp every 2 seconds for 10 minutes would be 4.8KB! Anyway, still something I've got in mind to work on at some point.
 
I used the autotune feature to get the external PID controller it to"learn" control parameters, but the conditions in the cook chamber are very different maintaining temp than on startup. The chamber is _+2 degrees most of the time, with exception of the initial startup and maybey a slight overshoot after opening the door the first couple of times. The overshoot on the initial startup is welcome, because the racks get nice and hot, and helps with recovery time after opening the door. The PID library and fan control electronics is next on my list when I get some time to dig in again.

The web interface is better in that it looks over an hour but shortcuts the calculation. The big problem with doing it on the HeaterMeter was storing the amount of data needed to generate a proper moving average on 4 probes and only having 2KB of RAM. Saving the temp every 2 seconds for 10 minutes would be 4.8KB! Anyway, still something I've got in mind to work on at some point.

I like the idea of having the web interface do the things one would do to a chart, but I have no clues about programming anything in java or jason or anything else that dont start with and end with C.

The mega seems to have a lot of memory left, so I can try to implement a stall detector on my firmware. I am thinking about ways to calculate and compare the slope of the line between two measurement intervals, like once every 5-10 minutes. That way, it cuts down on the number of points required, so I should be able to do more than one probe, and surface an alert when a quorum of meats have stalled...
 
Hi,
I am close to having the controller function on my project. I imported the PID control code from Tempmon, and have verified the control loop and my Mega makes the proper output using a LED (diminishing brightness approaching the 225 control point) , but do not have an IRL510 mosfet that Bob specs out... can I use another part ? I have a IRF510 standard mosfet (not logic level feature) and a TIP42 PNP power transistor. I searched for "tip42" and did not get any hits on this forum : (

Would I need to change the gate resistor value from 1K to some other value to use the IRF510 ?
Is it safe with the current draw, etc ?

<next day>
OK, so I found that the difference between IRF510 and the IRL510 is that the "F" part has a 10v threshold, while the "L" part has a 5v threshold. That means the L part will turn on with a logic level voltage and is the best part to use.
The TIP42 transistor worked, but when it should not be working (on when it shoulda been off and off when it shoulda been on) That is a PNP flavor, so I found a TIP31 that is a NPN flavor and it is working as it should be, and that I what I am using untril I can get the correct mosfet.

Here is the project on a test run today... I am smoking two pork loins, about 16 lbs and attempting to see how the cook temps go on the different racks.

Megamometer_111211a.jpg
 
Here is my first ATC run using the Megamometer. I collected a bunch of data on this run, and have summarized it all in a few charts.

I am cooking about 17lbs of pork loin on a gravity fed charcoal, insulated cabinet smoker with ambient temps in the mid 50's.

Here is a look inside the cabinet for the duration of the cook:
11-12-2011_megamometer_test.jpg

Section A represents the warm-up phase, the fan is at 100% and the temperature fluctuations in the fire transfer tube seem to be related to fuel feed/lump size... I was using Cowboy Lump (no RO available at the usual getting place). I notice that Cowboy brand has some pretty big chunks, and if these are not made smaller, they will cause the fire temp to drop because they take up space from the coal bed. When a big ol' lump drops in, only the outer edges are glowing, and that is a lot cooler than a lot of smaller glowing embers. Lok at the last part of section A where the fire temp (red trace) goes from 425 to about 575 while the fan is around 25% duty cycle. Pretty sure that is just part of cooking with natural lump.

Notice there is no meat in the cooker. It appears this fuel/fan combination on a 56 degree F day took about 2.5 hrs to reach 225 in the chamber. Controller did good here - no overshoot, but I think I like my other fan that ran the temp up to 950F : )

Section B is related to the operation under a meat load.
There was a relatively short time that the fan run at 100%, then it started dropping the duty cycle to around 60-70% for most of the cook, even though the chamber was hovering around 218. There seems to be room for improvement on the fan CFM or the tuning of the PID parameters - I would rather see the fan back off closer to the target temp, because this issue made the whole cook a bit low.

Section C is me fiddling around, I was checking the temps during the day, and decided to take another fan and "force feed" the firebox some additional air to see if I could get the cook temp up a bit. I was behind the cooker and unable to monitor anything except if the fans were running, and during that time, I did not see the fans turn off.Having the additional air flow did increase the chamber temp and the PID loop was trying to fight this by backing off the duty cycle to around 15%. (green trace) I think it is interesting to see the fire temp (red trace) is dropping even though the cabinet temp is rising. This is the power of convection cooking or possibly some radiant cooking inside the chamber.

Ok, moving on the the meat temps...
11-12-2011_pork_temps.jpg

For this test, I was monitoring a piece of pork loin on each of the 8 racks of my cooker. The meat weights were not the same though, so this was a variable for sure, although I did record the weights and rack positions.

My understanding is that once meat hits a certain temperature, the cook "stalls" where the temp stays the same or actually drops a bit before resuming the upward trend towards the cook chamber temperature. If I understand that article by the BBQ-Physicist correctly, the meat would be juiciest before the "evaporative" phase of the cook where the moisture goes out of the meat and the temp starts moving upward again.

I added a moving average band to the rack 2 and rack 7 meat traces. This is to show that both extremes of weight and placement in the cooker had the same shape - kind of like a rainbow. The top part of the rainbow is where the meat is stalling, then there is a dip and a rise as the meat dries out and becomes "well done".

Here is a look at the data in the spreadsheet highlighting the stall temps and for each piece of meat:
11-12-2011_pork_peaks.jpg

I color coded the temperature entries that were the same - this is the very peak for each temp probe. I averaged these temps and it appears that the pull temp would be somewhere around 155 to 160... or the point where half of the meat has started to stall (the other half would still be on the juicy side before the stall)

The red line on the left indicates where half of the pieces of meat had started to stall. The red line on the right indicates where nearly 80% had started to decrease temp.

This type of information seems useful to improve my cooks, so I would like to come up with an alert so that the Megamometer will let me know when the meats are starting the stall phase of the cook. That seems to be a good time to pull lean meats like turkey or a loin or maybey sausages (?)... but the brisket and butts are not done until all that moisture is gone. Gotta study those a bit more.
 
Here is a link to version 4f of the Megamometer code that provides features:

8 thermistor probes,
1 thermocouple probe,
a real time clock,
data logging to a SD card,
PID control loop
a driver circuit for the blower fan
a LCD display to show fan speed, time and all temps on demand.

http://www.innerwitness.org/up.../Megamometer_04f.pde

(Right click and save as...)

Many thanks to those who I studied hard and borrowed from - I would still be using two thermometers and recording temps on paper every hour or so if I had not found this forum.
 

 

Back
Top