Wednesday, October 26, 2011

Hacking Meggy Jr. RGB

You have a Megga Jr RGB "game console" from EMSL and you are tired of playing or writing new games for it. How about making it into a clock?
This takes a bit of hardware hacking on your side; I provide the basic-clock-functionality sketch (download here).
In the end, the "Meggy Jr Clock" will look and work as shown in this video.

Here is a list of what you need (beside an working Meggy Jr):

  • DS1307 and a 8-pin socket;
  • crystal (32768Hz);
  • coin battery (CR1220) and a holder for it;
  • a small piece of prototyping board;
  • 2 pieces of 6-pin female header;
  • 6-pin right-angle male header;
  • a few wires.
We will start with hacking the Meggy Jr board, which involves 3 steps:
  • remove the FTDI connector; you know the drill: desoldering wick, pliers etc;
  • in place of the FTDI connector solder a 6-pin female header;
  • connect, with a short piece of wire the 2 points as shown in the picture below.

The hacked Meggy Jr board will look as shown in this photo:

Next, we will build, on prototyping board, the circuit for the real-time-clock based on DS1307, as shown in the datasheet. We will use the 32768Hz crystal and the 3V coin battery (CR1220, with holder).

There are two requirements for the small RTC board we are building:

  • it will have a pair of 6-pin male headers that plug into the new headers we just installed on the Meggy Jr board;
  • it needs to fit in the small space above the processor, between the Meggy Jr edges, the buttons and the LED matrix.

So here is how we are going to do it:
- cut the piece of prototyping board to size;
- place it on the spot, above the headers;
- solder the 2 headers (which are already plugged in the female headers);
- place and wire the RTC circuitry;
- solder the new FTDI connector (6-pin right angle male header) at the top of the board, close to the edge (above the old one we removed);
- connect each of the 6 pins of the FTDI connector to the pins of the top header.

The little RTC board you built may look like in the photos below (both sides shown).

Now we put them together (plug the RTC board into the headers) and start testing.

The Meggy Jr Clock we just built will look something like this:

First, make sure the new FTDI connector works, by uploading any sketch.
Next, make sure the DS1307 works as well, by uploading this test sketch.

Once everything looks ok, upload the Meggy Jr Clock sketch

If you need more detailed instructions, please visit my step-by-step tutorial at

No comments:

Post a Comment