Skip to content

This is a demo using the ESP32 and W5500 ethernet module, using NTP, setting timezone, serial 2 network session bridge, and deep sleep

Notifications You must be signed in to change notification settings

iafilius/ESP32_W5500_Ethernet_NTP_deepsleep_demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

ESP32_W5500_Ethernet_NTP_deepsleep_demo

This is a demo using the hardware ESP32 and W5500 ethernet modules using NTP over ethernet, setting timezone, serial 2 network session bridge, keep time and variabele over deep sleep

Hardware

  • ESP32 (Doitdev devkit v1)
  • W5500 based 10/100Mbps Wired/UTP Ethernet (not Wifi/LWIP) (Ethernet(2) Libary) (Not needed when using WiFI)

No hardware modifictions where needed, just wire up, and start using it.

Concepts demo'd:

  • (S)NTP (Time over tcp/ip) (UTP/ethernet) (Custom build packets) (Note: standard/building libary can be used when using WiFi instead Ethernet)
  • setting/getting systemtime (standard/buildin C libary call's)
  • timezone using exact timezone specification string (standard/buildin C libary)
  • timezone using using filespec (:CET) (standard/buildin C libary) (FAILED)
  • daylightsavings (standard/buildin C libary)
  • using RTC time, actual time surviving deep sleep (standard/buildin C libary)
  • Deep sleep (esp32/buildin libary)
  • Using RTC memory to store deep sleep persistent variabele (esp32/buildin libary)
  • Creating a low priority for NTP updates in the background

Costs

The ESP32 dev bord can be optained for about $4 and the W5500 module for about $2.50 (incl postage) A more compact version of the W5500 module costs $1 more at this time. (11/2018)

remarks

lwIP

The Ethernet module/libary is NOT integrated into the LWIP stack on the ESP32 currently, so you need to use the Ethernet libary functions. ESP32 native sntp is not usable for example, and the list is likely much longer.

For LWIP support you may have a close look at:

ESP8266 W5500lwIP and ESP32 W5500lwIP

At the time of writing it seemed not ready for use yet, but progres is made.

NTP Update strategy

As in the demo the deep sleep interval is set to 60 seconds, the NTP_UPDATE_INTERVAL is not triggered in this code, as the NTP is updated always at start-up or wake-up. Depending on your needs to most likely want to adjust that.

  • [Current]Always update NTP after boot/wake-up and wait for the next update interval (if that happens before another deep sleep)
  • Update at fixed times, and you mey even want to get awake for that.

About

This is a demo using the ESP32 and W5500 ethernet module, using NTP, setting timezone, serial 2 network session bridge, and deep sleep

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages