Thursday, February 27, 2014

Designing some PCBs

Having decided that I didn't want a big mess of wires and several square feet of prototype boards, I set out to design a PCB to accommodate all the circuitry. Initial drafts were made using Fritzing, a very accessible open source program.
I wanted to have one shift register with eight transistors and all required resistors on one small board, so I could control 8 cathodes. The design had to be small and stackable; you should be able to put multiple boards on top of each other easily.

Designing a PCB is surprisingly easy. All you need to do is create the schematic in the schematic view by placing all components and drawing wires between the connectors.

 Then you go to the PCB view and set all the right footprints for the components (components may come in various forms, like through hole or surface mount, check the datasheets of your components). After that it's simply a matter of placing the components on the PCB in a logical way. The software will draw lines between pads that need to be connected to each other (so called rats nests) and all you need to do is draw traces between unconnected pads, making sure they don't cross and aren't too close to each other. The software will check for the most obvious design faults.
The above pcb is about 5 by 2 cm (2 by 0.8 inch) and can control the cathodes of 8 LEDs. Check out the result in 3D (made with KiCad):
The row of 8 pins are connected to the cathodes of the LEDs. The double pin header next to the shift register are the data pins which are connected to the microcontroller. The pins of the bottom row are connected to the pins above them, except for the last one in each row. The bottom one is data in, the top one is data out. When you stack these boards, you can connect the top 4 pins (output) to the bottom 4 pins (input) of the board above it. The data out of the bottom board will be connected to data in of the board above it. Pretty neat eh? The signal on the other pins of that connector are the same for all boards. They´re (in no particular order) Clock, Reset and Latch. The three pin connector (drawn in blue) is the power connector.

Although Fritzing is very easy to use, it has its limitations. Which is why I switched to KiCad, which is also open source and free, but it's much more professional. Id' say Fritzing is nice to learn the basics, but KiCad is great when you start to run into Fritzing's limitations. The learning curve for KiCad is much higher though, but there are some great tutorials that'll help you get started. Plus it has a 3D view :)

I've also designed an Anode driver board to hold a shift register and the MOSFETs, it can be connected the same way as the Cathode boards.
You've probably noticed the thick traces, those are needed to handle the 5 A current that will be flowing when the cube is fully lit. It's about 7 by 5 cm (3 by 2 inch).

The cool thing about these boards is that you can use them not just for a cube, but also for LED bars or LED matrices.
Above pictures are of older versions, the current design has some minor improvements.

No comments:

Post a Comment