VIA: http://www.barrettandcarly.com/blog/elec/DroidLightsV2.html
Arduino-based logic displays
NOTE! The files below are the version 2 board design which has been superseded by the version 3 design. The version 3 information is on this page.
FreePCB (fpc) files. Download these if you want to edit or just view the board designs in the FreePCB application.V2 front logic PCB file
V2 Rear logic PCB file
Gerber files. You can use these files to order a set of boards from pcb.laen.org, or your favorite fabricator. You can also view or print the gerber files with GC-Prevue.
V2 Front logic gerber
V2 Rear logic gerber
Here's a sketch with scrolling text and random display.
I drew these using FreePCB. If you don't already have it, you'll need to install all of the updates on the downloads page, including the latest "unstable" executable and the 2 files listed under "New header footprints with larger hole and pad sizes".
Also, please add the following text to the top of the th_capacitor.fpl file. This adds a part called CKJV which is defined as a capacitor, but I'm using it as a connection point for a screw terminal. If anyone knows the "correct" way to add a screw terminal in FreePCB, please let me know.
--- cut here (start) --- name: "CKJV" author: "JMV" source: "made up" units: MIL sel_rect: -46 -58 246 58 ref_text: 50 100 80 0 7 outline_polyline: 7 -80 70 next_corner: 280 70 0 next_corner: 280 -70 0 next_corner: -80 -70 0 close_polyline: 0 n_pins: 2 pin: 1 52 0 0 0 top_pad: 1 94 47 47 bottom_pad: 1 94 47 47 inner_pad: 1 94 47 47 pin: 2 52 200 0 0 top_pad: 1 94 47 47 bottom_pad: 1 94 47 47 inner_pad: 1 94 47 47 --- cut here (end) ---Now that we've got that out of the way, I'll describe the theory of the circuit.
The design is based on the MAX7219 LED driver IC from Maxim. This driver has several properties that make it attractive for use with Arduino:
- it can control 64 LEDs (8x8 matrix) using only 3 output pins
- they can daisy chain together to control even more LEDs, still requiring only the 3 pins
- there is already an Arduino library developed specifically for this IC.
Also they don't require you to place a resistor in the circuit for each LED. A single resistor labeled RSet is used to set the upper limit on the current sent to all the LEDs.
Since the driver IC is capable of controlling more than the 45 LEDs in the front logic matrix, my original version of the front board included an "extra" row of 8 LEDs positioned below the IC. This extra row was intended to give a place to hook up additional LEDs that you would need in addition to the logic displays, such as HP or PSI. I wound up removing this extra row for 2 reasons: There's no way that LEDs driven by the MAX7219 would be bright enough for PSI or HP. Those have to be VERY bright. Also, the extra row made the board too tall, and it wouldn't clear the bearing adapter ring in the bottom of the dome.
Also, you'll notice that the 5x9 matrix has 9 columns, whereas the driver IC only supports 8 columns. To get this 9th column, I simply added an extra row to the matrix, then rotated and moved that row to the 9th column. After all, the notion of "rows" and "columns" is purely conceptual and the LEDs themselves can be positioned anywhere, as long as the circuit can be made.
Finally, the circuit is designed with "IN" and "OUT" signal headers. You could hook these up as follows:
output from 3 Arduino pins to the bottom FLD "IN";
connect bottom FLD "OUT" to the top FLD "IN";
connect top FLD "OUT" to the RLD "IN"
That's it. In your Arduino sketch, you would create an LEDControl object:
LedControl lc=LedControl(12,11,10,5);so we would use pins 12,11 and 10, and we specify that we have 5 driver ICs. From that point we can turn any LED on or off.
//turn on the 3rd row, 8th column of the first driver lc.setLed(0,2,7,true); //turn off the 4th row, 5th column of the second driver lc.setLed(1,3,4,false);
Here are the bare boards as they arrive from pcb.laen.org
Some pictures of the built-up boards with the LEDs inserted but not soldered yet. The RLD back...
The RLD front...
The RLD with Joymonkey's CNC-cut bezel
The FLD back...
The FLD front with bezel...
Parts List
item | each | qty | total | source | part # | Incl shipping? | notes |
---|---|---|---|---|---|---|---|
rld board 6.51 sq. in. | 10.85 | 1 | 10.85 | pcb.laen.org | y | must order multiples of 3 | |
fld board 2.354 sq. in. | 3.92 | 2 | 7.84 | pcb.laen.org | y | must order multiples of 3 | |
LED | 0.025 | 225 | 5.625 | eBay | y | must order 3 lots; each lot contains 20 of each color (R, G, Y, W, B); cost 2.49 per lot | |
DIP24 socket | 0.27 | 5 | 1.35 | Digi-Key | 3M5466-ND | n | |
MAX7219 | 1.00 | 5 | 5 | eBay | n | order 1 or 2 extra | |
cap 10uF | 0.52 | 3 | 1.56 | Digi-Key | 445-2863-ND or 445-2874-ND | n | |
cap 0.1uF | 0.15 | 3 | 0.45 | Digi-Key | 490-5369-ND | n | |
resistor 24k for fld | 0.06 | 2 | 0.12 | Digi-Key | 24KH-ND | n | |
resistor 28k for rld | 0.11 | 1 | 0.11 | Digi-Key | 28.0KXBK-ND | n | |
screw terminal | 0.46 | 3 | 1.38 | Digi-Key | ED1609-ND | n | |
double row header strip | 0.03 | 3 | 0.09 | eBay | y | sellers typically offer strips of 40+ pins; break off groups of 3 | |
14-inch 3-wire F/F Extension Cable | 2.50 | 3 | 7.50 | parallax.com | 805-00002 | n | you can occasionally find these on eBay for MUCH cheaper, more like $5 for 12 pcs. |
total | 41.875 |
The LEDs I used are readily available on eBay. Search for this text: "100 3mm Red Green Blue". Sort by price, lowest first. The first one in the list should be $2.49 shipped, and includes 20 of each color (R, G, Y, W, B); order 3 sets of those, total cost $7.47. It will be more than enough to do all 3 displays. Some of them turn out to be flanged while others are not. For the flanged ones, clip off the flange with a set of nail clippers. Clipping the flange is a breeze once you've done a few. Then cut the leads short before inserting into the board.
Note that this is just one of many sources for LEDs! If you know of other good sources, let me know and I'll add them to this page.
I have made a simple tutorial for building the front display.
Ordering boards from pcb.laen.org
I chose to order the boards from pcb.laen.org because he's a great guy to work with and has fast turnaround time. He fabs the boards in sets of three, so your order would be placed as "I would like one set of 3 boards", or "I would like two sets of 3 boards" etc. Since an astromech requires one rear and two front boards, one reasonable approach would be to order one set of (3) rear boards and two sets of (3) front boards. This would give you 3 rear and 6 front boards, which would be enough to do three droids. Then you could order enough parts from the parts list above for 3 sets and split the shipping costs 3 ways, further reducing the per-droid cost. John VannoyMarch 2011
No comments:
Post a Comment