Search This Blog

Loading...

Friday, August 27, 2010

Building Blocks: Anatomy of a Digit

Having already quite a bit of experience with microcontrollers, I decided to tackle the score digits first. I figured that if I could build these, the rest (except for maybe the wireless) would be pretty straight forward. Also, the digit design would be applicable for score digits, the inning digits, and also the balls/strikes/outs display.

My design criteria were as follows:
  1. The digits must be easily visible from a distance
  2. The digits must be visible in sunlight.
  3. I must have dimming control of the digits for night viewing.
  4. I need to control all of this from a single microcontroller (atMega168 or similar)

After much research, I found these wonderful chips from TI (TLC5916) and STMicro (STP08CP05). Both are effectively identical. They each have their own value added features (none of which I use), but the basics are the same. They are a 8-bit, constant current, LED driver with cascadable latch registers. Additionally, they work on 3.3V power, which is something I didn’t consider before I started, but is convenient since I’m going to likely have to run the whole thing on 3.3V because of the wireless module I’ve chosen.

These chips are quite simple. There is an SPI input and an SPI output on the chips. From your microcontroller, you start by sending a byte on the SPI peripheral. This shifts bits across the SPI bus and into the shift register on the TLC5916. Then, if you take the Latch Enable pin low, up to 8 LED driver channels will be lit based on the position of the 1 bits in the byte you sent. Cool!

If you send more than one byte, as the second byte is shifted into the first chip, the first byte gets shifted out of the chip to the input of the next chip. This allows me to send an entire string of bytes that represent the values I want to display on the scoreboard. Once I’ve shifted all the bytes, then I take the Latch Enable pin low and the LED driver channels light up all at once. Double cool!

In order for this to work, you have to design your board so that you can easily cascade them. Some pins, SPI in for example, terminate on the chip. Others terminate on the TLC5916, but also are passed on to the next; Latch Enable, for example. Also, the SPI out pins have to be connected to the next as well.

The LED segments are 10mm red ultrabright LEDs, four in series, and powered by a 11.1 LiPo 4000mAh battery (let’s call it 12V for now). I’ve decided to use a bus bar power design for simplicity. All 12V power and ground are derived from these bus bars and are connected to each digit with a 5mm dual screw terminal connector. The electronics are powered by 3.3V coming in on the cascade connectors.

A picture is worth a thousand words (or more), so I’ve added a view of what the Score Digit schematic and layout look like. The schematic is pretty straight forward. I simply copied the sample schematic out of the data sheet and then added in my own values and LED design. Then I added in a SPI/Power/Latch bus design that would enable me to easily cascade the digit modules.




The layout of the PCB is, even now, in a state of flux. Each time I make one of these, I find something I can improve. Mounting holes, copper fill to help with heat dissipation, layout so I can optionally use SMD resistors and capacitors, adjustments to tracks to allow for easier home etching and drilling, thermals on pads, then no thermals on pads (ended up being a bad idea). Here’s the latest version of the layout, and I may yet change it because I have two more of these to make. There is a variant of this module that I will be using for the inning and ball/strike/out display. Essentially it will be the same. I will post this once I’ve made it.



I hope you've enjoyed this segment.  More later!


1 comment:

  1. This is really cool.. I've been thinking of doing the same thing, although for a Karate sparring scoreboard... You mentioned in your post that you'd be posting your final circuit board, once it was complete. I dont see it, and was wondering if you'd mind sharing a file that I could order some with, or if you're in the mood to handle selling the boards (populated, or unpopulated), I'd be curious what you'd sell 8 of them for... If you can help, send me an email at 172pilot at gmail dot com.

    Thanks!
    -Steve

    ReplyDelete