-
Notifications
You must be signed in to change notification settings - Fork 2
Using GPS as Time Source
BresserWeatherSensorLW's README – Real-Time Clock (RTC) lists several option for setting the microcontroller's internal RTC from a time source:
- LoRaWAN Network Time
- LoRaWAN Downlink Command
- Separate RTC with backup battery
Potential reasons for using a GPS as time source:
- Time is set automatically
- Timezone is set automatically
- High accuracy (no unknown latency as in case of LoRaWAN network time)
Warning
Check the GPS module's datasheet for the correct power supply voltage and I/O voltage levels! Using the wrong voltage can damage the GPS module or the microcontroller.
The following are common GPS module configurations:
- 3.3V power supply and 3.3V I/O levels
- 5V power supply and 3.3V I/O levels (internal voltage regulator)
- 5V power supply and 5V I/O levels (LEVEL SHIFTER REQUIRED!)
A modern GPS module still has a much higher power consumption than an RTC module. For battery/solar powered applications, it makes sense to enable GPS only for synchronizing the MCU's internal RTC.
Denpending on the GPS receiver chip/module, the following options exist:
- A dedicated enable input
- A (proprietary) serial interface command for power down/ wake up
- Controlling the module's power supply with an external load switch
Ad 1. Rarely available with low budget modules Ad 2. Rarely available, often poorly documented, sometimes poorly implemented (e.g. power down works/wake up required power cycling) Ad 3. Generally usable