ESP-01 - Ds18b20 - Cellphone Li-ion Battery

An easy way to measure Temperature mobile in your Home or Garden.
If Wifi connect or Wifi-power is enough at your Home.
I soldered a wire like on the Picture on the ESP to get them in Deepsleep.
So the ESP send´s every 60 sec. the temperature

Thats Connect on my Device.

1 ESP-01

1 Ds18b20 Dallas-Temperatur

1 4,7 kOhm Resistor

1 Lipo Battery charging board

1 self soldered board for the ESP and the Gpis 0 and 2

1 Li-ion Battery 3,7 V, 1700 mAh Old Cellphone Battery

You have solder the Resistor to VDD and DQ of the Ds18b20, its easier to connect on the Board.

10

To Programm the Arduino Sketch use a ESP-Programmer and switch a resistor like the Picture.
So is Gpio 0 Grounded !! thats very important and an easy way to get firmware on the ESP-01!

This is the easy Arduino Sketch.

#define CAYENNE_PRINT Serial // Comment this out to disable prints and save space
#include <OneWire.h>
#include <DallasTemperature.h>
#include <CayenneMQTTESP8266.h>

// Virtual Pin of the DS18B20 widget.

char ssid = “*************i”;
char wifiPassword = “**************”;

// Cayenne authentication info. This should be obtained from the Cayenne Dashboard.
char username = “";
char password[] = "
";
char clientID[] = "
*****************”;

const int tmpPin = 0;

OneWire oneWire(tmpPin);
DallasTemperature sensors(&oneWire);

void setup()
{
Serial.begin(9600);
Cayenne.begin(username, password, clientID, ssid, wifiPassword);
sensors.begin();
}

void loop()
{
Cayenne.loop();

sensors.requestTemperatures();

Cayenne.virtualWrite(1, sensors.getTempCByIndex(0));

delay(1000);
ESP.deepSleep(60000000);
}

5 Likes

Nice hack with the deep sleep. Do you ever run into issues with the ESP going into boot mode when its power cycled?

No, only problems with the connection to Cayenne.
I think that’s up to the Dashboard update. It was just an idea to build some with the cellphone batteries. 3.7V and 1700mAh is enough power for the ESP for about 20h by transmitt every 60 sec.

Hi @Sven,

Awesome project! Thanks for sharing!

-Jesse