<- Back to 2XOD.com

Arduino Wifi Temp Logger With Maxim DS18B20 And Hi Flying HF-LPT100 Wifi

When I purchased my first Arduino I also grabbed a myriad of sensors. One was the Maxim / Dallas DS18B20 one-wire temperature sensor (PDF Spec). The cost was $17 for 5 sensors on 3 meter cables from amazon under the RioRand brand name. I didn't know what their intended purpose was going to do with them, but when I received my wifi module I figured I would put it all to use.

Some quick googling lead me to the Dallas Temperature Control Library. After connecting the sensors using a 10k resistor I loaded up the example sketch - success - I could see my temp probes!

The next task is to publish the data to some kind of database. In this case I elected to send the data to a PHP script which would simply write it to a CSV file.

Wiring Diagram

Code for the Arduino

https://github.com/RyAndrew/Arduino-Wifi-Temp-Logger-Client

Here we expand on the previous serial wifi code to send data via POST to a PHP script for processing.

Code for the Server (PHP)

https://github.com/RyAndrew/Arduino-Wifi-Temp-Logger-Server

This PHP script accepts POST data from the arduino and logs it to a CSV file.

Viewing The Data

I made a simple chart using Sencha ExtJs. You can see the data below. I'm limiting the output to the last 480 readings - which at once per minute gives 8 hours.

Power Consumption

Using the INA219 current sensor from adafruit, actual current consumtion measured is on average 60.4 mA. This is with absolutely no power optimizations to decrease the current consumption for the arduino or wifi module.

Total Cost

ComponentVendorCost
USR Wifi232-T w/ antennaEbay$11
5pcs DS18B20 Temp Sensor 3M CableAmazon$17
10k Resistor Digikey$0.10
Arduino Nano (Clone)Amazon$12
9v 1A Regulated Power SupplyAdafruit$7
Female 2.1mm DC Power JackAdafruit$2
Total$49.10

Page Revision History

2014-10-24 Published

2014-12-28 Github code added

2015-1-8 Added Arduino Nano Wiring Diagram