{"id":459,"date":"2021-10-06T20:49:37","date_gmt":"2021-10-06T17:49:37","guid":{"rendered":"https:\/\/tsoukias.eu\/wordpress\/?p=459"},"modified":"2022-05-01T15:23:04","modified_gmt":"2022-05-01T12:23:04","slug":"kicad-to-neoden","status":"publish","type":"post","link":"https:\/\/tsoukias.eu\/wordpress\/2021\/10\/kicad-to-neoden\/","title":{"rendered":"KiCad to NeoDen"},"content":{"rendered":"\n<p>At work we have a new Pick n&#8217; Place machine,  a  <strong><a rel=\"noreferrer noopener\" href=\"https:\/\/www.neodentech.eu\/contents\/en-uk\/d8_NEODEN4.html\" target=\"_blank\">NeoDen4<\/a><\/strong>  for small production batches and prototypes.<\/p>\n\n\n\n<p>It has many nice features, and some naggin&#8217; quirks too. One of the latter is the way it imports the positions file from the PCB design software. The best approach so far is a back and forth procedure as I will describe here.<\/p>\n\n\n\n<p>I have to say that the best solution for the needed format conversion (that I found) is the cross-platform script by Mike Szczys:<\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/szczys\/kicad_to_neoden\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/github.com\/szczys\/kicad_to_neoden<\/a><\/p>\n\n\n\n<p>That script was not perfect though. So I did a few modifications. I am not a python expert, I just patched it to have the columns correct and added an offset feature. The offset permits to have a file with positions very close to the ones needed for the PCB placement you want on the NeoDen machine. The X, Y coordinates numbers on the NeoDen software are absolute, covering the whole area the nozzles head can move. On the other hand, the position of the parts KiCad gives you, is usually relative to the auxiliary axis origin. There must be an easy way to make them relevant. That was my thought and so I came up with this modified script:<\/p>\n\n\n\n<p><a href=\"https:\/\/drive.google.com\/file\/d\/1Z78dUrMhkmU6gy0XtEnY-NKRiAF63eKl\/view?usp=sharing\">https:\/\/drive.google.com\/file\/d\/1Z78dUrMhkmU6gy0XtEnY-NKRiAF63eKl\/view?usp=sharing<\/a><\/p>\n\n\n\n<p>You can run it in a console like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">python kicad.pos_to_neoden_chip.py your_position_file_from_kicad.pos<\/code><\/pre>\n\n\n\n<p>It is tested with python 2.7.18, also with 3.6.12 and KiCad 5.1.10, on Windows 10 and Linux.<\/p>\n\n\n\n<p>The work flow is like this:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>First find out which part will be placed first. Usually a fiducial  will be exported on top (if you have the designator &#8211; reference- AFID) or a capacitor. <\/li><li>Then go to the PnP machine and load the PCB where you want it. Start the procedure as usual and then find the coordinates of the first part to be placed. Note the X and Y values and go back to KiCad. <\/li><li>In pcbnew rotate the board as it is placed in the PnP machine. Put the auxiliary axis on the bottom left corner of the board, so you will end up with the positive numbers NeoDen likes. <\/li><li>Export the .pos file in ASCII mode.<\/li><li>Run the script as above on that file.<\/li><li>Give the X and Y values you found and voila!<\/li><li>Take the exported .csv file to the machine and import it in auto (&#8216;manual&#8217; unchecked).<\/li><li>Check &#8216;manual&#8217; again and make your fine-tuning<\/li><\/ul>\n\n\n\n<p>That&#8217;s it. I hope this helps you and makes work easier for you. If you have a better way please tell me, I will be happy to know.<\/p>\n\n\n\n<p>Have fun!<\/p>\n\n\n\n<p><strong><em>P.S. There is an updated version, see: <a href=\"https:\/\/tsoukias.eu\/wordpress\/2022\/02\/kicad-to-neoden-part-2\/\">https:\/\/tsoukias.eu\/wordpress\/2022\/02\/kicad-to-neoden-part-2\/<\/a> <\/em><\/strong><\/p>\n\n\n\n<p><strong>I recommend to use that one!<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>At work we have a new Pick n&#8217; Place machine, a NeoDen4 for small production batches and prototypes. It has many nice features, and some naggin&#8217; quirks too. One of the latter is the way it imports the positions file from the PCB design software. The best approach so far is a back and forth [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":330,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[8,52],"class_list":{"0":"post-459","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-elec","8":"tag-kicad","9":"tag-neoden","10":"czr-hentry"},"_links":{"self":[{"href":"https:\/\/tsoukias.eu\/wordpress\/wp-json\/wp\/v2\/posts\/459","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tsoukias.eu\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tsoukias.eu\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tsoukias.eu\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/tsoukias.eu\/wordpress\/wp-json\/wp\/v2\/comments?post=459"}],"version-history":[{"count":15,"href":"https:\/\/tsoukias.eu\/wordpress\/wp-json\/wp\/v2\/posts\/459\/revisions"}],"predecessor-version":[{"id":518,"href":"https:\/\/tsoukias.eu\/wordpress\/wp-json\/wp\/v2\/posts\/459\/revisions\/518"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tsoukias.eu\/wordpress\/wp-json\/wp\/v2\/media\/330"}],"wp:attachment":[{"href":"https:\/\/tsoukias.eu\/wordpress\/wp-json\/wp\/v2\/media?parent=459"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tsoukias.eu\/wordpress\/wp-json\/wp\/v2\/categories?post=459"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tsoukias.eu\/wordpress\/wp-json\/wp\/v2\/tags?post=459"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}