DIY SMS/E-Mail temperature alarm for your Android phone/tablet (SmartThermo )

smartthermoapp
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)

Features:

  • 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

Demo Video
In this demonstration video, a temperature SMS alarm was set for 28 degree Celsius:

Let’s start building the thermal sensor:

  1. Get your own SmartThermo DIY sensor kit in the shop here.
  2. Connect the three resistors (1K, 1%) as shown below.
    Connect
    the thermal sensor  (NTC 2K, 1%) as shown below.

    smartthermo_wiring
    Schematics (just showing the above in a more abstract view):

      headphone connector (CTIA standard)
         |_____|
           | |     mic+   --1K---------+-------+-------------+         
           |-|                         1K      |             |       
           | |     GND    -------------+    NTC 2K           |         
           |-|                                 |            1K
           | |     audioR ---------------------+             |
           |-|                                               |
           |_|     audioL -----------------------------------+
  3. Plug the sensor into your Android device.
  4. Download the ‘SmartThermo‘ app onto your phone and start it.
  5. Verify that your sensor is working correctly and that the measurement is linear. Under menu ‘Sensor details’, the plot should look like this one:
    smartthermo_sensor_details
    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.
  6. 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:
    smartthermo_android_thermometer_app
    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)
  7. 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)
  8. To setup SMS alarms, choose this under SMS:
    Activate: YES
    Phone number: +49123456789  (adjust this to your phone number you want to send the SMS alarm)
  9. To setup email alarms (e.g. via your Google email account), choose this under menu ‘Email’:
    Activate: YES
    Host: smtp.gmail.com
    Port/SSL Port: 465
    User: user@gmail.com  (adjust this to your Google account name)
    Password: yourpassword   (use your Google account password)
    From: <name> email@gmail.com  (adjust this to your Google sender email)
    To: <name> email@gmail.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’).
  10. To setup power loss alarms, adjust ‘triggerIfChargerDisconnected’ time under menu ‘General’.
  11. 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
    etc.

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

Leave a Reply

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

IMPORTANT! To be able to proceed, please enter the magic word 'agdean' so we know hat you are a human)

Enter the magic word:
Please leave these two fields as-is:

A blog on projects with robotics, computer vision, 3D printing, microcontrollers, car diagnostics, localization & mapping, digital filters, LiDAR and more