AVR Schematic Review

I’m planning on posting my layout, but first I have to verify my footprints. I’ve been told never to trust other people’s foot prints.

One thing though… On standard parts like 0805 resistors and caps? what is the best foot print to use for hand soldering? I’m seeing different sized pads in the Eagle libraries, but I’m unsure of which to use.

As for the diode question, I just sent them the question. I’ll let everyone know what they say.

Thanks. :slight_smile:

For hand soldering, the exact shape of the footprint isn’t too critical. You want to ensure that the pad extends out a little (say, 0.5mm) from the end of the device, so you get a nice fillet at each end and can see that the component is solidly attached. If the footprint exactly matches the component outline, it’s actually very difficult to get solder in underneath the component, and so the risk of faulty joints goes up.

Hi Again…

I’ve been busy creating a library of foot prints for all of my parts while I waited on my shipment of the switching regulator parts. Well, the parts came in and I’ve tested the 3.3V switching regulator on a breadboard. That didn’t go so well. I was able to get it to work with little to no load only. With no load, the output was a nice 3.3V, but if I added a 40mA LED, the voltage dropped just a bit. If I put a 330mA load the regulator output drops to nothing. Could this be because I’m testing on a breadboard? I just search about this online and it seems that it would cause problems for me, but I wasn’t sure it the load could effect that or not. Is it possible that I did everything correctly and it works for a small load, but doesn’t work for a larger load due to breadboard issues? Also, I was checking the Vin and Vout on a scope and there was what seemed to be a lot of noise… almost 2V peak-peak.

What do you guys think? What did I do wrong?

I was thinking that maybe I should design a small 1 inch square PCB with my switching regulator for breadboard use so I can test my project out and verify it works.

I really appreciate all of the help you guys are giving me! I’m determined to get this working. :slight_smile:

2V may not be noise, it’s possible that the regulator is unstable. What does it look like? Are the voltages reasonably flat but with sharp spikes at the switching frequency, or are the voltages varying in something more similar to a sine wave?

What input and output reservoir capacitors do you have, and where are they located?

Breadboards are, IMHO, hateful, horrible things that can very easily cause way more problems than they ever solve. Every connection ends up resistive, and every net ends up with excess capacitance. While that’s OK for a circuit operating with low currents and at dc, it’s death to a switching supply.

Can you post a photo of your circuit so we can see how it’s constructed and laid out?

The voltages where sharp spikes when I was looking at it. My capacitors are all ceramic caps. I tried a 10uF tantilum at the input at one point, but it made no difference, so I switched it back to the ceramic.

Here’s the picture of what I have on the breadboard. I removed everything else on the red and blue power rails during testing.

http://img16.imageshack.us/img16/2610/2 … 120322.jpg

I tried to get it tight, but maybe it’s not good enough.

I’m afraid your experience here is exactly why I dislike breadboards. You’ve not done anything ‘wrong’ as such, but there’s an awful lot of wire between one component and the next, which results in a lot of stray inductance. That inductance, in series with your capacitors, prevents them from working at high frequencies - and that’s why the noise is so bad. It’s also why changing between types makes no difference.

There’s no cure other than to rebuild the circuit using a better method. I hate copper stripboard a bit less than I hate breadboards, and you’ll probably find that a carefully laid out circuit on stripboard works a lot better. Keep all the wires and component leads as short as possible, especially capacitor leads, and remember that the length of the copper strip itself must be included too.

There’s am important probing technique to be aware of too. When probing high speed signals with a scope, it’s really important to keep the scope ground lead as short as possible. With some types of probe it’s possible to disconnect the ground lead and instead connect a short piece of wire or ground spike to the body of the probe; this spike should be connected to a ground point as physically close to the signal you’re probing as possible. Regular clip-on ground leads are very convenient, but for looking at high speed signals like the noise spikes on a switching power supply, they’re useless.

Since I’m having trouble on the breadboard, made a PCB just for testing. See here: http://img823.imageshack.us/img823/4976/mcp16301dev.png

http://img823.imageshack.us/img823/4976/mcp16301dev.png

I guess this dev board will be my first ever PCB!

I used the switching regulator’s datasheet and Microchip’s own dev board manual to create this. The datasheet has a basic layout that I found out was copied from their own dev board. The diagram in the datasheet didn’t make as much sense until I looked at the dev board’s manual.

Here are some links…

Datasheet (Page 21): ww1.microchip.com/downloads/en/DeviceDo … df#page=21

Dev Board Manual (Page 15-16): http://ww1.microchip.com/downloads/en/D … df#page=15

Picture of the Dev Board: http://www.microchip.com/stellent/idcpl … e=en554050

The only things that I wasn’t sure about were those vias placed about and if I really needed all of that ground plane on the lower half of the top layer. I think those are only needed for the connectors on Microchip’s dev board. Please correct me if I’m wrong.

Also, I’m really unsure about how the thermals on my pads will affect the circuit. I put them in because I was afraid that I would not be able to solder the parts on to the board if I didn’t have thermals. Please let me know what you think of this. :think:

So… How did I do on my first PCB? :mrgreen:

(I can upload the Eagle or Gerber files if anyone wants to take a look.)

Ok just my opinion:

Rotate R1 and R2 and stack them(not literally,R1 above and R2 below it), and get them closer to the controller.

Why does the ground plane stop? I don’t see a reason. The fab house would be happier when they etch your board.

Are there specific components C3 and C4 are supposed to be close too? Go back into your documentation and see where these caps are supposed to be placed close too and place them there.

Vias: Good idea.

Could you find a smaller version of D2? Or is that necessary to be to spec? If that specific size is not required, go ahead and get a smaller one. Even if it is only a few cents more. Of course, then again if you have to pay 10 cents more for a smaller product, go with the bigger.

How did you route the polygons on the top layer?

As for all the pads with the + type connection, fill in the empty spots. No reason to route those out.

Do you know what the smash button is?

If so, use it on all those colliding values.

Date and version your board

[Read this,if you already haven’t

How much current load do you expect to use?

Note: I didn’t bother looking at the datasheet. Too much time. I am familiar with Microchip, as I constantly use their PICs, vregs, and occasionally their switching regulators

Mind if I have a copy of the board and schematic to mess around with? I enjoy PCB design](History Museum - SparkFun Electronics)

I put R1 & R2 away from the controller because the datasheet indicated that I should do that. I think it’s something to do with noise. Same for the ground plane. I’m not sure why they did half of this stuff. If you take a look at the PDF’s on the pages I’ve listed, you’ll see a picture (no reading required :D) of their recommended design. I was going to put the ground plane all the way up, but I also wanted to follow what Microchip did. I basically copied their dev board and put the components all in the same locations.

What’s the reason for all of the vias? I guess I did good on that one! :dance:

For the top layer, I just started drawing polygons where I had a big planes and then for some of the other parts I used thick traces (24 mil).

The “+ type” connection you’re referring to is what I called thermals. They help when soldering the parts. I’m afraid that the planes will take too much heat away. Is this really a problem? I can take them out if not.

I just left the smaller text because it wasn’t silk screen text anyway. I didn’t want to mess with it for now. I’ll have to add a date though.

For load current, I expect it to be about 300mA, but the board should be able to handle 600mA.

I wouldn’t mind uploading this project somewhere. Where do you guys usually upload non-picture files?

Thanks!

Oh ok.

Well my understanding is that it will keep both of the polygons closer to true ground (or whatever the voltage is). Not significant, but for larger designs, you can have the voltage change a little bit if you have enough resistance through the copper.

Ah ok. Just FYI if you didn’t already know, there is a polygon tool that can help create the polygons. If you knew that, great!

Then current should be no issue. I usually use an online trace calculator to calculate the widths if there is a large amount of current.

Duh. :doh:

Again, current should be fine.

I’m not sure. I usually don’t upload files.

I’ve found a site to upload files. You can see my Eagle files here: http://www20.zippyshare.com/v/33600531/file.html (MCP16301-3.3V-DevBoard.zip)

Let me know if the files are readable. I wasn’t sure if I need to include the libraries I used.

Thermals are fine, they’re a good idea. You’ll struggle to solder the larger components to the board without them.

Pin 2 of the IC should be grounded, shouldn’t it?

Placing the resistors off the edge of the ground plane might help prevent them from picking up noise from it by capacitive coupling, though it’s not something I’ve ever seen done in this type of application. I doubt it’ll make the slightest difference either way.

You could improve the layout slightly by moving the input capacitor C1 to the left, and moving the IC down into the space. This would have the effect of shortening the high current ac path which runs from input, through the IC, through the inductor, through the output caps C3 and C4, and back through C1 to the input. Keeping high current paths short is always good.

Either way, do take a moment to compare and contrast the total length of copper in between the components in the PCB with what you have in the breadboard. You should expect a dramatic improvement in performance.

Suggest including a GND test pad or two, so you’ll have somewhere to attach the scope probe’s ground. The probing technique I described above is really important if you want to get an accurate measure of the amount of noise that’s really there; if you use a long clip-on ground lead, the noise will look much worse than it really is. An easy way to tell whether you’re getting an accurate measurement or not is to probe the actual point where the scope’s ground connection is made; you should ideally see a completely flat trace. If you still see noise, your probe isn’t giving accurate results. I could waffle on about why for hours, but shortening the probe ground lead often works wonders.

Nevermind…

I’ve updated the PCB: http://img35.imageshack.us/img35/345/mcp16301dev2.png

http://img35.imageshack.us/img35/345/mcp16301dev2.png

Pin 2 is grounded though the via under the IC. I did add a ground via near the SW test point just for scoping. That was a good catch!

As for moving C1, I think that I’ll leave it as is. I think it will end up being roughly the same since C1’s ground pin will now be farther away from those of C3 & C4. Compared to may failed breadboard experiment though, the path is much shorter now. :smiley:

Hope it works. :pray:

Joeisi:
Well I made this up. Not sure if it is any good. I would suggest going through and touching it up.

I opened your file and it looks the same as the one I uploaded. Maybe I’m missing something, but what did you change?

Also, I feel so stupid… The “Upload Attachment” tab was right there all a long. :oops: I searched for it a while ago, but I didn’t see it. :doh:

Yeah… It never saved… :oops:

Oh well. I got it to maybe an inch square or something like that.

That’s ok. Mine is only 1.1 x 1.1 inches. Not too bad. I think I’ll submit this to have it made, unless anyone else sees any mistakes.

Mine was way smaller then. You can cut down a lot on space. I guess it is all a matter on how small you want to make stuff. The bottom left, and bottom right could be used up. If you wanted to, you could put in standoff holes.

I’m ok with the size. I picture this being used in breadboard development. I was going to just put a 3 pin header on it so I can stick it on my breadboard so I can continue testing out my initial project. I just ordered the board… I have to say, it was pretty cheap at less than $10 for three of them.

I’ll let you guys know how it works out when I receive it. I sure hope it works! :smiley:

Hi Everyone!

I just wanted to update this thread to say that I got my PCB for the switching regulator and I’ve assembled and tested it. It works great! My first PCB came out perfectly. :dance: The waveform on the switch node even looks like the one in the data sheet. Now, I’ll have to finish routing my original project. I’ll post that for you all to look over when I’m done.

I’ve added a EEPROM that contains a built in MAC address, as I figured that this would be a good idea. It’s U6 in the schematic that I’ve attached to this thread.

I’ve also attached some pics of my PCB. :smiley:

Here’s a link to the PCB pics: http://img803.imageshack.us/img803/6857 … 205218.jpg The image was to big to upload here.

Updated Schematic: http://img7.imageshack.us/img7/1845/ser … ateway.png

EDIT: I have a new question… Should there be two rectifier diodes before each of the regulator VIN’s or is one where I have it fine?