This page describes how you can build yourself a simple and precise thermometer with alarm functions (SMS, E-Mail, Alarm sound) for your Android device (phone, tablet etc.) from just a few electronic parts (12 USD / EUR).
What you need:
- an Android 2.2 or higher device having a stereo headphone output (and mono microphone input)
- this SmartThermo DIY sensor kit (contains three 1KOhm resistors and a 2KOhm thermal NTC sensor, for sensor details see sensor characteristics below)
- our SmartThermo App (you can download via Google Play)
- temperature monitoring, logging, and alarm
- alarm trigger on: temperature higher/lower than setpoint, sensor disconnected, device power loss, test day (for testing)
- SMS alarm, E-Mail alarm, sound alarm
- temperature range: -50 to +180 °C (degree Celsius)
- Fahrenheit and Celsius
- precision: 1 °C (degree Celsius) in the range -10..+30°C, otherwise 2 °C
- for all Android 2.2 or higher devices with a stereo headphone output (3.5mm 4-poles headphone plug, CTIA standard)
- simple to build
- no external power needed
- fully-adjustable software
What can you do with this external Android thermometer sensor? Examples:
- Send yourself an SMS or email message if temperature falls below or above a certain value, or if power is lost
- Log temperature data, date and time to a file on your Android device (e.g. SD card)
- Applications: monitor temperature (food, vending machines, freezers, etc.)
- Your own ideas… (contact me)
Tested devices (NOTE: this list ist NOT complete, just showing devices we tested)
tested device Android connector result Sony Tablet S 4.0.3 CTIA succces Samsung GT-S5300 2.3.6 CTIA success Samsung GT-I5500 2.2 CTIA success Cubot Bobby 3G 4.2.2 CTIA success
In this demonstration video, a temperature SMS alarm was set for 28 degree Celsius:
Let’s start building the thermal sensor:
- Get your own SmartThermo DIY sensor kit in the shop here.
- Connect the three resistors (1K, 1%) as shown below.
Connect the thermal sensor (NTC 2K, 1%) as shown below.
Schematics (just showing the above in a more abstract view):
headphone connector (CTIA standard) |_____| | | mic+ --1K---------+-------+-------------+ |-| 1K | | | | GND -------------+ NTC 2K | |-| | 1K | | audioR ---------------------+ | |-| | |_| audioL -----------------------------------+
- Plug the sensor into your Android device.
- Download the ‘SmartThermo‘ app onto your phone and start it.
- Verify that your sensor is working correctly and that the measurement is linear. Under menu ‘Sensor details’, the plot should look like this one:
If the curves are not linear (straight lines) like in this plot, adjust ‘device volume‘ under menu ‘sensor details’ so that they are linear (straight lines) as in above plot.
IMPORTANT: For accurate measurements, close all other apps on your Android device thay may use audio or microphone.
- You can calibrate the temperatur sensor by adjusting ‘Rref‘ under menu ‘sensor details’. Adjust it so that the displayed temperature is correct (or that measured Rntc in Ohm is correct). Default is 1095.
Finally, the main menu should plot the temperature:
NOTE: You can adjust the temperature average filtering under menu ‘Sensor details’. Choose:
Smooth weight: 0 (no averaging at all)
Smooth weight: 0.5 (moderate averaging)
Smooth weight: 0.9 (maximum averaging)
- To setup a temperature trigger, choose ‘Trigger alarm…’ under menu ‘General’. You can choose different triggers:
- Trigger below a certain degree (degree Celsius/Fahrenheit)
- Trigger above a certain degree (degree Celsius/Fahrenheit)
- Trigger if device charger disconnected (device power-loss)
- Trigger on test day (for test message)
- To setup SMS alarms, choose this under SMS:
Phone number: +49123456789 (adjust this to your phone number you want to send the SMS alarm)
- To setup email alarms (e.g. via your Google email account), choose this under menu ‘Email’:
Port/SSL Port: 465
User: email@example.com (adjust this to your Google account name)
Password: yourpassword (use your Google account password)
From: <name> firstname.lastname@example.org (adjust this to your Google sender email)
To: <name> email@example.com (adjust this to your Email receiver)
NOTE: Due to Google Mail security policy, you have to allow SMTP in your Google account settings for this (Google calls this ‘allow login using unsecure devices’).
- To setup power loss alarms, adjust ‘triggerIfChargerDisconnected’ time under menu ‘General’.
- To enable temperature logging to a file, activate ‘Log to file’ under menu ‘General’. The temperature log file can be found on your device at ‘/storage device/thermoApp/…’ and will look like this:
10:23:51, true, 20.3
10:24:51, true, 20.5
10:25:51, true, 20.4
10:26:51, true, 20.5
Appendix: sensor characteristics (NTC_2K_MS)
degree C Ohm -50 77969 -40 43035 -30 24650 -20 14614.9 -10 8946.9 0 5642 10 3656.9 20 2431.1 25 2000 30 1654.5 40 1150.7 50 816.4 60 590.1 70 433.9 80 324.2 90 245.8 100 189 110 147.1