Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
equipment:electronics:pick_and_place_machine [2026/05/05 12:45] kenequipment:electronics:pick_and_place_machine [2026/08/15 09:06] (current) – Add CAD conversion instructions nicks
Line 1: Line 1:
 =======Pick and place machine - NeoDen 4======= =======Pick and place machine - NeoDen 4=======
 +
 [[https://www.neodensmt.com/uploads/14386/files/NeoDen4-User-Manual.pdf|Link to full manufacturer's manual]] [[https://www.neodensmt.com/uploads/14386/files/NeoDen4-User-Manual.pdf|Link to full manufacturer's manual]]
  
Line 37: Line 38:
   * Shut down the machine by pressing the Exit button in the UI then waiting for the system to shut down before removing power.   * Shut down the machine by pressing the Exit button in the UI then waiting for the system to shut down before removing power.
  
-=== CAD Data Preparation === +=== CAD Data Preparation for KiCad === 
-Instructions for obtaining pick and place data from KiCad...+These instructions may work for other programs as long as they can produce ASCII position files. 
 + 
 +If your design doesn't already have fiducials, you will need them. Even if you're using board holes, you need them in your design so that the pick and place machine knows where they are. 
 + 
 +In the KiCad schematic editor, add two fiducialsForward annotate them and place them on the PCBIf using board holes, you can just place them on top of the board holes. 
 + 
 +In the PCB editor, go to File > Fabrication Outputs > Component Placement. Choose ASCII format and generate the file. 
 + 
 +Copy and paste the below program into a new .py file and use it to convert the ASCII placement file into the correct format for the pick and place machine. 
 + 
 +<file> 
 +# Translator for converting KiCAD .pos files to .csv files for a NEODEN pick and place machine 
 +# Based on https://github.com/szczys/kicad_to_neoden 
 +# Usage 
 +# python kicad_to_neoden.py your_position_file_from_kicad.pos 
 +# Works with Python 2 or 3 and outputs a file with the same name as the input but ending with "_neoden.csv" 
 + 
 +from __future__ import print_function 
 + 
 +import fileinput 
 +import os 
 +import sys 
 + 
 +def transrotate(value): 
 + if value <= 180: 
 + return int(value) 
 + else: 
 + value -= 180 
 + return int(0-(180-value)) 
 + 
 +def process_pos_lines(pos_lists): 
 +        output_string = "Designator,Footprint,Mid X,Mid Y,Layer,Rotation,Comment\n" 
 +        output_string += ",,,,,,\n" 
 +        for line in pos_lists: 
 +                if line[0][0] == '#': 
 +                        continue 
 +                outline = line[0] + "," + line[2] + "," 
 +                outline += line[3].split('.')[0] + "." + line[3].split('.')[1][:2] + "mm," 
 +                outline += line[4].split('.')[0] + "." + line[4].split('.')[1][:2] + "mm," 
 +                if line[-1] == "top": 
 +                        outline += "T," 
 +                else: 
 +                        outline += "B," 
 +                outline += str(transrotate(float(line[5]))) + "," + line[1] 
 +                output_string += outline + '\n' 
 +        return output_string 
 + 
 +def main(): 
 +        if len(sys.argv) != 2: 
 +                print("Syntax error!"
 +                print("Usage: python kicad_to_neoden.py your_position_file_from_kicad.pos"
 +                return 
 +        #Turn input .pos file into a list of lists 
 +        pos_lines = list() 
 +        for line in fileinput.input(): 
 +                pos_lines.append(line.strip('\n').split()) 
 + 
 +        cur_dir = os.getcwd() 
 +        filename = fileinput.filename() 
 +        if filename[-4:] != ".pos": 
 +                print("WARNING: Input file doesn't have expected '.pos' extension"
 +        print("Parsing " + filename) 
 + 
 +        neoden_format = process_pos_lines(pos_lines) 
 +        #Strip trailing newline character 
 +        if neoden_format[-2:] == '\n': 
 +                neoden_format = neoden_format[:-2] 
 + 
 +        print("Writing CSV file"
 +        output_file = os.path.splitext(os.path.join(cur_dir,filename))[0]+"_neoden.csv" 
 + 
 +        with open(output_file, 'w') as ofile: 
 +                ofile.write(neoden_format) 
 +        print("Successfully wrote:",output_file) 
 + 
 +if __name__ == '__main__': 
 +        main() 
 + 
 +</file> 
 + 
 +You may wish to edit the output file and delete the lines for components you definitely won't want to place on the machine, but you can also do that on the machine. 
 + 
 +Copy the output file to a USB drive. The computer built into the pick and place machine runs Windows XP so try not to put viruses on it.
  
 === Configuring the component feeders === === Configuring the component feeders ===
Line 48: Line 131:
  
 === Programming the machine with your job === === Programming the machine with your job ===
 +
 +After following the instructions above, you will now have a pick and place file in the correct format on a USB drive.
  
 === Running the job === === Running the job ===
  • equipment/electronics/pick_and_place_machine.1777985103
  • Last modified: 4 months ago
  • by ken