Smart Thermometer Using Esp-01F and Web Socket [Arduino IDE]
Introduction: Smart Thermometer Using Esp-01F and Web Socket [Arduino IDE]
In one of the previous instructable, we saw how to make a simple thermometer with ATTINY 85 which can last for 140days with a single battery and it still works great after 40+ days with the same battery I showed in the video.
But it was a tiny bit clumsy when it came to the electronics and the programming. So, in this instructable, let me show you how to make a thermometer on steroids with features nobody asked for, but by doing so I hope you will definitely learn plenty of electronics along the way.
The device will have the following features:
* Realtime reading using WebSockets
* Auto sleep on when not in use
* Control the thermometer from a webpage
* Sleek PCB design
* Integrated esp-01F programmer
* Integrated lipo charging circuit
* 3d printed case
Supplies
These are the list of products that can help you do this project with ease
(Affiliate Link)
* ESP-01F : https://amzn.to/3imkkd5
* SMD Resistor : https://amzn.to/3Bhy0yQ
* SMD Capacitor : https://amzn.to/3Betykm
* BC817 transistor : https://amzn.to/3kuOcGN
* CP2102 IC : https://amzn.to/3z8GW7F
* TP4056 IC : https://amzn.to/3il5lQz
* SMD LED : https://amzn.to/3kuC0pz
* Voltage regulator : https://amzn.to/3ifM1Es
* Micro USB : https://amzn.to/3kumREM
* White PLA : https://amzn.to/3Betj8W
* PETG filament : https://amzn.to/3w6bB46
* DS18B20 : https://amzn.to/3ylGRy0
* OLED display : https://amzn.to/2VcEATc
* Resistor Kit : https://amzn.to/3frj4nx
* 3d Printer : https://amzn.to/3trVWKw
* Printer Upgrades : https://amzn.to/3hbK3Ga
Step 1: Why ESP-01F?
In version 1 the flash storage was very limited, hardly 8kb, I had struggled a bit for running different libraries. So, this time I chose the esp-01f, which comes with a 1MB of flash memory, which is 128times greater than the ATTINY 85. Along with this it also has features like WiFi, UART, higher clock speed up to 160MHz. Even though it won’t matter for this particular project we can flex the specs to make the thermometer look more muscular.
But it does come with a cost, the esp-01f is a very power-hungry module because of the onboard wifi connectivity, but this power consumption can be reduced greatly by putting the module to deep-sleep where it should consume just 20uA according to the datasheet.
Step 2: Other Components
The other components are similar to the thermometer version 1. 382
For the display, I’m going to use the same 0.91inch 128X32 OLED display, for the temperature sensor DS18B20 probe, and finally for the battery a small 150MAh lipo battery.
Everything looks easy to put together but with great power comes great responsibilities. There are so many smaller details that we are missing to complete this project at least to a bare minimum.
Step 3: Smaller Details
To begin with, the size of the esp-01f is so compact that there is no antenna built-in. So either we have to build one on the PCB or add an external one, if not there will be stability issues and a shorter range for wifi connectivity.
But I’m going to do neither of those because I haven’t found myself any true purpose of having wifi integrated with the thermometer yet maybe someday I will but until then I can manage without the antenna.
Anyway, apart from this programming this module is clumsy and super hard because of the tiny footprint and not being able to solder this on any perf board. So many of my previous methods and technique for programming would not work quite well with this.
Step 4: USB to Serial Convertor
That’s the reason I plan to integrate a USB to serial converter to program the esp-01f. Just like the ones on the development boards like Arduino, Nodemcu, etc. 382