Wednesday, 30 April 2014

Small boards mean double-sided etching

Wherever possible, we try to stick to single-sided boards for our projects, particularly if we're planning on posting them on the blog, to share with other people. Making double-sided boards is, at best, a pain, and at worst, really really hard. So where possible, it makes sense to keep to single-sided, so anyone can download a pdf, print the design onto some press-n-peel, and make the board themselves.

But for this project, Steve specifically asked for a small PCB.
And, if the circuit works as we hope it should, we may just go crazy and get some PCBs manufactured (complete with solder mask) which means having a double-sided design shouldn't be such a problem.

With all this in mind, here's the latest layout for our serial-controlled wav-player boards:


The board size is just 28mm wide x 33mm high. It's been planned so that a micro SD card holder can be mounted on the reverse of the board, while a full-sized SD card can be mounted on the "front" (the side with the copper traces).


We've had experience of different SD card holders - and they come in different orientations: some have pin one/nine on the left, some on the right (so you mount the SD card "upside-down", with the pins facing upwards in some, and with the pins faces down in another).

To make the whole board as flexible as possible, we've allowed for:


  • Full-sized SD card holder can be mounted on either side, depending on orientation - either on the "face side" with the body of the card to the right, facing away from the rest of the circuit, or on the "reverse side" with the holder in either direction.
  • Micro SD card holder can be mounted on the reverse, to keep the overall footprint to an absolute minimum (the SD card would sit entirely within the outline of the PCB, on the back)
  • The audio output from the PIC can be directed through the onboard amplifier (a BS170/2N7000 fet) before going into the op-amp, or can be fed straight into the op-amp directly, by soldering a 0R 1206 resistor either on the left or on the right hand side of twin 1206 pads labelled "SW".
  • The entire board can be powered directly from a 3v source (2xAA batteries for example) or through the LDO voltage regulator, via a 5v-12v source
  • The audio signal "volume" can be adjusted via a trim-pot across the three pins marked R2
  • The gain of the op-amp can be set to a fixed value by changing the value of the capacitor C3

One thing to note is that the pin-out of the full-sized and micro SD card holders are not pin-for-pin. This has caught us out in the past, when trying to change a full-sized design into a micro- one!


Pins 8-4 are the same, but on the micro SD card, pin 3 on the micro card goes to pin2 on the full sized version, and pin2 (on the micro-) goes to pin1 (on the full-sized connector). It's worth also noting that the micro-sd card has only one ground pin (the full sized card has ground on pins 3 and 6).
Strangely - for something with such a small form-factor - pins 1 and 8 are not used in SPI mode for the micro-sd card, whereas on the full-sized card, seven out of nine pins are used.

Anyway, that's the board designed, for use with an LM386 op-amp.
We're going to have to dust off the laminator for etching these - it's easy enough to laser the mask for one side, but to get the two sides to line up properly, it's often easier to etch and drill one side, then toner transfer (using press-n-peel) the pcb layout for the back. This allows the holes to be lined up with much more accuracy than can be achieved with laser etching the mask.