Saturday, 11 October 2014

PCB etching fail

We've had mixed success making a few (relatively) large PCBs this weekend. Firstly, the laser cutter at BuildBrighton is completely up the spout - there's been a fire inside the enclosure and it barely etches. So we had to spend a bit more time preparing the files to be etching on our LS3020 laser cutter, at the studio.

Etching the paint resist off an 8" x 6" copper board takes about 20 minutes or more in our laser cutter. Although it's not quick, and preparing the files takes a little bit more time than the BB laser, it does have the advantage of guaranteed to be working each time we come to use it!

We wanted a total of six boards, so set about preparing and etching eight. So even if a couple go bad, there should still be plenty to make up the six required.

With some brand new ferric chloride, straight from Farnell, we decided to give "contact etching" a go. This is a process whereby the etchant is soaked into a sponge, and this is used to "wipe" the copper off the board.

We had success with this technique some time ago, but only on very small boards. It seemed that this board was probably too big, had too much exposed copper, or simply wasn't suitable for contact etching - after about 15 minutes of wiping the board with ferric chloride, the mask started to soften and rub off.

As soon as the mask started to come away we had to stop etching - there was no point continuing, and destroying parts where traces were supposed to lie!

The next board, we tried etching the "traditional" way, by submerging into some lightly heated ferric chloride. It didn't take long for the etch resist to soften again, and start to flake off, where the traces were at their thinnest on the board.

It's quite possible that the new batch of Halfords Matt Black car paint has been mixed using a different formula to the stuff we've been using over the last few months, and this is why it's not sticking as well to the copper boards.

It could also be that it doesn't stand up very well to being rubbed over too much, and that it goes soft when heated. Both of these reasons would explain it failing on the previous boards.

We decided to try again, this time with "cold" etchant - i.e. using the ferric chloride at room temperature. Although nervous of damaging the tracks, it was important to make sure the copper was clean and exposed, so that the ferric chloride could get at it. This means cleaning the boards by lightly wiping over them with some white spirit.

The top board shows a copper panel after cleaning with white spirit. On the panel on the bottom, you can see the paint residue makes the copper appear dull. It is this thin coat of paint residue that stops the ferric chloride from etching the board properly, so it needs removing completely.

Etching an 8" x 6" board in cold ferric chloride takes about 25-30 minutes.
Even then, as the board was almost complete (it etched outwards from the centre of the board) we ended up losing the etch resist in the far corners of the board, after about 30 minutes of etching

Undeterred, the board was cleaned up. It looked like it should be salvageable.

There were a few tracks in the corners that hadn't fully etched through. These had to be corrected using a craft knife, to carefully cut between the tracks and weed out the extra, unetched, copper.

The board was never going to win any prizes for aesthetics, but we managed to make it functional. It took a long time testing the board for shorts and broken traces, using a multimeter but we got there in the end. Since the board is simple a microcontroller connected to an array of hall sensors and a few other discrete components, the place to start was with the AVR atmega128-au chip right in the middle.

Having spent so long to finally get a working PCB, we were distraught - after soldering no less than 58 of the 64 pins on the mcu - to discover it had been mounted the wrong way around on the board! The PCB may be functionally correct - but it'd never work, because the bleeding microcontroller was rotated 180 degrees!

Four boards down (one of the earlier boards had dust settled in the paint as it was drying, leading to exposed copper dots all over it) it was starting to look like we'd never get even one working board. The suggestion that we get the boards made by a PCB fab-house was starting to look sensible (though still quite expensive) but we needed to make sure that at least one board worked fully, before committing the PCB design and sending off the gerber files.

Finally, we got a working PCB.
So far it consists of just the microcontroller in the middle of the board, a few 0R resistors as jumpers, and no hall effect sensors. They will be fitted over this weekend. But for now, at least we're able to test the (updated) firmware, and confirm that the device can, indeed, be programmed while mounted on the PCB.

These flying leads have been tacked on, to plug into the USBTiny programmer we use to dump code to the chip over AVRDudess. They've since been replaced by three-way 0.1" pitch pin-header sockets, so that the programming cable can be plugged in (and removed) easily.

Testing has so far been running the firmware on the chip to report back debugging values over serial, and using a blunt metal blade on a screwdriver to short the input pins on the lower side of the hall sensor pads to the central (ground) trace running through them.

Initial tests are looking very encouraging.
We'll know for sure once we've got all those hall sensors fitting, and it actually starts responding to playing pieces being moved over it. Once we've demonstrated that this design does work, we can send some gerbers off (and a whole load of cash) to a PCB prototyping/fabrication company and get them to do the tricky job of actually making the circuit boards!