I am a beginner in electronics design. I have some experience with fairly complex PCB design. I want to design a product that will hopefully sell a lot. How do I ensure that the design is inexpensive from manufacturing perspective? I mean not for a single PCB fabrication but for mass production. I use commonly found microcontrollers like atmel, Texas instrument. Is this the way to go for mass manufacturing?
There's a thousand things to consider to reduce manufacturing costs, but some of the important ones are
Build in high volume. This spreads the set-up costs for a batch across more units. You'll find, for example, that the cost of board blanks drops extremely fast as you increase the batch size.
Negotiate your component costs. List price is just a starting point for negotiation. And once you've started buying in volume and your vendors know you're serious (and not going to need more support), go back and negotiate again. (To have a stronger position, design in multi-sourced components wherever possible)
Reduce process steps. For example, via-in-pad plated-over adds steps to board manufacturing, and mixing SMT with through-hole components adds steps to assembly.
Reduce the number of lines in the BOM. This reduces effort for purchasing and increases the volume you're purchasing for each part number. For example, if you have both 49.9 and 51.1 ohm resistors, check if you can just make them all the same value. Or, if you have 3 linear regulators with different output voltages, use the same adjustable type for all of them instead of 3 different fixed-output parts.
Design in as much tolerance as you can. For example, don't use 4 mil tracks if you can use 6 mil tracks. Don't specify +/- 10 mils on the board size if you can live with +/- 25 mils. Etc. The looser your tolerances, the better your yield. Even better, if you can make a tolerance loose enough, you might even eliminate the need to test it in final test.
Make your boards smaller. The more boards that fit on a standard panel, the lower the material cost.
Design in testability. This might mean adding test points for a bed-of-nails tester or it might mean making the design able to test all necessary features by itself (BIST).
Use standard processes rather than exotic ones: hot-air solder level instead of gold plating, through vias rather than blind vias, green solder mask rather than red, etc., etc.
Already some great answers here so I'll just add a few more things.
Work closely with your assembler and your pcb fab house, they often provide dfm (design for manufacturing feedback) that will help you understand how to change your product to be easier for them to manufacture. The higher you go in volume the more concerened you will be about every little thing related to yeild.
Minimize assembly operations. Can you get away with all surface mount components on a single side of your board? Adding the second side is another operation for assembly, they have to go back through the line, maybe in carriers cost will go up.
Component selection, that tiny QFN part sure is cheap, oh but turns out it costs me slightly more in assembly because it's harder for the cheap guys I'm using. This through hole connector is cheaper than the surface mount version, but using it means your board has to go through another step at assembly, wave soldering, so your cost goes up.
HASL is a cheap surface finish but it doesn't have the shelf life of a silver immersion or gold ENIG. At really high volumes you may be buying boards in bulk and using them over serveral months. If half your boards become scrap because of oxidation you're not saving any money.
Comments about minimizing test time are on point, time is cost, and testing takes time. At moderate volume you maybe doing in circuit or clam shell testing. At very high volume there's no time or money for that. You'll likely be only doing FVT, a functional test of your circuit at the end of the line. Bad boards just go in a pile, that may or may not be looked at later. So long as yield is acceptable you just want to keep the line screaming.
PCBs in addition to what was already said keep in mind that pcbs have several cost factors. Obviously size is related to cost but so is waste. Boards are made in panels so you to maximize your usage of the panel, wasted material is just that waste. Also your fab house has a list of things that are standard, and things that are doable but cost more. That tiny via sure is attractive but maybe it costs less to use one 2 mils bigger. You should check with them. Tiny trace widths are great but when moving to a high volume shop it may cost less again to me just 1 or 2 mils bigger.
Layer count is also a big discussion point 2 layers is cheaper than 4, but is it? If you're doing digital logic and I/O above say 1Mhz you may find that the added cost and time required to pass EMI negates your savings. I haven't done a 2 layer board in years on million unit plus designs. However I have done them, and in my case using a spread spectrum clock was a life saver for emmissions. There are definitely some board where 2 layer is more appropriate, but I'm a 4 layer advocate all the time.
More on component selection. I liked the answers that talk about second sourcing, and thinking about the decision to use a cheapo part vs something more reliable. The interesting thing to know is that the good price is often hidden in various ways. By pushing researching and working you can find much better pricing. Not sure where you're located but compaines here in the US seem to like to give us higher pricing then when I get it quoted in China. Often there are parts only marketed to the China market that you have to find out about to even get pricing. I once had a company come in and present their line of products, then I started asking them about what turned out to be China only products. They stopped, asked me how I knew about them, then closed their presentation and opened a whole new one about their much cheaper parts not sold in the US!
Negotiate, if you have volume that first price is not the price :) Probably the third or fourth price is the right price. We just went from $10 to $2 on a part just by saying, no I'm going to go with your competitor on this one (which would have been true). At some point though keep in mind if the parts are equal in value to you? If you're getting more reliability and support perhaps a few cents is worth the cost?
Advice. I'll assume you're not a giant corporation with deep pockets and a marketing team already hyping your product? That you're more of a one man startup at this point. I'll give you the best piece of advice I ever got about building to scale when starting a company or new product. Don't. Focus on what it will take for to get one customer, or ten. Build for that. Then get your next ten, your next hundred, and scale with your customer base. For us engineers making the product isn't the hard part it's getting a customer. If you find that you can only sell your product if you had the price you get at volume... perhaps that's the wrong product to start with :) here's a great article on that
One point that is often underestimated by engineers is finding a second source for all components. Not only for price negotiations, as @The Photon (in his great answer) mentioned, but also to make sure you don't have to throw away PCBs if one of your components isn't sold anymore, or get into problems if there are unforeseen delivery/supply problems. For diodes etc. that's rather easy, but also try to find pin-compatible voltage regulators, if possible even pin-compatible microcontrollers from another manufacturer.
If you have different versions of your circuit, e.g. NPN/PNP output, different interfaces, voltage versions, etc. it is usually cheaper to create one PCB for all versions then to create a PCB for every version. You can then assemble only the parts needed for a specific version.
If you have some space left on the PCB (e.g. if you have given mechanical dimensions for the PCB) then you can add footprints for EMC protection like TVS diodes or decoupling capacitors.
One hint I got from our assembly company (actually from the boss of a 5 people company, always having a talk with customers):
We had a board with 24 "euro DIN connectors". They are like standard pin headers with 2x16 or 3x16 pins.
The board was wave-soldered and the connectors were pulled over the wave in parallel, i.e. all pins of a connector were soldered at the same time. Due to this, the liquid tin cooled down locally, and the risk of bridges between the pins increased. If the connectors are pulled over the wave perpendicularly, the risk is much much smaller.
In our case, we had about 26 boards and they reworked them by hand. But on larger scale, you would not do that, and it would lower your yield.
Typically, a board is pulled over a board with the short side ahead, so it would be nice if parts like long pin headers are in parallel to the long sides.
Decide the quantities your board is going to be built, the geographical region and use appropriate parts and materials for those conditions.
You can have a board made in China in large quantities with a "US" or "European" design, but it will not be optimal. It's better if you use parts that are widely available and cheap in that market (which may mean using older generation parts, using parts that are common in consumer products or quit modern parts you're not familiar with and have no English datasheet because the manufacturer has no interest in selling less than 50,000 pieces at a time). You may choose to use a punched paper-phenolic board for part of the design and a fancy multilayer board for other parts.
In large enough volume, forget about second sourcing, the only important thing is how far you can screw the costs down. The product can always be redesigned. Engineering time is free, relatively speaking. You may have to use weird microcontrollers with unwieldy development systems to save a few pennies, on the other hand you may find it makes sense to negotiate a very low price on a higher end micro so you can take advantage of open-source software and speed up the development. Costs become a lot softer when volumes get really large- I recall it was possible to get a very impressive DSP for about 1/20 the 100's price at Digikey because the manufacturer was motivated to break into that market and the total amount of money was still attractive to them. They may even provide the software.
If the volumes are not huge, you have to be concerned about the longer term availability of products (look at track record as well as price), spreading risk by using multiple suppliers etc. Be careful about locking into technologies that are associated with highly volatile or fad products. Six months might be a long time in the life of some products.
Don't succumb to temptation and use low quality components- rebuilding a reputation is very expensive. This applies especially to electromechanical parts. Make sure any required safety agency approvals are genuine and current. Be sure to use appropriate suppliers for assembly- if you have a one-time order of 20K pieces, you're not going to get a top-tier supplier the slightest bit interested unless there is some really convincing story there (involving future business and minimal risk of embarrassment), and saving money on a cut-rate assembly house may really hurt when you see the results. If the components might involve patents be sure to verify that the required licenses are in place and royalty payments are up-to-date.
Defensive design applies to all phases of the product lifecycle.
These are just some of the phases your product might encounter:
Leaving extra pads for different-value components is good, during the early phases of a prototype. However, as your design nears completion, the board should start to look exactly like the "mass produced" one. This can be especially important for high-frequency or high-power circuits where the shape and size of the copper on a PCB is just as important as the things soldered to it. Don't forget to do a small run of boards using exactly the same layout and component as your large-scale production run.
As mentioned you should take manufacturing processes into account. This also applies to multi-layer PCBs, especially the interior layers:
The copper is etched away with a solution, which must then drain away before the next layer covers it up, otherwise you'll have etchant trapped inside your board. This is terribly hard to debug later, because it's completely invisible and might not fail right away.
So, when you are laying out the interior layers of a board, avoid pockets or dams that might trap liquid etchant and prevent it from draining properly.
How many times does the design change hands during the build process? If one company makes circuit boards, another stuffs components, and a third puts the finished board assembly into an enclosure, minimize the chance of failures due to repeated packing and unpacking. This can mean things like
- Use lower-profile connectors (short lever arms are harder to snag on bubble wrap)
- Give the assembly technicians something to grab on to, so they don't pick up the board by something that might break off.
- Make it easy to wrap. Rectangles are easier to wrap than other shapes, which means they'll be more likely to arrive safely to the next destination.
All good answers here already. Just to add my 2c on designing for debug/repair. It's a fact of life that there may be some units that are RMA'd from downstream (internally or externally). Just as it is good to make a unit easy to assemble it is also good to make it easy to disassemble a unit so as to reduce the turn around time for such RMA'd units.
Examples of design decisions here may include taking a balance on using smaller SMA components, as the tiny ones are of course harder to manually handle and place when all the other components are already in place. Similarly placing things packages too close together may lead to heat damage with them when removing and replacing nearby components resulting in the need to actually replace two or more components even if only one of them failed.
Another one is reducing the size of heat dissipating pours to only as large as necessary. Again when removing and replacing parts, if the part pad is connected to an unnecessarily large pour or other heat dissipating PCB feature the heat gun will need to be applied for longer, allowing the possibility of damaged nearby components or damaged board surface/layers which means replacing the unit altogether.
Overly constrained or concentrated collections of components will also complicate repair, E.g. if one component blocks access to one that is to be replaced or just preventing access for manual probing.
Second-sourcing also has a large bearing in regard to RMA work for mass produced products that are to be produced for some time.
Such considerations are of course somewhat secondary to constraints imposed by DFM and the functionality and overall physical product design but should still be considered for any potentially mass market product.