To keep costs low, the Raspberry Pi does not include a Real Time Clock module. Instead, users are expected to have it always connected to WiFi or Ethernet and keep time by checking the network. Since we want to include an external module, we'll have to wire one up.
We have three different RTC we suggest, PCF8523 is inexpensive, DS1307 is most common, and DS3231 is most precise. Any of them will do!
While the DS1307 is historically the most common, its not the best RTC chipset, we've found!
Don't forget to also install a CR1220 coin cell. In particular the DS1307 wont work at all without it and none of the RTCs will keep time when the Pi is off and no coin battery is in place.
Wiring is simple:
- Connect VCC on the breakout board to the 5.0V pin of the Pi (if using DS1307)
Connect VCC on the breakout board to the 3.3V pin of the Pi (if using PCF8523 or DS3231) - Connect GND on the breakout board to the GND pin of the Pi
- Connect SDA on the breakout board to the SDA pin of the Pi
- Connect SCL on the breakout board to the SCL pin of the Pi
For the PiRTC, just place it on the header away from the USB ports.
Text editor powered by tinymce.