EEVblog Electronics Community Forum

Electronics => Beginners => Topic started by: mdijkens on March 30, 2018, 01:24:32 pm

Title: Designed my first PCB
Post by: mdijkens on March 30, 2018, 01:24:32 pm
Hi,

I've just designed my first (very simple) PCB with EasyEda
It's a small formfactor minimal wiring of an ESP-12E with a LDO vreg and breakout for my UART board

Since I have not yet discovered most of the EasyEda possibilities and also have no experience in good design practices, I'd really like to get some feedback and/or tips

Title: Re: Designed my first PCB
Post by: 0xfede on March 30, 2018, 02:05:16 pm
Hi mdijkens,

nice first project.
May I suggest you to move the antenna of the ESP12 module outside the main PCB? Placing an antenna on two ground planes will cause a lot of problems like reduced range.
And if you have a bit of time maybe you should also add a few vias to better close the bottom and top ground planes.

Best,
0xfede
Title: Re: Designed my first PCB
Post by: mdijkens on March 30, 2018, 02:27:59 pm
Thanks for the feedback. Really helpfull

The top plane is the VCC and the bottom plane is the GND
It looked nice  ;D
Is it better to keep them as small as possible or avoid using them at all?
Title: Re: Designed my first PCB
Post by: 0xfede on March 30, 2018, 02:40:28 pm
It is better to have ground planes, there is no need to have a VCC plane (at least not for something that simple).
You should route VCC with a track, transform the Top plane in GND and move the antenna of the module outside the PCB. Then you could add some vias that close the Top and Bottom ground plane.
Generally speaking you should use all the available PCB surface as ground plane.

Doei,
0xfede
Title: Re: Designed my first PCB
Post by: mdijkens on March 30, 2018, 03:55:15 pm
OK

I made the antenna stick out
and both top and bottom are ground-planes now

Any more suggestions?
Title: Re: Designed my first PCB
Post by: paulca on March 30, 2018, 04:12:21 pm
Remember most PCB manufacturers will cut odd shapes out of your board.

Check page 13 of this datasheet for ideas.
https://docs-emea.rs-online.com/webdocs/13d5/0900766b813d594c.pdf
Title: Re: Designed my first PCB
Post by: mdijkens on March 30, 2018, 04:18:35 pm
Thanks

So according to that datasheet I am good now ?

What do you mean with cut odd shapes out of board? Which odd shapes?
Title: Re: Designed my first PCB
Post by: paulca on March 30, 2018, 04:29:12 pm
If you don't want to exceed your board footprint hanging the antenna off the edge, you can cut the board out from underneath the antenna so it remains within the confines of the board edge, but isn't obscured by board (or ground plane).
Title: Re: Designed my first PCB
Post by: mdijkens on March 30, 2018, 04:33:34 pm
Ah ok

But if I don't mind the antenna-part sticking out the board like it is now, then that's good?
Title: Re: Designed my first PCB
Post by: ebastler on March 30, 2018, 05:55:23 pm
It is better to have ground planes, there is no need to have a VCC plane (at least not for something that simple).
You should route VCC with a track, transform the Top plane in GND and move the antenna of the module outside the PCB. Then you could add some vias that close the Top and Bottom ground plane.
Generally speaking you should use all the available PCB surface as ground plane.

Why do you think a ground and a VCC plane are inferior to using two ground planes?

With good decoupling, a VCC plane should have the same HF benefits as a GND plane. And it provides for a nice way to route solid VCC supplies in a clean layout. I like the "GND plane + VCC plane" approach in 2-sided PCBs, and am not aware of major drawbacks.
Title: Re: Designed my first PCB
Post by: paulca on March 30, 2018, 06:35:53 pm
Ah ok

But if I don't mind the antenna-part sticking out the board like it is now, then that's good?

Yes, sticking out beyond the board is apparently the best configuration. 
Title: Re: Designed my first PCB
Post by: 0xfede on March 30, 2018, 06:55:12 pm
It is better to have ground planes, there is no need to have a VCC plane (at least not for something that simple).
You should route VCC with a track, transform the Top plane in GND and move the antenna of the module outside the PCB. Then you could add some vias that close the Top and Bottom ground plane.
Generally speaking you should use all the available PCB surface as ground plane.

Why do you think a ground and a VCC plane are inferior to using two ground planes?

With good decoupling, a VCC plane should have the same HF benefits as a GND plane. And it provides for a nice way to route solid VCC supplies in a clean layout. I like the "GND plane + VCC plane" approach in 2-sided PCBs, and am not aware of major drawbacks.

In fact I don't think that is inferior.

Best,
0xfede
Title: Re: Designed my first PCB
Post by: ebastler on March 30, 2018, 07:07:06 pm
In fact I don't think that is inferior.

Ah, then I must have misunderstood you. I understood your statement "it is better to have ground planes, there is no need to have a VCC plane" to imply that "it is inferior to have a VCC plane and only one ground plane".  ;) 

Thanks for clarifying! So the OP could have left that aspect of his design unchanged, or revert to it if he prefers.
Title: Re: Designed my first PCB
Post by: JustMeHere on March 30, 2018, 07:19:18 pm
You probably want at least 500mA on your power regulator.  250mA might not enough for the default firmware to initialize.  Although you could possibly power by your programmer.  The current firmware on my project doesn't use that much power, but I did have an ESP8266 that would. 

Someone is talking about this here: https://www.ondrovo.com/a/20170207-esp-consumption/ (https://www.ondrovo.com/a/20170207-esp-consumption/)
Title: Re: Designed my first PCB
Post by: ebastler on March 30, 2018, 07:27:55 pm
You probably want at least 500mA on your power regulator.

According to this spec sheet, 170mA max. and 80mA typical (page 16, page 6):
http://www.kloppenborg.net/images/blog/esp8266/esp8266-esp12e-specs.pdf (http://www.kloppenborg.net/images/blog/esp8266/esp8266-esp12e-specs.pdf)

So the 250mA regulator should be OK, although it might run hot under maximum load.
Title: Re: Designed my first PCB
Post by: mdijkens on March 30, 2018, 07:32:34 pm
Thanks for the comments
Looks I'm good  8)

I use the HT7333 with the ESP12E already for a long time; great combo!
The very short spikes above 80mA are mostly taken by the 220uF tantalum
The sleep current for this combo is about 21uA and the ESP can run from 12V down to as low as 3.0V  :)
Title: Re: Designed my first PCB
Post by: 0xfede on March 30, 2018, 07:35:50 pm
In fact I don't think that is inferior.

Ah, then I must have misunderstood you. I understood your statement "it is better to have ground planes, there is no need to have a VCC plane" to imply that "it is inferior to have a VCC plane and only one ground plane".  ;) 

Thanks for clarifying! So the OP could have left that aspect of his design unchanged, or revert to it if he prefers.

Nope. If you have a vcc plane with likely uncovered via touching another pcb ground plane something may go wrong. And it is much easyer for a first project have two ground planes closed together.

Best,
0xfede
Title: Re: Designed my first PCB
Post by: ebastler on March 30, 2018, 07:42:06 pm
If you have a vcc plane with likely uncovered via touching another pcb ground plane something may go wrong.

So your point is that, in this particular design (with the ESP-12E piggyback board sitting on top of it) the VCC plane on top is not a good idea? I don't see the risk of short circuits, assuming that regular single-inline header pins with a plastic carrier strip are used between the two PCBs.

Quote
And it is much easyer for a first project have two ground planes closed together.

Heck, why?? Didn't we just agree that a VCC plane plus a GND plane were just as good?  ::)
Title: Re: Designed my first PCB
Post by: 0xfede on March 30, 2018, 08:52:42 pm
If you have a vcc plane with likely uncovered via touching another pcb ground plane something may go wrong.
So your point is that, in this particular design (with the ESP-12E piggyback board sitting on top of it) the VCC plane on top is not a good idea? I don't see the risk of short circuits, assuming that regular single-inline header pins with a plastic carrier strip are used between the two PCBs.

Quote
And it is much easyer for a first project have two ground planes closed together.

Heck, why?? Didn't we just agree that a VCC plane plus a GND plane were just as good?  ::)

Nope again. The module footprint chosen by the OP is a SMD part (no holes). There is no room for pins headers and, as a rule of thumb, I would avoid anything that Murphy can use to bite the OP.
I'm sincerely curious, why you insist so much in making a Vcc plane?

Best,
0xfede
Title: Re: Designed my first PCB
Post by: ebastler on March 30, 2018, 08:59:27 pm
I'm sincerely curious, why you insist so much in making a Vcc plane?

Not insisting, just wanting to understand why you talked the OP out of it.

And I do like to use that layout approach myself, and wanted to understand whether there were any issues with it which I hadn't been aware of. I find that a Vcc plane makes for a cleaner layout than having broad Vcc traces plus a fragmented ground plane on one side of the PCB.
Title: Re: Designed my first PCB
Post by: 0xfede on March 30, 2018, 09:11:46 pm
I'm sincerely curious, why you insist so much in making a Vcc plane?

Not insisting, just wanting to understand why you talked the OP out of it.

And I do like to use that layout approach myself, and wanted to understand whether there were any issues with it which I hadn't been aware of. I find that a Vcc plane makes for a cleaner layout than having broad Vcc traces plus a fragmented ground plane on one side of the PCB.

I do use often power and ground planes too especially in 4 layers and up boards.
I remember a few years ago, one of my customers was producing a lot of 1000 SIM800 based devices and the designer left a vcc plane below the module. I remember the face of the production engineer when he discovered that about 50% of the boards were not working properly.

Best,
0xfede
Title: Re: Designed my first PCB
Post by: mariush on March 30, 2018, 09:48:07 pm
Looks nice.

My suggestions would be ...  do you really need a 220uF capacitor on the output of that LDO?

And two ... looks like an annoyance to have just three surface mounted resistors on the bottom of the board. You could have that bottom completely empty and lifted off the board by just the leads and solder there... so you could use for example a double sided sticky  tape to attach the board to a box or something.

All your resistors are 10k ... I'd consider for example using a 4 resistor array on the other side of the board for example something like this (https://www.digikey.com/product-detail/en/yageo/YC164-JR-0710KL/YC164J-10KCT-ND/1005702)

It could go for example where it says PRG ... shift RST button a bit up,  rotate the PRG button by 90 degrees and slide it up a bit , basically the two buttons should line up ...
You have some wasted board space in that corner . If you move the LDO down below the 5v print you can move the 22uF electrolytic closer to the top corner and shift the reset button up where the capacitor is now. Maybe leave more room for that capacitor (make a standard 5mm lead spacing and leave 6-8mm diameter in case you want to put 47-100uF instead of 22uF, and basically make sure you don't touch the ldo with the capacitor, why heat the capacitor with the ldo?)

Lots of board space used by that 220uF capacitor ...  there's plenty of 5 / 6.3 mm x 8-11 mm polymers out there (or smaller at 6mm tall, but considering the to-92 regulator is about 10-11mm tall, what's the point spending more for a smaller height cap?) ... for example this 220uF 6.3v one (https://www.digikey.com/product-detail/en/kemet/A750BG227M0JAAE020/399-13660-ND/6196320) with 2 mm lead spacing , 5mm x 8 mm, 0.18$ if you buy 100, 0.3$ if you buy 10.

Or a 100uF 10v electrolytic that's 6.3mm x 6.3mm is around 0.15$ for 10pcs ... Rubycon ML (https://www.digikey.com/product-detail/en/rubycon/10ML100MEFC6.3X5/1189-2166-ND/3562979) with 3k hours @ 105c ... do you need more for a LDO?

Looking at the HT7333 datasheet, the TO-92 regulator doesn't come with the leads formed that way, they're on tap in straight line with 2.5mm spacing, see datasheet page 10 (http://www.angeladvance.com/HT73xx.pdf) - do you have other regulator that comes with leads bent  in that shape, or you're planning to shape the leads and make the regulator sit above the pcb by some distance to have one lead bent that way?  You could have all three holes in straight line.
 
Title: Re: Designed my first PCB
Post by: mdijkens on March 30, 2018, 10:34:39 pm
Looks nice.
Thanks for your extensive reply

My suggestions would be ...  do you really need a 220uF capacitor on the output of that LDO?
Yep. Tested last couple of years with several caps, but the ESP8266 has some touch spikes (up to 300mA). 220uF just does the job reliable and since some devices end up far away from my home, I'd like them to reliably run for a year unattended.

And two ... looks like an annoyance to have just three surface mounted resistors on the bottom of the board. You could have that bottom completely empty and lifted off the board by just the leads and solder there... so you could use for example a double sided sticky  tape to attach the board to a box or something.
Good point. I'd love to have them on top-side also, but space/routing became very complex

All your resistors are 10k ... I'd consider for example using a 4 resistor array on the other side of the board for example something like this (https://www.digikey.com/product-detail/en/yageo/YC164-JR-0710KL/YC164J-10KCT-ND/1005702)
Seems a bit to small for me; the 1206's I can barely handle with my skills. This is my first step with SMD  ::) (I normally use through-hole stuff  :))

It could go for example where it says PRG ... shift RST button a bit up,  rotate the PRG button by 90 degrees and slide it up a bit , basically the two buttons should line up ...
You have some wasted board space in that corner . If you move the LDO down below the 5v print you can move the 22uF electrolytic closer to the top corner and shift the reset button up where the capacitor is now. Maybe leave more room for that capacitor (make a standard 5mm lead spacing and leave 6-8mm diameter in case you want to put 47-100uF instead of 22uF, and basically make sure you don't touch the ldo with the capacitor, why heat the capacitor with the ldo?)
Thanks. I am going to play a bit with that idea and see how it works out

Lots of board space used by that 220uF capacitor ...  there's plenty of 5 / 6.3 mm x 8-11 mm polymers out there (or smaller at 6mm tall, but considering the to-92 regulator is about 10-11mm tall, what's the point spending more for a smaller height cap?) ... for example this 220uF 6.3v one (https://www.digikey.com/product-detail/en/kemet/A750BG227M0JAAE020/399-13660-ND/6196320) with 2 mm lead spacing , 5mm x 8 mm, 0.18$ if you buy 100, 0.3$ if you buy 10.
This is a very convenient size for my eyes/hands to handle :) I already try to avoid the 1206's as much as possible because I am really struggling with that

Or a 100uF 10v electrolytic that's 6.3mm x 6.3mm is around 0.15$ for 10pcs ... Rubycon ML (https://www.digikey.com/product-detail/en/rubycon/10ML100MEFC6.3X5/1189-2166-ND/3562979) with 3k hours @ 105c ... do you need more for a LDO?
No, although it looks ridiculous, 220uF is really the minimum

Looking at the HT7333 datasheet, the TO-92 regulator doesn't come with the leads formed that way, they're on tap in straight line with 2.5mm spacing, see datasheet page 10 (http://www.angeladvance.com/HT73xx.pdf) - do you have other regulator that comes with leads bent  in that shape, or you're planning to shape the leads and make the regulator sit above the pcb by some distance to have one lead bent that way?  You could have all three holes in straight line.
You are right. I have the TO-92's as in the datasheet. Didn't notice, so I'll bend the leads or change the PCB. Height however is normally not an issue and for heat it might be ok to have the LDO a bit above the PCB.

Thanks for all this positive feedback.
Learning more and more :)
Title: Re: Designed my first PCB
Post by: mariush on March 30, 2018, 11:08:51 pm
I'd seriously consider replacing that regulator with something that has more contact with the circuit board for higher heat transfer, and with higher maximum operating temperature. Your TO-92 regulator has maximum 85c operating temperature and if you say it's gonna "see" 150-200mA often, then it's probably gonna operate at around 60c or more often.
Look at SOT-223 regulators, they're around 6.7mm by 6.3mm which is maybe 1-2 mm more in area compared to how much space the to-92 footprint takes ... and a couple of mm is the tab on one side which is basically heatsink.
See for example MCP1824 (https://www.digikey.com/product-detail/en/microchip-technology/MCP1824ST-3302E-DB/MCP1824ST-3302E-DBCT-ND/2003475) if you don't mind maximum 6v input voltage, or  MCP1703 (https://www.digikey.com/product-detail/en/microchip-technology/MCP1703T-3302E-DB/MCP1703T-3302E-DBCT-ND/3622380) if you want higher input voltage (16v max)  and these have operating temperature up to 125c.

There's also cheaper regulators like AP7365 (https://www.digikey.com/product-detail/en/diodes-incorporated/AP7365-33EG-13/AP7365-33EG-13DICT-ND/5267061) ... but make sure you get the versions with the right pinout, some are in-gnd-out, some are also available as out-gnd-in , or both

There's also some regulators which have different pin layout like  gnd, out , in or gnd-in-out, for example like ap2111h / ap2111ha has.
Title: Re: Designed my first PCB
Post by: mdijkens on March 30, 2018, 11:58:46 pm
hi mariush

No that's not the case. I use these HT7333's for 2 years now and they work abosultely fine.
The power consumption of the ESP is around 80mA with 1ms spikes of 300mA every few seconds. These are mainly handled by the 220uF
Average current draw from the HT7333 is slightly above 80mA (maybe 81mA or 82mA) so nothing to worry about
Even under high wifi load the HT7333 isn't gone get warm at all

Way more important for me is the voltage drop (90mV) and low quisquent current 5uA since I run circuits on a single 18650 for over a year
Title: Re: Designed my first PCB
Post by: paulca on March 31, 2018, 07:35:35 am
Get yourself some "glass" for SMD work.  You'll never look back (slight pun intended).

Something like these:
https://www.ebay.co.uk/itm/Magnifying-Glass-Lens-LED-Light-Lamp-Visor-Head-Loupe-Jeweler-Magnifier/392005109712?hash=item5b455347d0:g:ejIAAOSwtxlas1NI (https://www.ebay.co.uk/itm/Magnifying-Glass-Lens-LED-Light-Lamp-Visor-Head-Loupe-Jeweler-Magnifier/392005109712?hash=item5b455347d0:g:ejIAAOSwtxlas1NI)

Or if you have a few more green backs to unload these are phenomenal to use.
https://www.ebay.co.uk/itm/Andonstar-ADSM201-HDMI-1080-Digital-Microscope-Electronics-Inspection-PCB-Repair/252637371625?epid=13016475438&hash=item3ad25c5ce9:g:OL0AAOSwoFVaVbc8 (https://www.ebay.co.uk/itm/Andonstar-ADSM201-HDMI-1080-Digital-Microscope-Electronics-Inspection-PCB-Repair/252637371625?epid=13016475438&hash=item3ad25c5ce9:g:OL0AAOSwoFVaVbc8)

When you plug the later into a 24" computer monitor an 0805 resistor is about 2" across when the scope is retracted to it's highest position for soldering underneath.

My eye sight is so rubbish I use a manicure illuminated magnifier lens to do through hole soldering and read chip ID numbers!  Yet I managed to solder this together this week:
(http://i.imgur.com/GcOgCyA.jpg) (https://imgur.com/GcOgCyA)

Anyway, I'm watching this thread with interest as I have an RN52 Bluetooth SMD card arriving in the post to play with and will be designing a PCB for it once it get tested on a breadboard using a bit of strip board to break it out.
Title: Re: Designed my first PCB
Post by: mdijkens on March 31, 2018, 11:58:22 am
Thanks for all tips and suggestions

This is what it looks like now.
All components on top side
Buttons better alligned
Ground plane on top and bottom
antenna outside the PCB
Title: Re: Designed my first PCB
Post by: JoeO on March 31, 2018, 12:22:07 pm
I think you might need some mounting holes for the board.
Title: Re: Designed my first PCB
Post by: paulca on March 31, 2018, 12:37:58 pm
Bonus points if you round the corners :) 
Title: Re: Designed my first PCB
Post by: mdijkens on March 31, 2018, 02:24:02 pm
Thanks for the advise but no I don't need mounting holes.
I mount them with pinheaders on the project PCB's.

Round corners is very nice but makes ordering more expensive
Besides, I'm using the space is most of the corners also :)
Title: Re: Designed my first PCB
Post by: paulca on March 31, 2018, 02:36:12 pm
Round corners is very nice but makes ordering more expensive

It does?  Or do you mean your PCB fab will add rounded corners for you, but at cost?

I added rounded corners to my PCB "Edge Cuts" layer using arcs on the corners and had them done by AllPCB with no extra cost.
Title: Re: Designed my first PCB
Post by: 1ABengineer on April 01, 2018, 10:13:02 pm
I wood put a little bit more distance between The headers and the side Of The boart, sometimes board manufacturers make small Changes en pin 15 of U1 could get Disconnected from gnd. This Happened To Me Once. And I Wouldn't Put the value of the resistor Between The pads . I personally like to see the refdes(U1,R4 ect.) Outside the Part And No values on the board. Voor de rest is Looks great.

Verstuurd vanaf mijn SM-T580 met Tapatalk

Title: Re: Designed my first PCB
Post by: mdijkens on April 03, 2018, 06:54:03 pm
Unfortunately red the last post too late; already send to manufacterer.

Now I wonder if there's enough track-width from the GN pin to the ground (1st) pin of the ESP ?
There's 20mil clearance between the two resistor pads
Normal current consumption is around 80-100 mA but the ESP has a habit of short (1ms) spikes of 300mA every second or so, although I hope these are mainly covered by the 220uF cap which has great connectivity to + and -
Title: Re: Designed my first PCB
Post by: paulca on April 03, 2018, 07:31:26 pm
Unfortunately red the last post too late; already send to manufacterer.

Relax ;)

Sit back, forget about it.  Wait for the board to arrive.  Part of this journey is about learning from mistakes.

I have so far made 4 PCBs and another in the post.  The 2nd threw a curve ball reversed polarity on one of the footprints.  Correctable.  The 4th only suffered from Left and right being the wrong way round on the stereo channels of an output jack.

EDIT: the first and second came out of the box and worked perfectly.  Very satisfying. 

On the reversed polarity, it is critical you treat the board very carefully straight out of the womb.  Do not apply an unlimited current supply to it the first time it receives power.  Not unless you like blue smoke.

Put it on a bench power supply and ease it up from low current.  Start at the minimum current you expect it to draw.  On the ESP8266 100mA is more than enough.  Power it on, wait, don't panic, let it settle first.  If it current limits at a low voltage and nothing happens you might have a problem.  Check for hot components, but if you use your fingers, be careful.  I have had a blister from finding out the polarity was backwards on an ATTiny85.  "Is that hot... *&#!  YES!  That's hot!"

If it current limits slightly, give it more power.  If it stabilises out of current limit, then thats what it's consuming.  If it's high, check for hot components. 

If you have any problems..  "Though shalt check voltages." and proceed from there.  By being careful and slow with the current and you can power up and test a board with a dead short on it without blowing anything up.

You seem to have spent quite a lot of time and diligence on this, so I expect you will be absolutely fine!  Good luck.