-
1Preparing project for export
JLCPCB offers custom PCB fabrication and SMT assembly services at https://jlcpcb.com/HAR!
SMT soldering can be fun, but it requires some special tools, it takes practice to do well, and it can be very frustrating along the way!
We decided to use JLCPCB's SMT assembly service for these boards to make things as easy for us as possible. The following steps outline the process to setup your KiCAD project so that you can export all the proper files such as the footprint position (.pos) file, Bill of Materials (BOM), and of course, the all important drill and gerber files.
Step 1: Creating BOM
First, you must navigate to Edit Symbol Fields (1) from within KiCAD's schematic window, and add a new field (2) called LCSC Part # (3). Then you just have to add JLCPCB part numbers for each of the components you would like to have assembled for you (4):
Most of the components on this board are actually through hole (THT) and not surface mount (SMT) since it is mostly connectors. We will have to add these parts once we receive the boards as JLC's assembly service currently only supports SMT devices. That is okay because THT soldering is much easier and faster than SMT soldering and we can still save time by using JLC's SMT assembly for all of the SMT components we need.
JLC's parts database is simple to use once you know what parts you are looking for. For example, finding the part number for the 0.1uF capacitors above (4), is done by searching for something like 100nF 0603. We usually check the Basic parts box as shown below since these are the easiest parts to source, and avoid potential surcharges:
Once you have input part numbers for all of your SMT components into KiCAD, you are ready to generate a BOM.
As seen in the screenshot below, start by clicking on the BOM icon in KiCAD's schematic window (1). There is a handy script available to download from arturo182's GitHub that can be added into KiCAD as a plugin (2), which will automatically generate a BOM following the conventions that JLC specifies on their website. Once added, you should be able to click Generate to create the BOM in .csv format (3):
I personally had issues running the script within KiCAD, but was able to execute the script from the command line. Judging from some comments on the GitHub, this may have been due to spaces within my KiCAD project path, but YMMV.
With the .csv BOM file generated into your project folder, create a new folder called assembly inside the root project directory and move the BOM file inside this folder. I also like to append a -BOM suffix to this file. This just keeps the project directory better organized.
Step 2: Generate Footprint Position File
Next you will need to generate a footprint positions file so that JLC's Pick and Place machine knows what orientation each of your parts need to be placed. This is crucial for polar components like electrolytic capacitors, or integrated circuits, while others like resistors and ceramic capacitors don't matter if they are placed one way or another, so long as they are placed on the pads!
You must have the KiCAD layout window open to generate this file. Navigate to File > Fabrication Outputs > Footprint Position (.pos) File, then set the Output directory to the assembly folder we just made (1), set the parameters as shown (2), and finally click Generate Position File as seen in the screenshots below:
To keep the files better organized, I like to rename this file with the suffix -Footprint-Positions rather than -all-pos, just to make the file name more meaningful. You need to open this file and rename the headings to comply with JLC's requirements. The screenshot below shows the proper header names after changing them in Excel:
Step 3: Generate Gerber Files
Finally, we are ready to generate the gerber (.gbr) and drill (.drl) files.
First, we should create another new folder in the project root called gerber.
Then, again from the KiCAD layout window, navigate to File > Plot. In the window that appears, set the Output directory to the gerber folder we just made (1), click Generate Drill Files (2), confirm the default drill file parameters (3), click Generate Drill File (4) then close the Generate Drill Files window, confirm the default gerber parameters (5), and finally click Plot (6), as shown in the screenshots below:
Lastly, you need to zip the contents of the gerber folder into a .zip file before you can move to the next stage of uploading to JLC's website.
-
2Uploading to JLCPCB
Now comes the fun part! Head over to https://jlcpcb.com/HAR and click on Upload gerber file, as shown below:
Once uploaded, you can make changes to the default settings applied for your PCB, based on the gerber files.
The only things we changed are the PCB colour to black (the new purple colour would undoubtedly look awesome, but unfortunately it is not one of our school colours!), the surface finish to the lead free HASL option, and we have also chosen to specify the order number on the backside of our PCBs by placing the text JLCJLCJLCJLC on the rear silkscreen layer. These changes are indicated in the screenshot below:
Next, we need to set our parameters for the SMT Assembly service. As seen below, we only chose to assemble 2 of the 5 boards we have ordered. We really only need one of these boards but 5 is the minimum quantity of PCBs you can order, and 2 is the minimum quantity that you can have assembled. There is also an option to specify where the tooling holes will be placed, but we chose to leave this up to the engineers at JLC since this board is not very crowded and we are not picky.
Next, after uploading both the BOM and footprint placer files, you will reach the following screen where you can verify that the JLCPCB part numbers you entered into KiCAD match the components that will be assembled:
After verifying the part numbers, you are ready to move on to the next stage of verifying the components' orientations.
-
3Verify component placement
The last step before you are ready to order your PCBs is checking the orientation of your assembled components.
As seen in the screenshot below, the JLC website gives you a preview of your PCB which you can zoom and move around in order to check how it thinks certain parts should be oriented:
The red boxes indicate components that are not going to be assembled by JLC. In this case, JLC did not have the diode and MOSFET IC that we wanted and so we opted to exclude those components from the assembly. This is done simply by not specifying a JLCPCB part number in the BOM file.
As for the parts that will be assembled, there are no components for which orientation matters and so there is nothing much for us to check here. This viewer is a good place to do a final check on the placement of pads and traces, and it just so happens that on the right hand side of the image above we noticed that there is a trace that could be too close to the edge! We will go back and fix this before submitting our gerbers for fabrication.
Although the capacitors we are using are not polar components, the viewer seems to still indicate what would be the positive pad. For illustrative purposes, consider the screenshot below:
As you can see by the red dots indicated by JLC's viewer tool, if these were polar capacitors, those pads would be where the footprint location file thinks the anode (positive terminal) will be. If this does not match your circuit schematic, you would need to open up the .pos file in the assembly folder, and adjust the Rotation parameters accordingly.
And that's all there is to it! There are some steps you need to be careful to do properly, but overall JLCPCB makes custom PCB fabrication as straightforward as it could be. And for under $18 CAD they offer incredible value for their services, with fantastic customer service!
Check them out at https://jlcpcb.com/HAR! They even offer coupons for new users!!
Thanks JLCPCB for sponsoring our custom PCB fabrication - we can't wait to work with you again!
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.