How to Use JLCPCB for Wicked-Fast PCB Fabrication and Assembly

by markahofmeister in Circuits > Electronics

31 Views, 0 Favorites, 0 Comments

How to Use JLCPCB for Wicked-Fast PCB Fabrication and Assembly

jlcpcb-2.png

JLCPCB's quick turnaround times and in-house parts library make them one of the fastest and cheapest sources of Printed Circuit Boards (PCBs) and Printed Circuit Board Assemblies (PCBAs) for hobbyists. I'll show you how to properly prepare your fabrication and assembly files to maximize your chances of success with JLCPCB. I'll be using Altium in this tutorial, so any Altium-specific steps will have an "(Altium)" Disclaimer.

Design Your Board With the JLCPCB Library in Mind

pcb-pcba.png

There are two stages of turning atoms into working circuit boards:

  1. Fabrication: The layers of copper are etched and sandwiched between layers of dielectric material, and then interconnected with vias.
  2. Assembly: The necessary components are soldered onto the PCB. The PCB is now populated and is considered a PCB Assembly (PCBA)

Almost all board houses have a quick-turn fabrication option, so JLCPCB's quick-turn is nothing new. JLCPCB's assembly process, however, is very unique. Normally, there are 3 service options if you'd like your PCBs assembled:

  • Turnkey: You provide a PCB manufacturer with a Bill of Materials (BOM) containing the part numbers for each component on the board. They will source these components and populate the PCBs with them.
  • Kitted/Consigned: You send the physical components to the PCB manufacturer and they populate the PCBs with them.
  • Both: A combination of turnkey and kitted/consigned - you supply some parts and they buy the rest.

Usually, it takes 1-3 weeks for manufacturers to receive components. JLCPCB, however, doesn't have this service - they have an in-house warehouse of parts that they simply stock the pick-and-place machines with. This has a few advantages:

  • Wicked-fast: Since JLCPCB doesn't have to wait for part shipping times, they can get to assembling your PCBs as soon as they're fabricated
  • They know the parts: Since JLCPCB knows how the parts are packaged and oriented, they have incredible tools to help you visualize what the components will look like on your PCB which can help you spot errors. I cannot stress the importance of this.


This, of course, is a tradeoff: you must design your PCB with components that are in JLCPCB's libraries. Though this sounds limiting, JLCPCB has 500,000+ stock components.


Here's a link to their library.


Here are some tips to help you navigate these new waters:

  1. Avoid parts with datasheets that you can't read: As JLCPCB is based in Asia, many of the components in their library have datasheets written entirely in Mandarin. If you can read both this and Mandarin datasheets, good for you - knock yourself out. If not, be very hesitant to use these components - you might use them improperly if you can't read the datasheet.
  2. Be generous with part numbers: If you find a part on DigiKey or Mouser and find that JLCPCB doesn't carry that exact part number, break the part number down to its essentials. For example, let's say that I want to use Analog Devices' MCP73871T-1CCI/ML battery charger IC. JLCPCB shows no stock for this item. Analog Devices provides a datasheet for the "MCP73871" IC. This implies that any letters/numbers/symbols after the "MCP73871" in the part number specify variations in packaging, temperature ranges, etc. JLCPCB might have one of these alternatives that works for my application. Sure enough, when searched, "MCP73871" returns 19 results, one of which is in stock - the MCP73871T-2CCI/ML, which is almost identical to the MCP73871T-1CCI/ML. Therefore, this IC can be used in place of the original.

(Altium) Create an Output Job File

outjob-new.png

When your board design is complete with JLCPCB-friendly components, we must export all of the necessary data to communicate to JLCPCB exactly what our requirements are.

In Altium, an output job is a pre-configured set of outputs used for a specific part of the manufacturing process. For example, you might have one output job for fabrication, one for assembly, one for a BOM, and so on. All of these output jobs are contained in an Output Job File with the extension ".OutJob".

To start, Add a new OutJob file to your Altium project (Right click on project in projects panel --> "Add New to Project" --> Output Job File".) Give this file a name and save it to your system.

(Altium) Add Fabrication File Outputs

1.png
3.png

First, we'll prepare the files necessary to fabricate the bare boards - no components yet. You'll need two sets of files:

  • Gerber Files - A single Gerber file contains a 2D map of some aspect of your board. For example, a single Gerber file might contain the copper pattern for one layer, the soldermask pattern for the top or bottom, or the board cutout profile.
  • NC Drill Files - This is a single file, usually in a .txt format, that specifies the locations and diameters of each hole in the board.

In the "Output Containers" column, create a new file structure in your OutJob file and name it "Fabrication." Add 2 new Fabrication Outputs in the "Outputs" column - one which is "Gerber Files" and another which is "NC Drill Files." For this example, I'm basing fabrication outputs on my Christmas 2023 Soundboard PCB, but you should select the PCBDoc specific to your project.

(Altium) Configure Your Gerber File Output

1.png
2.png

Double-click on the "Gerber Files" Fabrication outputs row; you'll be greeted with a menu of all possible Gerber output files for your project. The default settings in the left column can remain unchanged. You can select which layers you'd like to "Plot," i.e. generate files for.

You should generate files for:

  • All copper layers
  • Top & Bottom Silkscreen
  • Top & Bottom Solder Mask
  • Top & Bottom Paste Mask
  • Necessary Mechanical Layers
  • If your board outline is contained on a mechanical layer, include it.
  • If you have a mechanical layer with any information that the manufacturer needs to know, include it.

Click "Apply" when you're finished.

(Altium) Configure Your NC Drill File Output

1.png

Double-click on the "NC Drill File" Fabrication outputs row. You shouldn't have to change anything here, but be sure to use mm units and the maximum 0.1um precision.


Click "Apply" when you're finished.

(Altium) Add and Configure a BOM Output Job

0.5.png
1.png
2.png
3.png
pns.png

In your project, "+Create" a new ActiveBOM document, which automatically creates a Bill of Materials for your project. Save this file to your file system.

Go back to the Output Job File; add a new Bill of Materials Report Output in the "Outputs" column. Set the BOM reference to the newly-created .BomDoc file, which will encapsulate all components in your project. In the "Output Containers" column, create a new file structure and name it "BOM".

Double-click on the "Bill of Materials" output to bring up the configuration menu. Right-click on one of the BOM column headers and select "Select Columns..." which will allow you to rearrange and show/hide BOM columns.

Be sure to check JLCPCB's up-to-date BOM template for proper formatting guidelines. As of January 2024, JLCPCB requires 3 parameters per component - Designator, Value, and Footprint:

  • Designator: Each component has a unique designator to map it to a specific component value or part number. For example, the designator "R1" represents resistor 1 in your design and is indicated on your PCB's silkscreen. In the BOM, the value and footprint cells in the row for R1 tell JLCPCB exactly what resistor should be populated in R1's footprint.
  • Value
  • If you're using common passive components like resistors, capacitors, and inductors, this cell will hold the value of said component. For example "1k" for a 1 kiloohm resistor, "5uF" for a 5 microfarad capacitor, or "7nH" for a 7 nanohenry inductor.
  • If you're using any other component like an IC or LED, the value cell holds the manufacturer part number.
  • Footprint: This cell holds the name of the footprint for a specific component. Most components are packaged in industry-standard packages like 0603, 0402, 8-DIP, 16-TSSOP, 64-LQFP, and so on. Check your component's datasheet for packaging data. If you're using an IC with an odd-ball package or a unique component, don't worry - as long as the footprint is correct, this field isn't terribly important. Be sure, however, that you double-check this "Footprint" component for passive components like capacitors and resistors.
  • (Optional) JLCPCB Part #: If you don't specify a JLCPCB Part number, JLCPCB will automatically select passive components to meet your needs, which is a great timesaver. If you'd like to specify a very specific component, be sure to include an extra column named "JLCPCB Part #" to do so. This column should contain the part numbers that JLCPCB assigns their components, not the manufacturer part number.

Apply your changes once you've formatted your BOM.


(Altium) Add and Configure a CPL Output Job

1.png
2.png
3.png

Our BOM will tell JLCPCB which components we want to use, but we haven't told them exactly where to put them and how to rotate them.

We'll create another file called a component placement file (CPL) to specify these locations and rotations. Create a new Pick and Place output file, this time under the "Assembly Outputs" section. We'll use the .PcbDoc as the reference for this CPL file.

Be sure to check JLCPCB's up-to-date CPL template for proper formatting guidelines. As of January 2024, JLCPCB requires the component designator, X-Y coordinates, Top/Bottom layer, and component rotation. Click "Ok" once you've formatted your CPL properly.

In the "Output Containers" column, create a new file structure and name it "Assembly".

(Altium) (Optional, But Recommended) Create an Assembly Drawing

1.png
2.png

JLCPCB should be able to fully fabricate and assemble your board with the Gerber, NC Drill, BOM, and CPL files. However, it's always good to overcommunicate your design intent to a manufacturer. For that reason, I recommend creating an assembly drawing to help JLCPCB visualize your requirements.

Create a new Draftsman Document in your Altium project. You'll be greeted with a blank page of graph paper. You can place different board views from different angles in this document (check out this tutorial for all things Draftsman.) My favorite board view is the assembly view, which allows you to make easy callouts and communicate what markers on your silkscreen mean. For example, you can use callouts to communicate that dots represent pin 1 of an IC or that a line in your LED footprint represents the anode/cathode.

Once you're satisfied with your assembly drawing, name and save the document. Remember - bias towards more information than less.

(Altium) (Optional, But Recommended) Add an Assembly Drawing Output Job

3.png
4.png

Once your Draftsman document is complete, create another output job in your OutJob file for the Draftsman. This time, it'll be under the "Documentation" section.

In the "Output Containers" column, create a new PDF and name it "Drawing".

(Altium) Generate Your Outputs

fab.png
bom.png
asm.png
drawing.png
generate.png
files.png

Finally, we need to connect the output files to their respective output containers.

  1. Click on the "Fabrication" Output Container. Click on the circles in the "Gerber Files" and "NC Drill Files" rows of the Fabrication Outputs section. You should see two green arrows pointing from these outputs to the Fabrication Output Container.
  2. Click on the "BOM" Output Container. Click on the circle in the "Bill of Materials" row of the Report Outputs section. You should see a green arrow pointing from this output to the BOM Output Container.
  3. Click on the "Assembly" Output Container. Click on the circle in the "Generates pick and place files" row of the Assembly Outputs section. You should see a green arrow pointing from this output to the Assembly Output Container.
  4. Click on the "Drawing" Output Container. Click on the circle in the "Draftsman" row of the Documentation Outputs section. You should see a green arrow pointing from this output to the Drawing Output Container.

Finally, you can generate all of these outputs. Click the "Generate content" on each of the output containers. Altium will place the generated files for all output containers in the "Project Outputs for [Project Name]" Folder on your machine.

Check Your Outputs

top.png
bottom.png

Before we upload our files to JLCPCB, we must make sure that these files are as we expect them to be. Open your Gerber files one-by-one and inspect them to ensure that you don't have any unexpected patterns, especially on your copper layers. Also, check the NC Drill file - ensure that the hole locations and sizes look correct to you.

Upload Your Files to JLCPCB

zip-file.png
upload.png
viewer.png
asm.png

Add your Gerber, NC Drill, and assembly drawing files into a zip file and upload them to the JLCPCB portal.

JLCPCB will process your Gerber files and generate a 3D viewer. Check this model - if it looks wrong, something will likely go wrong in the fabrication of your PCB. Go through all of the fabrication options and ensure that they're correct - change them if not.

You'll also want to enable the Assembly option. Just as you did for fabrication, change the parameter options as necessary. Do click "yes" for Confirmation of parts placement, as JLCPCB engineers will likely catch any glaring mistakes in your CPL specifications.

When you're finished, click "Next."

Review Your Gerber Upload

next.png

Review the Gerber Files again in the 3D viewer. We only get one shot at this, so look carefully.

When you've thoroughly reviewed your file, click "Next."

Upload Your BOM and CPL Files

BOM-CPL-upload.png

Upload both your BOM and your CPL in a supported file format and click "Process BOM and CPL."

If you have components on your board that JLCPCB does not have in their library that you will purchase separately and assemble yourself, remove these rows from your BOM. Upon upload, you'll likely get an error message telling you that these parts won't be assembled; click continue.

Review Your JLCPCB BOM

component-matching.png
missing-parts.png
missing-stock.png

JLCPCB will automatically connect the components on your BOM with components in their library. Any part that is "selected" in the far right BOM column will be purchased and assembled on your PCB.

Check JLCPCB's matching closely for the passive components for which we have not specified product numbers. Check for errors in footprints or component values.

If your BOM contains product numbers that do not match a component in JLCPCB's library, there will be unselected parts in your JLCPCB BOM.

If your BOM contains product numbers that match a component in JLCPCB's library, but this component has insufficient stock, these parts will also be unselected.

Both of the above issues can be solved by selecting another part from JLCPCB's library or purchasing these items separately and hand-assembling them.


Confirm Component Placement

part-error.png
led.png
rotation.png

JLCPCB will then overlay 2D models of all components in your BOM over the 2D model of your PCB. I can't stress how great of a feature this is, and it's only possible due to JLCPCB's in-house library.

Component selection errors will show up here. On my first upload, JLCPCB selected resistor arrays instead of single resistors, which I had to go back and fix.

Check that the pin 1 indicators and the LED polarity indicators for the 2D models in JLCPCB's library line up with your silkscreen indicators. If they don't, this can easily be fixed by using the rotation buttons in the component viewer.

Important: Even if you're not the one ordering this board, you should go through the process of uploading and reviewing your files. If you make changes to the component rotation, be sure to go back to your Altium-generated CPL file and adjust the rotation values here accordingly before sending your files to the buyer.

Send Off to Order

After you've triple-checked every aspect of your board, specify fabrication time, assembly time, and shipping speed options and save the board to your cart. Again, go though this process completely even if you're not ordering the board.

Watch your email closely and respond promptly to any JLCPCB engineers who have questions for you.

Good luck.

References

  • https://sbcinc.com/pcb-vs-pcba-whats-the-difference/
  • https://www.altium.com/documentation/altium-designer/streamlining-generation-of-manufacturing-data-with-output-jobs
  • https://jlcpcb.com/parts/componentSearch
  • https://jlcpcb.com/