Saturday, October 22, 2011

Yet Another PIC32 Proto Board

Over the past few months I've been doing some developments and research based on Microchip's PIC32MX 32-bits Microcontroller product line. Time to time I have the need to do some hardware and firmware verification before I commit a final design on a pcb, I'm a prototype maniac.

Searching on eBay for TQFP-100 adapters I found this one from some folks in Thailand that is not just a plain adapter. It is tailored for dsPIC, PIC24 and PIC32 parts.

What is special about this one is that it is not just an adapter, as you will see on the other pictures below, on the bottom it includes the pads for several of the support components (decoupling capacitors, VCORE caps, etc.) and a header for the ICSP (In Circuit Serial Programming) interface to get a PIC32 up and running very easily.

You can get this adapter for less than U$S 2, and taking advantage of Microchip's excellent sample program you can get free samples of several of the PIC32MX family parts. I went ahead and dropped a PIC32MX795F512L-80I/PF on it.

Some folks may feel intimidated about soldering a 0.5mm pitch100-pin surface mount chip, don't be so, as you give it a try you will find that sometimes prototyping with surface mounted components is easier, quicker, cleaner and more reliable than with the old through-hole parts. 

So how do you solder this beast ? I'll show you.

First of all, you need the right tools, patience, a good solder iron with a thin tip (I have a Weller WESD51 station with the PES51 iron and a long canonical 1/64 tip (ETS), a good set of tweezers, a pair of magnified glasses or a microscope, and more patience.

First of all make sure the board is clean, use denatured or isopropyl alcohol to remove any grease, dust, etc. Put just a tiny bit of solder in one of the corner pads, I normally do it with the lower left corner. Position the PIC32 with the right orientation, double and triple check that you put it with pin 1 where it is supposed to be, don't get confused with the orientation of the PIC32 legend on the chip, you will see it rotated clockwise 90 degrees, that's the right orientation !!

Using the tweezers or your fingers to hold the part in place making all the pins aligned with the pads, melt the solder on the corner pin so the pin gets soldered to the pad. Then add a little bit of solder on the opposite side and corner (upper left in my case, as shown on the picture). That will put the PIC32 in almost a fixed position so with your magnifying glass and/or microscope you can double check that all the pins align correctly with the pads before we move to the next step.

Then we are going to use a technique that consists on flooding all the pins with solder, that we will later clean up using a desoldering braid or wick. Do one side of the PIC32 at a time making a pause before moving to the next side so you don't overheat the PIC32.

The desoldering braid I use is a Pro Wick 1815-10F from my Texan friends of Techspray available from Mouser.


When you are done let it cool down before you start to clean each side with the desoldering braid, put the braid in parallel to the PIC32 side with enough braid to cover all the pins on that side, when you are ready put the iron on the braid (not the pins) as the braid heats up it will start sucking up all the excess solder from the pins, when you see that most of the solder has been removed remove the braid, don't let it cool down and attached to the pads or traces on the pcb. You need to be careful about not to damage the traces coming out of the pads or trying to remove the braid if some solder got it attached to the pads or traces, reheat the braid to make sure it is free of any hard connection.

Another great product I use from Techspray is a general purpose defluxer to remove all the flux left on the board by the solder. It is also available at Mouser and the product number is 1631-16S.

Once you are done removing the solder and cleaning the area you will find that you just soldered a 100-pin PIC32 microcontroller and it looks very neat !!


Now it is time to take care of the support components in the bottom of the adapter, in case you wonder about the values and what each one is for I put together a quick schematic showing how pins on this adapter are connected. Take in account that this is not a "generic" TQFP adapter, given that the Vss and Vdd pins are connected according to the dsPIC33/PIC24/PIC32 pin outs, but be aware that the Analog Vdd (AVDD) pin and VBUS pin are not connected to Vdd. After adding the bottom components and headers I added a small piece of wire connecting AVDD to VDD, without that connection your PIC32 will not startup or be recognized by your ICD or REAL-ICE.

To solder the SMD parts I normally put a little bit a solder in one of the pads for each part, then with the tweezers position the part with one hand while with the iron heating the pad with the solder. TIme ago I put together a tutorial with some pictures showing how to deal with these parts. 
You may have noticed that on the schematic I have one LED connected to RG15, looking from the bottom on the upper right you can see one of the leads of the LED soldered to the GND/Vss plane and the other which I later connected via a 330Ω limiting resistor to RG15 (Pin 1).

While I included as optional the crystal and load capacitors for it as an external source for the PIC32 main clock oscillator, I was planning just to use the internal clock. These are the particular configuration bits (for the MPLAB C32 Compiler) I used for this project:


#pragma config FPLLODIV = DIV_1, FPLLMUL = MUL_20, FPLLIDIV = DIV_2
#pragma config FWDTEN = OFF, FCKSM = CSECME, FPBDIV = DIV_1
#pragma config OSCIOFNC = ON, POSCMOD = OFF, FSOSCEN = OFF, FNOSC = FRCPLL
#pragma config CP = OFF, BWP = OFF, PWP = OFF

After finishing with the components on the bottom, adding the wire for AVDD and the status LED, I added the headers for each side and for the ICSP interface. Created a simple program to initialize the PIC32 and get the LED on RG15 blinking, applied power and voila the thing became alive !!


I've several other development boards and gadgets for development with the PIC32MX family, but I really like this simple one that has nothing besides the minimal support components and one LED connected to its pins.

Hope you find this article useful for your PIC32 projects, don't be afraid of soldering a TQFP-100, the worst that can happen is you get a wasted free sample and few bucks on parts.

Happy Prototyping !!

Cheers
Jorge



20 comments:

ElectronicsNews said...

Glad to have this from you, every post is very helpful for me in my job.......

Cees Meijer said...

Very neat. I've tried this technique once, but I could not get it right.. There were always two or three shorts due to invisible specs of solder. I now use solder paste. Just put a small line of paste over the all pads, stick on the chip and heat it. Preferably using a hot-air soldering unit, but you could also try with a a standard heat-gun.

Anonymous said...

Hi do you have a parts list that I could use as a reference? I am a newb and need a helping hand.

onjoFilms said...

Hello Jorge. Does the AVDD and VDD not require a 10 ohm resistor between them. I saw in the datasheet that they recommend one. What's your thoughts on that?

Jorge Amodio said...

onjo,
it is not a requirement but as you said a good recommendation and best/common practice to add a low pass filter (not just the resistor) for the AVdd pin. Some folks also add a choke to further filter noise.
All the PIC32 starter kits and other Microchip boards like the PIC32 Audio Development Board connects it directly to Vdd.
If you are not going to use the ADC you can just connect AVdd directly to Vdd, the important thing is that it must be connected, even if you don't use the ADC.
Another important recommendation, with or without the limiting resistor is to place the decoupling .1uF cap as close as possible to the AVdd pin and connect AVss to the common ground or plane, not just to another Vss pin on the PIC32 that may be part of a high frequency current loop, and if possible add some small bulk cap 1uF-10uF close to the AVdd pin to make it more stable when you use AVdd as the high voltage reference.
As always Murphy's laws apply and your mileage may vary.
Cheers
Jorge

Anonymous said...

hallo. firts of all, congratulations for the great tutorial. so, do you know the size of the smd components? I'm buying them from china and the guy asked me if they are o805 or 0603 size. Can you help me with if that?

Jorge Amodio said...

Hi There,
I didn't have any problems to fit 0805 parts.
Cheers
Jorge

Gustavo said...

me again. in the pictures, C2 and C8 are bigger than the other components. are they 0804 and the rest of the components 0603? sorry to bother you with those lame questions.

thanks again

Jorge Amodio said...

Hi Gustavo,
no problem at all. C2 and C8 are both tantalum capacitors, I used 47µF x 6.3V for C2 and 10µF x 12V for C8, both sizes 3528, you can use other voltages (always >5V) and sizes that fit the pad, I just have those in my components inventory.
Regards
Jorge

EA8DGL said...

built one today with success!!! thank you very much!

http://twitpic.com/7oglu0

Anonymous said...

In your schematic, it says C9 is to 10uF, but in your comment, it says C8 is 10uF. Which is correct?

Jorge Amodio said...

Thanks for noticing the numbering mistake on the schematic. C8 is the 10uF yellow tantalum capacitor shown on the bottom of the board.
C9 is a .1uF decoupling ceramic capacitor in parallel with C8.
I corrected the schematics to avoid further confusion.
Cheers

Anonymous said...

Thank you so much for this information and fixing the error so quickly!

Anonymous said...

One more thing, your pictures show a 4.7k Resistor as R2, and the schematic shows 10k. Is it safe to say 4.7k should be used?

Jorge Amodio said...

R2 is the pull-up for the MCLR or Reset line, I normally use 10K for it but since the silk screen had the 4K7 legend I used 4K7 which is also an acceptable value.
Going lower than 4K7 will be a too strong pull and create issues with some programmers/debuggers like RealICE.

Anonymous said...

Thank you so much for the above advice. After getting all the parts shipped, I have successfully run the board. I found it was easier to line the pads with solder before putting the chip on. Then I lined the chip up and fluxed all the pins. A simple touch of the iron on each pin created a clean connection.

DVM - Delphi Virtual Machine said...

Hi Jorge.
Like this post has the schematic design of this PCB, you have the Eagle files for manufacturing?
Thank you.

Euclides Franco de Rezende.
Brazil.

Unknown said...

Is it also required to connect AVss to ground? It's also not connected in the board.

Do you power the PIC with the Pickit3 or using an external power source?
I get the same Vdd not connected message on Mplab, even if I enable Pickit3 power to the target...

Thanks for the tutorial.

Anonymous said...

good post

Anonymous said...

hi,

after long waiting for components to put mine together finally i am starting this. But before i try, i wanted to confirm that this also works for PIC32MX470? Also I want to attach oscillator of 20MHz, do you have any recommendation, picture?

thanks