Overview
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.
Usage
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.
Code
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).
Files
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
1 Comment
Leave a Reply
Your email address will not be published. Required fields are marked
You may use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <s> <ins> <strong>
Add Comment

Hello, and Happy New Year!. I am looking for a device, I can wear on my jacket to display a price of food I am delivering. Ideally, I would like to have 5 digits or 4 digits. Is the box for sale, and do you think, the application I am searching would be comparable for the box? Please help.