pongclock.jpg
pongtime.jpg
P1020145.JPG
P1020147.JPG
bignumbers.jpg
P1020152.JPG
playpong.jpg



This clock uses the classic video game Pong to tell the time. The 2 players automatically win and lose so their scores show the hours and minutes. It's not too hard to build and should cost less than $100. All the parts are easily available on eBay and the software code is free to download!

The clock can also show the time written in words such as "Ten Past Twelve", or with large or small digits. The date pops up every now and again too, printed out with a retro flashing cursor effect. A menu screen lets you choose the display mode, or you can have the clock pick a random mode every few hours.

The project uses 2 bright LED matrix panels from Sure Electronics (you can choose between red and green). An Arduino runs the main code and a DS1307 clock chip  keeps time, even when the power is off.
 
Remove these adsRemove these ads by Signing Up

Step 1: Parts List & Cost

P1020068.JPG
arduino.jpg
ds1307.jpg
shield.jpeg
idc16way.jpeg
push to make.jpg
usb-a-b-cable.jpg
mainsusb.jpg
So here's what you need...

2 x Model 2416 Red or Green LED Matrix Displays from Sure Electronics

You can get these from Sure's eBay store for $15 each: http://www.sure-electronics.net/  Make sure you get the new version of the display which is based on the Holtek HT1632C chip. You can tell the new displays as they have the controller chip and DIP switches on the back. (See pic). My clock is made with the 3mm LED display, but they also make a larger 5mm one.

1 x Arduino Uno / Duemilanove with ATmega 328 CPU 

Th Arduino is the brains of the clock. It has a microprocessor that runs the main clock software, plus inputs and outputs we connect to the displays and other components. Ensure you get an Arduino with the ATmega 328 CPU. (Some older boards come with the ATmega 168 with doesn't  have enough RAM). You can get Arduino's for about $30. Try Sparkfun Electronics or eBay.

1 x DS1307 Real Time Clock chip (RTC) and IC socket.
1 x Crystal Oscillator for the DS1307  
1x 3.3v Coin Cell and holder - battery backup for the DS1307  

I found all these bits on eBay bundled as a kit for $10.

1x Arduino Prototyping Shield

The prototyping board or ‘shield’ plugs onto the top of  the Arduino making it easy to add components. It brings all the Arduino's input and output pins onto a circuit board that you can solder components to. Get a board which is designed for a chip to go on, i.e. one that brings each pin of the IC out to a solder pad you can connect wires to (see pic). Again places like Sparkfun or eBay are good sources for them. You should be able to pick one up for $15 - $20. If you don't like the idea of soldering, you could get a breadboard and jumper wire to build the circuit on temporarily instead.

1x 16 Pin IDC Socket 
We solder this socket to the prototype board so we can plug the display ribbon cable in. They are a couple of dollars on eBay. If you aren't planning to solder, you don't need this. 

2x ‘Push to Make’ Buttons.
These are used to set the time / change the display mode. You can get them for a few dollars.

1x USB Lead - Type "A to B" 
This is needed to to program the Arduino, and then as a power lead for the clock.

1x Mains to USB Power Adapter
This is used to power the clock and you can pick them up for less than $10. Look for one with an output of 150mA or above.



tboultwood1 says: Mar 22, 2013. 1:10 PM
I am having a little problem, uploading the sketch, I can see nothing on my board :/
sarahline says: Dec 19, 2012. 12:11 AM
If I wanted to rework the code a bit to where on the "jumble" section it changes to words instead of the time, how would I do that? I'm having a hard time seeing which code is drawing from the clock and which is creating the jumble. Thanks for your help.
mrnick1234567 (author) in reply to sarahlineDec 22, 2012. 8:26 AM
In the Jumble function, remove the code from under the bit that says

//set final characters

all they way up until the bit that says:

byte x = 0;
byte y = 0;

//until all counters are 0

Then replace it with lines that set the endchar array to the letters you wanted. E.g. if you did

endchar[1] = 'H';
endchar[2] = 'E';
endchar[3] = 'L';
endchar[4] = 'L';
endchar[5] = 'O';
endchar[6] = '!';
endchar[7] = '!';
endchar[8] = '!';

You should see the top line say "HELLO!!!" You can set the bottom line by setting endchar[9] to [15]

Hope this helps.
Nick
mrnick1234567 (author) in reply to mrnick1234567Dec 22, 2012. 8:29 AM
Sorry that should be:

endchar[0] = 'H';
endchar[1] = 'E';
endchar[2] = 'L';
endchar[3] = 'L';
endchar[4] = 'O';
endchar[5] = '!';
endchar[6] = '!';
endchar[7] = '!';
sarahline says: Dec 8, 2012. 10:16 PM
(removed by author or community request)
mrnick1234567 (author) in reply to sarahlineDec 9, 2012. 5:20 AM
Hey, so I use a 5 volt Mains to USB power supply to supply the Arduino - i.e plugged into the USB port on the Arduino. Then I use the 5v pin on the Arduino as an output of 5v, this is split to go to the RTC and the first display. (The second display gets it's power through the ribbon cable from the first so nothing else is needed there.)

I split the power using the proto shield, but you could also do the same with a breadboard for testing - this lets you plug things like the RTC chip and wires in. They are really simple to use and cost only a few pounds / dollars from eBay.

Hope this helps.
Nick
ddpdpdp says: Aug 4, 2012. 1:55 PM
Sorry again, here is the image of the chip.Please help!
mrnick1234567 (author) in reply to ddpdpdpAug 7, 2012. 11:33 AM
Hey, I Can't see an image. Is it this breakout board?

http://www.ladyada.net/learn/breakoutplus/ds1307rtc.html


Nick
ddpdpdp in reply to ddpdpdpAug 4, 2012. 2:10 PM
It's called the DS1307 RTC breakout chip.
ddpdpdp says: Aug 4, 2012. 1:52 PM
Hi, Please help! I am a total newbie. I bought most/all of the parts but am confused on how to hook them up. I bought a DS1307 clock chip kit, but this came with a small chip attached to it. in your example you used the Proto shield to attach the clock , but since mine has a small chip with it, where do i place that at? Do i even need the proto shield anymore? Please help!
Genzo says: Mar 18, 2012. 11:21 AM
Nice job.
I had few compilation fails, but Google helped me (about round which has already defined).

Thanks for your tutorial.
cyoung_mi says: Feb 25, 2012. 10:11 AM
Any suggestions on mounting the project?

I'd like something that holds all the parts together and allows it to stand alone on a desk or something.
mrnick1234567 (author) in reply to cyoung_miFeb 27, 2012. 10:57 AM
Hey,

A couple of people have used 2 bit of acrylic with holes in the corners, then long threaded screws through them and the displays.

Nick
cyoung_mi says: Feb 25, 2012. 10:04 AM
Any mounting suggestions?
I'd like to connect everything together and allow it to stand on it's own like on a desk or something.
J-Five says: Feb 25, 2012. 8:58 AM
COOL I WANT ONE!!!!!
bassplayer1015 says: Jan 28, 2012. 8:35 PM
Could you possibly upload a picture of the other side of this completed board? I am a complete beginner with circuitry/wiring and have never done anything like this before. I have an Arduino board from a project I gave up on a year ago, but would like to give this one a try. Thanks, BC
mrnick1234567 (author) in reply to bassplayer1015Jan 30, 2012. 3:06 PM
Hey, I will try when I get time. There's not much to see apart from my messy soldering!

If you're not sure I'd suggest getting a breadboard and building it on there first.

Nick
027842715 says: Jan 30, 2012. 9:31 AM
salvation
I speak french
I live in Belgium
I'm a beginner in electronics and computer
I have a clock like this
I do not know how but you can maybe help me
If you still have a list of all the components needed to do (clock) for you send it to me please! and maybe the code lists which also needs

thank you very much
mrnick1234567 (author) in reply to 027842715Jan 30, 2012. 3:03 PM
hi, the list of components and the code are all in the instructable... I'm not sure what else I can give you!
027842715 says: Jan 30, 2012. 9:30 AM
salvation
I speak french
I live in Belgium
I'm a beginner in electronics and computer
I have a clock like this
I do not know how but you can maybe help me
If you still have a list of all the components needed to do (clock) for you send it to me please! and maybe the code lists which also needs

thank you very much
Djandco says: Dec 25, 2011. 4:37 AM
Hi,

First off thanks for the idea and the ible ;-)

I built one and I have a little question if you don't mind;
The clock works perfectly but it freezes up. If you do the IT repair (power off, power on) it works perfectly again.
Any ideas?

Oh, one more thing, for some reason the Uno is only pumping 3.4V DC from the 5V output, I found that I had to use the 5V supply to power the clock chip otherwise I got random code on the display and if your tried to change the clock time the number goes up and you can not select anything.
Put the 5V on and bob is your next door neighbour!

Thanks

Darren
mrnick1234567 (author) in reply to DjandcoDec 27, 2011. 7:54 AM
Hi Darren,

Someone else had the same with the time freezing, he fixed it by replacing the DS1307, but it could be the power if your board is only outputting 3.4v. You might also have a bad connection to the clock chip. The LED on the arduino pin 13 should flash every second to let you know the clock chip is being read and ticking.

Make sure you are not powering the Uno from the round power jack and check the voltage from the 5v pin without anything plugged into the Uno. If it still reads low, maybe there is something up with your Arduino or power supply. If not maybe you have a short somewhere. Good luck!

Nick
Djandco in reply to mrnick1234567Dec 28, 2011. 9:27 AM
Thanks Nick,

In your ible you do state to use the USB to power it and not the round power socket, I had been told that you only had to worry about this on older ones where you had to select the power source? not sure about that but I had also been told that on the new model UNO it did not matter which way you power it.
Turns out it does :-)
I cut down a USB lead and powered the unit from that and so far we have no issues.

Should have done what you said in the first place!

Thanks for coming back to me on this.

Kind regards

Darren
2011-12-28_13.05.06.jpg
THEORANGESNOWFROG says: Dec 26, 2011. 8:26 AM
Thanks for the amazing instructables
jashan510 says: Sep 22, 2011. 9:05 AM
Instead of an arduino can we use a pic micro controller.. Because i wanna make this clock for someone but i really dont want to give away my arduino
mrnick1234567 (author) in reply to jashan510Sep 22, 2011. 1:54 PM
Very hard to say.. depends on the PIC, what outputs / inputs / what code it runs etc etc...
jashan510 in reply to mrnick1234567Sep 22, 2011. 9:07 PM
im new to the microcontroller world dont know much about em...
if not pic then any microcontroller with which i dont have to use my arduino board
cz u get the microcontrollers for like 3-4 dollars but the arduino i have was quite expensive..
is there a way to use the arduino boot loader without the arduino board?

P.s thanks for replying man im in love with your clock best iv ever seen.
mischka in reply to jashan510Nov 25, 2011. 4:51 AM
You could buy the ATMEGA preprogrammed with the arduino bootloader, program it with your arduino board and wire it like this: http://www.instructables.com/id/Standalone-Arduino-ATMega-chip-on-breadboard/

mrnick1234567 (author) in reply to jashan510Sep 24, 2011. 3:50 AM
I think using any other microcontroller or pic would need a lot of work and re-coding to get the clock going.

If you look at in terms of how much time you would spend on trying to get it working, and how much you value your time, it's probably a cheaper option of you just bite the bullet and get another arduino. They are a bit cheaper on eBay if you search.
jashan510 in reply to mrnick1234567Sep 24, 2011. 8:01 AM
Yes u probably right man itll take a lot to rewrite the codes and redesign everything..
Ugifer in reply to jashan510Dec 21, 2011. 5:40 AM
The way to go is definitely as mischka says - use an ATMeag-328 and program it in your Arduino but then pull out the chip and put it into a socket on a piece of perf-board made up as indicated in the bread-board arduino tutorial. You need almost none of the gubbins on an Arduino board to make the chip run - that's mostly for development. Once you have it running you only need the chip, crystal and a few capacitors. You don't really even need a reset switch unless you are wanting to re-program it in place. With this project you are only using a few pins so it would be very easy to make up a '328 board. The '328 chips themselves only contribute about £3-£4 to the cost of the project.
said007 says: Oct 29, 2011. 2:03 PM
Nice clock mrnick. Do I need to download the code for this? Where do I get the code?

I am diffinately building this clock and Ordered the parts already. Just wondering how the code thing is done..

Tks
mischka in reply to said007Nov 25, 2011. 4:47 AM
See Step 9 for the code.
JoelLemos says: Oct 6, 2011. 2:42 AM
Hello, I have the PDF of this project will be someone I could give it away because it can not get it?

Thank you!
said007 in reply to JoelLemosOct 28, 2011. 1:18 PM
i would like the PDF please :)
anonymouse197 in reply to said007Nov 5, 2011. 8:23 PM
Become a Pro member :) (or be lucky enough to have signed up before pro memberships existed)
tigerbomb8 in reply to anonymouse197Nov 7, 2011. 7:53 AM
yer like me
alfamc2 says: Oct 22, 2011. 1:01 AM
OMG!! this is so cool. im making a big list of peices i need for multiple instructables and im gona go on a nerdy shopping spree and build this. (=
Carleyy says: Aug 22, 2011. 10:54 AM
Awesome Project!
mrnick1234567 (author) in reply to CarleyySep 11, 2011. 3:02 PM
Thanks!
nix78 says: Aug 22, 2011. 10:07 AM
Hmm, nice Pong Clock implementation! I like this pixely display better than the "originals" (the one by Buro Vormkrijgers and LadyAda's MonoChron)!
mrnick1234567 (author) in reply to nix78Sep 11, 2011. 3:02 PM
Hey thanks. I am a sucker for those LED pixel displays!
magicthegathering says: Sep 9, 2011. 2:23 AM
This is great. I have one question I couldn't answer. Are you using the USB adapter for powering the clock or are you using the power adapter on the arduino board to power the clock? Thanks.
mrnick1234567 (author) in reply to magicthegatheringSep 9, 2011. 11:21 AM
Hey,

Yes the USB adapter powers the clock. I plug it into the Arduino USB port and connect the display and clock chip power leads to the +5v and GND connectors on the the Arduino.

Don't use the round power jack on the Arduino if you wire it up this way.

Cheers
Nick
magicthegathering in reply to magicthegatheringSep 9, 2011. 2:39 AM
One more thing. Sorry If these questions seem stupid, I am new to this stuff. Would the code you provided work with the larger 5mm led panels without editing it? Thanks.
mrnick1234567 (author) in reply to magicthegatheringSep 9, 2011. 11:19 AM
Yes they should work fine looking at the data sheet on the Sure electronics site, all the connections are the same.

Nick
magicthegathering in reply to mrnick1234567Sep 9, 2011. 10:53 PM
Thanks for the help. I ordered the 5mm ones so I will post a video of it in action. Your project has made me excited to build one. I was wondering how complex it would be for me to change the time to a 12 hour format? Not that it really matters anyway, just curious. Thanks for posting this indestructible. It is really good and should have won.
Alex
mrnick1234567 (author) in reply to magicthegatheringSep 10, 2011. 5:17 AM
Hey,

Glad you decided to have a go building one - good luck!

It depends how comfortable you are with coding to make it 12 hour. The 'proper' coding way would be to program the DS1307 register with the correct bit to set it to 12 hour. The datasheet for the chip is here: http://datasheets.maxim-ic.com/en/ds/DS1307.pdf

You'd need to make a change to DS1307.h in the libraries folder, to set this bit, and make tweaks in the main code where it assumes the time is 24 hour.

The easier way would be to just fiddle the number after you get it from the DS1307, then you'd just have to play with the main code.

Looking forward to seeing the video!
magicthegathering in reply to mrnick1234567Oct 3, 2011. 7:34 PM
Hey man,
I got all the parts in and put it together using a breadboard first. It all works and looks stunning! Thanks for the great program. I am about to solder it together when I get some time. I was wondering how you mounted yours inside a case? I want to put mine in a fancy case and wanted to see what you did to yours.

By the way, those larger 5mm displays work wonderfully like you said they should. The one trick is it seems like they have to go in a certain order. I know that sounds odd but I had the first one connected up with the right switch on in the back and it displayed the image incorrectly. All worked well after switching the displays out and the switches again. Such a great project and I hope you win. I hope to post a video as soon as it is mounted.
Alex
mrnick1234567 (author) in reply to magicthegatheringOct 6, 2011. 2:23 PM
Hey Alex, great to hear you got it working. Yeah you have to get the switches right otherwise you get the displays swapped round, or two left or two right displays.

I haven't built a case for mine yet - I was thinking of an opaque perspex box, something simple. But getting one made is expensive so I have't gotten round to it.

Be great to see a video with the 5mm displays.
anurag130 says: Sep 8, 2011. 7:42 PM
could you add 2 potentiometers so that you and a friend could play pong?
mrnick1234567 (author) in reply to anurag130Sep 9, 2011. 11:14 AM
Hey, yes that's possible, but it would need the pong code to be re written as a game rather than a clock.

Do able if you are ok tinkering with the code!
ksx says: Sep 8, 2011. 1:42 PM
Would it be hard to get rss feeds displayed ?
mrnick1234567 (author) in reply to ksxSep 8, 2011. 2:30 PM
Hi, yes it would be a bit of work.

You could probably swap the arduino for the new version with ethernet built in.

You could reuse the existing code, but would need to add in more code - e.g. the ethernet libraries and code to get the RSS text, format it, and then scroll it.

Nick
bulletBird says: Aug 23, 2011. 3:34 AM
This is awesome! I'm definitely voting for you!
mrnick1234567 (author) in reply to bulletBirdAug 24, 2011. 9:51 AM
Hey thanks!
SDgeek says: Aug 21, 2011. 12:04 PM
Can you please figure out how to make this into a full-on snoozing alarm clock with multiple alarm settings so I can build one too...
mrnick1234567 (author) in reply to SDgeekAug 24, 2011. 9:50 AM
Haha, if I get the time, or you could see if you could add to my code yourself.
rusky says: Aug 22, 2011. 11:23 AM
Very nice , but didn't Atari file a lawsuit against a similar clock a few years ago??
frank26080115 in reply to ruskyAug 23, 2011. 9:31 PM
Hi rusky, are you serious? Can you give us a link to the news article?
rusky in reply to frank26080115Aug 23, 2011. 11:25 PM
frank26080115 in reply to ruskyAug 23, 2011. 11:35 PM
Thanks

Atari seems a little bit... off-the-radar these days... I bet most kids don't even know they made Pong.
mrnick1234567 (author) in reply to frank26080115Aug 24, 2011. 9:48 AM
I guess I could always change the name to Bat & Ball clock! I. See a few other people have them and sell them (ladyada etc). I wonder is she has been contacted by Atari?
frank26080115 says: Aug 23, 2011. 9:34 PM
I was wondering when somebody enters a pong clock. You can't have a clock contest without a pong clock.
CaseBoy says: Aug 22, 2011. 3:13 PM
..this on webos as an app
PNY says: Aug 22, 2011. 6:19 AM
Very cool!
SDgeek says: Aug 21, 2011. 12:00 PM
Pong scores reflect the time!!! Are you in the clocks competition so I can vote for you!
mrnick1234567 (author) in reply to SDgeekAug 21, 2011. 2:17 PM
Haha yes I am in there somewhere!
tlynch1 says: Aug 21, 2011. 11:09 AM
thats awesome..
mikeasaurus says: Aug 21, 2011. 10:13 AM
looks great!
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!