Raven Controller Board Version History

In the last post I talked about how I recently had a board fabricated that I’d designed… The purpose of this board is to make it very easy for me to install a microcontroller inside a model, even in very tight spaces… The general parameters of the design (specifically, the size) were dictated by my “Armored Core Hakuheisen” project: the one site on that kit that is central, easy to access, and easy to hollow out is also very small – at most I could probably fit a board about 10mm wide and 13mm long in there. Using a regular pin-through-hole type IC in there, the chip alone would take up most of that space, and I’d have no space left for resistors or connectors. So I set out to design a board that would make it easy to install a very small surface mount PIC and host the resistors on the board itself. I’ve gone through several iterations of this design – the version that was manufactured was version 3. For those curious, I’ve decided to write about some of the earlier (and more recent) versions.

Version 1

Initially, when thinking about this design, I was trying to minimize the pin count of the microcontroller to get the smallest footprint possible. This led me to look at the SOIC version of the PIC 12F683, an 8 pin device. Using that chip as a starting point, I developed the first version of the board with a size of 11mm x 10mm:

This design was fairly compact, and provided four extra ground connections to make it super-easy to hook up multiple LEDs. Unfortunately, there were also some problems with this design:

  • The 12F683 has only 6 I/O pins. One of these is input-only, and another two are being used up in this design as communication lines. That leaves only three I/O lines capable of driving LEDs.
  • Instead of using series resistors and driving the LEDs directly from the I/O pins, I used the resistors as pull-ups, so that the PIC could turn off an LED by driving the pin low, or turn on an LED by setting the pin as an input. Unfortunately this means that while an LED is off, there’s more power going through that resistor than would be going through it while the LED is on – and all the PIC would have to sink all that current. This severely limits how much current I can feed to the LEDs without sinking too much current to the PIC in the “off” state.

Ultimately it was just the shortage of I/O lines that made me rethink this design. 3 lines could have been enough for the Hakuheisen, except that driving four LEDs at once on a single output line would limit how bright those LEDs could be, due to current-capacity limits on individual PIC I/O pins. That and the fact that the 16F688 was available in a SSOP package: a 14-pin SSOP is roughly the same size as an 8-pin SOIC, because the pins on the SSOP are smaller and closer together…

Version 2

Version 2 was the first version I designed using the 16F688 as the basis. It’s also an 11mm x 10mm board, and it provides access to four of the PIC’s twelve I/O lines. An interesting feature of this version of the board is that the top and bottom I/O connections can also be used as connections to the 5V source or ground, by leaving out the series resistor for the I/O pin and shorting out the pads on the other side of the board. The I/O pins provide connections to port pins C0, C1, C2, A2, and A5 (not in that order) – and there’s a small connection at the bottom of the board for access (without a built-in series resistor) for A4. The ICSP clock and data lines are tied to port pins C4 and C5 (which are used by the PIC’s built-in serial port hardware). I/O pin C3 has no connection – it was hopelessly boxed-in by this design. Later on as I learned more details about the BatchPCB service I discovered that the drill size on the vias is smaller than BatchPCB allows – so I would have had to fix this design before I could attempt to have it made…

One of the funny things about this design in retrospect is that the PIC is basically backwards of how it really ought to be… most of the connections start on the right side of the board and have to cross to the left, or vice versa. Experimenting with the orientation of the PIC and the ICSP connector has been one of the main things I’ve changed between versions of the design…

This design provided more I/O pins than v1, but access to voltage and ground was a bit of a compromise. There was no way to provide an entire strip of ground connections as in V1 because I couldn’t route a trace for ground around the five I/O pin holes which took up the entire width of the board. This design got me thinking about ways to make the board more versatile.

Version 3

Version 3 is the version I sent off to BatchPCB. Unfortunately, as I mentioned in my earlier post, the design had some mistakes…

Version 3 introduced the idea of an area of the board which could be cut off to make the board smaller. The overall board was 12mm x 12mm but it could be cut down to 12mm x 10mm with the loss of four I/O pins and a ground connection. I used Version 2 as a reference when creating this design, which led to the first major mistake in the design: I connected the SSP clock and data lines to the ICSP header, instead of the ICSP clock and data lines… I also somehow managed to get the power connection backwards…

Apart from these mistakes I think version 3 had a lot going for it. All the I/O lines apart from those of the ICSP header were available as full-size through-hole solder points with series resistors. Also, there were pads for a pull-up resistor for the reset line (useful if you want to use the reset line, I guess – personally I’d just disable the reset line in software). Apart from the functional mistakes in the design, one thing I don’t like about this version in retrospect is that the order in which the I/O pins are arranged on the board is completely arbitrary. If you cut off the “optional” section you wind up with three PORT C pins and two PORT A pins… And the pins aren’t labeled, either. I didn’t think this would be important (the idea was that after everything was hooked up, software loaded onto the PIC would be used to configure and report on what pin held what function) but in retrospect I think it would have been useful. After I got the defective boards back, I did a quick fix to the board:

The power lines were switched back, and I did a simple fix to get the ICSP lines onto the ICSP header. This resulted in them being opposite the way they’re arranged on other versions of the design: “Ground, 5V, Data, Clock” instead of “Ground, 5V, Clock, Data”… By convention I try to keep my connections in the latter order (ground comes first, then power, and then the serial lines – you can’t even attempt to read the data line without the clock line, so the clock line comes first… It’s arbitrary, really, but it makes sense to me, and it’s very useful to establish a consistent pattern for these things…) I also arranged the left side of the board to provide connections to PortC 0-4 in order. 3b would have been workable, but I wanted to see what else I could improve, as well…

Version 4

Version 4a was another 12mm x 12mm board with a 2mm optional section, like Version 3… The main difference was that I set out from the start to arrange the available I/O pins in order. If you look at the back side of the board, you’ll see the pins on the left edge are labeled, simply, “PORTC 0-4”. If you’re reading that right-side up, then C0 is on the left and C4 is on the right…

The back side of the board seemed very spacious, so I did another version in which I made the board 1mm narrower:

One new feature of this board is it includes not only a pull-up for the reset line, but a capacitor to ground, as well. Still, like I said before, I never use the reset line, so this could just be a waste of board space… I don’t know. It might come in handy someday, I guess! :)

In version 4 I rotated the PIC to make it “tall” instead of “wide” – this allowed me to put the resistors for Port C on the same side of the board as the PIC. But when I was experimenting with the V3 boards I got back from BatchPCB, it seemed to me that these boards still might be a tight fit inside the Hakuheisen belly space… It seemed as though if I put those resistors back onto the back side of the board again, I should be able to significantly cut down the board’s width. And looking at the back-side of the board, it seemed like I had all kinds of space there just going to waste. I mean, I formed five vias into the triangular-grid pattern from the Ingram’s head in Patlabor, and all the back-side traces are curvy and silly – and there are only a few components on the back side of the board. So while I think v4 is great and I actually enjoy those silly features visible on the back of the board, I was sure I could do better.

Version 5

In version 5 I made two attempts to redesign the board into a narrower, longer format, about 9mm x 13mm. To do this I moved almost all the components other than the PIC to the back side of the board, made the holes for the I/O pins smaller, and started over.

In v5a I made the connection holes about 0.6mm in diameter, down from the original 1.0mm. The board is 9mm x 13.5mm with two optional sections: one at the top (including pin C5 and the extra power connections), and one at the bottom, containing the three remaining pins of Port A.

Version 5b is half a millimeter shorter, at 9mm x 13mm. The optional section at the bottom contains only power connections (two ground, one 5V), while the optional section at the top contains I/O pins. The design is a lot more cramped than earlier versions: the back side is littered with resistor pads and vias, while the front is dominated by the PIC. There was very little space remaining to put markings on. I feel like 5a is a little bit cleaner, which is nice: 5b has resistors alternating orientation on neighboring I/O pins and markings not quite exactly where I’d want them to be, and so many vias all over that there’s no room for any text… 5b is smaller but 5a seems like a cleaner design. In any case, to go with either design I’m going to have to be careful to make sure those pin holes are really large enough. The 1mm holes on the v3 boards are more than large enough for any of the pins or connectors I’d use there now, but I wouldn’t want to have the boards made and discover later that I should have made the holes larger…

(EDIT 2014-7-24): I have made the original source files for the Raven boards available here. Feel free to use them however you like. Unfortunately, I created the files using gEDA PCB, which isn’t particularly good software in my experience – but it’s what I had at the time.

Among the files are two versions of the board I made after writing this post: v5c and v6a. v5c (9x13mm) is a modest improvement over v5b, with a slightly less cluttered layout and better component placement. v6a (10x14mm) was slightly larger than the v4 series, but could be cut down to 10x10mm by sacrificing four I/O pins.

3 Comment(s)

  1. May I request to download the files for the 4b version of this board, so I may create a “light show” similar to what you created during your sonic screwdriver build. I plan to use OSH Park make the board, as batchpcb is no longer available.

    Bluebox303 | 2014-07-09 | Reply

  2. Hi, sure no problem. I’ll edit the post (“controller board history”) within the next couple days to include links to the files for each board rev. (Well, most of ’em anyway. Some revs I never produced or tested, and a couple were defective. But 4b will be in there for sure.) Good luck with your project!

    tetsujin | 2014-07-10 | Reply

  3. Thank you very much!

    Bluebox303 | 2014-08-13 | Reply

Post a Comment