Harrys TV
Harry gets all the major network shows!
Harrys TV displays the “new” RCA CTC-15 console Color TV circa 1963-64 – in HO scale of course. The basic electronic setup uses 3 components: an Arduino Pro Mini, a micro SD card reader attached to the Pro Mini, and a 1 inch Organic Light Emitting Diode (OLED) display, powered by a 9 volt battery.
The “trick” to building Harrys TV was in reworking the code for to speed up the SSD1302 Arduino library, so you could display about 12 small pictures on the display per second (about 83 milliseconds per picture, give or take). For those not quite aware, video is actually transmitted “frame by frame” (picture by picture) and displayed on your screen fast enough that your eyes and brain integrate the pictures into continuous movement. This project set out to try to put pictures on the screen as fast as possible, and as cheap as possible, to render an HO scale video that might be recognizable on the whole. Large, color TV’s in 1964 had bulky round tubes that were partially masked off to show the “rectangular” video image. Changing channels often skipped over blank channels where video “snow” and “white” noise would be displayed. This is also reproduced.
The basic components are:
Arduino Pro Mini (about $2.25): http://www.ebay.com/itm/230795578198
SD Card reader (about $1.31): http://www.ebay.com/itm/261646897915
1.04" 65K OLED Color Display 96x64 SSD1332 ($13.99) : http://www.ebay.com/itm/160938679586
also a small slide switch and a 9 volt battery. I added a couple of LEDs for the upstairs rooms too.
The other addition was Harrys TV sign. The sign is my first attempt to build a backlit sign using a “stencil” cut out from 0.010 styrene sheet (front) and laminated (glued) to a translucent sheet of 0.005 white styrene. A small “light box” is attached to the back and fitted into the store front. Then five 0603 white LEDs are strategically placed above the letters where the black stencil would block the direct light to the front (LEDs are facing down). A resistor was chosen (about 100 ohms) so that about 18 milliamps total (measured) powered all the LEDs (wired in parallel). Please take note: this yields about 3.6 milliamps per LED). This reduced the amount of light produced so the light “sources” are not very obvious to the viewer. The stencil was cut directly on a KNK Zing Cutter which I recently received as a gift—a fantastic modeling tool!
The Hard Part
The difficulty in animating Harrys TV was not with the hardware, but with the software sketch to do the job, as well as the preparation to get the “video” in place.
Let’s start making pictures. What prevented me from going completely insane with this project was finding three very special tools. The first was the Corel Video Editor ( http://www.videostudiopro.com/en/products/videostudio/pro/default.html ), which enables you to piece together video clips, shorten them, mix and reorder them too. The second was the “Free Video to JPG Converter” from DVDVideoSoft ( http://www.dvdvideosoft.com/) which would take a video and convert it to a series of jpeg still pictures. In doing so it would allow you to skip numbers of frames – I elected to use every second frame. The third tool was ImageMagick® ( http://www.imagemagick.org/index.php) a free, unbelievably powerful image conversion and manipulation tool that is NOT for the weak of heart! The jpeg images were all placed ALONE in one folder and then resized and cropped with the single command:
Convert *.jpg –resize 28% -crop 38x38+5+1 W%d.bmp
Which translated to English means: take each and all pictures in the current folder with the .jpg extension, reduce their size to 28% of the original (my originals were 176x144 pixels) then crop them to 38 by 38 pixels with an X axis offset of 5 and a Y axis offset of 1 !!! Obvious …right? Well, not to me-- It took about 4 hours to get this right! J Lastly, convert each picture to bmp format and name each output picture in numeric sequence as W1.bmp, W2.bmp, W3.bmp, etc.
In the video that I used, there were 1262 bmp pictures placed on the 1GB micro SD Memory Card used.
Pictures were read off the memory card and displayed as fast as possible, on the display, in sequence, by the Pro Mini. Intermixed with the “video” was the random sequencing of the upper room lights in the building.
If you are a glutton for punishment you can download the Arduino sketch, the modified libraries, and the “video” to place on your own SD card here: http://www.scalemodelanimation.com/Articles/HarrysTV.zip
OLEDColor4_edit4 folder contains the Arduino sketch
Video folder contains the “video” for your SD Card (put only the CONTENTS of the folder
On the SD Card
OLED_SSD1332 & are folders with the modified libraries to be copied into the “libraries” folder
Adafruit_GFX in your personal Arduino folder (usually …\My Documents\Arduino\libraries\
on a Microsoft system)
Only a portion of the one inch OLED display was used: 38 by 38 pixels out of the 96 by 64 pixel screen. The display was masked off with a scaled photo of an RCA CTC-15 Console TV from 1963-1964. Harry’s TV is still a work in progress. I’m thinking of another animation for the right side window and how I will finish the details and weathering of the building.
Complicated? Yes—a bit. Do-able? Yes, entirely! Now even your HO scale citizens can become couch potatoes!
Harry’s TV will be one of the animation examples I use in one of 3 animation clinics I hope to give this summer at the NMRA national convention in Portland. I Hope you all come and watch some scale TV with me!
Have fun.
Best Regards,
Geoff Bunza