Offline Weather Station Arduino
by paclevkov in Circuits > Arduino
4488 Views, 36 Favorites, 0 Comments
Offline Weather Station Arduino
![IMG_20181225_172822.jpg](/proxy/?url=https://content.instructables.com/FQX/W7OS/JQ2O2EAI/FQXW7OSJQ2O2EAI.jpg&filename=IMG_20181225_172822.jpg)
![battery_page.jpg](/proxy/?url=https://content.instructables.com/FZT/NDGC/JQ2O2EDW/FZTNDGCJQ2O2EDW.jpg&filename=battery_page.jpg)
![IMG_20181225_150657.jpg](/proxy/?url=https://content.instructables.com/F4V/D9J2/JQ2O2EDY/F4VD9J2JQ2O2EDY.jpg&filename=IMG_20181225_150657.jpg)
![temp_page.jpg](/proxy/?url=https://content.instructables.com/FK9/OZHO/JQ2O2EE0/FK9OZHOJQ2O2EE0.jpg&filename=temp_page.jpg)
Summary
Last several times when i buy thermometer, i saw that there is almost always difference in the values. My task was to follow the temperature and the humidity inside my baby's room. Also there was issue reading the values from 2-3 meters range on the most thermometers and i needed to stand up to see the temp value, problem that i have with the most thermometers was the light. Other problem was I cannot see the temperature value because it is without backlight in order to save energy. I don't want to save energy i just need a couple of hours energy storage in order this device to work if the main energy line shuts down.
So i came with an idea:
- To create thermometer with allowance to change the temperature value.
- Which can be with backlight and Colors.
- To combine all the stuffs that regular thermometers have: (RTC, Battery, Min Max t, etc)
- And to have additional features like Seasons and Holidays
So i started the project before 1 year. The software part took me several months to complete. I have created several versions of the software, and the past 2 weeks i complete the project.
Device software information
Arduino code, and libraries:
Code is also uploaded on Code step.
https://github.com/stlevkov/KT2_144
https://github.com/stlevkov/Arduino-Libraries
Device Features
- Boot Page - showing the Date and Time of the last firmware upload.
- Home Page - showing Time, Date, Battery Icon, Temperature Icon, Temperature Value, Humidity Value, Tmax, Tmin, Seasons, Holidays, USB Indicator when plugged in.
- Menu Page - with Temp, Clock, Battery, About, Back menus
- Temp Page - allows to calibrate the DHT Sensor
- Clock Page - allows to edit the Time and Date
- Battery Page - showing Battery info, % percentage, mV voltage, Charging status
- About Page - showing info for the author
- Back function for exiting the menu
- Transparent panels
- RTC long life
- Lithium battery - up to ~9 hours (450mAh)
- Low Battery indicator - showing the icon in red ~ remaining 5 min.
- Different colors for the - Low, Medium, High temperature
- Holidays and Seasons messages
- Programmable socket - at the back side
- User Interface - using Rotary Encoder
The back side with the board will not be covered, because i want by baby to see and touch the board, while the device is not powered on. You can create some kind of cover for the back side of the board.
Sketch the Device, Draw the Init Idea
![IMG_20181225_145812.jpg](/proxy/?url=https://content.instructables.com/F03/BBQN/JQ2O28NU/F03BBQNJQ2O28NU.jpg&filename=IMG_20181225_145812.jpg)
![IMG_20181225_145803.jpg](/proxy/?url=https://content.instructables.com/FS2/FM5A/JQ2O28NO/FS2FM5AJQ2O28NO.jpg&filename=IMG_20181225_145803.jpg)
![IMG_20181225_145715.jpg](/proxy/?url=https://content.instructables.com/FLQ/SFA0/JQ2O28NA/FLQSFA0JQ2O28NA.jpg&filename=IMG_20181225_145715.jpg)
![IMG_20181225_145723.jpg](/proxy/?url=https://content.instructables.com/FL0/5JCX/JQ2O28NB/FL05JCXJQ2O28NB.jpg&filename=IMG_20181225_145723.jpg)
![IMG_20181225_145742.jpg](/proxy/?url=https://content.instructables.com/FWI/XD0N/JQ2O28NF/FWIXD0NJQ2O28NF.jpg&filename=IMG_20181225_145742.jpg)
![IMG_20181225_145754.jpg](/proxy/?url=https://content.instructables.com/FQ0/EPME/JQ2O28NN/FQ0EPMEJQ2O28NN.jpg&filename=IMG_20181225_145754.jpg)
Decide what to have - how many pages, menus, how to change the menus and the pages.
If you have another ideas, you can change it with the arduino code.
Decide what form you want and what can be done easy. I first choose 3D printing, but after that decide to use simple material.
The idea is to have transparent walls on the top and on the bottom, also you can create more fine box.
So the main parts of the box are:
- Front - with the Display and Rotary Encoder
- Right - with the RTC module
- Left - with the DHT Module
- Back - with the oposite side of the board
- Top - Transparent with the 3.7V Battery and the ON/OFF Slide switch
- Bottom - Transparent
Choose the Right Components
- TP4056 Micro USB Charger 5V 1A 18650 Lithium Battery Charging Board - Ebay
-
1.44" 128x128 SPI Full Color 65K TFT LCD Display Module ST7735 - Ebay
-
KY-040 Rotary Encoder Module for Arduino - Ebay
-
DHT22 AM2302 Digital Temperature And Humidity Sensor - Ebay
-
Tiny RTC I2C Modules 24C32 Memory DS1307 Real Time Clock RTC Module Board - Ebay
-
Pro Micro Controller Board ATmega328P 16MHz Arduino Pro Mini Module - Ebay
-
3.7V 450mAh Lipo Rechargeable Battery - Ebay
-
6 Pins 2 Positions DPDT On/On Mini Slide Switch - Ebay
-
CR2032 CR 2032 3V Button Cell Coin Battery - Ebay
-
10x22cm Soldering Prototype Copper PCB Board Single Side Universal - Ebay
-
Male&Female 40pin 2.54mm Header Socket Single Row Strip - Ebay
Prepare Wiring Diagram
![fritzing_katrin_therm_2_bb.png](/proxy/?url=https://content.instructables.com/FVK/X6TW/JQ2O2A5K/FVKX6TWJQ2O2A5K.png&filename=fritzing_katrin_therm_2_bb.png)
The diagram shows connectivity of the similar sensors, while the Display is almost the same.
For proper pin usage, see the Arduino code in the Code step.
Download the fritzing file for more detail about the pinout. Hover the points from the diagram to see the exact pins of the modules.
Downloads
Additional Info Before Start - Power Consumption
![power_usage.png](/proxy/?url=https://content.instructables.com/FA7/613U/JQ2O2AIX/FA7613UJQ2O2AIX.png&filename=power_usage.png)
The project use 450mAh battery, but you can use greater. Just have a look at the power consumption in order to choose and calculate the right battery for specific hours usage. When using 450mAh, the device can run approx. 9 hours.
In idle the device is running with around 0.102A - No energy saving optimization are done here
When the button is pressed, the high current is applied and it is around 0.177A.
Connect the Display
![IMG_20180210_170557.jpg](/proxy/?url=https://content.instructables.com/FUJ/MM39/JQ2O2B1C/FUJMM39JQ2O2B1C.jpg&filename=IMG_20180210_170557.jpg)
![IMG_20180210_170622.jpg](/proxy/?url=https://content.instructables.com/F8R/1NPH/JQ2O2BAC/F8R1NPHJQ2O2BAC.jpg&filename=IMG_20180210_170622.jpg)
The display is using SPI for connection.
There is adafruit library for this driver ST7735.
Downloads
Connect RTC Module
![IMG_20180304_133849.jpg](/proxy/?url=https://content.instructables.com/FTF/3MDT/JQ2O2C49/FTF3MDTJQ2O2C49.jpg&filename=IMG_20180304_133849.jpg)
Create PCB Modification In order to use CR2032 Battery.
- Remove D1
- Remove R4
- Remove R5
- Remove R6
- Short R6
More information about this modification is found here.
Attach Front Wall With the Display, RTC, Battery, Rotary Encoder
![IMG_20180225_110845.jpg](/proxy/?url=https://content.instructables.com/F1L/XS3H/JQ2O2COI/F1LXS3HJQ2O2COI.jpg&filename=IMG_20180225_110845.jpg)
![IMG_20180225_131916.jpg](/proxy/?url=https://content.instructables.com/FLI/BNUI/JQ2O2CSX/FLIBNUIJQ2O2CSX.jpg&filename=IMG_20180225_131916.jpg)
![IMG_20180225_160350.jpg](/proxy/?url=https://content.instructables.com/FOA/ZD9I/JQ2O2CTB/FOAZD9IJQ2O2CTB.jpg&filename=IMG_20180225_160350.jpg)
If you want to boot up the device, just upload the code from the Code step and follow the other steps while changing and attaching the new parts.
Prepare Transparent Walls
![IMG_20180421_163041.jpg](/proxy/?url=https://content.instructables.com/FTG/K56I/JQ2O2D0R/FTGK56IJQ2O2D0R.jpg&filename=IMG_20180421_163041.jpg)
I use 3mm plexi. You can use similar transparent material. I use only one for the bottom side.
Create Right Wall
![IMG_20180421_174425.jpg](/proxy/?url=https://content.instructables.com/FEM/3UIZ/JQ2O2DI1/FEM3UIZJQ2O2DI1.jpg&filename=IMG_20180421_174425.jpg)
![IMG_20180421_174432.jpg](/proxy/?url=https://content.instructables.com/FV4/HE5G/JQ2O2DI4/FV4HE5GJQ2O2DI4.jpg&filename=IMG_20180421_174432.jpg)
Create the Right side wall. Use the CR2032 size for the hole.
Create Left Side Wall
![IMG_20180603_130806.jpg](/proxy/?url=https://content.instructables.com/FBW/EYKK/JQ2O2EWF/FBWEYKKJQ2O2EWF.jpg&filename=IMG_20180603_130806.jpg)
![IMG_20180603_132117.jpg](/proxy/?url=https://content.instructables.com/FPL/VB7I/JQ2O2EWG/FPLVB7IJQ2O2EWG.jpg&filename=IMG_20180603_132117.jpg)
![IMG_20180603_132222.jpg](/proxy/?url=https://content.instructables.com/FZ1/YCX1/JQ2O2EXC/FZ1YCX1JQ2O2EXC.jpg&filename=IMG_20180603_132222.jpg)
![IMG_20180603_132216.jpg](/proxy/?url=https://content.instructables.com/FOR/B20X/JQ2O2EX9/FORB20XJQ2O2EX9.jpg&filename=IMG_20180603_132216.jpg)
![IMG_20180603_142332.jpg](/proxy/?url=https://content.instructables.com/F3J/0MOR/JQ2O2EW8/F3J0MORJQ2O2EW8.jpg&filename=IMG_20180603_142332.jpg)
Create the left side wall. Use the size of the DHT Module for the hole.
Create the Socket With the Universal Board and the Rails, Connect RTC, Encoder, Display and Display
![IMG_20180606_000251.jpg](/proxy/?url=https://content.instructables.com/FC0/9S9X/JQ2O2F76/FC09S9XJQ2O2F76.jpg&filename=IMG_20180606_000251.jpg)
![IMG_20180621_182638.jpg](/proxy/?url=https://content.instructables.com/F87/V6IO/JQ2O2F77/F87V6IOJQ2O2F77.jpg&filename=IMG_20180621_182638.jpg)
![IMG_20180621_183905.jpg](/proxy/?url=https://content.instructables.com/FTV/8ARU/JQ2O2F79/FTV8ARUJQ2O2F79.jpg&filename=IMG_20180621_183905.jpg)
![IMG_20180621_183915.jpg](/proxy/?url=https://content.instructables.com/F3T/JIPI/JQ2O2F7E/F3TJIPIJQ2O2F7E.jpg&filename=IMG_20180621_183915.jpg)
![IMG_20180627_204145.jpg](/proxy/?url=https://content.instructables.com/F65/2LHP/JQ2O2F99/F652LHPJQ2O2F99.jpg&filename=IMG_20180627_204145.jpg)
![IMG_20180627_203610.jpg](/proxy/?url=https://content.instructables.com/FDM/X121/JQ2O2F8Y/FDMX121JQ2O2F8Y.jpg&filename=IMG_20180627_203610.jpg)
![IMG_20180813_195552.jpg](/proxy/?url=https://content.instructables.com/FTR/FX4G/JQ2O2FC0/FTRFX4GJQ2O2FC0.jpg&filename=IMG_20180813_195552.jpg)
![IMG_20180707_182656.jpg](/proxy/?url=https://content.instructables.com/FXF/JCMG/JQ2O2FB1/FXFJCMGJQ2O2FB1.jpg&filename=IMG_20180707_182656.jpg)
![IMG_20180707_192055.jpg](/proxy/?url=https://content.instructables.com/FKT/UNYW/JQ2O2FB3/FKTUNYWJQ2O2FB3.jpg&filename=IMG_20180707_192055.jpg)
![IMG_20180627_203642.jpg](/proxy/?url=https://content.instructables.com/FZ4/07ES/JQ2O2F96/FZ407ESJQ2O2F96.jpg&filename=IMG_20180627_203642.jpg)
![IMG_20180708_115141.jpg](/proxy/?url=https://content.instructables.com/F0G/MGM2/JQ2O2FBM/F0GMGM2JQ2O2FBM.jpg&filename=IMG_20180708_115141.jpg)
![IMG_20180627_203806.jpg](/proxy/?url=https://content.instructables.com/F07/SX1U/JQ2O2F97/F07SX1UJQ2O2F97.jpg&filename=IMG_20180627_203806.jpg)
![IMG_20180627_205344.jpg](/proxy/?url=https://content.instructables.com/F3E/BE37/JQ2O2FB0/F3EBE37JQ2O2FB0.jpg&filename=IMG_20180627_205344.jpg)
![IMG_20180709_150845.jpg](/proxy/?url=https://content.instructables.com/F42/QY5R/JQ2O2FBZ/F42QY5RJQ2O2FBZ.jpg&filename=IMG_20180709_150845.jpg)
Connect and solder all the pins following the wire diagram. You can use Arduino UNO with empty sketch installed in order to program the Arduino Mini.
Needed pins:
- VCC 5V
- GND
- RX
- TX
- RESET
Dont forget to unplug the battery 3.7V at this steps if you upload the sketch before finish with the parts.
Power It on Before Continue
![Arduino 1.44" color display - Idea for interface. DHT, RTC, Rotary encoder](/proxy/?url=https://content.instructables.com/F0S/884O/JQ2O2FGM/F0S884OJQ2O2FGM.jpg&filename=Arduino 1.44" color display - Idea for interface. DHT, RTC, Rotary encoder)
At this point, you will be able to power on the device and use the all functions.
Use the Video preview to see what was the software on version 1.1. Also there is github link in the summary step for see the latest update.
Power on the device before the continue with the other steps before closing the top cover, make sure it works normally.
Add TP4056 and the Battery, Solder the Slide Switch, Add Charging Wire to Pin 5, Solder the Back Programmable Socket
![IMG_20180813_193726.jpg](/proxy/?url=https://content.instructables.com/FJD/3NDN/JQ2O2GGZ/FJD3NDNJQ2O2GGZ.jpg&filename=IMG_20180813_193726.jpg)
![IMG_20180813_195128.jpg](/proxy/?url=https://content.instructables.com/FZI/PFH3/JQ2O2GH0/FZIPFH3JQ2O2GH0.jpg&filename=IMG_20180813_195128.jpg)
![IMG_20180813_223200.jpg](/proxy/?url=https://content.instructables.com/FPB/7PJL/JQ2O2GF5/FPB7PJLJQ2O2GF5.jpg&filename=IMG_20180813_223200.jpg)
![IMG_20181116_164927.jpg](/proxy/?url=https://content.instructables.com/FE7/AKE7/JQ2O2GIR/FE7AKE7JQ2O2GIR.jpg&filename=IMG_20181116_164927.jpg)
![IMG_20181116_170040.jpg](/proxy/?url=https://content.instructables.com/F2T/D5NF/JQ2O2GIU/F2TD5NFJQ2O2GIU.jpg&filename=IMG_20181116_170040.jpg)
![IMG_20181225_114727.jpg](/proxy/?url=https://content.instructables.com/FLR/RPL8/JQ2O2GKO/FLRRPL8JQ2O2GKO.jpg&filename=IMG_20181225_114727.jpg)
![IMG_20181118_162228.jpg](/proxy/?url=https://content.instructables.com/FP4/PXHC/JQ2O2GKV/FP4PXHCJQ2O2GKV.jpg&filename=IMG_20181118_162228.jpg)
![IMG_20180813_223300.jpg](/proxy/?url=https://content.instructables.com/FI9/51CQ/JQ2O2GF2/FI951CQJQ2O2GF2.jpg&filename=IMG_20180813_223300.jpg)
![IMG_20180813_223330.jpg](/proxy/?url=https://content.instructables.com/FNU/1K20/JQ2O2GF4/FNU1K20JQ2O2GF4.jpg&filename=IMG_20180813_223330.jpg)
![IMG_20180813_223346.jpg](/proxy/?url=https://content.instructables.com/FE2/JOY6/JQ2O2GF3/FE2JOY6JQ2O2GF3.jpg&filename=IMG_20180813_223346.jpg)
After every soldering, test the system, make sure the parts are working fine before continue.
Create the Top Cover
![IMG_20181225_125457.jpg](/proxy/?url=https://content.instructables.com/F2U/G9U3/JQ2O2GWA/F2UG9U3JQ2O2GWA.jpg&filename=IMG_20181225_125457.jpg)
![IMG_20181225_125541.jpg](/proxy/?url=https://content.instructables.com/FOG/JXOA/JQ2O2H0H/FOGJXOAJQ2O2H0H.jpg&filename=IMG_20181225_125541.jpg)
![IMG_20181225_125939.jpg](/proxy/?url=https://content.instructables.com/FHB/Z3LH/JQ2O2H33/FHBZ3LHJQ2O2H33.jpg&filename=IMG_20181225_125939.jpg)
I use 0.5mm plexi sheet from power bank box.
Code
Use the parameters in the init section to define your preferences.
For the holidays, i use Bulgarian. You can edit the array using the holidays in your country.
The device is showing 4 seasons, edit them in the code prefer for your location.
If your sensors are different, follow the pins definitions and edit them in the code. I have left almost all the lines comments for better understanding of the code.
Tested platforms:
- Arduino UNO
- Arduino Pro Mini
Take the libraries you need from the repository, use those, defined in the sketch.
Downloads
Test the Device Before Final Touches
![IMG_20181225_131321.jpg](/proxy/?url=https://content.instructables.com/FU3/71OF/JQ2O2JEC/FU371OFJQ2O2JEC.jpg&filename=IMG_20181225_131321.jpg)
![IMG_20181225_131311.jpg](/proxy/?url=https://content.instructables.com/FAP/F6PR/JQ2O2JCI/FAPF6PRJQ2O2JCI.jpg&filename=IMG_20181225_131311.jpg)
![IMG_20181225_131328.jpg](/proxy/?url=https://content.instructables.com/FN5/WQXJ/JQ2O2JG0/FN5WQXJJQ2O2JG0.jpg&filename=IMG_20181225_131328.jpg)
![IMG_20181225_131410.jpg](/proxy/?url=https://content.instructables.com/FWY/9AWG/JQ2O2JB6/FWY9AWGJQ2O2JB6.jpg&filename=IMG_20181225_131410.jpg)
![IMG_20181225_131347.jpg](/proxy/?url=https://content.instructables.com/FHC/QCIW/JQ2O2JAG/FHCQCIWJQ2O2JAG.jpg&filename=IMG_20181225_131347.jpg)
The device is perfect, mine is calibrated -4*C, i used my Toshiba air conditioner, 2 simple walled thermometers, and two digital thermometers for calibrate it. If your sensor measure different values, you can now modify it.
Interface Preview
![IMG_20181225_150919.jpg](/proxy/?url=https://content.instructables.com/FXB/28Y0/JQ2O2LVT/FXB28Y0JQ2O2LVT.jpg&filename=IMG_20181225_150919.jpg)
![IMG_20181225_150657.jpg](/proxy/?url=https://content.instructables.com/FAA/DHG0/JQ2O2LVR/FAADHG0JQ2O2LVR.jpg&filename=IMG_20181225_150657.jpg)
![IMG_20181225_150515.jpg](/proxy/?url=https://content.instructables.com/FP8/UANJ/JQ2O2LVQ/FP8UANJJQ2O2LVQ.jpg&filename=IMG_20181225_150515.jpg)
![IMG_20181224_181730.jpg](/proxy/?url=https://content.instructables.com/FQ7/BMIN/JQ2O2LVL/FQ7BMINJQ2O2LVL.jpg&filename=IMG_20181224_181730.jpg)
![home_page_warm.jpg](/proxy/?url=https://content.instructables.com/F1F/KQKG/JQ2O2LVK/F1FKQKGJQ2O2LVK.jpg&filename=home_page_warm.jpg)
![menu_page.jpg](/proxy/?url=https://content.instructables.com/FWN/9ONT/JQ2O2LVE/FWN9ONTJQ2O2LVE.jpg&filename=menu_page.jpg)
![temp_page.jpg](/proxy/?url=https://content.instructables.com/F6O/UG9U/JQ2O2LVF/F6OUG9UJQ2O2LVF.jpg&filename=temp_page.jpg)
![home_page_cold.jpg](/proxy/?url=https://content.instructables.com/F1I/01TJ/JQ2O2LVI/F1I01TJJQ2O2LVI.jpg&filename=home_page_cold.jpg)
![about_page.jpg](/proxy/?url=https://content.instructables.com/F61/7I18/JQ2O2LVG/F617I18JQ2O2LVG.jpg&filename=about_page.jpg)
![battery_page.jpg](/proxy/?url=https://content.instructables.com/F6X/FQY6/JQ2O2LVH/F6XFQY6JQ2O2LVH.jpg&filename=battery_page.jpg)
![home_page_normal.jpg](/proxy/?url=https://content.instructables.com/FHK/W8VW/JQ2O2LVJ/FHKW8VWJQ2O2LVJ.jpg&filename=home_page_normal.jpg)
![IMG_20181224_231649.jpg](/proxy/?url=https://content.instructables.com/FSM/168B/JQ2O2LVM/FSM168BJQ2O2LVM.jpg&filename=IMG_20181224_231649.jpg)
![IMG_20181225_150501.jpg](/proxy/?url=https://content.instructables.com/FSL/IO62/JQ2O2LVP/FSLIO62JQ2O2LVP.jpg&filename=IMG_20181225_150501.jpg)
![IMG_20181225_150824.jpg](/proxy/?url=https://content.instructables.com/F1I/AIQQ/JQ2O2LVS/F1IAIQQJQ2O2LVS.jpg&filename=IMG_20181225_150824.jpg)
Dont forget to edit the Firmware info in the init section of the code to show your credentials or left it as it is.
Finish Project
![Home Thermometer using Arduino Mini and TFT Display](/proxy/?url=https://content.instructables.com/FGD/LKP0/JQ2O2MLO/FGDLKP0JQ2O2MLO.jpg&filename=Home Thermometer using Arduino Mini and TFT Display)