Thursday, January 31, 2013

Soldermask Expansion on DFN Footprints

Recently I've spent some time redesigning the PCB I had made to test out the MCP9808 temperature sensor from Microchip.  I'm satisfied I can solder the small footprint DFN packages without too much hassle.  This then allows me to remove the large footprint components and arrange the board the way I want, so that it satisfies some mechanical constraints.  I basically want to water proof the board and provide strain relief for the cables.

In the process of redesigning the board, I tidied up the footprints and thought it would be a good opportunity to talk about solder mask expansion.  Solder mask on a PCB is there for a couple of reasons, it provides the underlying traces some protection from the environment, but what I'm mainly interested in is its ability to prevent bridges between pins during soldering.  In an ideal world you'd design the solder mask so that it only exposes parts of the board that you want to solder, but due to inaccuracies in manufacturing you need to make the holes in the solder mask slightly larger than needed to account for things like misalignment and shrinkage.  This means that even if there are alignment issues, the whole of the pad is still exposed.  The amount that the openings are increased is called the solder mask expansion.

Typically you'd want an expansion of 5 mil to be safe, but in certain instances you have to have a smaller amount.  For example the DFN component below has no expansion.  The red line indicates the space between pads, 0.2 mm, and the green line indicates the pad width 0.3 mm.  The black area is solder mask, and the light green areas are pads.

DFN footprint
DFN Footprint - No solder-mask expansion

In the image below, after a 5mil (blue line) solder mask expansion is applied, all of the solder mask between the pads disappears, which is a valid way of doing things called a gang solder mask, but it's not what I'm after.  I'm experimenting and trying to figure out the pros and cons of different methods.  The dull green area is bare board, the black area is solder mask, and the light green areas are pads.

DFN footprint
DFN Footprint - 5 mil solder-mask expansion

To make sure that there's solder mask between the pads, the expansion needs to be decreased.   When doing this, another requirement needs to be met, the minimum-solder mask web.  If the slivers of solder-mask between pads are too thin they'll lift off and cause problems during manufacturing.  A safe minimum value for this parameter would be 5 mil.  This means that the solder-mask expansion in the diagram below has to be smaller than about 1.4 mil (blue line) to allow the black section of soldermask in between the pads to be wider than 5 mil.

DFN footprint
DFN Footprint - 1.4 mil solder-mask expansion
Using a solder mask expansion of 1.4 mil is less than optimal.  Ideally an expansion of 5 mil would be better.  Ultimately it all depends on the capabilities of the board manufacturer.  If there is good alignment of the solder mask with the copper layer it doesn't really matter.  I'm considering doing two runs of the board, one with an expansion of 5 mil and one with an expansion of of 1.4 mil, the boards don't cost a lot, so it's a cheap way to learn and get some experience.

Sunday, January 20, 2013

Reflow Soldering a Breakout PCB for the MCP9808 Temperature Sensor

My last post showed my initial attempts at reflow soldering, and after a few more tests I was confident enough to move on and assemble the PCB for my MCP9808 temperature sensor board. I'll run through the process and show what tools I used and how things turned out.

The high density of recent designs and small size of recent surface mount components means that you'll need tools to handle parts, and with the smallest component on my board being an 0402 package (1mm x 0.6 mm), a good set of tweezers will come in handy.  I picked up a set off ebay for about 30 bucks.  Professional sets from places like element14 can cost $450 for a set of 7 tweezers, but unless you're doing highly specialised work, a cheap set of decent quality, stainless, anti-magnetic tweezers will do just fine.

Tweezers
Tweezer set
Tweezers
Tweezer set

My tool of choice is the pair of tweezers with a bent nose.  It allows you work from the side of the board but still grab parts from above.  By coming in from the side you don't obscure your view of the components.

Tweezers
Angled tweezers

How you dispense and apply solder paste to the circuit board is critical to the quality of the final product.  For instance, the pads on the smallest component on the PCB require a volume of solder paste equal to 1 hundredth of a cubic mm.  Getting that right by hand is almost impossible.  In a manufacturing environment the solder paste would be applied by a stencil such as the ones from Mastercut.  For my tests however, I purchased a syringe of solder paste from Jaycar electronics and started using the standard tip it came with to apply paste by hand.

The tip supplied with the syringe, a blue tapered 22 gauge tip, can be seen in the image below.  It has an outlet diameter of 0.4 mm.  For standard components it's fine, but I wanted to see if I could get better control by using smaller tips. To test this I ordered two different types of from Okay.  A red 25 gauge and a lavender 30 gauge tip, both being half inch long stainless steel.

Dispenser tips
Solder paste and dispenser tips

The internal diameter of the 25 and 30 gauge tips are 0.26 mm and 0.16 mm respectively.  Theoretically the solder paste should pass through the tips as the particles in the solder paste are significantly smaller.  The pressure required to do this however is quite high.  So high in fact, that I couldn't get anything to come out of the 30 gauge tip.  The 25 gauge tip did work, but you really have to press hard to get the paste out.  This isn't necessarily bad, it prevents you from dispensing too much paste.

Dispenser tip
25 Gauge dispenser tip with a small drop of solder

I carefully applied the solder paste to the required pads.  By squeezing out a little paste and then dabbing it on the pad, I was able to get a reasonable amount of control.  I had to steady my hand on something solid to get a good result though.

PCB with solder paste
PCB with solder paste applied

Using the tweezers to lift the parts, the components were carefully placed on the board in the correct orientation.  The board was then reflow soldered in an oven using the process described in my last post.  I was reasonably happy with the results.

Soldered PCB
PCB with parts mounted after reflow

The resistors and capacitors came out looking pretty good.  As long as you have close to the right amount of paste on the pad, surface tension will line up the components and the solder will travel up the side of the parts and pull the parts close to the board.  It's pretty forgiving.


Soldered joint
Resistors
Soldered joint
Capacitor

The diodes however are slightly different.  They are the smallest parts on the board and only have metal pads underneath the component.  This makes it hard to get a good result.  If you have slightly too much paste on the board (like I think I did) the part will float on it, and because the solder can't creep up the sides of the component, it won't get pulled tight to the board.  My three diodes have a good electrical connection with the board, and two of them aren't too bad.  One isn't that great though.  It's not going to fall off, the joint is strong, but you can see that the diode on the left in the image below has too much solder under it and has floated sideways slightly.  Not that it matters much to me, but I think the joint would be mechanically stronger if it were closer to the board.

Soldered joint
Diodes

Before starting, the biggest concern I had was how difficult it was going to be to solder the DFN chip to the board.  Turns out it wasn't too hard.  I think the key lies in making sure the solder paste goes in the right place to start with.  If you get that right and then carefully place the component on the board you can't go wrong.  From the image below I can see that the joints around the outside are good, I can't however inspect the large thermal pad underneath the chip, but electrically everything is fine, so I have no reason to believe It didn't work either.

Soldered joint
DFN package


The next step was to add 4 header pins to the PCB so it could be plugged into a breadboard.  To hold the board while soldering, the header pins were put into an old piece of vero-board.  This also helps to keep the pins aligned as the heat from soldering can sometimes cause the plastic that holds them to slightly melt.  An old resistor with the leads bent was used to support the board and keep it level.

Soldering a breakout board
With header pins in place

The breakout board was then plugged into a bread board with an ATTINY85 that has code on it to read and output the the temperature data from the MCP9808 to an oscilloscope.  Don't pay too much attention to the LEDs, they're only there for storage.

Prototype on a breadboard
Connected to an ATMEL AVR on a breadboard

After a quick test I could confirm the device was working as expected.  By manually toggling pins on the ATTINY I was able to initiate and read back a temperature sample.  This was done by pulling an enable pin low and then toggling the clock line.  Each transition of the clock line causes a bit of data to appear on the output until all 17 bits are displayed.  The scope display below shows the input to the clock signal at the bottom, while the temperature data that appears on the output is at the top.  The value of the output signal for each transition is as follows.

10000100000111101

The first 2 and last 2 bits are start and stop bits to indicate the device is operating and can be discarded once they've been confirmed to be 10 and 01.  The binary data in green is the temperature data multiplied by 16. Converting the binary to decimal gives 527, dividing that by 16 gives a temperature reading of 32.9375 degrees Celsius.  That reading agreed with the current temperature.

oscilloscope screen
Output of temperature from the AVR

Overall, things went to plan.  The board worked and I was satisfied with the soldered joints.  That being said there's still room for improvement regarding accurate solder paste dispensing and component placement.  I'm investigating a way to place components that should give me higher accuracy and allow higher density designs.  I'd also like to get stencil made for the solder paste.  That could be expensive though, and for a tiny prototype may make using one impractical.  I'd still like to do it, just for the experience.

Wednesday, January 9, 2013

Surface Mount Toaster Reflow Trial and Error

I've been reading about using toaster ovens to reflow PCBs for years now, so I thought it was about time I gave it a go.  Consider this a bit of a feasibility study.  I've never done this before and wanted to get an idea of how hard it is, and what issues I need to account for.

The board I'm trying to assemble doesn't have many parts and all but one device could be soldered by hand.  With a few part changes I could avoid the reflow process all together, but parts keep getting smaller and eventually it's a skill that'll be critical to know.  Besides, when done properly, the resulting joints are also cleaner, and stronger.

Sometimes the most important thing you can do is just start.  So with that in mind, I started testing using my toaster oven and an old breakout board I had.  The oven has 4 ceramic elements, 2 at the top, 2 on the bottom, and I didn't want radiant heat from these to directly heat the board.  I figured that would be a bit too harsh and uneven, I wanted the hot air to do the job.  By putting a metal tray on the top and bottom shelves of the oven I could shield the board from the elements.  Ideally I would have liked a fan forced oven to distribute the heat quicker and more evenly, but for now this will have to do.

The next step was to get an oven thermometer and hang it from the rack and verify the temperatures on the dial.  I would set the oven to different temperatures, leave it to stabilise, and then read the thermometer.  Surprisingly the temperatures on the dial matched my readings reasonably well.  It's not the most accurate method, but it gave me a little more confidence in the equipment I'm using.

I've read quite a few articles on reflow profiles, how hot should things be, how fast should things be heated, and how long should you leave it at a temperature, and in the end decided to have a go at manually controlling the oven.  My first test was to try and solder an 0603 resistor to a board by applying some solder paste, putting the part on the board, placing it on the tray, and turning the oven on full from a cold start.  My plan was to observe the board, and as soon as I saw the solder liquefy, count 20 seconds turn off the heat and open the door gradually over the next minute and let the board cool naturally.

Toaster Oven Reflow Test Set-Up
Solder Reflow Test 1 - Unsupported board

Things didn't go too well.  I was slightly preoccupied and board was scorched.  The first indication that something went wrong was when I started to smell burnt FR4.  The board also made some cracking  noises.  I think it was starting to de-laminate.

Surface mount resistor on a PCB
Scorched Board

The mounting of the resistor wasn't great either.  The joint was irregular and a strange yellowish colour.  It looked like lightly tempered steel.  May have had something to do with the rate that the board was cooled, could have been flux, but I'm not sure.  The resistor also rotated as I had a lot of solder on the pads and it floated to this position.

Surface mount resistor on a PCB
Poor Join

I think part of the problem was that the board was in direct contact with the bottom tray, which I suspect was hotter than the air as it is directly above the elements.  To counteract this I placed the board on a fine wire mesh which I supported with some scraps of aluminium I hand on hand.  This isolates the board from the heat of the bottom plate and allows air to circulate all around the board.

Toaster Oven Reflow Test Set-Up
Solder Reflow Test 2 - Supported board

 This time I basically did the same thing with regard to temperature, only I paid a little more attention and didn't turn the oven up so high.  The results were pretty good.

Surface mount resistor on a PCB
Supported Board - Reflow Results

The joint wasn't spectacular and it still rotated, but the solder was the right colour and the board wasn't discoloured.  There was also a nice fillet on the ends of the resistor.

Surface mount resistor on a PCB
Reflow test 2

Surface mount resistor on a PCB
Reflow Test 2

By my third attempt I had a better idea of how much solder I needed.  I also had a go at recreating the JDEC reflow profile.  I put the board into the oven at room temperature then turned the oven on and set the thermostat to 150 degrees Celsius.  This is my preheat stage.  Once the thermostat cut out I let it sit for one minute.  This is the soak zone.  After that I ramped the thermostat up to 240 degrees Celsius and watched the solder paste.  As soon as it liquefied I timed 30 seconds and turned off the heat.  After another 30 seconds I cracked the door open for thirty seconds and then all the way.  The board was then allowed to cool naturally.

The results were pretty impressive.  It looked like joints I'd seen on professional boards.  Positioned well, nice wetting, nice fillet.

Surface mount resistor on a PCB
Reflow Test 3

Surface mount resistor on a PCB
Reflow Test 3

Surface mount resistor on a PCB
Reflow Test 3

It's a bit of a learning process.  I've got some finer tips coming for my solder paste dispenser that should give me better control over the paste placement.  I think I may still have a little bit too much.  It really goes a long way.  I'm probably also going to get a thermocouple to monitor the temperature of the board during the process.  At first it will be for manual control, but at a later point I might get an automated controller for tighter control of the temperatures.

It's not the greatest set-up, but I'm not doing BGA chips here.  They're relatively large components on boards for prototypes.  If the need arises later on I may improve things, but for now I'm pretty damned happy with it.