Skip to content
A Firebase and powered digital temperature logging system
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs/images added additional detail in the readme Jul 21, 2014
.gitignore initial commit Jul 21, 2014 minor readme changes Jul 22, 2014
app.js rm unecessary pkgs Apr 8, 2015
package.json rm fb Apr 8, 2015

Digital Temperature Logger (DTL)

DTL is a node application that collects data from up to 64 DS18b20 digital temperature sensors connected to the GPIO interface of a Raspberry Pi and pushes the data in to a firebase cloud datastore.


This is a supercharged application. Clone it, push it to your resin endpoint and you're good to go!


The recipe for this project is as follows:

  • Raspberry Pi with ethernet cable for internet connectivity and USB -> micro USB cable for power.
  • one or more DS18b20 digital temperature sensors.
  • a 4.7KΩ or 10KΩ.
  • A breadboard, for example the AD-102 from Maplin.
  • Jumper wires to connect everything. For example, these male-to-female connectors from Maplin.

Build Instructions


Warning: disconnect the raspberry pi for power before wiring up these parts

  1. Connect up the DS18b20 as shown in the diagram, with pin1 connected to ground (GND), pin2 connected to GPIO4 of the raspberry pi and pin3 connected to 3.3V.
  2. Additionally you will need to connect a resistor between pin2 (the data line) and the 3.3V supply voltage. This resistor can be any value between 4.7KΩ and 10KΩ.
  3. Connect the ethernet cable to the raspberry pi and power it up using the micro usb. Here is a diagram of the circuit: Circuit diagram Setup & Deployment

  1. If you haven't got a alpha account, visit and sign up.
  2. start a new applicaton on, name it as you want, download the .zip file and extract it to your SD card.
  3. Insert the SD card into the Rasoberry pi, connect the ethernet cable and power it up using the micro-usb cable.
  4. After about 10 minutes your new device should show up on the applications dashboard.
  5. Setup an empty firebase application.
  6. Add your application's firebase url as an environment variable in the resin application dashboard called FIREBASE_URL.
  7. Add a second environment variable called INTERVAL_TIME and set its value to the time between sensor measurement, this value is set in seconds and defaults to 600 seconds (10 minutes) if you do not set a time interval. Environment Variables
  8. you can now clone down the firebaseDTL folder:

$ git clone

then add the resin remote: (replacing and with yours from the dashboard)

$ git remote add resin<myUserName>/<myApplicationName>.git

and finally push the code to your raspberry pi:

$ git push resin master

After some time your firebase should look something like this: Data structure

Where the long alphanumeric number at the top is the unique ID for your raspberry pi and the following sublevels are year, integer day of the year and sample number. For a sample interval of 10 minutes you will get 144 samples. Each sample object consists of temp and time, the temp object contains a list of all the connected sensors. Here we can see one sensor connected, called 28-00000054b548. Note: If you don't have any DS18b20 sensors connected, the RPi will just push time stamps up to the firebase.

Extending the system

To extend the system to multiple sensors, all you need to do is connect up the additional DS18b20's in parallel to the first one, so they will all share the same 3.3V, ground and data line. Only one resistor is needed in this case.

You can’t perform that action at this time.