Close
0%
0%

KilnShark

Wireless pottery kiln sensor that pushes temperature readings to data.sparkfun.com for remote monitoring

Similar projects worth following
My wife is a ceramic artist/teacher, and one of the key components in her studio is a pottery kiln. The kiln has an automatic temperature controller so the amount of time it takes to heat up is known, but cool-down times depend on a number of factors, and can range from 10 to almost 24 hours (it heats up to 2100+F and can weight 300 pounds fully loaded). Instead of guessing when she can drive to the studio to unload the kiln, I set this up so it can be monitored from anywhere.

This is a WiFi-connected temperature sensor for monitoring a pottery kiln and logging data. It is built with the SparkFun EPS8266 Thing Dev Board, MAX31855K thermocouple amp, and data.sparkfun.com. There is also a simple website (kiln.lanahobbs.com) that uses Google Charts to display the data.

I'm calling it the KilnShark because the temperature profiles look like a shark's fin.

The device connects to local WiFi. If it can't connect, it goes into Access Point mode and allows you to connect directly to it, search for local networks, select one, and enter the password. This functionality comes from tzapu's WiFiManager.

Future Plans/Wish List:

Filter Readings. Occasionally there are low/erroneous readings. Sampling at a higher frequency and calculating an average or median value to be uploaded might help.

Fix "Last Updated" feature on website. I tried to use javascript to report the timestamp of the last upload to data.sparkfun, but it isn't working.

Add a setup button. Right now, if Pin 13 is grounded, WiFi is reset and it goes into Access Point mode where you connect to you to change network settings. Connecting a button that can be pressed with a paperclip would be nice.

Add more configuration and upload options. Using the Thing/ESP8266 as an Access Point, it would be nice to be able to change the logging interval and data.sparkfun keys. There could also be other ways to share data, including Blynk or dweet.io (example project). Other possibilities: xively, grovestream, thingspeak, Twitter + IFTTT.

KilnShark_website.html

HTML for a website that uses Google Charts to display the temperature readings.

HyperText Markup Language (HTML) - 4.57 kB - 03/02/2016 at 04:30

Download

KilnShark_Wifi_Setup_example.ino

Arduino code for the SparkFun ESP8266 Thing - Dev Board.

ino - 4.91 kB - 02/28/2016 at 20:26

Download

View all 13 components

  • 1
    Step 1

    Introduction:

    If you are new to the SparkFun ESP8266 Thing Dev Board, I highly recommend you work through the hookup guide (at least through the "Example Sketch: Posting to Phant" page):

    https://learn.sparkfun.com/tutorials/esp8266-thing-development-board-hookup-guide


    Note: I had to connect pin 0 to ground during boot-up to be able to program it. This appears to no longer be needed with Arduino 1.6.7 + ESP Arduino 2.1+.


    I also recommend looking at the MAX31855K hookup guide:

    https://learn.sparkfun.com/tutorials/max31855k-thermocouple-breakout-hookup-guide

  • 2
    Step 2

    Data Stream:

    Create a data stream at https://data.sparkfun.com/streams/make.

    The Arduino sketch I provided uses field names "id" and "temperature_f". If you plan to change these in the sketch, make sure to change the names when creating the data stream, and vice versa.


    Make sure you save the public and private keys somewhere.

  • 3
    Step 3

    Arduino Code:

    There are a few libraries that you will need:

    • SparkFun MAX31855K Thermocouple Digitizer
    • Phant by SparkFun
    • DNSServer
    • SPI
    • ESP8266WiFi
    • ESP8266WebServer

    These can all be downloaded in Arduino IDE by going to Sketch > Include Library > Manage Libraries and searching.

    And one more that you will need:

    • WiFiManager

    To add this one, go to https://github.com/tzapu/WiFiManager and click "Download Zip" in the top right. Then, in the Arduino software, go to Sketch > Include Library > Add .ZIP Library.

    Once you've done all of that, download the sketch I've provided, KilnShark_Wifi_Setup_example.ino, open it, and make the modifications described below.

    Modify the example sketch to match your data streams public and private keys.

    ////////////////
    // Phant Keys //
    ////////////////
    const char PhantHost[] = "data.sparkfun.com";
    const char PublicKey[] = "wpvZ9pE1qbFJAjaGd3bn"; //This is the demo key. Add yours here.
    const char PrivateKey[] = "wzeB1z0xWNt1YJX27xdg"; //This is the demo key. Add yours here.

    You can also modify the upload interval. The default is 30,000 milliseconds (5 minutes).

    /////////////////
    // Post Timing //
    /////////////////
    boolean postSparkFun = 1;
    const unsigned long postRate = 300000; //milliseconds
    unsigned long lastPost = 0;

    The default SSID and password for the connecting to the device to program it can also be changed. It needs to be changed in two places - in this section,

    int resetWifiSettings() {
    here:
      //first parameter is name of access point, second is the password
      wifiManager.autoConnect("KilnTempSetup", "password");

    and in this section,

    void setup() 
    here:
      //first parameter is name of access point, second is the password
      wifiManager.autoConnect("KilnTempSetup", "password");

    Upload the code. See the intro above and the SparkFun hookup guide for details.

View all 7 instructions

Enjoy this project?

Share

Discussions

RandyKC wrote 03/02/2016 at 06:11 point

I've been looking at the documentation for the API and schema and noticing the time it takes for your charts to load. In the default schema they list "tags" as one of the fields used to categorize the data. I wonder if they are using that to take the place of an index. Normalized data would be indexed to aid in data retrieval times. Since this is not normalized data, it is constantly being overwritten,  you can't use an index since the index would be continually corrupted. So, the "tags" field could act like an index to categorize the data into your data and other peoples data and potentially decrease retrieval times. Are you currently using the "tags" field?

  Are you sure? yes | no

Jarrett wrote 03/02/2016 at 06:35 point

This will probably be highly interesting to you:

https://docs.influxdata.com/influxdb/v0.10/concepts/key_concepts/

Google "influx and grafana" to see some of the gorgeous data plots people are making

  Are you sure? yes | no

RandyKC wrote 03/02/2016 at 18:45 point

It was extremely interesting. Thanks for sharing. Someone even installed them on a Raspi2:

http://www.aymerick.com/2015/10/07/influxdb-telegraf-grafana-raspberry-pi.html

Would be a very interesting alternative to Phant on a local install. I wonder about using a setup like that to push updates out to a personal website rather than pushing them out to a shared datahost.

  Are you sure? yes | no

Will Hobbs wrote 03/03/2016 at 13:28 point

This is the JSONP query that is currently used:

data: {'gte' :{'timestamp' : 'now - 18 hours'}, 'eq' :{'id' : 'kiln1'}},

If the upload was at 10 minute interval instead of 5, or if I only pulled 9 hours in stead of 18, it should load faster. I filter on id = kiln1 in case I build a second KilnShark, which will use id = kiln2.

One of the other supported JSONP requests is:

data: {page: 1},

That simply pulls the first page of data (see here: https://data.sparkfun.com/potterykiln, which I think is about 100 rows, or 8-9 hours at 5 minute intervals). I haven't tested it, but it's possible that results in a faster response.

The last thought I have on this is that there may be a way to run a new JSONP request and get Google Charts to update data without having to refresh everything. So the page might be slow the first time, but you could leave it open and it would update quickly. I haven't looked into this, and the website is already a little over my head :).

  Are you sure? yes | no

RandyKC wrote 02/29/2016 at 05:53 point

I think it's the additional filters and chokes.  Probably to cut down on the noise. Which thermocouple are you testing? 

I'm kindof excited about this since I have an L&L that I want to monitor 2 or 3 zones on and keep records of firing. Also as a check of the Easyfire controller. 

  Are you sure? yes | no

Will Hobbs wrote 03/02/2016 at 03:08 point

I've been using the 14 gauge K-type TC from Omega. If I had to order it again, I think I would get something like this from eBay: http://r.ebay.com/2n2zxW.  

I think it's possible to connect more than one MAX31855K board to an Arduino/ESP8266, so you might be able to monitor multiple zones with one system. If you don't need remote monitoring, connecting to WiFi and data.sparkfun.com might be overkill, but it is free (and fun). 

As far as long-term records, the 5-min interval uploads (running 24/7), have used up about 95% of my allotted space on data.sparkfun in about 2 months. It will start overwriting old data soon. So if you use that for records, either export your data at least every other month or increase the upload interval. Not much changes in a kiln in 5 minutes. 30 minute uploads should get you about a year (6 X 2 months). Another idea that I just is to only upload data if the temperature is >100F (or some reasonable cutoff). 

  Are you sure? yes | no

RandyKC wrote 02/28/2016 at 23:03 point

Are you sure your thermocouple/adapter is up to the challenge? 

Bisque fire is usually cone 010 to 05.

http://bellevuecollege.edu/artshum/materials/art/Husby/FiringTemperatures.pdf

Even though you dont need accuracy over the full range you couldn't leave the probe in for the full cycle. It would destroy the probe.

  Are you sure? yes | no

Will Hobbs wrote 02/29/2016 at 01:30 point

Thanks for the interest!

The Amazon thermocouple, if that's the component you are referring to, is just a cheap source for thermocouple extension wire and a mini plug. It needs to be connected to the terminal block and 14 gauge insulated thermocouple from Omega. You're right - the cheap thermocouple wouldn't last long in the kiln. It regularly fires to cone 5 or 6 (200-300F hotter than bisque). 

In fact, after about 25 firings, the 14 gauge thermocouple is actually getting a little thin. I think the 8 gauge thermocouple kit from eBay that I listed as an alternative may last longer and be cheaper. I doubt it is as accurate as the one from Omega, but accuracy isn't critical for monitoring (control is a different story).

If you were referring to the MAX31855K breakout board, it isn't rated by SparkFun for temperatures above 700C (1292F), but it does work. Their tech support just notes that accuracy begins to suffer above that. Again, not too important for monitoring.

  Are you sure? yes | no

RandyKC wrote 02/29/2016 at 03:05 point

I was worried about the Sparkfun MAX31855K breakout board. The Adafruit version goes up to 1350 C in quarter degree increments. 

https://www.adafruit.com/product/269

That would be accurate past cone 10. 

  Are you sure? yes | no

Will Hobbs wrote 02/29/2016 at 03:18 point

(not sure why I can't reply directly to your last comment...) (never mind, looks like it worked)

I looked at the Adafruit version, but after talking with SparkFun tech support, decided it was worth a shot to save on shipping. It isn't clear to me what what is different about the Adafruit board, since they both use the same chip (it does look like Adafruit uses different/more components).

When the kiln temperature is stable, I'm reading within 10-15 degrees of the kiln controller. 

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates