This is my first PCB design based on the ATmega328P. All components are through the hole, took me some time to make the board without any vias. The board has an LM2576 3A 5V switching regulator. The L1 inductor is a lot bigger then the outline on the PCB that's why there is so much space around it. I'm new to Eagle so I haven't bothered making a symbol for it. I already have most parts including the LM2576 regulator and 3A 100µH inductor. I have one issue though, the regulators that I bought don't have the pins staggered, they are all 5 straight. When I put the regulator on the PCB in Eagle using a TO220-5 symbol with straight pins I couldn't get it to pass a DRC check. Even after changing the TO220-5 symbol to the smallest pads. It always complains that there is not enough space between the pads. So I just used the staggered symbol and I thought of just bending the pins on my regulators Does my design look ok? Or won't this work? I'm a bit worried about the regulator, that's why I've put so many caps on the board. I have a decent stock of caps so I might as well use them...
Datasheet of the regulator can be found here: National Semiconductor DS011476 datasheet pdf
The board will be used for a couple of small robots using a bunch of small SG90 servos. With this design I can just connect the servos directly on the board. The regulator is powerful enough to power the servos. Power supply will come from a 2 cell Lipo battery.
I've not used Eagle, but have a couple of comments:
you have rather unusual angles on your traces, most pcbs have the traces at
0 and 90 degrees, with 45 degree angles to round the corners.
going to extremes to eliminate "all" vias probably isn't worth the effort.
you appear to have a narrow area with the trace that goes between pins 1
and 3 on the LM2576. I think it will work better if you stagger pins 2 and 4
forwards instead of 1,3,5.
You only show one side of the board, I assume that it is a double sided board and the only criticism I might make (you did well for a first time layout/routing task) is that the ground plane from the IC ground(s) and crystal ground doesn't seem well connected to the rest of the ground plane, If it is a two sided board then my critique means nothing as the other side fixes the issue. If you are intending to drive servo's directly from that board there are several possible issues that I see. One is thay in my opinion there should be a 100nF capacitor across the 5V buss probable one on either side of the I/O connectors and that C10 might be 100 uF and C11 might well be 1000 uF. Servo's are noisy things that Need large current pulses. I have a question here , are you intending to drive more than 2 or 3 servo's at a time? is so then here is a further error and that is that the inductor chosen might well not be big enough. The inductor MUST be capable of carrying all the output (load) current without saturating and also it should be moved to the junction of the catch diode (1N5822) and the 5V buss line that goes to the + servo common connection. Switching noise is exaggerated by long traces (wires) a more direct connection from the diode to the main 5V buss would present less switching noise to be filtered and that the first filter C4 on the 5V buss should be a low ESR type capacitor. The suggestions I made were based on mistakes I made when first using switching regulators... It is a very good idea to read the manufacturers recommendations about good switcher PCB layout. My supplies took 24 Vac and produced 3 - 5A for uhf transmitters that required clean +12Vdc supplies any PSU noise got 'FM'ed... and was present on the radio carrier (RF output) I used and liked the Analog devices LT1170 Boost mode and LM2576 Buck mode devices. I was able (once I got my PCB layout corrected) get 13.8V @ 3.5 A from an LT1170 and 2 2V Gates cells (2.2V lead acid batteries capable of 4 AH). IMO
Not in my experience 2200 uF is common on high current switchers like that although the first one should be a low ESR type as the switcher runs @ 52 Khz and can be hard to filter well enough for analog devices, They worked well, remember the inrush current is only for a few milliseconds. At least in practice on the 100 units I made. 30 35 Vin and 13.8 Vout @ 3 A for a 5 watt 470 Mhz transceiver. The device I designed was a center pivot controller. A 1/4 mile long pipe that rotated about a 'center' had wheels (Called trucks) that supported the pipe above the crop being irrigated and allowed it to rotate. My thoughts are that because of the nature of a servo and it's operation large caps will make life easier on the board overall. Regardless of his minor gafffe's on not using 45's and 90's for routing the board he did very well, he paid good attention to wire (Trace) sizes for the supply bus'es. I did a lot of that type of design in 2000 - 2005 and his layout should work well once he gets the inductor right. If he reads the data sheet section on choice of inductors he should be ok completely. IMO
Thanks for all the comments. The board is single sided, I'm planning to have it made at Seedstudio or Iteadstudio. I'm going to reposition the regulator and retrace connections. I just had another look at the datasheet and can see my mistake. I bought 10 inductors on Ebay rated at 5A 100µH so they should be strong enough. I'm aware that servos are noisy things that's the reason for the big caps, the regulator needs a 1000µF cap on the output according to the datasheet. I'll add a diode across R1. Designing this board has been a big learning experience. I've spent hours reading datasheets and watching Eagle tutorials on Youtube
Yes I concur as well the diode is required and the ground on the processor seems flimsy as it appears to be the trace between pins 13 and 14 of the Processor. A double sided board doesn't cost that much more to make and is a lot easier to filter, further if you use a double sided board the layout around the '2576 should have a 'bunch' of via's to make the board easier to work with. Double sided boards make 'ground' loops much harder to make and easier to filter... and use lots of via's they are cheap...
If you Must use a single sided board then re-arrange the LM2576 pins as suggested as it will help to keep the switcher grounds lower in impedance. Thus quieter... @52Khz
In my experience and opinion...
Going to a dual layer board might be a good idea. Just need to find out how to make vias in Eagle.
What kind of caps are low ESR and are available in 1000µF? I thought that only electrolytic caps are available in that size? I know these are high ESR and not the best suited for this application. I hope to power 12 small servos from the board for a quadpod (4 leg / 3 dof) or hexapod (6 leg / 2 dof).
This video shows 48 servos (I have the same servos) driven by a 3A 5V regulator, it's an LM2676 on an Mega1280 based board. I have the same board that I use in another robot. I thought why not make my own...
The vias are easy. Look for the via symbol (little green blob), put one in place, right-click it and Name it GND. Then use the Copy command and insert as needed.
You only need to search for Low ESR capacitors. These parts are recommended by most switcher designers and MFR's to use 2 or 3 330 uF in parallel and as close to the switch as possible. Make sure that you place a lot of Via's near and as much as possible near the input (Low ESR caps) filters. I designed a really busy board ONCE that had one ground on the uController and this device was intended to "Dump" a 4700 mF cap @ 17 Volts into a 4 ohm solenoid. The board did everything except work after the first attempt. The problem was ground bounce... a condition where grounds on the PCB change level compared to the battery ground... This one was resetting the processor... a 2 inch piece of 30 ga wire wrap wire fixed the problem by tying the proc ground to a real ground.
I've changed my design to a 2 layer PCB, was very easy in Eagle. Moved most of the traces to the top layer (red), so now the bottom (blue) is mostly ground. Made room for lots of caps, I'll do some testing with the board to see if it's necessary to put them all on. I have lots of electrolytic caps from decent brands, I'll will use the highest rated voltage ones that I have (35-50V) Those should be good enough. I only need to order the small 100µH inductor that's connected to the ATmega328P, all other parts I have. I'll have the board made by Seeedstudio (24.9$ + 8.1$ shipping for 10pcs).
The layout looks much more "professional" now, will look even better when
you orthogonalize the rest of the traces. The 45-deg bends on the signal
traces look good - 90-deg bends lead to noise generation.
You should beef up the traces going to cpu pins 7 and 20 to 50-mils. 7 is the
main Vdd power pin, and these [and gnd] should always be heavy traces. Also,
it's best to have a bypass cap [0.1 uF] between Vdd and gnd right at the cpu
chip, as close as possible to the Vdd pin.
The trace to pin 20 [Aref] should also be heavy. You have an LC filter on the
pin [which most boards do not even have - but is probably a good idea since
the switching supply is so close], but the thin trace going from L2 to pin 20
will partially defeat the purpose of the LC filter. Also, like the bypass cap on
Vdd, the LC filter would be better located as close to pin 20 as possible.
One other thing. I don't know how accurate the Eagle graphics display is, but the
clearances seem to be extremely small on the traces going between the standard
pads. Possibly the pads O.D. need to be made smaller. Also, the trace going from
pin 17 past gnd on ICSP header looks especially bad. So you might check those
clearances.
I would add ground layer to both sides. Can only help with noise reduction.
The boards start with copper on both sides, might as well leave it there & use for grounds.
I think lad that you have done a fine job, the criticism I heard was more IMO nit picking than constructive, after all it is your first go... Please don't misunderstand me the critique was valid but not for a beginner... like that 'small trace' to the ICSP pin... it powerfully easy to overlook things like that. Sometimes even a DRC will miss that. The board as is needs two minor things and it would be in my experience production ready, I see no debilitating errors and a fine job... BUT I think that you need to do a copper pour on the top side. It comprises the top half of a shield that will make shielding possible without it every power supply lead becomes a radiator, very hard to filter so lots of via's around the switcher. And Second before you produce that board, test that inductor at rated power... An Inductor in a switcher 'stores' energy in the magnetic field in the inductor core. For example if the core was of a material characterized at Vhf or Uhf frequencies it would behave very differently at 52 Khz. A wrong part there will cause poor regulation, inadequate current output and poor efficiency which shows up as heat. You know that the Arduino works, you used a reference design 'proofed' by Many users... I never in my life made a circuit board where first I hadn't thoroughly tested each sub circuit first. at least not one that worked right without patches or cutzNjumperz, once I think but I am sure I just got lucky. IMO
... shield that will make shielding possible without it every power supply lead becomes a radiator, very hard to filter so lots of via's around the switcher.
Along these lines, I wonder whether it's actually a bad idea to use an LC filter on
Aref, especially being so close to the switcher inductor, as you might have some
mutual coupling and pickup by the LC filter inductor.
As long as the two inductors, the Switch Coil and the Filter coil are placed as far apart as the board will allow and that they are mounted at right angles to each other (H field or mag field) coupling will only really exist in ground loops in the board. The E field or electrical field is the thing that is an issue here and that is what the ground plane fixes, it acts like a shield for the electrostatic field or more simply "any time a "wire" carries an electrical current two things happen, the first and obvious one is that it has a different electrical potential and will radiate an electrical field ("E" Field) that is proportional to it's impedance and the amount of current flowing (Physics 101) Because there is an electrical current flowing, the "wire" will create a Magnetic field ("H" Field) that is directly proportional again to impedance and current flow thorough the "Wire" (Again Physics 101). Adding a Ground Plane serves two things 1. it provides a LOW impedance (Hopefully) Ground path that will cause the current density in any area to be as low as possible under the circumstances and 2. will act as an electrostatic or Faraday shield for electrical fields. E fields can be 1. Shielded and 2. when shielded allow for 'Filtering" signals that are fed into and out of the shielded area. In this case it is the Ground Plane (Shield) and the Choke (Aref filter). The Magnetic or "H" plane (90 deg diff to E field) is Very difficult to shield. The best most designers can hope for is simply to minimize H field coupling by orienting coils in such a manner as to minimize coupling to each other without resorting to "enclosing" the devices on a manner that reduces the Mag field by "Shorting or providing a very low impedance barrier to the H field for really sensitive measurement. There are various types of Mag shielding (Mu Metal is one). Thus the statement about "At Right Angles" as that is the point of minimum "Co-Incident" coupling. There is a lot that goes into designing a working PCB and many things to consider when a good designer creates the circuitry required for a given task. One major consideration must be "How will this function when laid out as a PCB" Some things simply cannot be done co-incidentally... A high current switcher and a low impedance high gain amplifier are Very difficult to implement on a single board because the amplifier has to "live" in the fields radiated by the "Wires" in the power supply, both supply and return (Ground Plane). This is one of the reasons for the A ground found on so many types of A/D converters and a Separate Analog Ground Plane. In the Arduino, the processor has provisions for an Analog Vcc and an Analog Ground (pins 20 and 22 of the "328 chip) this is done for the above reasons. This subject is poorly covered here as it is both beyond the scope of this forum and Far too complex to be adequately covered in a hundred words or more... as I have a tendency to do... IMO
The Magnetic or "H" plane (90 deg diff to E field) is Very difficult to shield.
This is what I was talking about. On the board the 2 inductors are almost touching
each other, assuming the switcher inductor is as large as the OP said. So there
will likely be a fair amount of mutual coupling to the LC filter inductor, not matter
how either one is oriented.
I covered that both ways, I mentioned coupling and the need for orientation. When coils are at right angles to each other most of the coupling (Right angles can mean as much as 30 DB or 1/1000th reduction in the H field or magnetic field) is electrostatic in nature and a simple shield made from a piece of PCB material will suffice to place the noise down far enough as to Not be an effect to worry about, as it will when soldered to the main PCB be an effective shield, I do know as it was a technique I used many times where space would not let me do it the way it should have been done "Ideally". There is another consideration and that is that it is likely that analog measurements (Aref referenced) are usually not made with steppers in motion and thus the radiated noise will be much less, typically by an order or two in magnitude. If the choke for some reason is an issue then remove it, short the terminals together {[Edit "or put it on the back side of the board the copper ground plane makes a very low impedance shield" } and move on... He will I think change that If and When he evaluates the switcher coil as I suggested. I fear that if he doesn't he is in for a surprise and further doing so (testing) is only "Due Diligence", something that is highly required if one really wishes to become a "Designer" instead of a dabbler. I used to Hate to Test what I Already Knew would Work and usually very surprised when it Didn't, Usually in the Manner I Expected. There is an old definition of "Assume" that I needn't go into here... IMO