WiFi Oven Thermometer

28 Aug
TM-902C K Type Digital Thermometer
TM-902C K Type Digital Thermometer

We have an old fashioned gas oven which does not have a thermometer inside. I bought a cheap digital thermometer from banggood for just over 5 euros. That’s already very nice, but would it not be cool if the temperature reading would be visible in an app on your smartphone?

Electronics and screen inside.
Electronics and screen inside.

Adding wires to the screen

I have absolutely no clue what’s underneath the black stuff on the PCB. There is probably some kind of logic there, since the pads that connect to the screen come out of it. The idea is to read signals on the display pads in order to retrieve the displayed information. It is probably not the best method, but I can be assured that the temperature on the display will be the same as in the app later on.

Logic chip hidden.
Logic chip hidden.

 

Adding wires to the pads that control the screen.
Adding wires to the pads that control the screen.

 

Hacking the screen signals

The wires on the left are numbered L1 – L7 and the wires on the right are numbered R1 – R8, both counting inward. I noticed when I touched the yellow wires, it sometimes activates a part of the screen.

Parts of the screen activated by the pads. D1 - D4 indicated the number of the digit.
Parts of the screen activated by the pads. D1 – D4 indicated the number of the digit.

Every element can be activated uniquely by a combination of one wire in the range L1 – L4 and one other wire. I hooked up wires L1 – L4 to a logic analyser and found that they all have a similar signal shifted in phase.

Signals on wires L1 - L4
Signals on wires L1 – L4.

The first 3.8 ms, L1 is ‘active’. It is opposite to the other three wires. If one of the other wires (not L1-L4) shows the same signal as L1 here, the segment is off. Otherwise, the segment is lit. The second 3.8 ms, L2 is ‘active’ etc.

For example, L1 and R4 control the dot between the third and fourth digit. If R4 has the same signal (high-low) as L1 during the first 3.8 ms, the dot is off. If R4 has the opposite signal (low-high), the dot is visible.

Attached to a Logic Analyzer
Attached to a Logic Analyzer.

Reading values with Arduino

For the WiFi readings, I only want to know the digits. The first can only be a 1, since values above 200 do not use the decimal. The 1 is used for values between 100 and 199, and above 1000. This means that L7 is not required. R2 – R8 (7 wires) control the digits. Also one of the wires in the range L1 – L4 is required for the timing. One of these signals is enough since the other three are related to it by a phase shift. So with 8 wires, it is possible to read the digital value of the screen.

For this project, I used an Arduino Pro Mini 3.3V 8Mhz. The L1 wire is connected to pin 8, which is used for an input capture interrupt. Wires R2 – R7 are connected to pin 2 – 7. R8 is connected to pin 9.

The code that spits out temperature readings over serial can be found on my github page at https://github.com/bartslinger/tempsensor.

Captured temperature reading.
Captured temperature reading.

 

ESP8266 WebServer showing temperature

Now that the Arduino Pro Mini is printing the temperature over the Serial line, it can be captured by an ESP8266. Then, the ESP8266 is configured as a WebServer which shows the most recent temperature value. To do this, I used the ESP8266 board configuration for the Arduino IDE. Be sure to connect CH_PD to 3.3V. When flashing new firmware, GPIO0 must be pulled LOW. It is also important to flash both devices before connecting them to each other with RX-TX.

ESP8266 connected to the Arduino Pro Mini 3.3V.
ESP8266 connected to the Arduino Pro Mini 3.3V.
#include <ESP8266WiFi.h>
#include <ESP8266WebServer.h>

const char* ssid = "*****";
const char* pass = "*****";
ESP8266WebServer server(80);
String currentValue = "";
String readBuffer = "";

void show_value() {
  server.send(200, "text/plain", currentValue);
}

void setup() {
  // put your setup code here, to run once:
  Serial.begin(115200);

  // Connect to local WiFi network
  WiFi.begin(ssid, pass);

  // Wait for connection
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }

  Serial.println("");
  Serial.print("Connected to ");
  Serial.println(ssid);
  Serial.print("IP address: ");
  Serial.println(WiFi.localIP());

  // Set up the HTTP Server
  server.on("/", show_value);

  server.begin();
  Serial.println("HTTP server started");
}

void loop() {
  // put your main code here, to run repeatedly:
  server.handleClient();

  if (Serial.available() &amp;gt; 0) {
    char inChar = (char)Serial.read();
    readBuffer += inChar;
    if (inChar == '\n') {
      currentValue = readBuffer;
      readBuffer = "";
    }
  }
}

The Arduino with ESP8266 is fitted in the battery compartment of the 9V battery. The temperature sensor does not require more than 3 volts, so it can be powered off the Arduino 3.3V line. An old telephone charger adapter is connected to the RAW input of the Arduino to supply power. In order to make it fit nicely, I cut out a small piece of the battery cover for the power cable.

20150828_155251
Cut-out for the power cord.

Android App

I created a simple app using MIT App Inventor 2. It reads the raw data from the IP address of the ESP8266 and prints it to a label.

App created with MIT App Inventor 2.
App created with MIT App Inventor 2.

Enjoy pizza

Enjoy a pizza baked with the new thermometer.
Enjoy a pizza baked with the new thermometer.

9 Replies to “WiFi Oven Thermometer

  1. Hi!

    I’m wondering if there is any 0-10V or 0-5V conversion happening in this circuit, that you could read? I have one somewhere at home, and I might integrate it to a temp monitoring and control system through a PLC. Thought I’d ask before ripping mine apart and start measuring.

    • I think the logic levels are even lower, around 2-3 V. The ESP-8266 is not designed for signals above 3.3V either.

  2. This is awesome! Could you please share the apk?

    There’s a version of TM-902C, which uses 2 AA batteries as a power source. So it will be possible to supply both a thermometer and Arduino Mini with two 2000mAh rechargeable batteries. Although there’s no enough space inside the thermometer for all this stuff.

    • I could share the apk theoretically, but it will not be useful for you. The IP addresses of the devices are hard coded. It is really easy to make an app yourself with the MIT App Inventor. You just need to call the IP of the thermometer periodically and set the responseContent to a label.

      • Well, I can change the IP addresses. Actually, it’d be even better if you could share a project file (.aia) and not the final apk. I want to add a temperature (or temp range) alert option and I could use your project as a very helpful reference.

  3. It’s been 5 yrs and I dont know if the author can respond. My question is, which is the gnd wire in the photo? Also, you said L1 -L7 on the left counting inward, doesnt the mean L1 would be at far left? The photo shows no wire at far left for L1 . Also, is R1 the rightmost pad on the photo? Can you show a sketch please?

  4. Hello, I have a question: is this a possibility to send data not by ESP, but via USB (FT232 for example)? 🙂

  5. Hello!

    Is there a possibility to datalog using USB and TM902C, without ESP module? I would like to connect TM902C to PC and datalog:)

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.