Comparison of four real-time clocks

Suggestions for Further Work

A very interesting test would be to change the temperature dramatically during the test (by putting it in the freezer or running a hairdryer over the board) and see how temperature affects the accuracy. Because the DS3231 is temperature compensated, the results would be very insightful.

Next Time

In the next column, I will implement a circuit and PCB board for a watchdog timer, which is used to reboot a computer (e.g., an Arduino or Raspberry Pi) if the computer stops functioning because of a software problem or a power glitch. It makes your system much more reliable and resistant to coding errors (yes, I build software with bugs – sometimes fatal) and problems with the power supply. This board is going on Project Curacao [10] in October 2014 to improve its reliability.


Question: In your last column, you talked about how 5V outputs can damage Raspberry Pi GPIO inputs. Why is this?

Answer: The Raspberry PI has protection diodes between the pin and 3.3V and ground. Positive voltages greater than 3V3+one "diode drop" (normally 0.5V) will be shorted to 5V; this means that if you put a 5V power supply on the GPIO pin, you will "feed" the 3V3 supply with 4.5V (= 5V – [the diode drop of 0.5V]), and that may damage 3V3 logic.

I have blown out pins on my Raspberry Pi doing just this. Other people have turned the Pi into a brick. Only use 3.3V outputs connected to your Raspberry Pi GPIO pins without putting a voltage level converter between the devices. Note that you can drive most 5V device inputs with the Raspberry Pi 3.3V GPIO outputs. Most devices will read 3.3V inputs as a logic 1.

If you have a suggestion for a column, please send email to If you have specific questions, please post on the SwitchDoc blog [11], so everybody can learn from your question. I'll be picking the best question and answering it in the next SwitchDoc Labs column.

Buy this article as PDF

Express-Checkout as PDF

Pages: 6

Price $2.95
(incl. VAT)

Buy Raspberry Pi Geek

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content