I recently designed and had manufactured a PCB for a project I am working on. It was an interesting exercise that I learned a lot from so I thought I’d share it here. The project uses RGB LEDs with the TI TLC5947 24 channel PWM driver. An mbed rapid prototyping board controls it, producing different shades of light in various rotating and pulsing patterns. Placing the LEDs with their controller on one PCB and using a development board like mbed on it’s own PCB with a cable connecting the two saved time and allowed me to get a prototype up and running faster. The alternative, a single PCB with an LPC1768 controller and associated support circuitry together with the LEDs and drivers would have taken longer and, at my skill level, would likely have had bugs. In contrast this simple PCB worked perfectly as soon as I powered it up. Well, almost. More on that shortly.
The TI TLC5947 LED driver has 24 channels, each with it’s own PWM dimmable output driver. It has an SPI interface into which you shift a 12 bit word for each channel’s PWM value. I have 24 LEDs, but since an RGB LED is basically 3 LEDs in one package it takes 3 TLC5947s to drive all 24 LEDs independently. Mine are daisy chained together, so in total I shift in 12*24*3=864 bits. Additional control inputs on the TLC5947 allow you to globally blank the outputs, and to latch the values from the registers to the LED outputs. The TLC5947 is a low side driver so when using it with RGB LEDs you have to get ones that are common anode, or ones that pin out all 6 leads.
I designed the circuit with the Eagle PCB package from Cadsoft. When designing PCBs you have to first come to grips with the fact that the people who create schematic capture or PCB layout software also consider themselves to be GUI design experts, and they don’t use any of the conventions that you may be familiar with from other graphical applications. Once I got over that hurdle I found Eagle to be straightforward to use for schematic capture. It’s a powerful package, with a built in scripting language, forward annotation from schematic editor to PCB editor and vice versa, auto router, flexible design rules, etc. I used the free-for-hobbyists version, which is fully featured but will only create 2 layer PCBs to a maximum size of approximately 3×4 inches.
The other big thing about PCB design software is the parts library. In ELEN214 (freshman level introduction to Electrical Engineering) there is only one capacitor, ideal in all respects, but in the real world there are dozens of types, each with different characteristics, and they come in all kinds of packages. Similarly an IC like the LED driver I chose may come in different packages that are all functionally equivalent. When adding components to your schematic you have to pay attention to the package as well, and make sure that it is something you’ll be able to find at your distributor. This is where I didn’t pay enough attention and ended up ordering 50 LEDs that had a different pinout than my library component. Hence the “Well, almost” comment above. In the photo you can see that I was able to bend the leads on two LEDs around to match — they look like my kids do when they have to “go”. For the other 22 LEDs I ended up ordering replacement LEDs with the correct pinout. I was able to recoup some of my loss by selling the initial LEDs on Craigslist.
Back to library components. Eagle has a lot of them. ICs, connectors, symbols, passives of all sorts. So many you can spend quite a bit of time looking for what you need. Fortunately Eagle is popular with hobbyists so for components that aren’t in the library (like the TI LED driver) you may also be able to find them in the user contributed section of the Cadsoft web page, or in the wider information superinterwebnet. You can also build up your own library of parts/packages that you use a lot. Creating library components in Eagle is not very intuitive, so I was glad to run across an Instructable that gave step by step instructions.
Next time: Schematic capture and PCB layout in Eagle.
Design News Gadgeteer