{"id":1331,"date":"2026-02-25T16:56:21","date_gmt":"2026-02-25T15:56:21","guid":{"rendered":"https:\/\/mohoyt.com\/blog\/?p=1331"},"modified":"2026-02-25T16:59:30","modified_gmt":"2026-02-25T15:59:30","slug":"cpl-generator","status":"publish","type":"post","link":"https:\/\/mohoyt.com\/blog\/2026\/cpl-generator\/","title":{"rendered":"CPL Generator"},"content":{"rendered":"\n<p>I always believe in building things to scratch your own itch and solving the problems that you have right here right now. So that&#8217;s what I did with this neat tool.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Here&#8217;s the problem:<\/h3>\n\n\n\n<p>I had a PCB design that I wanted to manufacture and have components be automatically placed and soldered at the factory. In order to do this you need two special files: a bill of materials (BOM) file that specifies exactly what components you want placed, and a component placement list (CPL) file that specifies exactly where each component should be and what rotation it should have.<\/p>\n\n\n\n<p>When you design a PCB yourself in KiCad or other software you can relatively easily generate this. However, when you&#8217;re building an open source PCB you don&#8217;t always get these files and you need to make them yourself. You can do this manually, but it&#8217;s really miserably slow as it involves you measuring each component with an on screen ruler in a gerber viewer and noting down the position carefully.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/mohoyt.com\/blog\/wp-content\/uploads\/2026\/02\/screenshot.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"703\" src=\"https:\/\/mohoyt.com\/blog\/wp-content\/uploads\/2026\/02\/screenshot-1024x703.png\" alt=\"\" class=\"wp-image-1333\" srcset=\"https:\/\/mohoyt.com\/blog\/wp-content\/uploads\/2026\/02\/screenshot-1024x703.png 1024w, https:\/\/mohoyt.com\/blog\/wp-content\/uploads\/2026\/02\/screenshot-300x206.png 300w, https:\/\/mohoyt.com\/blog\/wp-content\/uploads\/2026\/02\/screenshot-768x527.png 768w, https:\/\/mohoyt.com\/blog\/wp-content\/uploads\/2026\/02\/screenshot-1536x1054.png 1536w, https:\/\/mohoyt.com\/blog\/wp-content\/uploads\/2026\/02\/screenshot-1568x1076.png 1568w, https:\/\/mohoyt.com\/blog\/wp-content\/uploads\/2026\/02\/screenshot.png 1815w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>Or, you could build something to do this in a much more automatic and wonderful way. Which is what I did with the fabulously named <a href=\"https:\/\/gerber-cpl.pages.dev\">gerber-cpl<\/a>. This tool allows you to upload a gerber file and a BOM csv. Then you can go through every component in the BOM and click on the gerber image to place them in the correct location. Once you&#8217;re happy with the placement, you can export the CPL CSV and you&#8217;re good to go to manufacturing!<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Some neat features that this has:<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Choose what gerber layers that you want to see (it defaults to a cool yet distracting x-ray view)<\/li>\n\n\n\n<li>See the rotation of the component that you&#8217;re placing and changing it by pressing <code>r<\/code><\/li>\n\n\n\n<li>See the components that you&#8217;ve already placed and their rotations with green marks on the PCB<\/li>\n\n\n\n<li>See an up to date list of the components on the BOM and their positions on the right hand side of the tool <\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">Some future features I&#8217;m considering:<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Better handling of actual component package sizes (so that it doesn&#8217;t assume everything is a simple 2 leg component like a resistor or capacitor)<\/li>\n\n\n\n<li>OCR detection of references in the gerber (so that it auto zooms to the correct area of the board when you select a component to place)<\/li>\n\n\n\n<li>Auto placement of everything (so you don&#8217;t have to do a thing!)<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">In conclusion:<\/h3>\n\n\n\n<p>It works great and does exactly what it says on the tin. I used this new tool when making a bunch of micro Ornament and Crime Eurorack PCBs recently, and they turned out perfect. Placing components digitally has never been more fun!<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Where to find out more:<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Try gerber-cpl for real here: <a href=\"https:\/\/gerber-cpl.pages.dev\">https:\/\/gerber-cpl.pages.dev<\/a> \n<ul class=\"wp-block-list\">\n<li>You&#8217;ll need a gerber file and a BOM file to try it with &#8211; there&#8217;s an example in the repo below<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>See how it&#8217;s built here: <a href=\"https:\/\/github.com\/mohoyt\/gerber-cpl\">https:\/\/github.com\/mohoyt\/gerber-cpl<\/a><\/li>\n<\/ul>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I always believe in building things to scratch your own itch and solving the problems that you have right here right now. So that&#8217;s what I did with this neat tool. Here&#8217;s the problem: I had a PCB design that I wanted to manufacture and have components be automatically placed and soldered at the factory. &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/mohoyt.com\/blog\/2026\/cpl-generator\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;CPL Generator&#8221;<\/span><\/a><\/p>\n","protected":false},"author":5,"featured_media":1333,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[87],"tags":[],"class_list":["post-1331","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-projects","entry"],"_links":{"self":[{"href":"https:\/\/mohoyt.com\/blog\/wp-json\/wp\/v2\/posts\/1331","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mohoyt.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohoyt.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohoyt.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/mohoyt.com\/blog\/wp-json\/wp\/v2\/comments?post=1331"}],"version-history":[{"count":3,"href":"https:\/\/mohoyt.com\/blog\/wp-json\/wp\/v2\/posts\/1331\/revisions"}],"predecessor-version":[{"id":1336,"href":"https:\/\/mohoyt.com\/blog\/wp-json\/wp\/v2\/posts\/1331\/revisions\/1336"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/mohoyt.com\/blog\/wp-json\/wp\/v2\/media\/1333"}],"wp:attachment":[{"href":"https:\/\/mohoyt.com\/blog\/wp-json\/wp\/v2\/media?parent=1331"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohoyt.com\/blog\/wp-json\/wp\/v2\/categories?post=1331"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohoyt.com\/blog\/wp-json\/wp\/v2\/tags?post=1331"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}