Memory Card LCD DisplayBy Lance Summers
Project Makes SD Card Data Readable AnywhereThis project started as many of mine usually do, as a honey-do. We have compiled an extensive list of our book and movie collections on our computer at home, but my wife wanted to be able to scan the list from the video store (yes, we still go to the video store).
So I created a hand held device that allows us to scroll through text files stored on an SD card. I have my video collection and science fiction book collection organized by title and saved to this card. Not having to rely on my own fading memory about what we've already read or seen, now we can reference our entire collection while we are in the book or video store.
The solution I came up with was to use a 20x4 LCD display and an SD card to hold the text files and display each record in four lines on the LCD. I programmed an ATMega328 to read a text line from the SD card and display it on the LCD. It's all wired to a small circuit board.
I kept the text files small by dividing the contents by author for the books and by title for movies (authors starting with the letter A will be located in the text file Books-A.txt).
The device has five switches: power, reset, menu, up and down, LCD display and SD card reader. When the menu button is pressed, the main menu is displayed. This allows us to choose File-Selector, Delay Change, Credits, Read Book List, or Read Movie List.
The ATMega328 and other components are placed on a PCB (Mega is socketed), according to schematic below. The LCD is connected to the PCB via IDE cable. The SD card is soldered right to the PCB in a position that allows the opening to be access through the box. Finally, the SD board is connected to the ATMega via shorting wires.
I wrote the code for the Arduino but it does use the tinyFAT code that was written by someone else and then included in the Arduino library as of version 022.
PCB (2x3 should be big enough) ATMega328 Flash Microcontroller
Momentary SPST PB Switches
On/Off SPDT Switch
SD Card Reader
Standard Regulator 5V
9V Battery Clip
LCD Display (I used 20x4)
10µF Electrolytic Capacitors
Low Forward Resistance Diodes
Enclosure (dictated by size of LCD - I used 5x2.75x1.5)
9V Battery Holder (metal 'U' clip fits best)
SD Memory Card (2GB)
Minimalist Arduino Circuit Kit
IDE Cable (cable dictated by LCD pin count)
Note: The ATMega328 was programmed via Jameco's Minimalist Arduino Circuit Kit with one change. The socket in the kit was replaced with a ZIF so that ICs programmed on the breadboard can easily be removed and placed into a socket on a PCB.
- • Almost any method may be used to connect the LCD to the PCB. I used an old IDE cable so that I could remove the lid entirely while I worked on soldering up the switches.
- • The forward resistance of the diodes will affect the ON state of A0 and A1. If the MENU button is not being registered correctly when pressed, you might have to change the value in the sketch of ButtonOnValue (lowering this value will mean you could use diodes that have a higher forward resistance value). Just be careful not to lower this too much because you don't want ghosting.
- • Might as well use a 2GB SD card because the tinyFAT that the sketch uses does not read sub-directories very well. This means that we have a limit that all files are in the root directory and therefore limited to 250 files. This is not a problem for me because both the books and DVD files only total 51 files (books do not have any authors starting with "U" or "X" and the DVD has an extra file of "Mc").
Download the project's Logic Flow.
Get Lance's sample code here.
This project was submitted by self-proclaimed Jameco addict, Lance Summers. He tinkers with electronics every chance he gets, especially when required to please his wife. You can email him at [email protected].
If you have an electronics story you'd like to share, please send it to [email protected].