Coder Social home page Coder Social logo

tbrumm / esp8266-weather-station-epaper Goto Github PK

View Code? Open in Web Editor NEW

This project forked from duck531a98/esp8266-weather-station-epaper

1.0 0.0 0.0 6.25 MB

use esp8266 to show weather forecast on 2.9inch e-paper

License: MIT License

C++ 82.87% C 9.41% HTML 2.31% Shell 0.90% Hack 0.66% PHP 3.85%

esp8266-weather-station-epaper's Introduction

Esp8266-weather-station-epaper

中文版说明在这里http://mxlu.com/2017/07/06/esp8266%E7%94%B5%E7%BA%B8%E5%B1%8F%E5%A4%A9%E6%B0%94%E9%A2%84%E6%8A%A5%E7%AB%99/

Changelog

2015/5/28 1.change voltage divder resistor form 1M and 300K to 300K and 100K.(R6,R7) 2.change the equation for battery voltage caculation 3.when battery voltage is lower than 3.4V, no more updating, warning on screen.

You'd better calibrate the adc yourself. ADC on esp is not that accurate.

Summary

Esp8266 is programed to display weather forecast on 2.9inch e-paper. You can get a 2.9inch e-paper display in Waveshare's shop. Buy it on taobao.com if you are in China. https://detail.tmall.com/item.htm?id=550690109675&spm=a1z09.2.0.0.nyL5N4&_u=q2skmgl30cb

Esp8266 is in deep sleeping after update the weather forecast to save battery.

BOM

  1. 2.9inch e-paper from Waveshare
  2. Nodemcu or Wemos or integrated PCB( gerber files in /PCB folder)
  3. Li-Po battery
  4. 3d printed case(STL files in /3d folder still in revising )

Uploading code to esp8266

Add esp8266 to boards manager in arduino ide. Follow this guide https://github.com/esp8266/Arduino#installing-with-boards-manager. Don't forget to upload font files. Follow this guide to upload font files to spiff meomory. https://arduino-esp8266.readthedocs.io/en/latest/filesystem.html#uploading-files-to-file-system.

Multi language support

modify the language in lang.h There is Strings for Chinese and English already. You can add you own. Weahter data supports zh,en,de,es,fr,it,jp,kr,ru,in,th

Connect esp8266 to display module

BUSY---->gpio4 RST---->gpio2 DC---->gpio5 CS---->gpio15 CLK---->gpio14 DIN---->gpio13

Connect gpio16 to rst on esp8266 to wakeup esp8266 from deep sleeping with internal timer.

There will be two versions of my pcb. One without epaper driving components and One with driving components. I'm still testing them to make sure they are reliable. Also Mike is making that board, too.

Send message to weather station

you can set a client name for your weather station in the program and send message to it (http://duckweather.tk/client.php). Useful to please girls.

Font

I developped this tool to generate your own font (unicode ucs-2) https://github.com/duck531a98/font-generator

Since arduino ide is compiling the code to utf-8 charset. There is a internal function to convert utf-8 to unicode ucs-2. Display strings typed in to arduino ide with function DrawUTF.

Font files should be uploaded into spiff memory of esp8266.

A full unicode ucs-s font with 16x16 size will be 2MB. So if you don't need to display multi language, just convert ascii characters.

Low power issues

Since regulator AMS1117 and CP2102 have a quiescent current about several mA, so nodemcu is not suitable for battery powered.

A low quiescent current LDO is needed. I'm testing HT7333 now, see how long could my board works with a 400mAh battery. Esp8266 consumes about 20-25uA in deep sleeping mode.

Weather Forecast Data

I'm using api from heweather.com. Because Esp8266 don't have enough RAM to handle HTTPS connection, so I build a website on 000webhost.com to transmit the data via HTTP. To reduce the consumption of the 3000 free requests per day, I build a cache, you will get the same returns in 20 mins.

Highly recommend you to build your own website. I can't guarantee mine will works forever.

You can find php files in /php folder.

Thanks

Thanks to Mike Daniel Fred. They led me into the world of esp8266. Thanks to their work on esp8266 weahter stations, wifi manager, json parser and so on. Thanks to Mike, for now he's the only one which I could share and ask for help about electronic stuffs.

esp8266-weather-station-epaper's People

Contributors

duck531a98 avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.