How to build an USB real-time clock (usb-rtc) for usage with low-cost Linux systems #piday #raspberrypi @Raspberry_Pi

USB-RTC-proj03USB-RTC-proj02

Here’s a project shared with us by Alexander Holler that he was eager to share after noticing a number of folks at the RaspberryPi.org Forums were curious how one might make an RTC over USB. Here is his project documentation based on his builds:

This page describes how you can use a small AVR device and a real-time clock (RTC) to build a hot-pluggable USB real-time clock (I’ve named it just usb-rtc), mainly for usage with ultra-low-cost hardware meant to be used with Linux.

The overall cost for one of those thingies I’m describing here is about 15€-20€, which isn’t really cheap. But I find it a valuable thingy because the result is a hot pluggable RTC, usable by almost any device which has USB. So it’s very likely you will use it for much longer than the device you currently want to build or search it for. In addition you might want to use it as a (hot pluggable) USB-I2C adapter too. The software I’m describing below already supports that.

To give you an impression about how it might look afterwards, here are some pictures of the ones I’ve build (above).

If you are a perfectionist, hardware developer or want to use such a device in some production environment, be warned: everything I’m describing here breaks several rules, so it’s very likely you don’t want it. E.g. the USB solution is bit-banged (implemented by software only) which likely breaks several requirements defined by the USB Implementers Forum. And for the I2C connection I don’t even use (external) pull-up resistors, which normally are necessary.

So everything might have a bad taste for you, but as a homebrewn solution for cheap devices without a RTC, a quick’n dirty device I didn’t want to spend much time for building it, it just works. At least for me and most of the time. 😉

Read more.


998Each Friday is PiDay here at Adafruit, be sure to check out our posts, tutorials and new Raspberry Pi related products. Have you tried the new “Adafruit Raspberry Pi Educational Linux Distro” ? It’s our tweaked distribution for teaching electronics using the Raspberry Pi. But wait, there’s more! Try our new Raspberry Pi WebIDE! The easiest way to learn programming on a Raspberry Pi.

Want a FREE RASPBERRY PI? All orders over $350 get a FREE Raspberry Pi Model B with 512MB RAM!


Have an amazing project to share? The Electronics Show and Tell is every Wednesday at 7:30pm ET! To join, head over to YouTube and check out the show’s live chat and our Discord!

Join us every Wednesday night at 8pm ET for Ask an Engineer!

Join over 38,000+ makers on Adafruit’s Discord channels and be part of the community! http://adafru.it/discord

CircuitPython – The easiest way to program microcontrollers – CircuitPython.org


New Products – Adafruit Industries – Makers, hackers, artists, designers and engineers! — New Products 11/15/2024 Featuring Adafruit bq25185 USB / DC / Solar Charger with 3.3V Buck Board! (Video)

Python for Microcontrollers – Adafruit Daily — Python on Microcontrollers Newsletter: A New Arduino MicroPython Package Manager, How-Tos and Much More! #CircuitPython #Python #micropython @ThePSF @Raspberry_Pi

EYE on NPI – Adafruit Daily — EYE on NPI Maxim’s Himalaya uSLIC Step-Down Power Module #EyeOnNPI @maximintegrated @digikey

Adafruit IoT Monthly — The 2024 Recap Issue!

Maker Business – Adafruit Daily — Apple to build another chip at TSMC Arizona

Electronics – Adafruit Daily — SMT Tip – Stop moving around!

Get the only spam-free daily newsletter about wearables, running a "maker business", electronic tips and more! Subscribe at AdafruitDaily.com !


No Comments

No comments yet.

Sorry, the comment form is closed at this time.