Today I'm releasing the code and schematics for a new project I am in the process of completing. I call it the 'code box,' but it can be re-purposed for many other uses. The box is a hand-held device with a single button and a 4-digit alpha-numeric LED display hidden behind an IR panel. The enclosure also has an optional silicone boot to enhance the slick factor.
The integrated circuit I chose (the ATMEGA168) can easily be programmed using an Arduino bootloader, which should hopefully allow less technically savvy users to experiment more easily. Alternate ATMEL processors of the same form factor can be substituted if your application requires more processing power or RAM.
In an effort to save space, I designed the PCB with surface mount technology, which might be a little scary for some people. The parts are big enough to be soldered by hand though. Here's a cool tutorial to demystify the process. The advantage of using smaller parts is that the entire board is only about 2.12" x .77" which will make it much more embeddable.
The entire system is powered by 2AA batteries and can sleep for approximately 30 days.
I designed the box to serve as a fancy one-time pad. The box can be programmed with a series of codes that can be verified by an external server. Each push of the button displays a new code. The codes are for a game that I'll be announcing later.
The box can also be programmed to scroll a message or display a static message.
In the zip file below I have included an Arduino sketch that contains the sleep function (courtesy MacSimski/D. Cuartielles); the library and associated methods for using the LEDs; and main program that iterates through an array of four digit codes (the purpose for which it was designed).
The Zip file below contains
- the Eagle files for the board and schematic
- a parts list (most items can be found on digikey.com
- a DWG file with the button hole placement
- an Arduino sketch that includes an example application
Download Files: code_box_011811.zip
Raphael Abrams was an essential mentor to me on this project. Without his knowledge and guidance, this project would have involved many tears. Thanks, Raphael.
Schematics and source file are being released under a Creative Commons Attribution license. Please credit: Brian Fountain / Raphael Abrams
I just launched a new blog to track a game I'm currently developing. It's called Karaoke Combat and its home is here: http://karaokecombat.com. The game is a work-in-progress and I thought it would be fun to use the blog as an open notebook to document my work. If you are into Karaoke or game design, check it out.