logo elektroda
logo elektroda
X
logo elektroda

LED weather station with NTP clock and calendar

efi222 17670 63

TL;DR

  • Built an LED weather station with seven-segment displays, NTP clock/calendar, and support for up to 9 temperature/humidity modules.
  • ESP-Now links the ESP12 sensor modules to an ESP8266 receiver, while an Atmega64 drives the LEDs, trends, alarms, and station web pages.
  • A 2000 mAh 18650 battery powers a sensor module for about 6 to 7 months when it sends measurements every minute.
  • The 27.5 x 12.5 cm front panel shows time, date, module temperatures, home temperature, humidity, pressure, trend arrows, and alarm icons.
  • RC5 and RC6 remotes are not suitable, and subzero temperatures shorten battery life.
Generated by the language model.
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
📢 Listen (AI):
  • #31 19282331
    pier
    Level 24  
    Posts: 2444
    Help: 40
    Rate: 1891
    What coverage do you get on ESP 12 with ESP NOW? Does ESP NOW have any RRSI checking function?
  • ADVERTISEMENT
  • #32 19282398
    Anonymous
    Level 1  
  • #33 19282402
    efi222
    Level 21  
    Posts: 655
    Help: 12
    Rate: 1057
    The range is similar to working via wifi. Somewhere I read that it is supposed to be bigger by ESP-Now, but somehow I didn't notice it. Instead of Rssi in the measurement module, I used the out of range signaling on the LED. There is a button which, when pressed, sends data to the receiver. If the module is within range of the station or the repeater, the diode is off. If it flashes, the module is out of range.
  • #34 19282414
    Anonymous
    Level 1  
  • #35 19282460
    efi222
    Level 21  
    Posts: 655
    Help: 12
    Rate: 1057
    I tested the idea of my colleague krzbor with connecting the Master to the wifi network for a while to save the settings. Everything works fine but after disconnecting the power, ESP does not remember the settings, or at least the channel. Maybe someone knows if there is a channel number in the ESP8266 network credentials? Because it looks like not.
  • #36 19282472
    Anonymous
    Level 1  
  • #37 19282488
    efi222
    Level 21  
    Posts: 655
    Help: 12
    Rate: 1057
    So you still have to cheat the Master with the non-existent access point to change this unfortunate channel .. :)
  • ADVERTISEMENT
  • #38 19282503
    Anonymous
    Level 1  
  • #40 19282615
    Anonymous
    Level 1  
  • #41 19282631
    krzbor
    Level 29  
    Posts: 1731
    Help: 40
    Rate: 1044
    efi222 wrote:
    I tested the idea of my colleague krzbor with connecting the Master to the wifi network for a while to save the settings. Everything works fine but after disconnecting the power, ESP does not remember the settings, or at least the channel. Maybe someone knows if there is a channel number in the ESP8266 network credentials? Because it looks like not.
    Somewhere on the electrode there was something about a quick connection to deep sleep - it was about remembering all the necessary parameters for communication over WiFi in order to maximize the length of battery life.
  • ADVERTISEMENT
  • #42 19282674
    efi222
    Level 21  
    Posts: 655
    Help: 12
    Rate: 1057
    khoam wrote:
    efi222 wrote:
    Master, i.e. transmitter and Slave, i.e. receiver, Combo - a mix of the two.

    So be it :) Although the term "peer" is used in newer documentation, and this one can transmit and receive, both are always available.


    Well, I didn't make it up :)
    esp_now_set_self_role (ESP_NOW_ROLE_CONTROLLER); // set the transmitter
    esp_now_set_self_role (ESP_NOW_ROLE_SLAVE); // set the receiver
    esp_now_set_self_role (ESP_NOW_ROLE_COMBO); // transmitter and receiver

    At least that's the case for ESP8266. And I have not met anyone else configuring. What you are writing about is probably for ESP32, and I didn't do that :)

    khoam wrote:
    If Master is a transmitter, what access point is it?


    Well, the idea was not to combine with a fictitious network to change the channel in the transmitter, but to connect to the wifi network for a while to save the network credentials. It did nothing, because the credentials do not include the wifi channel.
  • #43 19282691
    Anonymous
    Level 1  
  • #44 19282705
    krzbor
    Level 29  
    Posts: 1731
    Help: 40
    Rate: 1044
    Found this article. This was the link from the electrode: Link The author saves the data in the RTC memory. In your case it is enough to write WiFi.channel () in EEPROM (simulated in ESP);
  • #45 19283924
    pier
    Level 24  
    Posts: 2444
    Help: 40
    Rate: 1891
    krzbor wrote:
    Found this article. This was the link from the electrode: Link The author saves the data in the RTC memory. In your case it is enough to write WiFi.channel () in EEPROM (simulated in ESP);


    Thanks for this link. You can read very interesting things there.
  • #46 19284625
    efi222
    Level 21  
    Posts: 655
    Help: 12
    Rate: 1057
    krzbor wrote:
    Found this article. This was the link from the electrode: Link The author saves the data in the RTC memory. In your case it is enough to write WiFi.channel () in EEPROM (simulated in ESP);


    The article is very interesting, only that if I understand correctly the settings "disappear" after disconnecting the power supply.
    I have used the WiFi.channel () function before, but I did not go in that direction. I scanned WiFi networks. A little pointless. And as it turned out, the function without parameters returns the channel of the network to which the ESP is connected.
    It was straight ahead. Just not to enter the network credentials in the transmitter configuration, I connect to the AP running in the ESP_NOW receiver. These settings are hard in the receiver code. The condition is that the station must be connected to the WiFi network. Next, configurations of measuring modules.
    In the screenshots, the configuration of the sensor module of the earlier version and the new one.

    LED weather station with NTP clock and calendar
    LED weather station with NTP clock and calendar
    LED weather station with NTP clock and calendar


    In the new version, you do not need to know and enter the WiFi channel of the network. Just run the transmitter configuration, set the number and interval and save everything. The message on the module configuration page is just an example. You can do it any way you like. For example, display the channel number again. The new transmitter code is attached. Many thanks to my colleagues krzbor and khoam for inspiration :)
    Attachments:
    • Nadajnik_Stacja8_O_ASYNC_elektroda_Auto_channel.zip (248.11 KB) You must be logged in to download this attachment.
  • #47 19284672
    Anonymous
    Level 1  
  • ADVERTISEMENT
  • #48 19284685
    efi222
    Level 21  
    Posts: 655
    Help: 12
    Rate: 1057
    Mercy..... :D . I don't have the strength anymore ... 40 software downloads. People must have read these codes. It is strange that no one reports amendments, etc. Maybe someone is willing to do it OTA and will implement it in the code :) . On the other hand, the Atmegi has to be programmed over the cable anyway. (unless there's something I don't know ..)
  • #49 19284690
    Anonymous
    Level 1  
  • #50 19284751
    krzbor
    Level 29  
    Posts: 1731
    Help: 40
    Rate: 1044
    efi222 wrote:
    Mercy..... :D . I don't have the strength anymore ... 40 software downloads. People must have read these codes. It is strange that no one reports amendments, etc. Maybe someone is willing to do it OTA and will implement it in the code :) . On the other hand, the Atmegi has to be programmed over the cable anyway. (unless there's something I don't know ..)
    I thought so too, but all OTA support in ESP is one (really) line of code (and including the library). It is easier to make an OTA in ESP than to turn off WiFi :) Anyway, when I did it, I wondered why it was so late :) Now I am uploading the new version to the server and ESP is downloading it - no more cables!

    Added after 11 [hours] 2 [minutes]:

    pier wrote:
    krzbor wrote:
    Found this article. This was the link from the electrode: Link The author saves the data in the RTC memory. In your case it is enough to write WiFi.channel () in EEPROM (simulated in ESP);


    Thanks for this link. You can read very interesting things there.

    It is worth reading the entire cycle (3 parts). In addition to the description and code, we have interesting charts there. To make it easier, I collected these links:
    Part 1
    Part 2
    Part 3
    Supplement
  • #51 19285364
    efi222
    Level 21  
    Posts: 655
    Help: 12
    Rate: 1057
    I read this tutorial once. Very interesting. But I decided to broadcast ESP-NOW. It's just faster. And with battery power, however, it has a significant impact on the battery life. I also made an oscillogram of the transmitter's operation (current consumption). You can see that the sending itself takes about 20ms. The rest of the time is waking up, taking measurements and falling asleep. I also tested the ESP8285. With this module you can save about 50ms. The module has an integrated flash with the MCU.

    LED weather station with NTP clock and calendar

    And here is the effect of the capacitor on the ESP8266 power supply. Interestingly, I did not notice any changes in the range.

    LED weather station with NTP clock and calendar
    LED weather station with NTP clock and calendar
    LED weather station with NTP clock and calendar

    I added a package with all PCBs for the project to the first post. I make the tiles myself, so they are ready for thermal transfer.
  • #52 19300435
    Anonymous
    Level 1  
  • #53 19300452
    efi222
    Level 21  
    Posts: 655
    Help: 12
    Rate: 1057
    It's not about power consumption, but about waking up, measuring and sleeping. Integrated memory probably speeds up data exchange. I compared both modules with a similar configuration.
    There is ESP 8266 in the oscillograms.
  • #54 19300502
    Anonymous
    Level 1  
  • #55 19300513
    efi222
    Level 21  
    Posts: 655
    Help: 12
    Rate: 1057
    This is the transmitter code snippet from this project. I personally checked all the sleep options. The former works the fastest.

    ESP.deepSleepInstant (SLEEP_TIME * inter, WAKE_NO_RFCAL);
    // ESP.deepSleepInstant (SLEEP_TIME * inter, WAKE_RFCAL);
    //ESP.deepSleepInstant(SLEEP_TIME * inter, RF_NO_CAL);
    //ESP.deepSleepInstant(SLEEP_TIME * inter, WAKE_RF_DEFAULT);
    //ESP.deepSleep(SLEEP TIME * inter);

    Measurement module oscillograms. Differences in the way ESP8266 sleeps. These aren't big differences, but still.

    WAKE_NO_RFCAL - 220 ms
    LED weather station with NTP clock and calendar

    WAKE_RFCAL - 260 ms
    LED weather station with NTP clock and calendar

    RF_NO_CAL - 230 ms
    LED weather station with NTP clock and calendar

    WAKE_RF_DEFAULT - 250 ms
    LED weather station with NTP clock and calendar

    DeepSleep without options - 360 ms
    LED weather station with NTP clock and calendar

    Interestingly, manual wake-up - module reset with the button, introduces an additional boot delay for all modes, approx. 120 ms
    DeepSleep without options - manual reset - 480 ms
    LED weather station with NTP clock and calendar

    When waking ESP from the timer by GPIO16 it looks like in the waveforms above.
  • #56 19300792
    Anonymous
    Level 1  
  • #57 19300835
    efi222
    Level 21  
    Posts: 655
    Help: 12
    Rate: 1057
    khoam wrote:
    efi222 wrote:
    Interestingly, manual wake-up - module reset with the button, introduces an additional boot delay for all modes, approx. 120 ms


    Decide with a timer or external wake-up? :)


    Well, GPIO16 is physically connected to the Reset input. This is not a timer wake up?

    khoam wrote:
    Generally, these times are a bit long. What is the benchmark for recognizing that ESP has awakened?


    The point of reference is the current consumption. And the times are long, because the module has to take measurements from the sensors after waking up, send them and go back to sleep.
  • #58 19300862
    Anonymous
    Level 1  
  • #59 19300894
    efi222
    Level 21  
    Posts: 655
    Help: 12
    Rate: 1057
    khoam wrote:
    efi222 wrote:
    Well, GPIO16 is physically connected to the Reset input. This is not a timer wake up?

    Yes, this is a wake-up timer, and external wake-up in the case of ESP8266 is by pressing reset when ESP.deepSleep (0) is set ;)


    Well, I did not mention the external wake-up :)
    I think I got lost ...

    khoam wrote:

    efi222 wrote:
    The point of reference is the current consumption. And the times are long, because the module has to take measurements from the sensors after waking up, send them and go back to sleep.

    You can, of course, take such a benchmark, but the results will not be very objective.


    I'm sorry, I don't know any other way ... :)
  • #60 19331186
    yogi009
    Level 43  
    Posts: 14667
    Help: 848
    Rate: 2646
    A very nice project, a definite plus from me.
📢 Listen (AI):

Topic summary

✨ The discussion revolves around the construction and functionality of a custom LED weather station utilizing seven-segment displays instead of traditional LCDs. The device features a range of measurements including temperature, humidity, atmospheric pressure, and time, with excellent visibility in various lighting conditions. Participants discuss the materials used, such as veneered MDF for the housing, and the integration of ESP8266 modules for data transmission in both AP and station modes. Concerns about sensor placement, power consumption, and the durability of components are addressed, along with suggestions for using alternative sensors like HTU21D for improved accuracy. The conversation also touches on PCB design, software updates, and the potential for expanding the station's capabilities.
Generated by the language model.

FAQ

TL;DR: “Wake-send-sleep takes 0.3 s” and a single 2000 mAh 18650 powers each sensor for 6–7 months [Elektroda, efi222, post #19272242] Build shows 2.5 cm LED digits, NTP-synced clock and up to nine ESP-Now wireless modules.

Why it matters: You get wall-clock readability, multi-room climate data and year-long battery life without cloud lock-in.

Quick Facts

• Digit height: 25 mm / 1 inch [Elektroda, efi222, post #19272242] • Auto-dimming: 30 brightness steps via LDR [Elektroda, efi222, post #19272242] • Station load: 1–5 W at 12 V, 1.5 A [Elektroda, efi222, post #19272242] • Battery runtime: 6–7 months on 2000 mAh @ 1-min interval [Elektroda, efi222, post #19272242] • Max sensors: 9 temperature/humidity nodes + repeater option [Elektroda, efi222, post #19272520]

Why choose seven-segment LEDs over common LCD or TFT panels?

LED digits are 25 mm tall, emit their own light and stay legible several metres away at wide angles [Elektroda, efi222, post #19272242] LCD/TFT panels depend on ambient or back-lighting and suffer contrast loss when viewed off-axis.

How bright is the display at night?

An LDR drives 30 exponential brightness levels; the firmware drops to the user-set minimum whenever room light falls, preventing glare [Elektroda, efi222, post #19272242]

How long can a wireless sensor run on one 18650 cell?

With 1-minute reporting the ESP-Now node draws 30–100 µA asleep, wakes for 0.3 s and lasts 6–7 months on 2000 mAh—longer if the interval is increased [Elektroda, efi222, post #19272242]

What wireless protocol and range are used?

Nodes use ESP-Now at 2.4 GHz. Coverage equals standard Wi-Fi; a simple repeater working as AP-client plus ESP-Now combo doubles range without extra channels [Elektroda, efi222, post #19272520]

How does the ESP-Now repeater forward packets?

  1. Repeater connects to the station’s hidden AP in STA mode. 2. In ESP-Now COMBO mode it listens for sensor packets. 3. It retransmits any packet to the station; duplicates are ignored by the MCU [Elektroda, efi222, post #19272520]

Does enclosing HTU21D inside the plastic sensor box skew humidity?

No. The module housing is ventilated; tests showed no measurable drift in relative humidity or temperature [Elektroda, efi222, post #19272520]

Why does the design still include a DS18B20 when HTU21D already measures temperature?

Author preferred the well-known accuracy and waterproof options of DS18B20, while HTU21D was selected mainly for humidity precision [Elektroda, efi222, post #19489597] A fork of the code removes DS18B20 and relies solely on HTU21D, showing ≤0.2 °C deviation [Elektroda, Gienek, post #19489794]

What failure modes trigger alarms?

If RSSI drops or no packet arrives within the set timeout, the Wi-Fi icon lights and the station auto-displays that module number. Below 3.3 V the low-battery icon blinks; under 3.0 V the node enters permanent sleep to protect the cell [Elektroda, efi222, post #19272242]

How is the MDF/glass enclosure built?

Expert quote: “Once applied, the veneer cannot be torn off” [Elektroda, efi222, post #19277647] 3-step quick guide:
  1. Glue 6 mm MDF frame, sand, seal with nitro varnish.
  2. Heat-apply matte black veneer, wrap edges, trim surplus.
  3. Mask glass, spread thin black silicone, press frame, clean excess, cure face-down [Elektroda, efi222, post #19277647]

Can I update firmware without opening the case?

Yes. Add one line of Arduino OTA library; ESP8266 will fetch new binaries over Wi-Fi, eliminating cables [Elektroda, krzbor, post #19284751] A companion sketch even lets ESP program the ATmega via ESP8266AVRISP [GitHub project].

How to reduce wake-up time further?

Use ESP.deepSleepInstant with WAKE_NO_RFCAL; scope traces show total active time of ~220 ms versus 360 ms for default deep-sleep—a 39 % saving [Elektroda, efi222, post #19300513]

Where can I get the PCB layouts?

Sprint-Layout 6 files and thermal-transfer PDFs for all boards, including the single-sided 27 × 11 cm display PCB, are attached in the first post [Elektroda, efi222, post #19285364]
Generated by the language model.
ADVERTISEMENT