Heatermeter BBQ Pit Temperature Controller

akornI have recently started getting into smoking my own BBQ at home using a Char-Griller Akorn kamado grill.  The grill itself and food coming off of it has been awesome so far (cooked a low and slow pork butt that went for 12 hours and a turkey that went for 4+).  But one of the challenges of making really good smoked BBQ is getting the temperature of the grill to sit right where you want it (say 225 degrees) over long periods of time and in some cases this mean going all night (which I did with the pork butt).  Kamado style smokers are very good at this consistency, but in many cases (esp. with a lower priced model like the Akorn) you are going to need to baby sit it a bit and watch for drops and rises in temperature so that adjustments can be manually made.  Even with a good remote monitor like the Maverick and a well insulated cooker it can lead to long nights of adjusting the dampers to maintain temps.

A solution to this problem are BBQ pit temperature controllers.  These devices act like a thermostat for a BBQ and control the flow of oxygen to the fire in order to raise (stoke) or lower (dampen) it.  Most use a hardware / software system called a PID Controler (proportional-integral-derivative controller).  This controller measures the current temperature of the pit and based on time, last reading, etc. decides if the fire needs more or less oxygen.  If more oxygen is needed the device turns on a small blower that is attached to the grill (in the case of the Akorn at the bottom damper slot).  It is important to note that the grill needs to be pretty air tight (if at all possible) in order to get the best results out of this sort of system, otherwise outside air will “leak” in and stoke the fire.

There are quite a few off the shelf commercial solutions out there that can be purchased based on PID technology.  The lower cost models (~$150) like the Auber or Party Q are basically just a PID controller and a blower.  While the more expensive models ($300+) like the Cyber Q and Rock’s Stoker include more advanced capabilities like WI-FI network access and built in web servers for remote monitoring and operation.  Some of the more expensive models also offer more temperature probes for food (most have just 1 pit probe and 1 food probe).  Of course, being the tech geek I am, I really wanted one of the network enabled models but the cost was more than my grill!  Luckily I found what turned out to be the solution, an open source project called Heatermeter!

Now, let me start out by saying, this is not for the feint of heart.  There is low level electronics work involved here including soldering onto a Printed Circuit Board (PCB) of lots of little parts.  But, if you can follow some pretty simple instructions, and watch lots of videos on YouTube about soldering… you can build this thing and get the capabilities of the more expensive products for the price of the cheaper ones.  If I can do it so can you!  Ok, so what the heck is a Heatermeter?

Basically you take a Raspberry Pi (tiny linux computer), a specialized PCB that all of the electronics components go onto including an ATmega328P microcontroller (also used in the Arduino), and a software image the good folks at the Heatermeter project put together and you have the beginnings of a web enabled BBQ pit controller!  All you need then is a blower (that you have to do a little surgery on), some temperature probes (you can use the ones from a Maverick temperature monitor), something to put it all in (they have designs for 3d printed cases, which is what I have but any old project box or even Tupperware would work) and a way to power the device (can use USB or an external 12V wall wart power adapter).  Oh and by the way it works awesome!

I will not go into all of the ins and outs of assembly and parts as all of that is covered in the official project wiki with further information available on a message board.  But I will post a couple of pics of my handy work below and describe a few things.

This first image shows the Heatermeter PCB with a few resistors added to it but not yet soldered in place.  The assembly of the Heatermeter requires only pass through components.  In fact the only surface mount component is an optional wireless module if you are trying to use wireless temperature probes which I did not need.photo (1)  There really is not anything special about the assembly beyond what you would find in any electronics project other than the main button (which is actually a four way joystick like button) and the three LED lights need to be positioned at an appropriate height off of the PCB if fitting into a 3d printed case.  I did a pretty good job on the button, but mounted my LEDs a bit too high, so they stick out of the case a bit.

The next pic shows the fully assembled device with the Raspberry Pi joined to it.  The RP connects to the Heatermeter using the GPIO pins on the Pi.photo 1  I would like to point a couple of things out here:  First, at the very top of the device you can see the LCD screen.  This screen allows the device to be used without going through the web interface and can be controlled with the center joystick button just below it.  To the left of the screen you can see the Raspberry Pi’s USB slot and the USB WI-FI dongle plugged in.  I was able to set mine up to a static IP so that it could be accessed from outside of my network if needed via port forwarding from my router.  Next, at the bottom of the device you can see the barrel plug on the left (this is for 12v power) and the RCA jack near the center.  The RCA jack is interesting as it is what supplies power as needed to the blower.  I had to take off the power jack from the Auber blower I purchased and solder an old RCA connector in its place.  Works well, but is just a little strange.  Lastly, on the right side of the device (which you cannot see from the pic) are the four jacks for the temperature probes.  The bottom jack is for the BBQ pit and the other three are for food items.  Each probe can have individual alarms set for both high and low temperature and scripts can be written to do things like sending an email when an alarm happens.

The next two pics show off the device sitting in the 3d printed case with the last one showing what it looks like when running.  You can also see the 12v power applied at the bottom.

photo 2 photo 3

Finally, a pic of the web interface.  The interface shows the BBQ pit temperature and set point (the desired temp) at the top with each probes readings below.  The probes can be labeled in the interface and changes made to the set point right from this main screen.  Additional setup is available from the web configuration screens including alarms, scripts, and network setup.  Also, the graphs are a really nice feature, and the interface continuously updates without intervention.photo 4

In conclusion, I absolutely LOVE this thing.  It was fun to build (and I only burnt myself once on the soldering iron).  If you are looking for a networked PID based BBQ temperature controller and are not afraid of an electronics project I highly recommend trying it out.  The community surrounding the project is really great too so check out the message board I linked earlier in the post.

Good cookin!

Char-Griller / King-Griller Akorn first Smoke

I have long wanted a kamado style grill/smoker.  I had read a large amount regarding these things on various websites and forums.  I heard about their amazing ability to hold stead temperatures for low and slow BBQ along with the ability, when wanted, to kick it into high gear and cook at 700+ degrees.  It seemed like the perfect thing to quench my desire for BBQ and grilling in one box.  But then comes the downside… these things are expensive!

For a high quality ceramic kamado (Big Green Egg, Primo, Kamado Joe, etc.) you are going to be pushing or into the $1000+ dollar range just to get started.  Now don’t get me wrong, I still want one of these bad boys… but I first wanted to get into the game without quite that much commitment.  Enter the Char-Griller (or King-Griller depending on where you bought it, mine is a King-Griller) Akorn kamado.  The guys can be had from the low $200’s and although not to the quality of the previously mentioned bad boys can be made pretty easily to produce outstanding results!

Here are some pics of my first low and slow BBQ (a 7 pound Pork Butt):

porkbutt   pulledpork

I was able to hold temps in this thing around 225 (+/- 15 degrees) for 12 hours.  I did need to baby sit it a bit and make adjustments a few times for the temp, but for a grill I paid $250 bucks for I will take it!

So what does this have to do with a tech blog?  Well, I want to add a temperature controller which will automatically do the baby sitting for me… basically a set it and forget it type of device that reads the temperature of the pit and controls the airflow through the cooker to maintain a temperature I set (just like your indoor oven).  Now there are a few products out there that are commercially available to do this.  The less expensive ones are no frills and just do the job I mentioned.  The higher end ones have Wi-Fi and web servers built in along with recording capabilities of the entire cook, etc.  Obviously, I want one of the more fancy ones being the tech geek I am!  Once again the issue comes down to price, the ones with no frills are going to run about $150 bucks, but the nicer network enabled ones are over $400!  Enter an open source project called Heatermeter… this project uses a Raspberry Pi and custom assembled hardware to create a full fledged BBQ pit controller including WI-FI for the same price or less of the cheaper commercial products out there.  The downside… quite a lot of soldering required.  I have put one together, but not yet tested it in a cook.  Check out my next blog post which will go more into my Heatermeter assembly.

Viewing Running Postgres Queries (and what if they are too long??)

There can be many times when knowing what queries are currently running on a Postgres server can be helpful to know.  It is pretty well known that the system pg_stat_activity table can get you this information.  Just run the following query:

SELECT * FROM pg_stat_activity;

The resulting record set contains a bunch of information but I find the current_query (the query itself) and procpid fields the most useful.  current_query shows the query itself (with one important issue I will talk about in a minute) and the procpid contains the process id (which can be used to kill the query if it is causing issues for instance).

If you need to stop a currently running query, issue the following command:

SELECT pg_cancel_backend(pid of the postgres process);

The issue I mentioned earlier is that the current_query field may not be long enough to contain a large query’s full text.  So what do you do??  The solution I was able to get to work in Linux was to use the GNU debugger to connect to the Postgres process.  As long as gdb is available on your server this should work (and not impact the running server in any way):

gdb [path_to_postgres] [pid]

For me (from inside the Postgres /bin directory) I would issue the following:

gdb postgres {proc id number found using the query above}

Once the debugger is running then issue the follow and you should be able to see the entire query:

printf “%s\n”, debug_query_string

After you have the query, you can exit gdb using the command quit.

New Release of SpatialKey (our biggest update to date)!

Very excited to pass the word along that our latest release of SpatialKey is now out the door!  This release bring our whole user experience to an all new level and we are all very proud of it.

Take a look at our blog for more information and a video introducing the new experience:

http://blog.spatialkey.com/2012/05/may-2012-release/

SpatialKey, Salesforce and Geopointe

SpatialKey now offers its spatial analytics capabilities to Salesforce users by way of our partnership with Arrowpointe software’s Geopointe mapping solution for Force.com.  Geopointe is the #1 Force.com geo/mapping solution and by way of our partnership now adding full-featured Geo-Analytics as well.

If you currently use Salesforce and are looking for a mapping and analytics solution check out Geopointe!  Here is a link to the Geopointe blog talking about the new SpatialKey integration, oh and a video to!

http://www.arrowpointe.com/2011/06/17/geo-analytics-in-salesforce/

 

 

 

 

 

 

 

 

 

Our Application Server Stack

With a new year coming up I thought I would give a quick run down of our OS server stack.  From the beginning SpatialKey has been built on a number of great community/company open source platforms, here is what we currently use:

  1. Apache/Tomcat
    1. We are currently evaluating moving our application servers to pure Tomcat vs. JBoss as at this time we are not taking advantage of any of the additional server capabilities JBoss provides and Tomcat gives a smaller and more easily managed servlet container.
  2. JBoss AS
    1. Has been our application server platform from the beginning.  I cannot say enough good things about JBoss.  It is an outstanding full stack J2EE server.
  3. Postgres SQL 9 + PostGIS
    1. SpatialKey would not be what it is today without Postgres and PostGIS.  Postgres is a great enterprise ready database from the get-go, but add PostGIS to it and you have a powerful full stack GIS database on top of it.
  4. Blaze DS
    1. The SpatialKey client is flash under the hood and Flex developed.  Blaze DS is the glue that allows the flash client to request server services.
  5. Server Development
    1. There are really too many technologies to list here, but there are three to definitely point out:
      1. Spring
        1. Ah, Spring… the magic container that brings the whole SpatialKey server together.  Don’t leave home without it!
      2. Hibernate
        1. Going hand in hand with Spring, Hibernate gives us an industry standard object relational mapping engine to help with the heavy lifting of standard database interactions.  Everything non-customer data goes through Hibernate in SpatialKey.
      3. Railo
        1. I have always been a ColdFusion fan.  I have worked on ColdFusion since its very early days and to this day believe it is still the easiest web application server to develop for.  Railo brings ColdFusion development to the open source world and of course at no charge!

So, there you have it the open source server stack used in SpatialKey (did I mention all of this great server goodness is free??).  If anyone has any specific questions regarding our usage of these products, please ask them in the comments and I will be glad to answer any that I can.

SpatialKey nearing 2.3

Wow, the past year has been one of excitement and growth for SpatialKey as a platform!  We are now nearing a 2.3 version release of the server.  Over the year we have made great inroads into the insurance industry and are focusing in on a new “Apps” based approach for adding specific targeted capabilities to SpatialKey.

The first of these Apps will be a Natural Perils suite that we have recently introduced.  Check out what we are working on here:

http://spatialkey.com/industry-solutions/insurance/details/instantly-forecast-hurricane-exposures/