Z-Scale controller part IIIb: Arduino Shield

I realised that I had completely forgotten to talk about the PCB I designed for the first prototype!

Before integrating the controller into a Beaglebone, I decided to test the concept using an Arduino. Most of the chips being SMD, it was just cheaper and more convenient to design a shield, rather than use multiple breakout boards on breadboards. The downside of not going all the way to a Beaglebone cape is that the arduino needs to be connected to a computer to do its job, or to a Beaglebone through a USB connector which is pretty ugly, but at least it provides a good proof of concept.

Eagle

I used Eagle to design the shield: the personal edition maximum board size is nice enough to accomodate an Arduino shield footprint without a problem, and I know that software, so why choose something else?

PCB design

Not much to say here: the whole point of the exercise was to fit 32 outputs on one fairly small board: this is the reason why I ended up wiring the outputs of the 33880 chips not in numeric order, but in the most convenient way for board layout, and used firmware mapping on the Arduino.

I also used ground fills everywhere I could, in an attempt to minimise noise issues. Also, the L293DD chip uses several ground connections which are directly connected to the ground plane in a way that maximises heat transfer. This also means that the chip will be more difficult to solder by hand.

Train controller Arduino shield PCB

Components BoM and sources

A few notes about some of the stuff I spent more time on during component selection.

MC33880

I discussed this earlier: this is an a chip designed for very large production runs, but fortunately you can get hold of it on freescale’s site directly. Good, because a lot of other similar drivers can only be purchased by 5k and more…

Connectors

Turnrout connectors: I spent some time on those, since the choice of connector has a direct impact on board size and practicality. I ended up selected the very classic connectors you can buy on Adafruit and others. Those are so-called “Eurostyle” connectors, with a 3.5mm pitch. They are compact, can be assembled together with a nice side clamp mechanism, and hold cables very well. Adafruit sells a version made by 4Ucon, one of the best kept secrets in the Maker business – or are they?. Check them out, you can buy pretty much any type of connector in bulk – usually 1000 minimum order quantity or more – for about the same price you would pay of about 50 to 100 of the same on any retail site… And you’ll get a lifetime supply of that reference.

Besides Adafruit, you can also get those on Mouser for quite a bit cheaper, as well as on Digikey.

PCB

I used the Fusion PCB service of Seeed Studio again for this board: very easy, very competitive, the cost of a 2-layer PCB today is about the same as the cost of a digital photograph print 10 years ago…

And here it is, very first prototype:

Z-Scale controller shield proto

And the working prototype:

Working prototype

The prototype worked right away, so I cannot give much comments there. I will run a few analyses on the scope later to verify noise in particular, but all the tests I have done so far were successful, both trains and accessories work as expected, what more can I say?

Now, let’s resume the series with Part IV !

Leave a Reply

Your email address will not be published. Required fields are marked *