Total Pageviews

Saturday, 28 February 2015

Choosing The Right Filament - ABS or PLA?

Let’s start with ABS. (Acrylonitrile Butadiene Styrene as it’s known by in it’s hometown) is the grandfather of home FDM filaments.

Temperature:
Print at 210-240º with a heated bed at 80º or more.
ABS has a glass transition zone (the temperature that the plastic starts to soften at) of 105º, and this matters because if you aimed to print something for use in your car, or perhaps a hot-drink coaster you don’t want it to start getting soft and drooping, unless you are aiming for a droopy print.
Print Performance:
Due to the nature of the plastic, ABS tends to be very easy to print with from a hot-end point of view – as in it’ll extrude beautifully from most hot-ends without fear of jamming or clogging. However it’s a little more difficult to deal with once it has been extruded, since it loves to shrink as it cools. The shrinkage can cause issues with the part lifting from the bed, or the layers cracking or splitting as the height of the object increases. For this reason it’s an absolute must to print ABS on a heated bed, and preferably within an enclosed-case printer. At the very least, print in a room that’s not too cold and one that is without drafts which might accelerate the cooling and therefore the shrinkage.
ABS can be printed very quickly and is very forgiving of large and/or rapid retraction settings, it resists stringing so very little retraction is usually necessary.
ABS is great for wearables due to it's resilience
ABS is great for wearables due to it’s resilience
Strength:
ABS is a rather strong plastic if printed at sufficient temps to get a great layer bond.
ABS has a decent amount of flex to it and it tends to bend rather than snap when put under pressure.
ABS is great for bracelets since it flexes
ABS is great for bracelets since it flexes
Fumes:
One of the bigger downsides to printing with ABS is the strong smell while it prints. While it doesn’t bother most people, some people may have issues with printing ABS in confined spaces. I would always recommend printing in a well ventilated room no matter what plastic you chose to print with, but I strongly recommend it with ABS. “When in doubt, let the fumes out!” –  That’s an old 3d printer’s saying from the 1930’s. Which is of course I totally made up just now.
When to use it:
Objects that might be dropped, put in hot environments or used in a rough manner are perfect uses for ABS. Think of knife handles, car phone mounts, phone cases, toys, wedding rings (mine is black ABS). In short it’s very good for most objects.
ABS withstands the high heat of in-car objects and suits the ruggedness needed in phone cases
ABS withstands the high heat of in-car objects and suits the ruggedness needed in phone cases
When NOT to use it:
If you don’t have a heated bed, forget about it. If you want to print some large objects and don’t have a way of protecting it from breezes or even the ambient air temp, you will fight with splitting and cracking. Avoid ABS if you cannot adequately ventilate the room you’re in, the smell might be irritating.

PLA (Polylactic Acid if you’re asking for it on the street) is the sweet smelling hippy cousin to ABS – IT BIODEGRADES AND SMELLS LIKE CANDY WHEN YOU PRINT! If that fact alone doesn’t interest you, then read on.
Temperature:
Print at 180 – 200º and while you can print without a heated bed, I recommend one running at 60º
PLA’s glass transition temp is probably it’s biggest downside and at only 60ishº (yes that’s a scientific value) it limits how you can use this plastic. Forget about making a gear-shift knob for your car, unless you like shifting with a gummy bear… Which is actually an awesome idea.
Print Performance:
In almost the complete opposite to ABS, PLA users sometimes have difficulties with jamming in the hot-end (especially all-metal hot end users) due to the sticky and expanding nature of PLA as it melts. This doesn’t mean you should shy away from printing with it, just a drop of oil added to almost any hot-end when you put a roll on will give you smooth, jam-free, jam-smelling prints till the cows come home.
The real joy with PLA comes as it lays on the print bed. With almost no shrinkage, you can print massive prints in open framed printers with little fear of lifting from the bed, warping or cracking, it’s a great filament to use when showing off your printer in a public setting.
Did I mention that I love how it smells?
PLA is no problem for outdoor projects
PLA is no problem for outdoor projects
Strength:
While you can still print incredibly strong objects with PLA, it tends to be a little more brittle than other plastics. Rather than bouncing when dropped or struck, some printed parts may just shatter or chip. Thin parts are more likely to snap than bend very far.
Layer bond is very strong if printed appropriately.
Fumes:
I’m not advocating the deliberate inhalation of PLA fumes at all (I’m sure there’s a lawsuit there somewhere), however if you do happen to catch a whiff of PLA as it prints, I think you’ll be pleasantly surprised. A day of printing in PLA makes my office smell lovely and kind of makes me hungry. The fumes are minor, and they smell good!
When to use it:
Personally I recommend using it whenever you can. It’s a bioplastic that can be recycled or composted. It’s perfect for boxes, gifts, models, prototype parts. Oh and don’t be afraid of using it outdoors, while it does biodegrade, it does need a heated composting setup and it’s insoluble in water, so make a PLA garden gnome right now!
PLA comes in nice transparent options, the choice is clear
PLA comes in nice transparent options, the choice is clear
When to avoid it:
If you’re making something that needs to hold up in 60º temperatures avoid PLA, it will start sagging at this temperature. Due to it’s brittle nature it isn’t recommended for tool handles or parts that will be dropped repeatedly, also parts that have very thin portions will break after bending slightly.

In Conclusion:
It’s worthwhile learning to use both materials since both ABS and PLA have ideal use situations. Myself, I try to use PLA at every opportunity due to it’s biodegradable qualities, ease of printing and sweet smells :) but ABS is just the ticket for higher impact or higher temperature jobs.

3D Printer Filament Buyer's Guide

This is intended to be a very basic Personal 3D Printer filament buyer’s guide for new 3D Printer users. Every single point presented here is worth a lengthy post, but this should serve as a top-level summary that might help you determine what plastic filaments will best suit your needs.
For corrections or ideas of other factors worth considering, share them with us at content AT protoparadigm DOT com.

Diameter

There are two common diameters of 3D Printer plastic filament, 1.75mm and 3mm. Your Personal 3D Printer is likely to use one of these. Each printer (or to be more specific, each extruder) is designed to work with one diameter of plastic filament and will not work with the other. Check your printers listed specifications or documentation to see which it uses. If you can’t find any indications of the diameter in those places check forums and user groups for the information, or ask there if you still can’t find it. If your printer came with some filament, you can also measure the filament to determine which of the two it is.
Some printers may use proprietary diameters that are slightly different from above. As above, read up to make sure your printer can use filament from suppliers other than your printer manufacturer. Likewise, if you’re shopping for a printer right now, make sure to buy one that uses standard materials so you have more choice when it comes to suppliers (which also gives you access to more materials, colors, etc.), or at least make sure there is a good technical reason for the proprietary diameter besides just locking you into the brand.
Here are diameters for some of the more predominant printers. Please email us any additions or corrections at content AT protoparadigm DOT com .
Company Printer or Extruder Diameter
Bits From Bytes
RapMan 3mm
3DTouch 3mm
Felix Printers
Felix 1.0 1.75mm
Leapfrog
Creatr 1.75mm
Xeed 1.75mm
MakerBot
Mk 5 and Earlier 3mm
Mk 6 3mm default, 1.75mm supported
Mk 7 and later 1.75mm
MakerGear
Mosaic 1.75mm (3mm extruder available)
M2 1.75mm (3mm extruder available)
Prusa 1.75mm or 3mm, buyer selectable
PP3DP
Up! 1.75mm
PrintrBot
PrintrBot 3mm
PrintrBot+ 3mm
RepRapPro
Huxley 1.75mm
Prusa 1.75mm
Solidoodle
Solidoodle 1.75mm
Ultimaking Ltd
Ultimaker 3mm
Misc Extruders/Hot-Ends
Arcol 3mm
J-Head 3mm
LulzBot Budaschnozzle 1.1 3mm default, 1.75mm supported
Filament diameters will vary slightly from supplier to supplier, and possibly from product to product (different colors or different plastics), though filaments coming from the same supplier should be fairly close. There is a slight discrepancy between the nominal diameters for each size. For 3mm, the maximum diameter of the filament should not exceed 3mm. Our nominal, and that of many others is 2.88mm. This is in contrast to 1.75mm where the nominal diameter IS 1.75mm and not a maximum. This is one reason this smaller size is sometimes referenced as 1.8mm.
Filament can also have lumps (short sections where the diameter is larger than tolerances allow, usually only a few cm long), and neck-downs (short sections where the diameter is smaller than tolerances allow, again, usually only a few cm long). These will often cause jamming or stripping, but should be rare from a quality supplier. These are usually unrelated to the tolerances of the filament.

Material

There are several materials available to print with. In general, the question for a new user usually comes down to ABS vs PLA. These are the two most common materials used in Personal 3D Printers. Each have distinct characteristics. The main deciding factor between ABS and PLA is probably going to be personal preference, though there are some limiting factors on each printer that may make one preferable to use over the other.
Here is a quick reference table of some of the differences between ABS and PLA. The details of each of these points can be found later in this post.
ABS PLA
Extrude at ~225°C Extrude at ~180-200°C
Requires heated bed Benefits from heated bed
Works reasonably well without cooling Benefits greatly from cooling while printing
Adheres best to polyimide tape Adheres well to a variety of surfaces
Filament tolerances are usually tighter Finer feature detail possible on a well calibrated machine
Prone to cracking, delamination, and warping Prone to curling of corners and overhangs
More flexible More brittle
Can be bonded using adhesives or solvents (Acetone or MEK) Can be bonded using adhesives
Fumes are unpleasant in enclosed areas More pleasant smell when extruded
Oil Based Plant Based
There are other materials, in particular Polycarbonate and PVA that are used for printing, but which are outside the scope of this buyer’s guide. Here you can find more information about printing with Polycarbonate. You may also come across blends of materials, such as a polycarbonate/ABS blend or polystyrene blends, but these too are outside the scope of this post.

Grade

Each different kind of plastic can come in different grades. Different grades may have different properties like melt temperature, flexibility, viscosity when melted, stickiness when melted, etc. These can all affect both your ability to print with them and the quality of your prints or the difficulty of calibration.
The Personal 3D Printing community has adopted 4043D and 2003D as the standard PLA grades, and PA-747 as the standard ABS grade. These grades are generally going to be the best for new users, as they are what other people have the most experience with; the community support for working with these materials is much better. Make sure to buy from a supplier that specifies the grade they sell, and make sure to either buy one of these standard grades or make an informed decision about why you're choosing a different grade.

Precision

Generally speaking, it is easier for manufacturers to attain better tolerances with ABS than with PLA. However, the extrusion characteristics of PLA will allow for finer feature detail on a well tuned machine.

Strength

While many people will claim that ABS is stronger than PLA, we haven't found them to be substantially different. PLA is more brittle than ABS and will tend to splinter and break where ABS may tend to bend, but similar force is required for either to fail. It is more likely that you will find your print settings to be a bigger contributor to the strength of printed objects than the plastic you're using (at least between PLA and ABS). Insufficient infill density, too few shells, delamination (layers pulling apart), and related problems may make your object weak even though the material itself is relatively strong. If your objects feel too flimsy or break too easily try upping infill, adding shells (perimeters), and tweaking your temperature and speed (to try to get better adhesion between layers) before you write off your plastic.

Printer Limitations

Does your printer have a heated bed? Is the bed capable of reaching temperatures over 100 degrees celsius? ABS tends to warp and peel, and often won’t stick well to an unheated, or under-heated print-bed. If you have an unheated bed, or one that doesn’t get hot enough, you’ll probably want to stick with PLA.
Does your printer have a cooling fan blowing directly at the print area near the end of the nozzle? If it does, you’re probably good to go with either material, but if it doesn’t, ABS may be a better choice. PLA has a tendency to curl at corners and overhangs, a tendency that can be minimized with proper cooling. While good cooling will help either, ABS may fare better without a fan.

Bed Surface Requirements

ABS adheres best when printed onto a bed covered with Polyimide Tape (you will also see references to Kapton, which is a trademarked name for a brand of Polyimide Tape). PLA is a little more lenient and works great on Kapton, but also works well on blue painter’s tape. Polyimide Tape is more expensive than painter’s tape, but it goes a long way and can be replaced a little less frequently. Some people have luck printing PLA directly onto freshly cleaned glass (be careful not to drive your nozzle into your bed though).

Temperature Resistance

ABS softens at a higher temperature than PLA, which makes parts printed in ABS more resistant to warping under higher temperatures. Keep in mind, we’re not talking about a huge difference; you’re still going to have a bad time if you print an oven rack accessory in ABS. For more moderate temperature situations, the difference may be important to you, it depends entirely on how you plan to use your printed object.

Printing Environment Considerations

Fumes can also play a factor. If you are operating your printer in a poorly ventilated environment, or where people will congregate, such as a classroom or your living room, you may find the fumes from long prints with ABS a bit overwhelming. PLA has a much more organic, less “plastic” smell to it. As was pointed out in the comments by Madox, the strength or offensiveness of fumes can vary by grade as well.
The temperature of your environment can make a difference too. If your 3D Printer is open to the air and you’re printing in an environment with relatively cold air, you’re much more likely to experience cracking and warping with ABS than with PLA. When the ambient air temperature is very cold, such as in a basement or shop during the winter, layers of ABS will have more of a tendency to come apart and peel away from each other.

Finishing

After a print, you may need to join parts together, or clean up the surfaces to make them look nicer. Both PLA and ABS may be sanded, and both can be painted with acrylic paints. Parts printed in PLA and ABS can both be joined with adhesives (those that advertise they adhere to plastic) (we like super-glue for its strength, ease of use, and quick drying time). ABS parts can also be joined with MEK (methyl ethyl ketone) or Acetone (especially in the form of ABS Glue, as we’ve detailed before), and can to some extent also be polished with these to create glossy surfaces. Common solvents for PLA (chemicals you would use like MEK or Acetone are used with ABS) tend to be very dangerous, expensive, and hard to acquire.

Environmental and Economic considerations

Like many other plastics, ABS is a petroleum product. PLA is made from vegetable waste (primarily from corn, but also from sugar beets and sugar cain). This is important to some people. Likewise, consider where your plastic is coming from. Supporting domestic retailers who use domestic suppliers helps reduce the energy used to transport goods, and also helps the domestic or local economy.

Color

Natural, whether natural ABS with its creamy white appearance, or transparent Natural PLA, are great colors to keep stocked. For one, they tend to be less expensive because there is no pigment expense, which makes them great for test prints and prototypes where color doesn’t matter. Natural ABS and PLA also tend to minimize the appearance of flaws, which is great for finished prints, but actually makes it more difficult to diagnose calibration issues while you are getting your printer settings dialed in.
Colored filaments print slightly differently, and are also easier to diagnose with. We recommend calibrating your settings and printer to print well with a colored filament, which will generally give you good results with other colors, and with natural filaments. Selecting colors is completely subjective and is based entirely on personal taste and the kinds of items you wish to print. As you’re stocking up, think about how you’ll be using your printer and what colors you imagine you’d like the printed items to be.
Also note that some plastics are translucent or transparent where others are opaque. Generally speaking, ABS is opaque, with the exception of natural ABS which has a milky, slightly (very slightly) translucent appearance. For the most part, any color of PLA may be offered as transparent, translucent, or opaque.

Packaging

Some people like coils, others like spools. There are pros and cons to each.
Spools (also called reels) are the easiest to work with. They store and travel neatly, dispense easily and evenly, mount conveniently, and look nice while helping avoid tangles. There are many accessories out there for mounting spools on your printer (or above it, or next to it, or under it...) or dispensing from spools set along side your printer on the desktop. The biggest down side to spools is the weight. When buying 1kg of plastic on a plastic spool, almost a third of the shipping weight can be the spool itself.
Coils (sometimes called "Air Spooled", which seems a bit hokey and misleading to us) are cheaper as you don't have to pay for the spool, and they weigh less, so shipping costs should be reduced. If you've got a spool with a removable flange that you can drop your coil onto, it can be just as easy to work with as buying spools; if not, you'll need some way to dispense it. Coils are also more practical for smaller quantities of plastic filament, anything greater than a pound becomes unwieldy very quickly.

Supplier

Make sure you are buying from a good supplier. While we feel we’re a great supplier, we recognize that there are other good suppliers out there. We suggest considering the following factors when selecting suppliers.

Calibration

Keep in mind that when using plastic filament from different suppliers, you may need to recalibrate your 3D Printer. This isn’t necessarily difficult, but it does take time and effort. Keep this in mind when shopping around.

Price

Of course, price is a major factor for most people, but keep in mind not only the price tag of the plastic itself, but also the cost of shipping (we now have free shipping, by the way...). Buy multiple spools or coils at a time to reduce per pound shipping costs. Also make sure to find information about any deals or promotions a supplier is offering.
Keep in mind that if you buy cheap filament and wind up throwing portions of it out (whether throwing out the filament or failed prints from it), you may not come out ahead (that stuff you're trashing cost money).

Tolerances

Make sure your supplier advertises good tolerances and guarantees them. Poor tolerances can cause problems ranging from poor surface finish to failed prints (which also mean wasted plastic, see Price above). See our post about the importance of filament tolerances for more information.

Customer Service

Make sure you select a supplier that is responsive to customers, has reasonable guarantees and return policies, and stands behind and understands their products.

Other Notes

As with everything, you will need to prioritize and decide which considerations are important to you when buying filament.

Hopefully this is helpful to you. If you have any suggestions for points we didn't hit on, please let us know at content AT protoparadigm DOT com. Likewise, if there are any questions you have about buying filament that you didn't feel were addressed here, let us know about that too. 

3D Printing: The Difference Between ABS and PLA

You've got a 3D Printer, or you're looking to buy a 3D Printer and each one seems to indicate it prints in either ABS, PLA, or both. So you find yourself wanting to know, what is the difference between ABS and PLA.

Some Common Ground

There are many materials that are being explored for 3D Printing, however you will find that the two dominant plastics are ABS and PLA. Both ABS and PLA are known as thermoplastics; that is they become soft and moldable when heated and return to a solid when cooled. This process can be repeated again and again. Their ability to melt and be processed again is what has made them so prevalent in society and is why most of the polymers you interact with on a daily basis are thermoplastics.
Now while there are many thermoplastics, very few of them are currently used for 3D Printing. For a material to prove viable for 3D Printing, it has to pass three different tests; initial extrusion into Plastic Filament, second extrusion and trace-binding during the 3D Printing process, then finally end use application.
To pass all three tests, a material's properties must lend desirably to first, its formation into the raw 3D Printer feedstock called Plastic Filament; second, process well during 3D Printing giving visually pleasing and physically accurate parts; and lastly, its properties should match the intended application, whether that be strength, durability, gloss, you name it. Often, a material will pass one test so superbly, that it becomes worth the extra effort to battle with it during its other stages. Polycarbonate, a lesser known printing material is this way. For some applications, its strength and temperature resistance makes it worth the battle to print accurate and fully fused parts.
The first test, that of production from base plastic resin into top-notch Plastic Filament such as what we carry is a strict and carefully monitored process. It is a battle of wits and engineering that takes the plastic from a pile of pellets to a uniformly dense, bubble free, consistently sized, round rod. Here there is little difference between ABS and PLA; most thermoplastics can pass this test, it is mainly just a question of the time and costs required to do so while still producing Plastic Filament that runs smoothly and consistently during the next stage, 3D Printing.
Here is where the two plastics divide and will help to explain why different groups prefer one over the other.

Storage

Both ABS and PLA do best if, before use or when stored long term, they are sealed off from the atmosphere to prevent the absorption of moisture from the air. This does not mean your plastic will be ruined by a week of sitting on a bench in the shop, but long term exposure to a humid environment can have detrimental effects, both to the printing process and to the quality of finished parts.
ABS - Moisture laden ABS will tend to bubble and spurt from the tip of the nozzle when printing; reducing the visual quality of the part, part accuracy, strength and introducing the risk of a stripping or clogging in the nozzle. ABS can be easily dried using a source of hot (preferably dry) air such as a food dehydrator.
PLA - PLA responds somewhat differently to moisture, in addition to bubbles or spurting at the nozzle, you may see discoloration and a reduction in 3D printed part properties as PLA can react with water at high temperatures and undergo de-polymerization. While PLA can also be dried using something as simple as a food dehydrator, it is important to note that this can alter the crystallinity ratio in the PLA and will possibly lead to changes in extrusion temperature and other extrusion characteristics. For many 3D Printers, this need not be of much concern.

Smell

The smell of 3D Printer Filament while printing will vary largely from manufacturer to manufacturer based in large part on how much degradation occurred during production. When we produced our plastic for instance, we place a large emphasis on preserving the integrity of the polymer to not only create stronger and more accurate parts, but to smell less when 3D Printing. Of course, plastics are tricky things and you'll find that the biggest influence on smell regardless of plastic type or source is printing temperature.
ABS - While printing ABS, there is often a notable smell of hot plastic. While some complain of the smell, there are many who either do not notice it or do not find it to be particularly unbearable. Ensuring proper ventilation in small rooms, that the ABS used is pure and free of contaminants and heated to the proper temperature in a reliable extruder can go a long way in reducing the smell.
PLA - PLA on the other hand, being derived from sugar gives off a smell similar to a semi-sweet cooking oil. While it certainly won't bring back fond memories of home-cooked meals, it is considered by many an improvement over hot plastic.

Part Accuracy

Both ABS and PLA are capable of creating dimensionally accurate parts. However, there are a few points worthy of mention regarding the two in this regard.
ABS - For most, the single greatest hurdle for accurate parts in ABS will be a curling upwards of the surface in direct contact with the 3D Printer's print bed. A combination of heating the print surface and ensuring it is smooth, flat and clean goes a long way in eliminating this issue. Additionally, some find various solutions can be useful when applied beforehand to the print surface. For example, a mixture of ABS/Acetone, or a shot of hairspray.
For fine features on parts involving sharp corners, such as gears, there will often be a slight rounding of the corner. A fan to provide a small amount of active cooling around the nozzle can improve corners but one does also run the risk of introducing too much cooling and reducing adhesion between layers, eventually leading to cracks in the finished part.
PLA - Compared to ABS, PLA demonstrates much less part warping. For this reason it is possible to successfully print without a heated bed and use more commonly available "Blue" painters tape as a print surface. Ironically, totally removing the heated bed can still allow the plastic to curl up slightly on large parts, though not always.
PLA undergoes more of a phase-change when heated and becomes much more liquid. If actively cooled, much sharper details can be seen on printed corners without the risk of cracking or warp. The increased flow can also lead to stronger binding between layers, improving the strength of the printed part.

ABS and PLA General Material Properties

In addition to a part being accurately made, it must also perform in its intended purpose.
ABS - ABS as a polymer can take many forms and can be engineered to have many properties. In general, it is a strong plastic with mild flexibility (compared to PLA). Natural ABS before colorants have been added is a soft milky beige. The flexibility of ABS makes creating interlocking pieces or pin connected pieces easier to work with. It is easily sanded and machined. Notably, ABS is soluble in Acetone allowing one to weld parts together with a drop or two, or smooth and create high gloss by brushing or dipping full pieces in Acetone. Compared to PLA, it is much easier to recycle ABS.
Its strength, flexibility, machinability, and higher temperature resistance make it often a preferred plastic by engineers and those with mechanical uses in mind.
PLA - Created from processing any number of plant products including corn, potatoes or sugar-beets, PLA is considered a more 'earth friendly' plastic compared to petroleum based ABS. Used primarily in food packaging and containers, PLA can be composted at commercial compost facilities. It won't bio-degrade in your backyard or home compost pile however. It is naturally transparent and can be colored to various degrees of translucency and opacity. Also strong, and more rigid than ABS, it is occasionally more difficult to work with in complicated interlocking assemblies and pin-joints. Printed objects will generally have a glossier look and feel than ABS. With a little more work, PLA can also be sanded and machined. The lower melting temperature of PLA makes it unsuitable for many applications as even parts spending the day in a hot car can droop and deform.

In Summary

Simplifying the myriad of factors that influence the use of one material over the other, broad strokes draw this comparison.
ABS - Its strength, flexibility, machinability, and higher temperature resistance make it often a preferred plastic for engineers, and professional applications. The hot plastic smell deter some as does the plastics petroleum based origin. The additional requirement of a heated print bed means there are some printers simply incapable of printing ABS with any reliability.
PLA - The wide range of available colors and translucencies and glossy feel often attract those who print for display or small household uses. Many appreciate the plant based origins and prefer the semi-sweet smell over ABS. When properly cooled, PLA seems to have higher maximum printing speeds, lower layer heights, and sharper printed corners. Combining this with low warping on parts make it a popular plastic for home printers, hobbyists, and schools.
Additionally one can find a handy chart comparing the two plastics on our Plastic Filament Buyers Guide

Tuesday, 10 February 2015

Cheap PCB Design Process

Making a cheap PCB is easier than you think. Here is short summary of how to create your layout and a list of some PCB manufacturers that you can choose from to get your circuit board manufactured.
What you need to create a PCB:
A cheap pcb produced at Seeed Studio
Next, choose one of these cheap PCB manufacturers:

Cheap PCB Manufacturers

Seeed Studio

Based in China. My number one choice for simple PCB prototypes. Cheap and friendly. $10 USD for ten boards. That’s one dollar per board! Plus shipping. It usually takes about three weeks to get the boards delivered to Norway.
Read my interview with Seeed Studio.

BatchPCB

Pretty cheap and lets you order one board if you want. They are straight forward with you and tell you that they make PROTOTYPE boards with no testing and they may contain errors. Board errors are probably something that all the cheap prototype PCB manufacturers struggle with, so I wouldn’t let this scare me of using them.

Olimex

Based in Bulgaria. They offer OK, prices, but their price list is a bit hard to understand. I used to order from them a couple of years back and was happy with their service.

iTeadStudio

I have never tried their service, but their prices are as low as Seeed Studio and they also offer 4-layer boards.

OSH Park

I have not tried them, but their prices seem fair and you can upload you Eagle design directly without having to convert to Gerber files. And they claim to make good quality board.

PCB Cart

A Chinese PCB and Assembly service. I have not tried them, but I hear they can offer really good prices. You can get an online instant quote if you want to check their prices.

Compare Different Manufacturers

A really good resource for finding a cheap PCB manufacturer is PCBShopper.com. Here you can enter your board size and where you are located in the world and get both price and estimated delivery time for a lot of different manufacturers.
When you have selected your manufacturer, go ahead and follow their instructions on how to send them your design files¸ then sit back and wait for your fresh circuit board to arrive in the mail =)

Don’t know how to design a cheap PCB?

It’s extremely useful to learn how to design circuit boards on your own. I waited too long before learning it, but when I finally did – a whole new world opened up for me. Suddenly I was able to build projects with RFID technology, large microcontroller boards, quadcopters, see-through-wall sensors and much more. To help you learn this, I have designed an eCourse for you that will teach you the exact steps to build your own circuit boards.

PCB Design Tutorial for Eagle

This is a PCB design tutorial that I designed as a simple way to learn how to create a PCB layout in Cadsoft Eagle. What we need:
(If you want to use the same schematic as used in this PCB tutorial you can download the schematic here. You can also find three simple electronic circuits with schematics, board layout and Gerber files here.)

Create Board From Schematic

We start by opening our schematic diagram in Eagle. Click on the “Board” button (or choose “Switch to board” from the “File” menu) to create a board for this schematic.You can also use the command line for selecting commands.

If no board exists, we will get a warning asking us to create a new board. Choose “Yes”. A new board will be created with all the components from the schematics.

Place Components

We choose the “Move” action from the toolbar (or the “Edit” menu) to place the components on our board. A good way to arrange our components is to place them similar to the placement in the schematics. This makes it much easier to troubleshoot the circuit at a later stage if needed.
Click on “Rastnest” from the “Tools” menu to update the yellow airwires.

Start Routing

Alright, now the routing fun begins :)
Routing can be done manually or automatic. Here I will explain how to do it manually. You can also read about how to use Eagle’s autoroute function.
Choose “Route” from the toolbar (or from the “Edit” menu). Select 12 mil trace width and 24 mill drill size.
A rule-of-thumb is to use wide traces for nets that draw a lot of current, for example your power lines. For other nets, we can use thinner traces. In this example, not much current is drawn by the circuit, so we just choose some default values.

We start routing by clicking on one of the yellow airwires. A trace appears with a color corresponding to the current routing layer. Now we use our left mouse button to route the wire to where the airwire points us.

If we want to change the routing layer, we simply click the middle mouse button or use the layer selector on the toolbar. A good rule-of-thumb for a two-layer board is to route only horizontally on one layer and only vertically on the other. But this is not necessary for such a simple board as ours.
Learn more about PCB design guidelines.
To simplify routing, a ground plane can be added.
Completed PCB Design Tutorial Board

Run ERC and DRC To Check For Errors

When we are finished routing the PCB, we should always run ERC and DRC from the “Tools” menu to look for errors. Fix any errors if present.
When there are no more errors, we have finished the PCB design tutorial. Let’s give ourselves a pat on the back! Now we are ready to create gerber files that we can send to a manufacturer for fabrication.

The Next Step After This PCB Design Tutorial

PCB Design is extremely useful to know. It’s what will take you from knowing how to build simple circuits to being able to build advanced stuff like LCD screens, Quadcopters, etc. I have personally put together an eCourse that will teach you everything you need to know, step-by-step.

Reference: http://www.build-electronic-circuits.com/pcb-design-tutorial

PCB Price Comparison

Compare prices from 21 PCB manufacturers at once:
 Reference: http://pcbshopper.com/


How to export gerber files from eagle for pcb production at youpcb.com

What is the purpose of this tutorial?

Well, as title, if you have created your own PCB layout with eagle PCB (http://www.cadsoftusa.com/), the next step is to produce prototype PCBs from the layout.
There are many PCB layout softwares, such as Altium Designer, OrCAD, KiCad, PowerPCB etc. Eagle PCB is one of them. The best thing about eagle is, it has a free version, you can use it for any boards smaller than 100x80mm, which is good enough for small boards. (eagle PCB do have limitations on the free version, please check it our from eagle's website).
PCB manufactures do not usually support all the PCB layout files from these software, however, they do support the standard gerber file format. It doesn't matter how you create the PCB layout, as long as you can export gerber files from your layout, the board can be produced by any manufacture, including youpcb.com.
In this tutorial, we are going to show you how to export gerber files from your eagle brd file, so that you can send it to youpcb.com for manufacture.

Softwares needed

You only need one software: eagle PCB. Download from here: download eagle PCB free version
You also need winzip or winrar, you probably already have it installed. If not: winzip or winrar
You also need Eagle design rule file: 8mils.dru, download it from here 8mils.dru

Export Gerber files from eagle

Design rule check

Make sure you run design rule check (DRC) before you generate Gerber files. DRC usually makes sure that your board doesn’t exceed the manufacturer’s production abilities.
Download this file: 8mils.dru and copy it to your eagle's DRU directory, for example: C:\Program Files (x86)\EAGLE-6.1.0\dru
Start eagle PCB software, load your brd file, then select Tools -> DRC..:
Run design rule check
Then, clock Load.. button to load our custom DRU file:
Load youbcb.com DRU file
Select the DRU file you downloaded from us and click open:
load youpcb.com DRU file
The wizard will load our DRU, then click Check button:
run design rule check
Make sure there are no errors. If there are errors, you need to fix them before you can continue to generate gerber files.

Generate Drill Rack file

Select Run from File menu:
run job
In the pop up dialog, select drillcfg.ulp from the list and click Open:
run drillcfg.ulp
Then select Inch and click OK:
select inch
Don't change anything and click OK:
click ok
Click Save:
save drill cfg file
Now you have the drill configuration file created.

Generate Excellon drill files

Select File -> Cam Processor... from the menu:
select cam processor
Click File -> Open -> Job...:
select job
Select Excellon.ulp, and click open:
Excellon job
Click process Job:
Run excellon
The file will be created instantly. Close the window by clicking the 'x' icon on the right too corner:
close dialog

Generate gerber files

Select File -> Cam Processor... from the menu:
select cam processor
Click File -> Open -> Job...:
select job
Select Gerb274x.ulp, and click open:
gerb274x job
Now this is important, make sure "Mirror" is unchecked on all tabs, then click "Process Job...":
process gerb274 job
It may take a couple seconds to generate all files, once it is done, close the dialog:
Close process job dialog

Zip up generated files and send to youpcb.com

Now open windows explorer, zip up the generated gerber files as rar or zip format, then send to youpcb.com for manufacturing. Before you send it, you may want to upload the zip file to online gerber viewer website and see if they are correct.
These are the files:
  • *.drl Drill rack data
  • *.drd Excellon drill description
  • *.dri Excellon drill tool description
  • *.cmp Component side data
  • *.sol Solder side data
  • *.plc Component side silk screen data
  • *.stc Component side solder stop mask data
  • *.sts Solder side solder stop mask data
  • *.gpi Gerber photoplotter information data
zip files



How To Create a Gerber File Using Eagle?

How To Create a Gerber File Using Eagle

A Gerber file for each section of your electronic circuit design is what you need if you want to create a PCB.
In this Gerber tutorial, I will teach you how to create the files you need for a 2-layer board using Cadsoft Eagle. After you have completed this tutorial you will have all the necessary files needed to send to most PCB manufacturers.

Step 1: Open the CAM Processor


In Eagle, open Board view. Click the “CAM” button or choose “File->CAM Processor”. This will open the CAM Processor tool that is used to generate the files.
Here you can define the sections you want to create files for.
But you don’t really need to understand this. Actually I have never really thought about the details of this until I was writing this article. I have just been using ready-made configurations. And that is probably what you want to do as well.

Step 2: Open a predefined job

To simplify creating Gerber files, Eagle comes with a predefined job for this. It is called gerb274x.cam.
To open it in the CAM Processor click “File->Open->Job…”
Browse to your …/eagle/cam/ folder, and you should see a file called gerb274x.cam. Choose it and click “Open”.
You will now see five tabs in the CAM Processor. Each of these tabs will generate a Gerber file.
Gerber file generator

Step 3: Adding a second silk screen (Optional)

If you look at the tabs, you will see that you don’t have a file for silk screen bottom. For simple boards, the silk screen is usually on the top layer so that you don’t need the bottom. Some of the cheap circuit board manufacturers don’t even allow bottom silk screen.
But if you need silk screen on bottom layer as well, follow these steps:
  • Click “Add”
  • Change Section to something like “Silk Screen SOL”
  • Change File to “%N.pls”
  • Deselect all layers
  • Select layers 20 “Dimension”, 22 “bPlace” and 26 “bNames”
There you go.

Step 4: Process the job

Select where you want to put the Gerber files by clicking on the “File” button and choosing a folder. Do this for all the tabs.
Then click “Process Job”. This creates your Gerber files.

Step 5: Adding file for drill holes

Even though drilling is supported by the Gerber format, manufacturers usually want the Excellon file format for specifying drill holes. Luckily, Eagle also comes with a predefined job for creating a drill file.
Open it in the CAM Processor by clicking “File->Open->Job…”
Browse to your …/eagle/cam/ folder, and open the file named “excellon.cam”.
Select where to put the output file by clicking on the “File” button.
Then click “Process Job” to create your Excellon file.

Step 6: Check output files

The resulting gerber files
You should now have the following files:
  • *.cmp (Copper, component side)
  • *.drd (Drill file)
  • *.dri (Drill Station Info File) – Usually not needed
  • *.gpi (Photoplotter Info File) – Usually not needed
  • *.plc (Silk screen, component side)
  • *.pls (Silk screen, solder side)
  • *.sol (Copper, solder side)
  • *.stc (Solder stop mask, component side)
  • *.sts (Solder stop mask, solder side)
After you have created your files, you should always look at them using a Gerber viewer to make sure everything is ok.

Summary

This Gerber tutorial shows one way of creating the files you need. Even though this should be OK for many PCB manufacturers, you might find that some would want the files created in a slightly different way. If so, don’t worry, they will probably provide you with a Job file you can load directly into Eagle or at least have a good explanation on how to do it on their website.
Check out more articles on PCB design by clicking this link:
Return from Gerber File to PCB Design


Reference: http://www.build-electronic-circuits.com/gerber-file/

Know everything about gerber files generated using Eagle software

Cadsoft Eagle .brd to Gerber conversion guidelines

Eurocircuits preferred input format is still Gerber (RS-274X).Nowadays we also offer the possibility to upload Eagle CAD data (.BRD files) which we convert internally to Gerber before starting the normal flow.
Be advised that this conversion is automated and based on the Eagle layer names and functions.In case you have
designed the board while respecting the normal Eagle layers , the conversion should lead to a correct printed circuit
board. In case you have used layers for other functions then the ones prescribed in the Eagle manual, the conversion
could lead to a non-functional board.

Layer conversion rules - syntax:

Layer function (.file extension) consists of Eagle layer(s) : Eagle layer number & function + ….
Solder stop Component side (.STC) = 20 Dimension layer + 29 tStop laye
Silkscreen Component side (.PLC) = 20 Dimension layer + 21 tPlace layer + 25 tNames layer
Componentside (.CMP) = 1 Top layer + 17 Pads layer + 18 Vias layer + 20 Dimension layer
Inner layers (.Lox) = x Inner layer + 17 Pads layer + 18 Vias layer + 20 Dimension layer
Solderside (.SOL) = 16 Bot layer + 17 Pads layer + 18 Vias layer + 20 Dimension layer
Solder stop Solder side (.STS) = 30 bStop layer + 20 Dimension layer
Silkscreen Solder side (.PLS) = 22 bPlace layer + 26 bNames layer + 20 Dimension layer
Milling (.MILING) = 46 Milling layer + 47 Measures layer + 20 Dimension Layer
Excellon drill (.DRD) = 44 Drills layer + 45 Holes laye
Cream frame Componentside(.PMC) =31 tCream layer + 20 Dimension layer
Cream frame Solderside (.PMS) = 32 bCream layer + 20 Dimension layer
The conversion is fully automated because of this Eurocircuits cannot take any customer specific requests into consideration.
If the above rules don’t suit your needs,simply convert the .BRD project yourself into Gerber and supply the set of gerberfiles for further processing.

Generate Gerber and Excellon files in Eagle

Generating Gerber- en Excellon files in Eagle is easy. Simply follow these steps:
  1. Open the CAM Processor
  2. Select under File -> Open for Job
  3. In the window that now opens you select the correct .cam-file, in this case gerb274x.cam (in the Eagle subdirectory cam).
    For a 4-layer PCB select gerb274x-4layer.cam
  4. The job opens itself in the CAM processor window. . In the right-hand panel the necessary items are already selected.
    You do not need to do anything here.
  5. Activate in every(!) layer the Dimension by clicking on it. This shows the outline of the PCB.
    The tick box next to Mirror needs to be un-ticked each time.
  6. The final step is carrying out the job. This is simply done by clicking the button Process Job
  7. The CAM Processor places the Gerber files in the folder of your opened project.
    There are quite a few files there (six for a two-layer board).
  8. To create an Excellon filethat contains the information for drilling the holes, you select the excellon.cam file when opening the .cam-file (steps 2 and 3).
    You then click process job and the Excellon file will be generated.
  9. You now simply combine all these files into a single zip file and upload it via the Eurocircuits website.

Data to be uploaded with your PCB order.

Provide us ONLY with the data files needed for production. These are :
  • Gerber files for the copper layers, soldermask and legend layers, mechanical layer and SMD paste layers. Plus
    carbon, peel-off and via-fill layers as needed.
  • Excellon drill file(s) for drilling.
  • If you want us to prepare a customer panel (“array”, “matrix” or “biscuit”) from the single board data to your individual specification,
    the panel plan can be supplied as a Gerber or DPF file.
Please DO NOT provide any additional files such as original CAD data (other than Eagle), Graphicode GWK files,
PDF files, Word files (doc), Excel files (xls), part lists, placement and assembly information, etc.
Where possible check your generated output data (Gerbers & Excellon) with a Gerber viewer before you send it on to production.
Make sure that all instructions or other necessary input needed for making the boards are included in the Gerber and Excellon files.

Preferred data formats

Supply only ASCII-encoded files. These files are man-readable so that our engineers can check them if needed during data preparation. We cannot accept formats such as EIA or EBCDIC.

CAD Design data.

We do accept CADSOFT Eagle .brd.files. ( use the Eurocircuits Eagle DRU files )
  • Submitted .brd files will be converted in gerberformat automatically using a script. The script supposes that the drawing was made
    using the layers as described in the manual.
  • Which layer in Eagle is used to create which Gerber layer is described in the .brd to Gerber conversion guidelines
Other CAD PCB design data are not accepted because:
  • converting CAD data into production data may lead to errors which we cannot cross-check.
  • It is impossible to have legal copies of every CAD PCB design package in the market, and to have the necessary knowledge to use them all correctly. As designers do not all use the same software version of a package we would need to have a whole range of update patches as well.
  • Gerber is clear and unambiguous. It has been the industry-standard format for PCB manufacture for many years. Nearly every PCB design package can output Gerber data and the process will be fully described in your CAD PCB design package handbook or help-files.
  • You can check the accuracy of the Gerber output data by downloadiing one of the many free Gerber viewers available on the internet. We recommend ( and use ) the freeware viewer " PCB-Preview" from Graphicode.
Remark for our PCB proto pooling service : For reasons of automated analysis the PCB proto service only accepts Extended Gerber (RS-274X)or Cadsoft Eagle .brd files as input data.

Drill files : Excellon or Sieb & Meyer format

The Excellon and Sieb & Meyer drill formats are designed to drive CNC drilling and routing machines. They are broadly
similar, differing only in minor details.
Each drill file requires a separate tool-file giving the diameter of the tool ( in some cases the tool-file is embedded in the header of the drill file).
Your drill file should always show the finished hole-size you require.
A drill file without embedded tool sizes looks like this:
M48
%
T01
X-001375Y-008500
X-002125Y-008750
T02
X-006625Y+018250
X-007875Y+019500
...
A drill file with embedded tool sizes:
M48
INCH
T01C00.020
T02C00.024
T03C00.035
%
M70
T01
X07292Y04884
X07292Y05071
X07380Y08123
...
Where:
  • INCH/METRIC defines the unit
  • T01 is the tool number
  • C indiates that the text numbers are the drill sizes :
    00.020 = drill size 0.020" or 20 mil or 0.50 mm.
More information on the Excellon format is available on Wikipedia.

RS-274X (Extended Gerber)

RS-274X includes many high level commands and controls that let the creator of the Gerber data specify the PCB (photoplot) very precisely. The file contains all critical information.
RS274X is an extension to standard RS-274D (commonly known as Gerber) that includes:
  • Embedded format, unit and data information
  • Embedded apertures
  • Custom aperture definitions
  • Film control statements
  • Multiple layers embedded in a single file
  • Special polygon definitions
The RS-274X specification was originally developed by Gerber Systems.

Determine if your Gerber files are in RS-274X format or RS-274D format.

Open a Gerber file with a text file editor like ( Notepad, Wordpad,... )
If the files are in RS-274X format the aperture definitions will be embedded at the beginning of your file. There will also be a header which shows the coordinate format and other options you have selected when generating the Gerber output.
Example: %FSLAX24Y24*% this means : Format Statement Leading Zeros Suppression, Absolute Coordinates format=2.4.
The syntax is defined in the following image:
RS-274X Format statement
where:
L = leading zeros omitted
T = trailing zeros omitted
D = explicit decimal point ( meaning that no zeros are omitted)
A = absolute coordinate mode
I = incremental coordinate mode
Nn = sequence number, where n is number of digits ( rarely used)
Gn = preparatory function code ( rarely used)
Xa = format of input data ( 5.5 is max)
Yb = format of input data
Zb = format of input data ( Z is rarely, if ever seen)
Dn = draft code
Mn = misc code

Example of embedded aperture list:

%ADD10C,0.0060*%
%ADD11C,0.0050*%
%ADD12R,1.0375X0.1125*%
%ADD13C,0.0040*%
%ADD14C,0.0010*%
The synax is:
%ADD{code}C,{$1}X{$2}X{$3}*%
where:
AD - aperture description parameter
D{code} d-code to which this aperture is assigned (10-999)
C tells 274X this is a circle macro
R tells 274X this is a rectangle macro
$1 value (inches or mm) of the outside diameter
$2 optional, if present defines the diameter of the hole
$3 optional, if present the $2 and $3 represent the size of
a rectangular hole.
If you see the aperture macros present in your files then you definitely have files in RS-274X format.
A free Gerber & DPF viewer ( GC-Preview) can be downloaded from Graphicode. We have experience with this viewer, so we can help you if needed.
A complete description of the Extended Gerber format RS-274X can be found in the download section of the UCAMCO website : RS-274X Extended Gerber Format Specification

DPF (Dynamic Process Format)

The DPF information is part of Ucamco’s JOB database structure. Each JOB contains reference to one or more DPF files.
(Ucamco, formerly Barco ETS, is a manufacturer of laser plotting systems and digital workstations for printed circuit board
production).
DPF is the data format developed by Ucamco to represent layer information of a Printed Circuit Board. This format not
only describes the image of the layer such as pads, tracks, holes, power and ground planes but also includes electrical net
list information as well as additional product information represented with attributes.
Developed specially for the Electronics Manufacturing industry, DPF offers a variety of powerful features such as:
  • embedded aperture definitions
  • reverse objects
  • contour for outline description
  • block apertures to represent Step & Repeat items.
More information about this data format can be found in the download section of the Ucamco site: DPF v7 Format Description.

X,Y coordinates - Decimal point and Zero suppression

Coordinate data make up the bulk of Gerber files. It is difficult to manually follow the table motion from a printout because the Gerber format
uses several techniques to minimize the number of bytes required to represent the data. These suppression techniques are :
  • Suppress the decimal point in the x,y data
  • Suppress either the leading or the trailing zeros
  • Only output changes in coordinate data
  • Only output changes in commands

a. Decimal point suppression

The decimal point is redundant if you know in advance where it will be. The decimal point needs to be reinserted by the photo-plotter control software
in the correct location. Consider the following Gerber commands:
X00560Y00320D02*
X00670Y00305D01*
X00700Y00305D01*
The table moves along X from 00560 to 00670 during the first two commands. But what does 00560 represent? It
could be 5.6 inches, 0.56 inches, 0.056 inches or even 0.0056 inches. No way to tell. If the designer tells you that
there are two integers before the decimal point and 4 integers after the decimal point then you know that 00560
represents 0.56 inch.
b. Leading and Trailing Zero Suppression
The designers of the Gerber database didn't rest after eliminating the decimal point. They must have looked at a
printout and thought, "What good are all those extra zeros in front? Suppose we cut them off. You can still figure
out the coordinate value if you count decimal points from the right side of the number".
No Zero Suppression Leading Zero Suppression
X00560Y00320D02* X560Y230D2*
X00670Y00305D01* X670Y305D1*
X00700Y00305D01* X700Y305D1*
Without zero suppression 48 bytes are used. With leading zero suppression 33 bytes are required to represent the same information.
Depending on the data you might be better off leaving the leading zeros on and suppressing the trailing zeros.
No Zero Suppression Trailing Zero Suppression
X00560Y00320D02* X0056Y0023D2*
X00670Y00305D01* X0067Y00305D1*
X00700Y00305D01* X007Y00305D1*
To correctly interpret the data you must count from the left side of the number to locate the decimal point. Today leading zero
suppression is more commonly encountered.

c. Modal Data Coordinates

After eliminating the decimal point and suppressing the redundant zeros you might expect the database designers would rest on their success.
Not at all. One sharp eyed programmer noticed that the same coordinate would appear over and over again when the table moved only along
X or Y, so " Why not remember the last value of X and Y, and output a coordinate only if it changes?"
All coordinates Modal coordinates
X560Y230D2* X560Y230D2*
X670Y305D1* X670Y305D1*
X700Y305D1* X700D1*
The concept that the plotter remembers the last value of coordiinates is called 'modality'. PC boards often have hundreds of pads in a row
along X or Y and a properly sorted Gerber file will be much smaller when the redundant coordinate is eliminated.

d. Modal Commands

Modality is a good concept for data and works equally well for commands. For example, if you have a string of draw commands,
why repeat the D01 command again and again? Let it stay in effect until another command (D02 or D03) occurs to change it.
D1 not modal D1 modal
X560Y230D2* X560Y230D2*
X670Y305D1* X670Y305D1*
X700D1* X700*
X730D1* X730*
X760D1* X760*

RS-274D : Standard Gerber with separate aperture tables

We can illustrate the structure and the content by using a very simple Gerber file:
G90* 1
G70* 2
G54D10* 3
G01X0Y0D02* 4
X450Y330D01* 5
X455Y300D03* 6
G54D11* 7
Y250D03* 8
Y200D03* 9
Y150D03* 10
X0Y0D02* 11
M02* 12

The line numbers at the right side are not part of the file.
How to understand this Gerber file :
  • Just by simply looking at the file, we can easily see that each (*) asterisk defines the end of the line (EOL).
  • Further we can see that there are different kinds of commands:
    • instructions beginning with G, D, M
    • X,Y coordinates
  • Explanation of the commands
    1. G-Codes: initialization codes
    2. D01, D02, D03: Draw and Flash Commands
    3. D10-D999: Apertures or D-codes
    4. M Codes: Miscellaneous

1. G-Codes : Initialization codes

The G-commands are initialization commands. They are mostly used to indicate to the plotter which data format is used.
We can recognize the following G-codes:

G90/G91 Incremental vs. Absolute Coordinates: ( line 1)

  • The G90 command in line 1 tells the machine that data coordinates are absolute. Each set of coordinates is referenced
    to the table's origin (0,0).
  • The alternative to absolute is incremental - each coordinate is measured relative to the previous coordinate value and is set
    by issuing the G91 command.

G70/G71 Inches versus millimeters ( line 2)

  • The G70 command (line 2) indicates that the unit of measurements for the data to follow is inches
  • The G71 command indicates that the unit is millimeters

G54 optional demand - don't panic if you don't find it back (line 3)

  • The Tool select (G54) instructs the plotter to select the shape and line width described as Dxx immediately following the D54 command.

2. D01,D02,D03 : Draw and flash commands

D-codes are instructions to the photo-plotter. The first three D-codes control the movement of the x-y table.
  • D01 (D1) - line 4 : move to the x-y location specified with the shutter open
  • D02 (D2) - line 5 : move to the x-y location specified with the shutter closed
  • D03 (D3) - line 6 : move to the x-y location specified with the shutter closed; then open and close the shutter, known as flashing.
D01 is the command that "draws" lines, D02 is the command to move the table without exposing any film. D01 and D02 correspond to
moving the paper on a pen plotter with the pen down (D01) and the pen up (D02).
D03 is the flash command. The table is moved with the shutter down. When the desired X-Y coordinates are reached, the shutter
opens and closes leaving the image of the aperture on the film. The flash introduction is an efficient way to image the thousands
of pads present on most circuit boards.
The commands D01-D02-D03 follow the coordinate data - lines 4,5,6 would move the table position first to 0,0 with the shutter closed,
then draw a line from 0,0 to 450,330 and position a flash on 455,300.

3. Apertures or D-codes

Unlike D01,D02 and D03, the D-codes with values from 10 till 999 are data, not commands.
They represent the line thickness and the shape used to make flashes or draws.

4. Miscellaneous M-codes.

At the end of the file we see the command M02*. Gerber calls the M-codes "miscellaneous codes".
The only commonly used M-codes are the stop commands at the end of a file. M00,M01 and M02 are all different types of program stop commands.

5. X,Y coordinates - Decimal point and Zero suppression


Reference: http://www.eurocircuits.com/Indicating-slots-milling-contour-and-routouts-in-your-PCB-design