General help on schematic and the terrifying routing stage.

Status
Not open for further replies.

propa

Well-known member
I've made a schematic for a project, I'm happy Ive been able to get to this stage, although that I'm not even sure works or will work. I've tried to route a version of it semi-successfully (as long as the board is large). And I've comically attempted a small version; unsuccessfully.

Screen Shot 2018-05-07 at 13.37.16.png

Does anyone on this forum have a knack with schematics or board design/layout? Any words of wisdom for someone starting out on this voyage?

The things annoying me so far in shrinkifying this project is knowing the right package size for components ie 402/603/0805 or whatever, I know some are too small to even handle without adequate equipment, I wonder what the smallest package size I can reliably use is. The two regulators 5v and 3.3v take up alot of space, I've used two 317's that seem massive even with the SOT (I think) package.

The other thing I can't workout is how on some Arduino circuits each side of the Atmel chip has a 5V and ground, I don't understand how they've broken out those pins or changed their functions, would make routing simpler if I could access the 5V or ground from any side of the chip.

So the schematic creation isn't the hard part (dammit), routing is a next level ball ache! What's the best approach, do you start with ground plane then route the rest, is there any methods like work from right to left or outermost to innermost? Or even placement before you start routing, are these just skills that take years to develop? Are there any ways to learn best practice other than trial and error/experimentation?

This was my attempt from yesterday:Screen Shot 2018-05-06 at 23.48.22.png

I had to significantly strip the schematic back to basically nothing to even be able to route that!

And just for comic effect (so you can laugh at how crazy I am) this is the ambition or end goal: Screen Shot 2018-05-07 at 13.59.39.png

Any thoughts feedback welcome, even if it's just "you're mental, it's not going to work"; I need a ground plane :p
 
My first impression is that this project is probably very doable. However, I'll just start with the question that pop into my head:

1. What is this project? What are your goals?
2. What special requirements does this project have? For example, why is it required to have the shape shown in "end goal"?
3. The images in the OP are too low resolution for me to read. Please attach full resolution (or at least 2x existing) images. Even better would be to put all the project artifacts (i.e., files, images) on GitHub and share a link to that here.
4. What CAD software are you using? Is it Eagle? What version?
5. Do you plan to build the boards yourself? Hand soldered? Other technique? Do you have previous experience with these types and sizes of components?
 
If you're trying to go dense (aka, small board with everything crowded together) there is only so much you can do with just 2 layers (top and bottom). If a tiny size is a requirement, you may be forced to go up to 4+ layers. That will increase cost significantly, especially if you go beyond 4. I don't know how many layers the Teensy is, but with BGA components it's not unusual to see 12 layers. That's what I did with an FPGA that had 300+ pins. There just isn't any other way to breakout that many signals.

Typically in a multi-layer board you'll have power and ground planes which is where an entire layer will be nothing but ground, or just a voltage rail. Sometimes you can put two rails on one layer, for example if you have a 5V section and a 3.3V section. On these power planes you do not want to route signals if you can avoid it. This is because these power planes are often used to keep noise and crosstalk down, and cutting traces through the middle of it can really screw with that.

If your end goal is to hand solder, then be careful on your component selection and spacing. When working in a CAD program you'll often be zoomed in. Things will look nice and big until you see it in real scale and your jaw drops. For example, if that IC you have is a QFP those aren't too bad to do by hand. If it's a QFN on the other hand, that can be quite a challenge. Especially if it has a thermal pad underneath which you obviously can't get an iron to. Speaking of the iron, if you have a bunch of components really close to each other, think of how you're going to get your iron in there.

SMD_resistors_size_comparison.jpg

A very good idea when you do get a layout completed is to print it out in 1:1 scale, then place your components to make sure things are lining up. Especially if you created any footprints yourself. You don't have to place everything, but should do one of every package you're using.
 
My first impression is that this project is probably very doable. However, I'll just start with the question that pop into my head:

1. What is this project? What are your goals?
2. What special requirements does this project have? For example, why is it required to have the shape shown in "end goal"?
3. The images in the OP are too low resolution for me to read. Please attach full resolution (or at least 2x existing) images. Even better would be to put all the project artifacts (i.e., files, images) on GitHub and share a link to that here.
4. What CAD software are you using? Is it Eagle? What version?
5. Do you plan to build the boards yourself? Hand soldered? Other technique? Do you have previous experience with these types and sizes of components?

Hi thanks for getting back to me, will answer all the points.

1. It's for a wearable technology prototype and this will be the final product board. The goals are 20 LEDs, an accelerometer (ADXL33x) for rudimentary tilt sensing and a mems microphone for peak detection of audio signals in say a club for instance.

2. The shape would be to fit into the prototype design to be worn, space is a concern, so I'm (ambitiously) trying to shrinkify everything as far as humanly possible.

3. I've done the later and chucked all the eagle files into a repo here: https://github.com/richhop/MCU-project

4. Eagle 9.00 I believe.

5. No I don't plan to build them myself, I will investigate down the line if assembly could be done at the same place manufacture is done, I'm guessing it's very expensive for low level orders, so I'd like to make the design as tight as I can before sending off. (I have expected to take years to get to that stage, although my motivation surprises me at times) I have not learned how to do surface mount soldering, maybe down the line I may invest in a microscope, but I would honestly rather someone do it right that me bodge it up.

I have heard things about some components being even too small for a pick and place machine and the smaller you go can actually increase your costs, for example the BGA/QFN and if I'm not mistaken 402's even add expense to a design. I like to know a decent price/value cutoff point.

Will answer Geomancer in a sec, just off to grab some dinner.
 
If you're trying to go dense (aka, small board with everything crowded together) there is only so much you can do with just 2 layers (top and bottom). If a tiny size is a requirement, you may be forced to go up to 4+ layers. That will increase cost significantly, especially if you go beyond 4. I don't know how many layers the Teensy is, but with BGA components it's not unusual to see 12 layers. That's what I did with an FPGA that had 300+ pins. There just isn't any other way to breakout that many signals.

Typically in a multi-layer board you'll have power and ground planes which is where an entire layer will be nothing but ground, or just a voltage rail. Sometimes you can put two rails on one layer, for example if you have a 5V section and a 3.3V section. On these power planes you do not want to route signals if you can avoid it. This is because these power planes are often used to keep noise and crosstalk down, and cutting traces through the middle of it can really screw with that.

If your end goal is to hand solder, then be careful on your component selection and spacing. When working in a CAD program you'll often be zoomed in. Things will look nice and big until you see it in real scale and your jaw drops. For example, if that IC you have is a QFP those aren't too bad to do by hand. If it's a QFN on the other hand, that can be quite a challenge. Especially if it has a thermal pad underneath which you obviously can't get an iron to. Speaking of the iron, if you have a bunch of components really close to each other, think of how you're going to get your iron in there.

View attachment 13753

A very good idea when you do get a layout completed is to print it out in 1:1 scale, then place your components to make sure things are lining up. Especially if you created any footprints yourself. You don't have to place everything, but should do one of every package you're using.

Paul replied to a forum post not too long ago saying the Teensy 3.2 is two-layers, and the 3.5 or 3.6 is 6 layers if I'm not mistaken, think I read a post from him wishing OSHpark had a 6layer service, you say 12 Paul does it in 6, I now see why others have referenced him as the "God of microcontrollers"! I think that many layers may be unfeasible for me just yet as an amateur.

And good god 12 layers is insane and 300pins, how do you even start something like that? I wouldn't know where to begin!

That's a really great idea printing out a real scale version of the board and placing parts for reference, may give yourself ideas about how best to route them as well, I've read an anecdote board design is "90% is part placement and 10% is routing"

I think I'm gonna totally outsource the assembly stage, however much it costs it will be cheaper than the time spent trying to learn how to SMT solder, and then the time taken to knock just one board out by myself, could take me days to do as little as one.
 
Paul would certainly know!

The Teensy 3.6 is only 144 pins (really balls on a BGA) so i could see it being done on "only" 6 layers.

4 layers isn't *too* bad at OSHPark, but is double the price of 2 layers. $10 per square inch, but if your board is small it may not be too much.

If you're planning to go to an assembler, be sure to plan out your budget accordingly... Often you're looking a several hundred bucks in "NRE" which is non-recurring engineering. This is for things like kitting the parts (the actual organizing/ordering of the parts, not part cost itself), making the solder paste screen, and programming the pick & place.

I don't mean to scare you off by any means, just pointing out that "one offs" in the manufacturing world can be quite expensive. If you can design your board around hand solder friendly components, you could have that as a fallback in case costs are more than you can bare. If you're making a bunch of boards though, that NRE cost can be amortized across them all. For example that board I did for work had a $3k NRE cost but across 200 units is only $15 each.
 
I have not learned how to do surface mount soldering, maybe down the line I may invest in a microscope, but I would honestly rather someone do it right that me bodge it up.

I highly recommend investing in a decent microscope, ring light, soldering iron, and get Kester #331 solder and 2331-ZX liquid flux. Sure, a microscope isn't cheap, but being able to build the prototypes yourself will save you quite a lot in the long run. It only takes a couple PCB assembly NRE charges to add up to the cost of this gear.

I personally use a Luxo 250 microscope, though it I were to buy another one I'd probably get the 273 only for the 2-beam boom stand (optically the 250 is fine). We also have an AmScope here, which is what Erin used (sadly, Erin is no longer with PJRC). The AmScope cameras are junk, so only get the base microscope.

The USB microscopes are less than ideal for hand soldering. They're best used only for inspection and documentation. The problem is lag really hurts hand-eye coordination. If you're on a student budget, perhaps these are better than nothing, but if you can get a fully optical path microscope it will allow you to do so much better than inserting software between your eyes and your hand soldering.

Everyone loves to focus on the soldering iron, but as long as it's temperature controlled and has a fine point tip, you'll get more capability from putting your money in the magnifier and ring light than the iron. Being able to actually see the finer details of what's really happening as you solder will allow you to rapidly improve your skill.

The flux you use matters most of all. This really is the secret sauce to achieving good hand soldering of fine pitch SMT parts. Kester 2331 works very well. Erin called it the "magic go juice". The only downside is it's higher corrosive, so you absolutely must wash the PCB in hot running water. Then you'll usually need to bake the board to get the moisture completely out. 20 minutes at 170 Fahrenheit works very well.

I have heard things about some components being even too small for a pick and place machine and the smaller you go can actually increase your costs

Pretty much every shop can handle 402 size passives and 0.5 mm pitch SMT chips.

Smaller tends to increase cost. Unless you're making a very expensive HDI PCB (laminated outer layers, blind & buried laser vias, etc) smaller than 402 also tends to be diminishing returns because the drilled vias tend to limit how compact you can squeeze everything.

Paul replied to a forum post not too long ago saying the Teensy 3.2 is two-layers, and the 3.5 or 3.6 is 6 layers if I'm not mistaken

Teensy 3.5 & Teensy 3.6 are 6 layers. Layer 2 is a ground plane and layer 5 is mostly 3.3V power plane, but ground near the regulator for heat dissipation.

Teensy 3.2 is 4 layers. Layer 3 is a ground plane. Power is routed as traces together with the signals on the other 3 layers.

Teensy LC, Teensy 2.0 and Teensy++ 2.0 are 2 layers.

And good god 12 layers is insane and 300pins, how do you even start something like that? I wouldn't know where to begin!

You always start with placement! First place large fixed-location stuff like connectors and mounting holes. Then put quite a lot of thought into where most of the nets need to connect between the parts. Time spent arranging the parts well pays itself back many times over when you're routing.

Paul shared this :: Teensy 3.6 DIY Reference Board

It is a hand solderable T_3.6 2 layer board - with a scope at least by Erin.

Yes, Erin built many of earlier version of those when we did the early beta test. They all worked perfectly. I still have a few on my desk. :)
 
being able to build the prototypes yourself will save you quite a lot in the long run. It only takes a couple PCB assembly NRE charges to add up to the cost of this gear.

Awesome thank you everyone that has commented, what I gather so far is... invest in a microscope and stop being lazy, costs could make project unfeasible if one mistake were made in the fab or assembly. A few circuit boards to test if an idea works is nothing compared to the cost of assembly of X to find that out.

I don't mean to scare you off by any means, just pointing out that "one offs" in the manufacturing world can be quite expensive. If you can design your board around hand solder friendly components, you could have that as a fallback in case costs are more than you can bare. If you're making a bunch of boards though, that NRE cost can be amortized across them all. For example that board I did for work had a $3k NRE cost but across 200 units is only $15 each.

In no way have your comments scared me away, merely opened my eyes to a new term lurking in my blind spot "NRE" and I thank you. It's actually a different kind of feedback than I was anticipating. I'm lucky enough to have a hackspace near me with a decent soldering station and a microscope, I may have to investigate to see if it can be used for SMT components, to my recollection it was quite small, not big enough to get a soldering iron under at least.

Does anyone here use ovens or toaster ovens or specific IR reflow stations? Could that be an option? Say if the board house could send a stencil as well?

Paul shared this :: Teensy 3.6 DIY Reference Board

It is a hand solderable T_3.6 2 layer board - with a scope at least by Erin.

Using the T_LC's M0 would shrink and simplify that. Is that a ref to ATMEGA on the one image?

:tears: After three days of trying to understand schematics and pcb manufacture I can just about look at that board and know what's going on! And I would be lying if it didn't bring a tear to my eye. It's hard to explain, when something's done by someone nailing their craft they make it seem like it's almost effortless, and you don't know how hard the (x) task is until you try it! Now I have a much better appreciation for PCB designers!

I was thinking go M0 and do everything 3v, raising up for the LED's may be complicated, and design with a buck converter or another voltage regulator. The positives of 3v could be the mems mic and accelerometer wiring/circuits may end up simpler.
 
+1 on flux being magic for getting things to solder where you want

Other advantages in working up to doing this yourself is that you can work the design in stages, get your core working and work out a function at a time. Any design problems come to light as you go and you have some chance of working out where.

Also means you can push the limits more knowing exactly how you will use the thing, doing things like soldering things on edge or getting artistic with the actual fabrication.

And before going fully micro it can be helpful to do a large scale prototype, sized for whatever is convenient with lots of test points, components grouped by function and easy assembly. Then when you use the same schematic but packed down on a small board you have something to take measurements on to compare the final version to.
 
Thank you for everyone for the input, I will be looking into getting my hands on some flux, and investigate eBay for some second hand microscope in the coming months, I may get lucky and get a bargain.

Is this a practical way to go about handling management for this project…

Split/segment circuit development, first focus on just making a working microcontroller no sensors, just test ports and outpins that would be used in final design. Move on to working on essentially break out boards for the sensors I want to use and make sure the design is working before trying to put everything on one board. After the three individual components (MCU, Sensor x 2) are working and reliable, move on to making a larger format board with lots of test points for debugging, once larger format board is done, soldered and working the confidence built from the process should allow for miniaturisation of the final design. Dev cost for this process est £300-£500 (not including equipment above), would I be right in saying for a board house to do design/fabrication/assembly that number could be in the thousands just for the dev stage?


There's still problems I have in just schematic design, I love all the advice you lot have given me, but I feel I'm ridiculously far away from the fabrication stage. I can just about read a schematic, but doesn't mean I trust myself to make any of this!

One actual question about the design of a 5V board, I've looked at the Teensy 2.0 and it doesn't seem to have a 5V regulator, I see an option for a 3.3 reg, is the logic of the design assuming that the 5v coming from usb will always be 5v or assumes board will always be connected to a pre regulated 5v supply?

If i can strip the regulator and just put a USB header supplying a pre-regulated voltage, that would be great!

The other practical question goes back to the start, OK you've all won me over, I'm going to have to invest in the development of these skills, and outsourcing or one NRE could easily cost the same as the equipment needed to do surface mount soldering….So what components should I use in my designs for hand fab or solder oven home fabrication? Should I limit myself to a certain package size i.e. no smaller than 0805 or something?

I'd still get the boards printed by a board house, please don't tell me I need to etch my own PCBs now and get CNC machine :p.
 
Is this a practical way to go about handling management for this project…

Split/segment circuit development, first focus on just making a working microcontroller no sensors, just test ports and outpins that would be used in final design. Move on to working on essentially break out boards for the sensors I want to use and make sure the design is working before trying to put everything on one board. After the three individual components (MCU, Sensor x 2) are working and reliable, move on to making a larger format board with lots of test points for debugging, once larger format board is done, soldered and working the confidence built from the process should allow for miniaturisation of the final design.
This sounds like a good approach to reducing risk of a costly mistake and supporting incremental progress. I especially endorse making a larger format that you can more easily build yourself. Once you have a known "good" circuit and layout, it's not such a leap to shrink it down a little more.

There's still problems I have in just schematic design, I love all the advice you lot have given me, but I feel I'm ridiculously far away from the fabrication stage. I can just about read a schematic, but doesn't mean I trust myself to make any of this!

Recommendation: From Eagle, print the schematic to a PDF document so that it does not require Eagle to view. Share that with the community. I expect that you will get lots of help this forum.

One actual question about the design of a 5V board, I've looked at the Teensy 2.0 and it doesn't seem to have a 5V regulator, I see an option for a 3.3 reg, is the logic of the design assuming that the 5v coming from usb will always be 5v or assumes board will always be connected to a pre regulated 5v supply?

You did not say which kind of LED but I will assume that they want to be powered by 5v. Even if they seem to work at 3.3v, there is very little noise margin left (or none), and this design might not be robust enough for working reliably for "everyone out in the wild". Also, the LEDs will consume the bulk of your power compared to the other components. I suggest power this board with 5v and regulate down to 3.3v for the Teensy and sensors. I'm speculating, but I think that would result in a smaller, cooler, lower cost regulator than a boost converter able to power the LEDs.

I'd still get the boards printed by a board house, please don't tell me I need to etch my own PCBs now and get CNC machine :p.
No, don't make your own ;). Here in the U.S. I use Oshpark ($5/sq. in. for 2 layer, $10/sq. in. for 4 layer) but they aren't the only ones. In Europe/U.K., I'll bet you find similar board fabs.[/QUOTE]
 
In china you get 10pcs 100mm x 100mm for 5EUR and faster than OSH, same quality (but not the gold finish, boards green) Last time they shipped the boards after 48 hours ... shipping took 1 week to Germany. With express shipping they arrived 4 Days from order.

Edit. Oops. They have new price now. 24USD with DHL express shipping for 5pcs.
 
Last edited:
Your design sequence makes sense, especially with needing to learn PCB design assuming this is a just for fun project that will hopefully sell a couple to people you know or how see your youtube video (total units <500) and hopefully payback your hardware costs (but you consider your design time 'free'). On step that may simplfiy things is just to design a board that mounts a Teensy or micro of your choice, which reduces the number of design critical parts. And if you are doing assembly yourself you can do 'wrong' things to save space like placing the Teensy in a cutout so it sits flush with the PCB, or upside down so you can reach the underside pads.

If this project is supposed to be your financial future you need to think about your desired end point (piles of cash) and where your time needs to go to actually sell that many. If the intention is to mass produce this then it will need to be 'design for manufacture' to be viable and you might as well focus on making working prototypes and learning all the hurdles in finding a manufacturing partner and handing them big chunks of money to do what they are good at (and you need to become a money man, not an engineer).

Be very wary of the 'pit of despair' in between these two sizes, where you do not have economies of scale to the production but also have more than you personally can test, box, ship, document and provide tech support for.

Doing your own PCBs is not needful unless you actually want 60 minute turn around on designs. The key difference between making a PCB and assembling it is that there is a well understood language and process around PCB fab that means a company in a random company can make your board and deliver what you asked for, and dispute resolution is easy since you can see the problem.

Assembly is harder since there is not yet a default language to feed a standard file into a machine that spits out an assembled and tested board. Hence at this scale point the suggestion to hand assemble, since you will be doing iterations of fault finding and repair anyway and saves arguing if the thing is non functional due fab or design error. Also gives you a known good (and actually practical to assemble) design if you then go to someone like Seeed https://www.seeedstudio.com/fusion_pcb.html who does offer a small board count hand assembly service later. Not necessarily recommending Seeed but they do have online calculators that may help, and I have also cribbed their 'preferred parts' list when puzzling over choices.
 
Last edited:
Your design sequence makes sense, especially with needing to learn PCB design assuming this is a just for fun project that will hopefully sell a couple to people you know or how see your youtube video (total units <500) and hopefully payback your hardware costs (but you consider your design time 'free'). On step that may simplfiy things is just to design a board that mounts a Teensy or micro of your choice, which reduces the number of design critical parts. And if you are doing assembly yourself you can do 'wrong' things to save space like placing the Teensy in a cutout so it sits flush with the PCB, or upside down so you can reach the underside pads.

If this project is supposed to be your financial future you need to think about your desired end point (piles of cash) and where your time needs to go to actually sell that many. If the intention is to mass produce this then it will need to be 'design for manufacture' to be viable and you might as well focus on making working prototypes and learning all the hurdles in finding a manufacturing partner and handing them big chunks of money to do what they are good at (and you need to become a money man, not an engineer).

Be very wary of the 'pit of despair' in between these two sizes, where you do not have economies of scale to the production but also have more than you personally can test, box, ship, document and provide tech support for.

Doing your own PCBs is not needful unless you actually want 60 minute turn around on designs. The key difference between making a PCB and assembling it is that there is a well understood language and process around PCB fab that means a company in a random company can make your board and deliver what you asked for, and dispute resolution is easy since you can see the problem.

Assembly is harder since there is not yet a default language to feed a standard file into a machine that spits out an assembled and tested board. Hence at this scale point the suggestion to hand assemble, since you will be doing iterations of fault finding and repair anyway and saves arguing if the thing is non functional due fab or design error. Also gives you a known good (and actually practical to assemble) design if you then go to someone like Seeed https://www.seeedstudio.com/fusion_pcb.html who does offer a small board count hand assembly service later. Not necessarily recommending Seeed but they do have online calculators that may help, and I have also cribbed their 'preferred parts' list when puzzling over choices.


This is worst answer ever, but a little of column A, and a little of column B, I would like to make a job out of making things but mainly addicted to learning, I know bits of code/3d design/Cad/CAM in various ways but I've never truly understood the electronics side other than plugging in sensors to prefab boards, all of this side of investigation is because it's truly something I'm passionate about but never had the chance to pick up skills though education or a job in the field. If through passion an income or living could be made then great, but it's not really the end goal, a better understanding of things and the fulfilment of making something work is all I'm after!

On the board front I've redesigned the schematic using all 0805 resitors and caps, and change the 328p package from QFN to QFP, maybe still ambitious but I'm gonna give it a crack! I've scrapped the MEMS microphone and Accelerometer for now (not going to be able to solder them), chucked a new LED package on just generic 5050 sized WS2812Bs. I've used a 317 5 volt regulator, and now put a way for the bootloader to be added, and put decoupling capacitors on the inputs. I'm not sure I need the pull up resistor on the reset button (as it has it built it to the chip or something?)

imag.jpg


Hopefully that's a better picture of the schematic

EDIT all the current errors:
Screen Shot 2018-05-11 at 01.46.19.png
 
Last edited:
Here's where I've got to so far:

test.jpg

I think I'm getting it a bit, place components that are in the schematic near each other; together in the board layout, no right angles, use ground planes, don't route under crystals. The main thing that's frustrating me is the understanding of the power and how to denote it properly in the schematic, I just don't understand eagles use of SUP or OUTPUT. I use +5V everywhere on the schematic apart from raw Input going into the regulator, everything else is +5V but the ERC thinks they are all supplies, I obviously don't understand the right way to label power busses. Any heads up would be greatly appreciated.

Latest schematic:
image.jpg
 
Dammit the last comments have made me wonder, I have $25 to burn to test a theory, however instead of just making 10 x 100x100mm boards is there a cleverer way of making a reliable set of observations on the right angle debacle? A first suggestion would be a load of right angle traces with different thicknesses staggered in size and test the Input/output of logic signals with a few headers to see if that particular trace could trigger other 5V or 3v logic devices. Also make a board of exactly the same thing but with 45 degrees and observe the differences and see where/when exactly the difference of angles might matter.

This may be the most prolifically boring episode of myth-busters but I'm willing to gamble $25 on getting slightly better at measuring electronicsy stuff.
 
Right angles may have a little influence with some 100MHz.. since traces become antennas..but.. I bet the trace length and width, and other factors are way more important. And with right angles, the traces become a bit longer.
For "our" frequencies,I'm pretty sure you will not notice any difference without using very expensive test equipment.
 
Last edited:
Avoiding right angles mindset may also come from the home brew etching space, where sharp angles are more likely to lift the resist mechanically prior/during etching. Suspect my PCB design tendencies have a permanent skew from starting out that way.
 
Status
Not open for further replies.
Back
Top