Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
102 lines (67 sloc) 5.72 KB

Bread

The Bread Detector

A DIY WiFi sensor to measure the size and temperature of rising bread.

Watch your boule from the bar

Phone bread

Bread Detector visualizes the shape and internal temperature of your dough as it rises, so you can do other things and check up on it from your phone once in a while.

You can build it yourself! We used the great -- and free -- Phant data logging service and the low-cost Sparkfun Thing platform. The raw parts cost about $60. It's a lot of fun to build and play with. You get to eat a lot of bread. We hope you enjoy it,

-- Maureen and Brian

Parts List

And some tools you might already have to make it easier

  • FTDI Basic Breakout for programming
  • breakaway headers
  • hookup wire
  • 3-pin JST cables / terminals
  • a breadboard
  • 3 resistors:
    • R1 = 2.2kΩ
    • R2 = 1kΩ
    • R3 = 4.7kΩ

We've made a Sparkfun Wist List with all the parts in it (including things you might already have), for convenience.

Hookup

The distance sensor is analog and goes to the MCU's ADC. It needs a 1/3rd voltage divider resistor circuit, as the ESP8266's ADC only reads 0 to 1V:

  • DIST Vo (yellow on JST) to R1 to MCU ADC. MCU ADC to R2 to MCU Vin.
  • DIST GND (black) to MCU GND.
  • DIST Vcc (red) to MCU Vin.

The temperature sensor needs a (potentially removable) pull-up resistor, and then connects to the MCU's digital pin 12.

  • TEMP DQ (yellow) to R3 to TEMP Vdd (red). TEMP DQ also to MCU 12.
  • TEMP GND (black) to MCU GND.
  • TEMP Vdd (red) to MCU Vin.

The MCU has a soldered-on JST connector for the battery. The battery is charged by the micro-USB jack on the MCU, and seems to last a long time.

  • BATT to MCU JST connector

The MCU has a set of six pins for the FTDI programmer (which you only need during the first-time setup, and not afterwards)

  • FTDI breakout board into the MCU header pins

We made a very simple breakout using a thru-hole breadboard, with JST connectors for the two sensors:

Bread Detector in action

Setting up

These steps just have to happen once. Once you've programmed the ESP8266 and set up your data stream, you don't need to do any of this again.

  • Fork or clone this repository
  • Follow all the steps on this page of Sparkfun's guide to setting up the Arduino environment for the ESP8266.
  • Create a free stream on data.sparkfun.com with the fields distance, raw_distance, and temp.
  • Create a new sketch in Arduino, and add 3 files from the master branch of this repository: the BreadDetector.ino, OneWire.h and OneWire.cpp.
  • Create a new file called auth.h in the sketch and put the following in it, replacing with your details
     const char WiFiSSID[] = "your wifi SSID";
     const char WiFiPSK[] = "your wifi's password";
     const char PublicKey[] = "your data.sparkfun.com's public key";
     const char PrivateKey[] = "your data.sparkfun.com's private key";
  • Either set up a GitHub Page for your forked repository, or place the index.html that is in the gh-pages branch on a publicly available web server. (You can also just open index.html locally on your computer to see the graph.)
  • In that index.html file, change the public_key variable to yours, otherwise, you'll only see our bread.
  • Connect to the FTDI programmer and program the sketch to the ESP8266 in Arduino.

Getting ready to rise

You should make something nice to hold the distance sensor over the rising bowl. We took a plastic mixer "splash guard" and cut a little slot for the distance sensor. The temperature wire just snakes in and gets put under the dough. You want the distance sensor in the middle, with at least a few inches over the dough. (The minimum accurate reading seems to be about 0.8 inches from the sensor, maximum is about 12 inches.)

Detecting some bread

Rise process

  • Set up your bowl with the sensors in the right place. Maybe have some dough in there.
  • Flip on the power switch of the ESP8266
  • After a few seconds, watch your data come in on your data.sparkfun.com stream: you can look at the raw data on the site itself, or navigate to your own copy of the visualization.
  • The data should update every 20 seconds.
  • The graph will stop updating after 17 hours of rising, so you don't get old rises in your graph from the day before.
  • If you add it to your home screen on your phone, you'll get a nice icon, mostly reminding you to make bread

A bread recipe from Maureen

A bread recipe