Introduction: ESP8266 - Thermometer

Picture of ESP8266 - Thermometer

Hello,

This is my first instructable, then sorry for the syntaxt :)

For my projet I made a thermometer by using an ESP8266 cheap WiFi module (you'll say ok an other one... yes but using AA battery for 1 year)

I'm using MQTT an Jeedom for my domotics and I would like to perfom a thermometer for heater regulation in room, my specification is :

- low cost

- simple to use and install

- 1 year autonomy with simple AA battery

To do this project I'm using :

- ESP8266 module (ESP-7)

- protyping board

- battery holder

- DS1820 temeprature sensor

- PVC tube diam 40mm

- wood for the caps and base plate

Step 1: The Hardware

Picture of The Hardware

Hardware explanation :

the sensor is powered by a GPIO of module to reduce consuption

the jumper is use to select the sensor number in my case only 7 sensors can be configured on same network

the power supply is measured by the analog input to check battery level with MQTT

remarks : some resistors are already mounted on module for for correct ESP configuration check on the net

Step 2: The Software

I'm using arduino environement for building the software

there are no difficulties but lot of optimisation for reducing power consuption

First optimisation

I remove the LED resistor on the module to remove 8mA from power LED (the red one)

I put the module in deepsleep for 5 min

see line ESP.deepSleep( DEEP_SLEEP, WAKE_RF_DEFAULT);

I start the WiFi only if temperature change +/-0.2°C

setup :

WiFi.mode(WIFI_OFF);
WiFi.forceSleepBegin();

in loop :

if( (TemperatureRAW >= (u16_oldTemperatureRAW + 4)) || (TemperatureRAW <= (u16_oldTemperatureRAW -4)))

WiFi.forceSleepWake();
WiFi.mode(WIFI_STA);

I'm using the RTC memory to store the old value for comparaison with new one.

I check the best RSSI before connect to network

With all that I have

- 40.8µA during deep sleep 90% of time

- 15mA during temperature measurement 8% of time

- 75mA during WiFi connexion 2% of time (estimation depending the temperature room variation)

Step 3: The Enclosure - Final Mounting

Picture of The Enclosure - Final Mounting

To make the enclusure I'm using a standard PVC tube used for vacuum whater in france, the diameter chooseen is 40mm. I have painted it in black color just for style other coulor should work :)

I'have turning the base and caps in wood

After you can introduce the battery holder and the circuit directly in the tube close this with the wooden caps.

That all !

note : I don't explain how to connect the thermometer with Jeedom because there are lot of sample

Comments

sweller (author)2017-12-06

Very nice and inspiring. Thank-you.

Swansong (author)2017-06-06

Thanks for sharing :)

About This Instructable

424views

18favorites

License:

More by ThierryC2:ESP8266 - Thermometer
Add instructable to: