ESP8266 - Thermometer

Introduction: 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

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: 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

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

Be the First to Share

    Recommendations

    • Trash to Treasure Contest

      Trash to Treasure Contest
    • Raspberry Pi Contest 2020

      Raspberry Pi Contest 2020
    • Wearables Contest

      Wearables Contest

    6 Discussions

    0
    nagygp
    nagygp

    Question 2 months ago on Step 3

    Can you explain the power source part? You have one AA battery, which gives you around 1.5V.
    You have a thermometer that requires minimum 3.3V and the ESP module, which requires minimum 3.0V.
    So how did you make this work?

    Also, if all the components are inside the closed tube, will you not have false reads when the temperature inside the tube has not followed the change in the outside temperature yet?

    0
    ThierryC2
    ThierryC2

    Answer 2 months ago

    Hello, I'm using 2 AA batterie, and your are right the power is very limit, after 2 month the power was not enough for the sensor limited to 3V min, it work for a time because the AA voltage is 1.6V at begining
    The ESP work fine at 2.5V By changing the DS1820 by other one sensor this could work fine

    Thierry,

    0
    nagygp
    nagygp

    Reply 2 months ago

    Thank you for explaining.
    I think I misunderstood and thought you are powering the whole thing with only one AA battery for 1 year.
    This makes sense now.

    Cheers, Gabor

    0
    PetrS71
    PetrS71

    Question 1 year ago on Step 3

    Hi, it's perfect ! I would like to build one. But how can I transfer code to ESP. Via Arduino IDE, it's clear but cannot find some functional and simple programmer schematics.
    Thanks for reply.

    0
    sweller
    sweller

    2 years ago

    Very nice and inspiring. Thank-you.

    0
    Swansong
    Swansong

    2 years ago

    Thanks for sharing :)