Capture temperature data with the ESP8266 and the LM75 Sensor

Ivan Ryabokon, 123RF

Precision Gauge

We use the ESP8266 chip which gathers temperature data from a sensor and then forwards it via REST to a Raspberry Pi, where it's stored in a database.

In the first part of this series of articles, we demonstrated how to build a functioning development environment. This time we focus our attention on activating and using the Wifi interface on the ESP8266 [1]. This module reads measurement values from the LM75 temperature sensor using an I2C-Bus, and transmits the data via a web interface to a MySQL database that is running on a Raspberry Pi.

As you read through this project, remember the sensor is battery powered. While operating, the ESP8266 consumes up to 200 milliamperes. If you run the sensor continuously, you'll need a battery that can supply this. A much more elegant and economical solution is to switch on the module for 1-2 seconds at a time, during which the sensor will identify and transmit the measurement values. After completing these tasks, the module can then deactivate.

As such, try to work out how many measurements you actually need. Do you really need one measurement per second or is once an hour enough? The sensor designers have also clearly given such questions some thought and have equipped it with an energy saving function. This makes it possible to power down the ESP8266 and the LM75 to a level where only a few microamperes are consumed. If you want to avoid using a complex power supply, make sure the semi-conductor is idle when it's not needed.


Use Express-Checkout link below to read the full article (PDF).

Buy this article as PDF

Express-Checkout as PDF

Pages: 7

Price $2.95
(incl. VAT)

Buy Raspberry Pi Geek

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content