Wednesday, May 25, 2011

Playing Pong on a pair of candy cans: it's the Cansole!

A little while ago I mentioned that I was working on a new contraption: a video games console in a candy can.

It's now complete and I can play Pong on a TV. Here's a shot of the completed contraption. On the left is the main controller (the power switch is visible) and on the right is the expansion controller with its cable. The left (red) controller also has a 'fire' button that isn't visible and both have simple 'paddle' style controls.

On the bottom of the main controller are the main connections for the TV (video and audio) and a second controller.

The second controller contains nothing but a simple potentiometer.

But the main controller is much more complex. There's an Arduino Pro, a potentiometer (for the paddle control), a button for 'fire' or 'select', the battery and the connection to the video and audio and second controller. Video and audio are handled by the Arduino TVout library.

The entire thing is wired squashed bug style as it's mostly interconnections and only a few discrete components (three fixed resistors, and two potentiometers).

The device generates a PAL TV signal in software (that's the clever bit that TVout does). It can generate NTSC with no problem if the code is changed. Here's a quick shot on the oscilloscope of the PAL TV signal just showing that the sync pulse is coming every 64 us as expected.

And, finally, to test it out I wrote a simple implementation of the classic game Pong. The source code can be found here.

No such blog post would be complete without a video showing the Cansole and Pong in action.

PS A few people have asked for a schematic. Here it is.


TimHannah said...

Do you have a schematic for the console, is there an instructable anywhere

John Graham-Cumming said...

I have added a hand drawn schematic.

Anonymous said...


Concerning the Code ...

I do not understand which of the files is actually needed for the Arduino?
Are they all different Versions/Ideas/drafts?

Thanks alot!

Anonymous said...

I got it running, but in the schematic there is a small fault. The Pots should be connected to 5V instead of 3,3V.

Unknown said...

i conect the pots to 3,3v and dont work, if i conect to 5v just work one and controls both players. what can i do?