Wednesday, August 6, 2014

Breaking out a QFP Attiny88 AVR


Several months ago I noticed the Attiny88.  It has several more I/O than the Atmega328, with an extra Port A  and PC7.  And unlike most of the other Attiny series, it has real SPI instead of USI, so libraries using SPI don't have to be re-written.  At just 86c for qty 1, it is the also the cheapest AVR with 8KB flash.  Since QFP-32 parts aren't easy to work with, I searched for breakout boards and found QFP32 to DIP32 boards that would allow me to use them in a small breadboard.

I had lots of experience soldering through-hole parts, but not surface-mount.  With the pin spacing of only 0.8mm, soldering individual pins with a standard soldering iron initially seemed like an impossibility.  After reading some guides and watching a couple youtube videos, I realized I should be able to solder the QFP-32 chips with my trusty old pencil-style soldering iron.

Besides the QFP Atiny, I figured I'd get some passive SMD parts as well.  I was surprised how cheap they are - 50c for 100 0.1uF ceramic capacitors and $3 for 1000 0805 resistors.  I got a little carried away and even ordered a full reel of 5000 15K 0603 resistors that were on special for $5.  Besides being more than I'll probably ever use, the 0603 size is almost too small for hand soldering.  Even the 0805 parts, at .08" or 2mm long are a bit tricky to handle.  The 0603 parts, at 1.6 by 08.mm, are the size of a bread crumb.

After all the parts arrived, I started by tinning the pads on the breakout board.  That turned out to be a mistake since the leads from the tiny88 would slide off the solder bumps when I tried to solder the first lead.  A dab of flux on the bottom of the chip helped keep it in place, but for the second chip I did I only tinned the pads in to opposite corners.  I tack soldered one lead in one corner, adjusted it until it was straight, and then soldered the other corner.

Once the chip is held in place with two leads (double and triple-check it while it is easy to adjust), the rest of the leads can be soldered.  On the first chip I tried I used too much solder, which caused bridging between some of the leads.  So have some solder wick on hand.  When I soldered the second board, I only tinned the tip of my iron, which was enough solder for about 4 leads, and avoided bridging.  After the soldering is done check continuity between the leads and the DIP holes with a multimeter.  Also check for shorts by testing the adjacent dip holes.

By my second chip I had no shorts or lack of continuity between leads and the breakout pads.  What I did have was weak shorts - between 20 and 200K Ohms of resistance between some pins.  More flux and re-soldering didn't help.  The problem turned out to be the flux.  For the second chip I couldn't find my new flux, so I used an old can of flux.  Flux can be slightly conductive, but on old DIP parts with 1.5 to 2mm between leads, it's rarely an issue.  The space between the pads on the breakout boards is only 0.2-0.3mm, and along their 3mm length the conductivity of the flux residue can add up.  I was able to clean up the residue with acetone and an old toothbrush, and in the future I'll make sure to use low-conductivity flux designed for fine-pitch surface-mount parts.

On the side opposite the chip, the board has a ground plane and pads running along the breakout pins.  The pad spacing is perfect for 0805 parts, so I was able to solder a 0.1uF cap between Vcc and the ground plane.  Again I encountered a weak short, even though I hadn't used any flux.  At first I wondered if my cheap soldering iron may be too hot and could have damaged the MLCC.  This time the problem turned out to be a black residue on the the capacitor.  Surface tension can cause small parts to pull up when they are soldered, so I had used a toothpick to press the capacitor to the board while I soldered the ends.  The heat from the soldering iron charred the toothpick, leaving a black semi-conductive residue.  Getting out the acetone and toothbrush again cleaned it up, and a note to get some anti-static tweezers the next time I order parts.

Among the SMD parts I ordered were some 0603 yellow LEDs.  These were even worse to work with than the resistors.  First, reading the polarity marks is difficult with the naked eye (or at least with my middle-aged eyes).  Second they're much more fragile than resistors and capacitors.  While trying to solder one of them, my iron slipped and melted off the plastic covering the LED die.  On my first board I failed at soldering one of the surface-mount LEDs and a resistor between PB5 and Gnd.  For the second board I used a through-hole red LED.  I clipped the negative lead to go into the ground plane hole at one end of the board. I bent and clipped the positive lead so it could line up with a resistor on PB5.  To avoid a short to the ground plane pad adjacent to the PB5 pin, I insulated it with some nail polish.  Here's the finished board:

You might notice that the pin numbers don't seem to match up - AVcc is pin 18 on the tiny88, not 26.  I intentionally rotated the chip 90 degrees so the SPI pins and AVcc were all on the same side.  This way it's easy to use my breadboard programming cable.

No comments:

Post a Comment