Arduboy GT - Arduboy with a RTC clock

A while back I made a DIY Arduboy with an RTC (Real Time Clock) as an entry for the DIY Arduboy Hardware contest.

The idea behind it was to have an Arduboy that you not only can play games with but also can use to check the time! :smiley: All it needed more was a custom bootloader that reads out and displays the RTC. Well now I finally made one!

This new bootloader reads the time from the DS3231 RTC and displays it at the loader screen using sprites stored in the external flash chip. It support both 24 and 12 hour mode. To keep the bootloader in 3K some I removed some hidden features like LED and button control and display streaming.

The current version supports the DS3231 RTC but the next version I’m working on will support Micro Crystal’s RV3028 RTC. That’s a tiny all in one RTC chip that could easily be added to Arduboy and Arduboy FX using a small flex PCB like the mod chip. With a RV3028 installed Ardboy is equiped with a swiss watch! :smiley:

  • Left: My Arduboy Devkit with Mod chip devboard and a DS3231 RTC module hooked to it. showing time in 12-hour mode.
  • Right: My DIY Arduboy GT which also uses DS3231 module installed. showing time in 24-hour mode.

Here’s a short video where you can watch the new bootloader in action.

Micro Crystal kindly supplied me with a development board for the RV3028-C7 RTC chip. Look how tiny it is! :face_with_monocle:


For the new Arduboy Mini, a RV3028 module could be attached to the Qwiic/I²C connector.

1 Like

This is so sick!



It includes a crystal though? So I think that could maybe be ok


Needs a crystal though which is another 5 or 10 cents still a lot cheaper.

Yes, the RV3028 has a built in crystal. It’s in a ceramic package along with the chip, which is a reason it’s relatively expensive. It needs less board space and draws 1 tenth of the power compared to a HT74563A.

1 Like

Really good. and nice Well done :slight_smile:

I suggest you attach the RV3028 INT pin to an interrupt generating pin on the ATmega32U4 that can wake it from deep sleep. This would allow the RTC’s alarm and other timer functions to wake up the CPU for things such as Tamagotchi type games.

Since the INT output is open drain, you could attach it in parallel with one of the buttons, so you wouldn’t need to use a dedicated pin for it. (A high value pullup resistor may be required.) I’d consider using the A button, since it’s on the INT6 pin, but a different button could end up to be more suitable.

I was using the A button for interrupt also.

1 Like

Tamagotchi time, @Mr.Blinky?

1 Like

Hey, at least you don’t have software development expenses to cover :wink: But yeah I don’t have to finance a 1000pcs.

Well send me a dev board already :smile:

Yeah that’s why I started with the DS3231 as it had a interupt pin. One Idea was to hook it to the reset pin to wake it up from (bootloader) power down. If I can find the room for some beeper code in the bootloader we have an alarm clock. An Arduboy AC :slight_smile:

Hooking it to a button has it’s advantages to. wake up by button or alarm. Only works if the sketch is running and powers down ofcourse.

HaHa! Maybe :slight_smile:


If necessary, you could probably query the RTC or the button registers to determine which one actually generated the interrupt, then take an appropriate action (like just go back to sleep if the button caused the interrupt). I haven’t researched it but it might actually be necessary to clear the interrupt, regardless.

1 Like

Of course this is your own board, not trying to steal your thunder, it’s incredible! I still don’t know how it’s possible in so small space. Just trying to greatly influence your development path! :smiley:

Yessir! And a gold arduboy to sway your thinking!

Yep, in most cases you’re going to want to allow the user to wake the device anyways so it just requires you to check the alarm when you wake up to see if it’s the user or rtc pressing the button - as noted.

1 Like

Ha! You beat me to it. Was just thinking if we had an RTC we can make a tamagotchi like game.

1 Like

That would be the way when hooking the RTC interrupt to the A or B button inputs.

I mentioned Tamagotchi specifically because @Mr.Blinky happens to be something of a Tamagotchi expert.

Though actually, I vaguely recall someone attempting a virtual pet before. If I remember rightly, it featured a dinosaur and was originally written for some other Arduino device, and they were trying to port it (and presumably just have it work without a proper RTC). Would have been a few years back. I’m leaning towards thinking it was FreezingSnail who was attempting it, but my memory’s not brilliant and I’ve seen a lot of people come and go…

At any rate, that game would probably be a good candidate for quick adaptation, assuming a decent chunk of it was already properly ported.

1 Like

Having the Arduboy sleep for an given amount of time is possible without a RTC to wake it up but it would use a little more power, so would have to be recharged more often. The timekeeping would likely not be as accurate, as well, but it is doable.

You would use the ATmega32U4 watchdog timer to wake up from a sleep state. The timeout is relatively short but you can briefly wake up just to decrement a timeout counter and only stay awake and do actual work when the counter reaches 0.

Previous conversation here:

It can’t keep time between games though.

1 Like

Yes, I vaguely remembered that possibility, but I wasn’t sure if that was what had been planned or not.

As it happens, the thread for the aforementioned project linked to that same comment you linked to, so I was able to find it in the list of ‘linked by’ topics:

Thus it was Keyboard Camper, not Freezing Snail.
(I did at least remember the dinosaur correctly.)

1 Like

IMO it’s essential for a virtual pet to wake up and call for attention. I toyed around with the watchdog timer and it helps to reduce power. But it’s not possible to track real time unless you set the time each time you run it. With an RTC you only need to set it up once.

BTW got the RV3028 chip working now too :slight_smile:

Here’s a more clearer picture then before.


I expect you would want to run a virtual pet program for quite some time, so setting a clock once at the start of a pet’s lifetime, or each time a pet who’s state has been saved to load a different game is restored, shouldn’t be too much of an inconvenience.

It’s true having a RTC is an advantage for perpetual time, time handling simplicity and power savings. On the other hand, using the watchdog would reach a far greater audience due to the number of existing Arduboys without a RTC. It sould be possible to write a game that uses the RTC if available or the watchdog if not.

1 Like

True but this the status quo and no such game has existed so maybe it’s not feature rich enough for developers get on it.

Or the thought it gets wiped out when someone else borrows your FX and switches games.

RTC on board! Let’s see it come on Arduboy creator! oh wait thats me