Friday, 23 May 2014

Cascading shift registers for new electronic board design

With our new boards designed, it was a relatively painless task at last night's BuildBrighton's Open Evening to knock out a PCB and mdf top layer for our new layout.

Because our shift registers are cascading, we can actually test (part of) the board by simply soldering on a few parts - the PIC microcontroller, maybe a shift register or two, pull-up resistors and some hall effect sensors.

In fact, so long as we have just one shift register, all the pull-up resistors on that register, and the PIC microcontroller, we can start to test as we go: reading the data in over the SPI lines should, at the first instant, return b11111111 (since all the lines on the shift register inputs are being held high thanks to the pull up resistors). Then as we introduce each hall effect sensor, we can test it's performance, looking for a zero in the incoming data from the shift register, at the point where a magnet is placed over the sensor. Once we've tested one shift register, we can simply add the next one "higher up the chain" and repeat - allowing us to test each individual component as it is added to the board.

This may seem like a slow, long-winded way to test our new board design, but - in the event of a problem - it will also allow us to immediately identify any offending component as soon as it is added to the board: a really useful thing to be able to do on a first-time prototype!

Of course, we're fully expecting everything to just work, first time, with no cock-ups, oversights or mistakes. And if, by some miracle, it does, then we've already got our artwork prepared for making a silkscreen for screen printing.

We're finally happy with our chosen board design - the entirely surface mount approach means that we don't have to worry about constructing a tray or enclosure for the lower-half of each board section. We don't have to worry about drilling the board and getting the pcb design to line up perfectly with the holds. And using this new design means that the underside of our single-sided copper board is simply the bottom of each board section. Keeping the design single-sided also means we're more than capable of producing a reasonable volume of boards ourselves (rather than get double-sided boards professionally manufactured) relatively quickly and we can produce more on demand, as the need arises.

We've had an ingenious idea for a semi-automated pick-n-place machine (more on this in a later post) so all that remains is to sort out the top/mdf layer for each board section. At the minute, we're laser cutting the top layers from 3mm mdf

This is actually quite a slow process. Although the laser cutting only takes 3-4 minutes, this does mean that to make any kind of volume of boards limits us to about twenty per hour.

And to produce 20 mdf layers in an hour means that the laser cutter is going to be working flat out, without a break. That's going to have a serious impact on the laser tube; and it's quite likely that we're not going to be able to keep that rate going for very long, as the tube gets hot and the cooling water needs chance to cool down.

While our new layout for the top layer fits our shift-register-based board really well, and the recesses for the 3-pin connects make the edges look nice and neat, we're going to have to consider an alternative to laser cutting sheets of mdf - both in terms of speed and appearance.

We're also going to need to consider using a slightly thicker material than 3mm - even if just by 1mm or so - because of our surface mounted crystals. They protrude ever-so-slightly over the lip of the laser cut mdf, when placed on the pcb.

While it is possible to source alternative/lower profile crystals, this also adds to both the cost and availability of sourcing our components - where possible we're trying to stick to easily sourced parts. We could also stick with our 3mm thick top layer and introduce a pocket on the underside of the graphic layer, but this is just complicating things unnecessarily. Better to just stick to a slightly thicker layer, and make sure that all components are completely covered by it, when it is in place.

Foam board is a relatively inexpensive material for making our top layers.
It's not only cheap, but easy to cut (the laser cutter can be run at a faster speed than mdf and still get a decent cut). It's also readily available from  a number of sources, and comes in both 3mm and 5mm thicknesses.

Hindleys, for example, sell a pack of 10 sheets of 508mmx762mm foam board for £21.45
Since our board section is 200 x 150, we can get 9 pieces per sheet, or 90 board section pieces for £21.45. Even allowing for VAT at 20% this works out at less than 30p per board section. Not at all bad!

It may also be possible to die cut. And it's this reason why we're giving it some serious thought: to be able to punch out the outline and all the internal holes with a single stroke would be a very quick way to produce this top layer for our board game sections. Of course we'd either need to build a die cutting punch, or pay for a cutting service (on top of a one-off charge to get the die made) but it does offer up an intriguing method of producing a relatively large volume of pieces, very quickly.

For now we'll keep that idea on the back-burner: we've a PCB to finish soldering up and some testing to do first!