KICAD Tip: Generating Pick and Place Files
When you need to assemble a PCB with a machine, you can generate a location file to let the machine know where to place your parts. In KiCAD, this process can be a bit of a pain, so we write an article to help you generate a location file.
First, you will need to place a ‘Place File Origin’. Go to “Place” and select “Drill/Place File Origin”.
Place the origin in the lower left corner of the board. It's okay if the origin is not exactly in the lower left corner of the board, as long as it's close.
In PCBNew go to “File” and then to “Fabrication Outputs” - from there select Component Placement (.pos)...
When generating these files, make sure you have the following settings:
Format: ASCII
Units: Millimeters
File: Separate front and back files
Check - use drill/place file origin
Two “.pos” files will be generated. One for the top of the board and one for the bottom of the board. These are the files we need.
Let's take a look at the contents of the file.
Reference Number: The designator of the component. Usually set in the schematic generator.
Val: the value of the component. Usually set in the schematic generator.
Package: Footprint used when laying out the PCB.
PosX: X position with reference to the position origin.
PosY: Y position relative to the position origin.
Rot: How many degrees the machine should rotate the part during assembly.
Side: Which side of the board the part is on. You should create two separate files for the top and bottom.
If you find that you need to change the “.pos” file, it is important not to change the generated file. Make the changes in the layout and generate a new “.pos” file. The generated file is fed into our pick and place machine and may not work properly if the format is changed.
Taking the time to properly handle this process will make your assembly process go much smoother.