Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 28, 2022, 05:37:27 17:37


Login with username, password and session length


Pages: [1]
Print
Author Topic: KiCad .pos to Neoden import  (Read 1672 times)
0 Members and 1 Guest are viewing this topic.
cycler
Newbie
*
Offline Offline

Posts: 16

Thank You
-Given: 38
-Receive: 38


« on: October 06, 2021, 07:51:19 19:51 »

A software tool, just a python script to help users of the NeoDen4 Pick and Place machine import the positions of the components to be placed from the relevant Kicad file.

At first I found this one:
https://github.com/szczys/kicad_to_neoden

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 the attached script. Please delete .txt extension, leave the .py extension.

Requires Python in your system.

** New version: Now with angle compensation. **

You can run it in a console like this:

Code:
python kicad.pos_to_neoden_chip_v2.0.py  your_position_file_from_kicad.pos

It is tested with python 2.7.18, also with 3.6.12 and KiCad 5.1.10, on Windows 10 and Linux.

The work flow is like this:

  • First find out which part will be placed first. Usually a fiducial will be exported on top (if you have the designator – reference- AFID) or a capacitor.
  • 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.
  • Then find the orientation error angle. If you tell the machine you have a single board, you can press the 'angle detect' button. Then you select two points of the same straight line no matter if it is vertical or horizontal. The machine gives you the error angle. You note the number and go back to KiCad.
  • In pcbnew rotate the board as it is placed in the PnP machine. You can put the auxiliary axis on the bottom left corner of the board, so you will end up with the positive numbers NeoDen likes, but this is not mandatory
  • Export the .pos file in ASCII mode.
  • Run the script as above on that file.
  • Give the X and Y values and the error angle value you found. The script will produce a suitable .csv file with the correct positions.
  • Take the exported .csv file to the machine and import it in auto (‘manual’ unchecked).
  • Check ‘manual’ again and make your fine-tuning, this will be minimal this time!

That’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.

Have fun!
« Last Edit: March 01, 2022, 04:30:33 16:30 by cycler » Logged
cycler
Newbie
*
Offline Offline

Posts: 16

Thank You
-Given: 38
-Receive: 38


« Reply #1 on: February 27, 2022, 02:21:19 14:21 »

I have updated the script above to ask for the error angle and compensate for it in the positions file it exports.

Check the attached image to see what I am talking about.
When you program Neoden machine to populate a PCB, you usually place the PCB not completely aligned with the machine's coordinate system. This script compensates for this error.

Now manual corrections have come to a minimum I think.
Logged
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC