This the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

OpenPnP

What is OpenPnP?

OpenPnP is a piece of open source software designed to control pick and place machines. It supports a wide range of machines, with many features found in high-end commercial software. You can find out more about it here.

What’s on this site?

  • How to configure and calibrate your LumenPnP in OpenPnP
  • How to run a job on your LumenPnP using OpenPnP

Let’s dive in!

1 - Calibration

Connect your LumenPnP to OpenPNP and perform basic calibration.

What you’ll learn

This guide is focused on performing basic calibration for your LumenPnP. Specifically it will test the motion system, and calibrate the cameras so that they can identify objects and apply offsets to the toolhead for precise part picking and placing. These steps are usually only necessary when first setting up a LumenPnP for the first time.

What you’ll need

  • A LumenPnP with the mechanical and electrical build completed.
  • Read through the OpenPnP Wiki. It’ll be super important to getting going with your machine. These docs are meant to augment the OpenPnP docs, not replace them.

1.1 - Importing Config Files

Install OpenPNP and import default config

To use OpenPnP with the LumenPnP, you will need to tell the software about your machine’s capabilities, such as it’s size, how many cameras it has, etc. We’ve done the basic work for you and put together a starting set of configuration files that will describe your Lumen. If you’d like to use the defaults to start with, then follow the instructions below to place them where OpenPnP can use them.

If you’d like to start from scratch with your setup, community member Qwertymodo has posted a very helpful video showing his process of doing calibration on his machine from scratch. It’s a great place to start if you want to do all the setup yourself.

Windows

  1. Download OpenPnP 2.0 for Windows here (probably the 64 bit installer).

  2. Go to the LumenPnP Releases Page.

  3. Find the latest release that is compatible with your hardware. If your machine’s version begins with v2, pick the most recent release starting with v2. If your machine’s version begins with v3, pick the most recent release starting with v3.

  4. Download the Source Code (zip) for that release.

  5. Unzip the source code.

  6. Navigate to the openPnP folder inside and find the three configuration files you need: machine.xml, packages.xml, and parts.xml.

  7. To install these files in OpenPnP, you’ll need to find its configuration folder. First, follow these instructions to show hidden folders in Windows Explorer.

  8. Next, navigate to:

    1. On Windows Vista and above: C:\Users\[username]\.openpnp2.
    2. On Windows 2000, XP and 2003: C:\Documents and Settings\[username]\.openpnp2.
  9. Double-check that OpenPnP is closed

  10. In the .openpnp2 folder you’ll find the currently used configuration files, machine.xml, packages.xml, and parts.xml. It is a good idea to copy these somewhere as backup whenever you make changes like this.

  11. Copy the configuration files from the LumenPnP source files into .openpnp2 and overwrite the old configuration files. Note that if you’ve already been using OpenPnP, you may want to only replace your machine.xml file, as the other files will overwrite your existing components library.

MacOS

  1. Download OpenPnP 2.0 for Mac here.

  2. Go to the LumenPnP Releases Page.

  3. Find the latest release that is compatible with your hardware. If your machine’s version begins with v2, pick the most recent release starting with v2. If your machine’s version begins with v3, pick the most recent release starting with v3.

  4. Download the Source Code (zip) for that release.

  5. Unzip the source code.

  6. Navigate to the openPnP folder inside and find the three configuration files you need: machine.xml, packages.xml, and parts.xml.

  7. To install these files in OpenPnP, you’ll need to find its configuration folder. Note you may need to follow these instructions to show hidden folders in Finder.

  8. Next, navigate to: /Users/[username]/.openpnp2.

  9. Double check that OpenPnP is closed.

  10. In the .openpnp2 folder you’ll find the currently used configuration files, machine.xml, packages.xml, and parts.xml. It is a good idea to copy these somewhere as backup whenever you make changes like this.

  11. Copy the configuration files from the LumenPnP source files into .openpnp2 and overwrite the old configuration files. Note that if you’ve already been using OpenPnP, you may want to only replace your machine.xml file, as the other files will overwrite your existing components library.

1.2 - Connecting to Your Machine

Getting set up and connected to your LumenPnP using OpenPnP

Awesome! Now we’ve got OpenPnP installed on your computer, and we’ve got the default configuration loaded up, our next step is getting connected to the machine using OpenPnP and getting familiar with the UI.

  1. Connect your machine to your computer using the included USB cable, and open OpenPnP on your computer. You should now see the OpenPnP UI:

Com Port and Baud Rate

Before connecting to the machine, you need to set which USB ports to use for communication in OpenPnP.

  1. Click on the Machine Setup tab

    Selecting the Machine setup tab from the main screen

  2. Click on the “Expand” checkbox to open all of the features about your machine.

    Expanding the Machine Config options

  3. Under Drivers click on GcodeDriver GcodeDriver

    Reviewing the GcodeDriver options

  4. Below the list of machine settings you’ll find the details of the GcodeDriver. In the Configuration tab, check the Baud and Port settings.

    1. The Baud should be 115200
    2. On Windows, the Port should be in the format: COM2.
    3. On Mac, the Port should be in the format: cu.usbmodem<a-lot-of-numbers>
    4. On Linux, the Port should be in the format: ttyACM0.
      Changing the Port and Baud Rate

Bottom Camera Config

Now we’ll set up the cameras. The big red “X” in the camera views means that OpenPnP doesn’t know where to find the webcam feed. OpenPnP needs to know which webcam is which.

  1. Again, navigate to the Machine Setup tab

  2. Again, click the “Expand” checkbox if necessary

  3. Under Cameras click on OpenPnpCaptureCamera Bottom

    Finding the Bottom Camera Settings

  4. In the lower detail pane, switch to the Device Settings tab

    Switching to the camera device settings

  5. In the Device drop-down, choose PnP Bottom Camera (PnP Bottom Camera)

    Selecting the correct device for the Bottom Camera

  6. In the Format drop-down, choose the 1280x720 10fps setting

  7. Click the “Apply” button in the bottom right

    Saving changes to the Bottom Camera Config

Top Camera Config

  1. Again, navigate to the Machine Setup tab

  2. Again, click the “Expand” checkbox if necessary

  3. Navigate to Heads > ReferenceHead H1 > Cameras > OpenPnPCaptureCamera Top

    Finding the Top Camera Settings

  4. In the lower detail pane, switch to the Device Settings tab

    Switching to the camera device settings

  5. In the Device drop-down, choose PnP Bottom Camera (PnP Top Camera)

    Selecting the correct device for the Bottom Camera

  6. In the Format drop-down, choose the 1280x720 10fps setting

  7. Click the “Apply” button in the bottom right

    Saving changes to the Top Camera Config

  8. To check that both cameras are working now, select your preferred view option in the top left Cameras section. The Camera feeds should update automatically. If you only see a black image but the red X has disappeared, it’s likely that your camera is connected properly, but just has its exposure set too low. We’ll address this in a later step.

    Both cameras showing live outputs.

Connecting to the LumenPnP

  1. Click the green power button in the Machine Controls section of the UI to connect to your machine.

  2. The power button should turn red, and OpenPnP has connected to your machine. You should also see both webcam feeds as shown below. (If you don’t see any, or just one, under the Cameras section, select the Show All Horizontal option from the dropdown.)

  3. Save your OpenPnP settings with File > Save Configuration.

1.3 - Camera Fisheye Calibration

Applying fisheye calibration to the cameras

Now that you’re connected to the LumenPnP, you’ll need to set up the cameras so that they can accurately fine tune the machine’s position. The LumenPnP is a robust machine, but it needs both cameras to make sure it can pick and place components reliably every time. Note that these are very important calibration steps, but OpenPnP makes them relatively easy. Certain steps will probably need you to tune them more than once to get them perfect, others should stay mostly constant.

The first step is to correct for the fisheye effect of the webcams to help make sure they can identify distances accurately. This is not a step you will need to re-run unless you replace your webcams or lenses. Original OpenPnP documentation for reference.

Top Camera Calibration

  1. Click on the Machine Setup tab.

    Selecting the Machine setup tab from the main screen

  2. Click on the “Expand” checkbox to open all of the features about your machine.

    Expanding the Machine Config options

  3. Under Cameras click on OpenPnpCaptureCamera Top

Finding the Top Camera Settings
  1. In the lower detail pane, switch to the Lens Calibration tab
    Switching to the lens calibration tab
  1. Click Start Lens Calibration.

    Starting bottom camera lens calibration

  2. OpenPnP is now looking for a specific pattern of dots. If you have a v2 machine, you can find this pattern is on the back side of your datum board. If you have a v3 machine, you can find this pattern on the back side of the FTP board in your Getting Started Kit.

  3. Hold the pattern under the top camera as shown below. Check the camera view in OpenPnP to move the pattern into focus. If the focal distance is too close such that you can’t get the whole pattern in focus and in the field of view, screw in the lens a few turns and test again. If you’re having trouble adjusting the focus, try using the community-created lens adjustment tool.

  4. OpenPnP will flash when it takes an image of the pattern, and will require you to take a few for an accurate calibration. Slowly move the calibration pattern around the camera’s field of view until OpenPnP tells you that it’s gathered enough photos.

  1. Confirm that the Apply Calibration? checkbox is enabled checked after calibration is complete.

Bottom Camera Calibration

  1. Again, navigate to the Machine Setup tab

  2. Again, click the “Expand” checkbox if necessary

  3. Navigate to Heads > ReferenceHead H1 > Cameras > OpenPnPCaptureCamera Bottom

    Finding the Bottom Camera Settings

  4. Continue with the same steps starting from number 5 above for the bottom camera.

1.4 - Homing Fiducial

Setting up the datum board and testing the homing fiducial

Now that fisheye calibration is complete, we can set up the datum board. The datum board is a reference point for everything else you’ll do with the machine. The center dot of the datum board will be the most important calibration point for the machine. It’ll be used to fine-tune the LumenPnP’s XY position after homing to account for any errors in the limit switches.

  1. In the “Machine Controls” pane in the lower left, connect to the LumenPnP if you haven’t already by pressing the power button.
  2. Run a rough home routine by pressing the Home button (shaped like a house). The machine will move to the X, Y, and Z zero positions. The default machine configuration files are set so that OpenPnP will not try to use the homing fiducial yet. Note that the home icon will turn yellow, as the LumenPnP has homed to it’s end stops, but hasn’t completed its full homing routine.
    Connect to the LumenPnP and attempt to home it

Tuning the Homing Fiducial

  1. Click on the Machine Setup tab in the top right pane.

    Selecting the Machine setup tab from the main screen

  2. Click on the “Expand” checkbox to open all of the features about your machine.

    Expanding the Machine Config options

  3. Under Heads, click on ReferenceHead H1

    Reviewing the ReferenceHead options

  4. In the bottom right details pane, you’ll be looking at the Configuration Tab. Change the Homing Method to ResetToFiducialLocation. This will set OpenPnP to use the top camera to look for the homing fiducial to more precisely home the XY gantry, instead of only using the limit switches.

    Switch to using the homing fiducial

  5. Click Apply to save this change.

    Save the homing technique

  6. Click on the “Position Camera over location” icon button show below. This will move the top camera to approximately where your datum board is mounted.

    Position top camera over homing fiducial

  7. In the bottom left Machine Controls pane, Select the Actuators tab.

    Switch to the Actuators Tab

  8. Toggle on the LED ring lights by pressing the LED button.

    Turn on the LEDs

  9. If the fiducial board is not in focus, rotate the Top Camera lens until the board is sharply in focus.

    Turn on the LEDs

  1. Go back to the Jog tab in the “Machine Controls” pane.
    Switch to the jog tab
  2. Set the Distance slider to 0.1 for more precise movements.
    Make the jog controls more precise
  3. Manually jog the head so that the reticle in the center of the Top Camera feed in your top camera view is perfectly centered on the Homing Fiducial in the center of the Opulo logo.
    Center the homing fiducial in the camera view

Check Camera Exposure

Set the exposure for the top camera so that we’re seeing the homing fiducial clearly and sharply.

  1. Navigate to the Machine Setup tab

    Selecting the Machine setup tab from the main screen

  2. Click the “Expand” checkbox if necessary

    Expanding the Machine Config options

  3. Navigate to Heads > ReferenceHead H1 > Cameras > OpenPnPCaptureCamera Top

    Finding the Top Camera Settings

  4. In the lower detail pane, switch to the Device Settings tab

    Switching to the camera device settings

  5. Scroll down if necessary to the Properties list of adjustments for the camera image.

    Top camera properties

  6. The goal here is to make the center fiducial look bright and sharp, and have the surrounding soldermask look dark. In most cases you can simply check the Auto checkbox for Exposure, then uncheck it to save the automatically set value, and this does a good job of making the image look how you want. Note that this may not work in all situations, so you may need to manually adjust the image settings to get a clear image, where the Homing Fiducial is clearly distinguished against the background of the datum board.

    Top camera properly exposed with the auto-exposure turned on

Apply Homing Fiducial Changes

  1. Double-check that:

    1. The Homing Fiducial is in the center of the reticle in the camera feed
    2. The camera image is in sharp focus
    3. The camera image is properly exposed
  2. Go back to Machine Setup and select Heads > ReferenceHead H1.

    Return to the homing fiducial location settings

  3. Click on the “Capture Location” icon button to save the location where OpenPnP will start searching for the Homing Fiducial.

    Capture the location of the homing fiducial

  4. Click Apply to save your changes.

    Save homing fiducial location

  5. Click on the “Home” button in the Machine Controls Pane > Jog Tab and watch your machine home using the limit switches, then move the top camera over the homing fiducial and find its exact location.

Troubleshooting: Vision Pipeline Adjustment

  1. If you find that the machine is having a hard time finding the homing fiducial, you might need to edit the Vision Pipeline for it. You can do that by going to the Machine Setup tab, and selecting Fiducial Locator under Vision. Click the Edit button to adjust the computer vision settings.

  2. There is quite a bit to tuning a vision pipeline, and you should take a look at the OpenPnP documentation. But there are a few things you can pretty easily tweak to get up and running. First, let’s check out what the vision pipeline thinks it’s seeing. In the window that just popped up, click on the row with “DrawCircles” in the Stage column. The image will show you every circle detected from the pipeline, as shown below. If there is more than one, or if the one shown is not perfectly hugging the fiducial, there are tweaks to be made. The image below shows a correctly tuned pipeline, with a single circle encircling the fiducial.

  1. The first variable to address is the threshold value. To access these settings, click on the row with “Threshold” under the Stage column. If the threshold is too low, then we won’t be isolating the area around the fiducial enough. A too low of a threshold value will look like the image below:

Raise the value until the fiducial is a clean, solid circle, as shown below:

  1. Next, we can check and see how many circles the pipeline is finding. We want it to only be finding one, and have it hug the fiducial exactly. Click on the row with “DetectCirclesHough” in the Stage column. In the image below, you can see from the list in the bottom right that two circles have been detected. We can solve this by adjusting “param2” and bumping the value up. The lower the value, the more circles are detected. If the diameter of the circles detected is incorrect, adjust the maxDiameter and minDiameter settings.

With a higher value in the “param2” field, we only detect a single circle.

  1. Lastly, you can confirm that the changes result in accurate fiducial detection. Once again click on the row with “DrawCircles” in the Stage column. The image will show you every circle detected from the pipeline. Confirm there is only one, and it is perfectly hugging the fiducial as shown below.
  1. Exit out of the pipeline editing UI, save your changes, and try to home again. With your vision pipeline tuned, the machine should find the homing fiducial on your machine and center the crosshairs of the top camera on it.

  2. It is likely that the machine will move to the wrong place and not be able to identify the homing fiducial. If this happens, OpenPnP will give an error popup that says FIDUCIAL-HOME no matches found. This is normal, as it means you’ll need to fine-tune the location that OpenPnP moves the LumenPnP to in order to find the homing fiducial. You’ll also note that the home icon will turn yellow, as the LumenPnP has homed to the end stops, but hasn’t completed the full homing routine.

    A first attempt at homing the LumenPnP

1.5 - MM/pixel Calibration

Setting the millimeters per pixel value in OpenPnP

Nicely done so far! You’ve got your homing fiducial all set up, and have played around with tweaking a vision pipeline. This next step calibrates the relationship between pixels and millimeters to make our cameras more accurate.

  1. First, let’s calibrate the top camera. Jog the camera over to your datum board. Select your machine’s head in the Machine Setup tab, and click the icon highlighted below to move there. There are some markers on the datum board that will help us do this exact calibration.

  2. Select your top camera in the device tree. Under the General Configuration tab, scroll down to Units Per Pixel. Under the X and Y Object Dimensions, type in the number 5.

  3. Now, zoom out on the camera and jog to one of the golden squares on the datum board. Make sure the entire square is visible in the camera’s field of view like the image below.

  1. Then click the Measure button. A box with drag handles will appear in the camera viewfinder. Drag the box so that it lines up with the golden box on the datum board; they are exactly 5mm x 5mm. Make sure that you are aligning the bounding box with the center of the golden lines as shown in the image below. Once you have it perfectly outlined, click Confirm. New numbers should populate the Units per Pixel fields, but they should be relatively close to what you found in there to begin with. Then hit Apply.
  1. To confirm, jog around by clicking on various locations on your datum board in the top camera viewfinder and see how accurate the centerpoint of the camera view gets to where you clicked. If it’s inaccurate, try doing the calibration again or tweaking the values in the fields.

  2. Now we’ll calibrate the bottom camera. For this, we’ll use a nozzle tip! Put an N24 nozzle on the CP40 Holder, and under your bottom camera’s settings in the device tree, under the Position tab, click the icon with the red nozzle in the blue circle (Hover text says “Position the tool over the center of the location”). This should move your nozzle over the camera. Don’t worry if it’s not exactly centered; we’ll fix this in a later step. It’s important you don’t try to fix this now. Manually jog it over the center of your bottom camera by clicking on the bottom camera viewfinder. If your lens is not focused on the nozzle tip, you should rotate the lens so that the nozzle tip is sharp and clear.

  1. Now, do the same calibration that you did for the top camera, but instead of inputting 5 in the X and Y fields, input 4. Drag your bounding box around the nozzle tip so that it’s perfectly tangent to the edges, and press Confirm. Your pixels per millimeter are now calibrated! Try clicking around the bottom viewfinder and check to see if the reticle is moving where you click.

1.6 - Backlash Compensation

Calibrating Backlash Compensation

Now we can have OpenPnP run its automatic backlash compensation routine to make all head movements more accurate. Read the OpenPnP docs page about this step here.

  1. First, we’ll select the axis we want to calibrate backlash compensation for. Under the Machine Setup tab, select ReferenceControllerAxis x under Axis. Then select the Backlash Compensation tab.

  2. Next, click the Calibrate now button. The machine will go through a long routine (between 5-15 minutes) where it measures the machine’s backlash, and determines the best settings to account for it.

  3. When it’s done, you’ll see the output data from the calibration. We suggest selecting OneSidedPositioning for the Compensation Method, but experiment with the different options to see which gives you the best results.

  4. Perform steps 1 - 3 but with the Y axis instead.

1.7 - Nozzle Offset Calibration

Calibrating the offset of the nozzle from the top camera

Now we need to tell OpenPnP how far the nozzle(s) is/are away from the center point of the top camera. OpenPnP has a built in “wizard” to help set this offset, so we’ll use that to help us do it. You can read the OpenPnP docs about this step here.

NOTE: OpenPnP has some new methods of calibration using a secondary fiducial at a different Z height, and a small piece of paper. If you’d like to explore this method of calibration, you can find the OpenPnP docs about this process here. This process requires making and installing a calibration rig, 3D Units per Pixel calibration, and Advanced Camera Calibration.

  1. Select your left nozzle (N1) in the device tree, and click on the Offset Wizard menu option. Leave the Include Z? box unchecked. Read the instructions that OpenPnP provides in this window.
  1. You can follow OpenPnP’s instructions using putty or flour, or you can use your homing fiducial. The rest of this page explains how to do this process with your homing fiducial.

  2. Using an N045 nozzle tip, jog the nozzle so that it is just barely touching the datum board, and perfectly centered over the homing fiducial. We recommend looking for the shiny edge of the gold fiducial poking out from under the nozzle tip to determine if you’ve centered it correctly.

  1. Now, click the Store nozzle mark position button.
  1. It’s important that you don’t navigate away from the nozzle menu in the device tree during this; it’ll wipe your stored nozzle mark position. Now, jog the nozzle up, and jog the top camera to the homing fiducial. Center it exactly on the fiducial, and click the Calculate nozzle offset button. Hit the Apply button in the bottom right. You’ve now stored the nozzle offset!
  1. If you have a v3 machine, you have a second nozzle as well (N2). Perform the same steps above but for the second nozzle instead.

1.8 - Bottom Camera Position

Setting the position of your bottom camera

Now that we know the offset from the top camera to the nozzle, we can use the nozzle to set our bottom camera position.

  1. Make sure that you have the N1 nozzle selected from the drop down beneath the camera view in OpenPnP.
  1. Select the bottom camera in the device tree. Click on the Position menu tab. Click on the icon with the red nozzle in blue circle (shown below) to jog the nozzle to the bottom camera position.

  2. The left nozzle will now move to be pretty close to the bottom camera inspection location, but it likely won’t be exact. It’s also possible that the tip of the nozzle is not in focus from the fisheye calibration step; adjust the bottom camera focus by turning the lens until the nozzle tip is sharp and in focus.

  3. Jog the nozzle to be perfectly centered over the bottom camera, and click on the blue nozzle icon to capture the position (see image below). Your bottom camera position is now saved!

1.9 - Automatic Toolchanger Calibration

Calibrating automatic toolchanger movements

Throughout the course of a job, you will find that you need multiple different size nozzle tips to pick different sized parts. You can always have OpenPnP prompt you to do this manually, but there’s a feature for automatic nozzle swapping that can just do it for you! In this optional step, we’ll set it up. Perform the following steps for each of the nozzle tips you’d like to enable it for. We recommend reading the OpenPnP Wiki page about this as well. Before starting, put the labeled nozzle tips into the holder in their respective labeled slots. Also make sure to lubricate the end of your nozzle holder with the lubrication packet included with your nozzles. It helps to insert the nozzle holder into all of the nozzle tips multiple times in order to break in the rubber O-rings, and lubricate the inside of the nozzle tips.

  1. Select the nozzle tip you’re setting up under the Nozzle Tips menu in the device tree. Select the Tool Changer tab.

  2. Now we can start capturing positions. The way automatic nozzle changing works is by replaying four position commands either forward or backward, to either load or unload a nozzle tip, respectively. We’re going to start with the last position, because it’s easiest for getting our Z height correct.

  3. Jog your nozzle with the relevant nozzle tip loaded to just in front of your nozzle rack, in front of the slot for that nozzle tip. Adjust the Z height until it’s clear it’ll slide into the rack. Also ensure that it’s aligned in the Y axis so that only a X movement would be necessary to slot it into place. Capture the nozzle position for the Last Location.

  4. Now we’re going to slowly jog the nozzle tip into the nozzle rack. Make sure you’re only jogging in the X axis for a clean action. Jog by increments of 0.1mm until you see the nozzle tip pop completely into place. Try to ensure there’s no lateral strain on the nozzle holder. If there is, we’ll see this in a later step and can correct it then. Capture the Third Location nozzle position.

  5. The next position is for making sure that the nozzle tip is completely seated on the CP40 holder during insertion. Jog the Z axis down two millimeters. This is not a hard and fast value, if you find that a larger or smaller value gets the nozzle tip seated completely, feel free to use that value instead. The spring in the CP40 holder will take up these few millimeters. Capture the Second Location nozzle position.

  6. Now jog the Z axis up 30 millimeters. This is the clearance position where the nozzle holder is getting ready for the plunge. Capture the First Location nozzle position.

  7. You can now play through the positions by clicking on the “move nozzle to position” buttons in order. Tune any values in the fields as necessary to ensure you get a clean and straight insertion.

  8. Now that your positions are set, you can enable automatic tool changing in OpenPnP.

  9. If you’d like to clone these positions for every nozzle tip in the rack, you can use the “Cloning Settings” section in the OpenPnP docs to help you.

2 - FTP

Use the Functional Test Placement PCB to learn how to run a job

What you’ll learn

This guide walks you through setting up and completing your first placement job using the Getting Started Kit, included with the LumenPnP v3. Before going through this guide, make sure you’ve completed the Calibration guide to get your machine up and running.

It might be useful to refer to this guide again after you finish it the first time, since many of these steps will need to be performed for every new board and job you start. Take your time going through this the first time around and keep in mind that this process gets faster with experience.

What you’ll need

  • A LumenPnP
  • The “Getting Started Kit” with:
    • A FTP PCB
    • 0603 Resistors and LEDs in 8mm tape
    • Universal Mounting Kit prints and hardware
    • Printed tray feeders

It’s highly recommend to take some time to read through the OpenPnP Wiki. The OpenPnP documentation is much more in depth that this guide, as this guide is meant to get you up and running quickly with a known board and configuration. As you set up your own jobs, the OpenPnP documentation should be your primary reference.

2.1 - Installing the Feeders

Getting the feeders ready for automatic picking

The FTP PCB has two different types of components that need to be placed: resistors and LEDs. Each will need its own feeder so that the LumenPnP can pick each type of component. For this guide, you’ll use printed tray feeders.

Attach Feeders

  1. Use two M3x10 button head screws and two M3 wingnuts to secure the printed tray feeder through onto the staging plate using holes: C11 and E11.

    Install the feeder to the staging plate

  2. For each component, cut a strip of component tape off the reel about 125mm long.

  3. Slide the Resistors into the left-most tray feeder, and the LEDs the adjacent tray.

  4. In OpenPnP, connect to your LumenPnP and home it.

    Connect to your LumenPnP and home it

Import Board

  1. Download the FTP board design. It’s in the LumenPnP_PCBs.zip artifact on the latest release.

  2. Go to File > Save Job As and save your FTP job.

    Save Job As

  3. Navigate to the Job tab in the top right.

    Job Tab

  4. Click that “Add” Icon button to add a new board and select New Board. Save the board in the same directory as the job.

    Add a new board to the job

  5. Click on the newly-created board in the list to select it.

    Select the board to import the design

  6. Go to File > Import Board > KiCAD .pos

    Start importing the board

  7. In the Import popup:

    1. Select the ftp-top.pos file you downloaded earlier as the Top File
    2. Enable the Assign Parts checkbox.
    3. Enable the Create Missing Parts checkbox.
    4. Click Import
      Fill out the board import dialog

Add Feeders

  1. Navigate to the Feeders tab in the top-right pane.

    Switch to the feeders list

  2. Click on the “Add Feeder” icon button.

    Start adding a new feeder

  3. Select ReferenceTrayFeeder and click Accept.

    Select and add a new reference tray feeder

  4. In the lower-right panel, you’ll be in the Configuration tab. Change the Part to be R_0603_1608Metric-R_Small.

    Assign the resistor to the tray feeder

  5. Set the Y Offset to -4. This is the space between components on the tape.

    Set feeder offset

  6. Set the Y Tray Count to 30. This is the number of components available on the feeder before it needs to be manually moved forward.

    Set the feeder tray count

  7. Set the Pick location to: X=45, Y=175, Z=20 as a starting point.

    Set the starting location for the left feeder

  8. Click on the “Position Camera” icon button to move the top camera roughly over the left feeder.

    Move the top camera over the left feeder's approximate location

  9. Position the center of the top camera feed over the center of the top-most slot holding a resistor in the tray. You can drag the reticle in the camera feed, or use the jog buttons.

    Manually move closer to the correct feeder location

  10. Zoom in on the camera feed and precisely position the center of the reticle over the center of the slot holding the resistor. The resistor itself may not be perfectly centered, that is fine.

    Manually move closer to the correct feeder location

  11. Click the “Capture Camera Location” icon button to save the XY position of the start of the feeder.

    Save the current camera position as the start place for the feeder

  12. Click Apply to save the feeder settings

    Save feeder settings

  13. Click the Enable checkbox in the feeder list.

    Enable the feeder so that it is used

  14. Do the same procedure again for the LED feeder. You’ll assign the part LED_0603_1608Metric-LED_Small to the new feeder.

Installing the N045 Nozzle

  1. Grease the nozzle holder before installing the N045 nozzle.

    Grease the nozzle holder before installing the N045 nozzle

  2. Install your N045 nozzle onto the nozzle holder.

    Install the N045 nozzle

  3. Wipe off any excess grease.

    Wipe excess grease from the nozzle holder

  4. Go to the Machine Setup tab in OpenPnP.

    Switch to the Machine Setup Tab

  5. Navigate to Heads > ReferenceHead H1 > Nozzles > ReferenceNozzle N1.

    Select Nozzle N1

  6. In the lower-right pane, switch to the Nozzle Tips tab.

    Switch to the nozzle tips tab

  7. For row N045, check both the Compatible and Loaded checkboxes. If you haven’t set up automatic nozzle changing, you will receive a popup saying that you’re required to manually load the nozzle on the toolhead.

    Load Nozzle N045

  8. Go to the Packages tab in the top-right pane.

    Switch to the Packages Tab

  9. Select LED_0603_1608Metric from the list.

    Select the LED package

  10. In the lower-right pane, you’ll be in the Nozzle Tips tab. Click the Compatible on the N045 row.

    Mark compatible with N045 nozzle

  11. Similarly, select R_0603_1608Metric from the Package list.

    Select the resistor package

  12. And click the Compatible checkbox on the N045 row.

    Mark compatible with N045 nozzle

  13. Under the bottom-left Machine Controls pane, select Nozzle: N1 - N045 (Head:H1) to enable the left toolhead.

    Select Nozzle N1

Fine-tuning feeder height

  1. Navigate to the Feeders tab in the top-right pane.

    Switch to the feeders list

  2. Click on the “Position Nozzle” icon button to bring the nozzle over the feeder.

    Position the nozzle over the feeder

  3. Use the Jog controls to lower the Z axis until the nozzle is touching the surface of the plastic tape cover.

    Use the jog controls to position the nozzle over the feeder
    Position the nozzle over the feeder
    Position the nozzle over the feeder

  4. Click on the “Capture Nozzle” icon button to save the new Z height of the feeder.

    Save the nozzle position

  5. Jog the XY gantry away from the feeder.

    Move the Tool Head away from the feeder

  6. Remove the tape cover from the feeder.

  7. Click the “Pick” icon button to pick a component from the feeder. If the component is picked up properly, your Z-height is correct. If not, you should:

    Pick from the feeder

    1. Lower the Z height of the feeder by 0.1mm
    2. Press Apply to save the change
    3. Home the machine
    4. Try picking a component from the feeder again.
  8. After you’ve successfully picked a component, in the machine Machine Controls pane, switch to the Special Tab.

    Switch to the special tab

  9. Recycle the component you’ve successfully picked up

    Recycle the component you've picked up

  10. Copy the final Z height, select the other feeder, paste it for the other feeder, and press Apply

    Apply the z height from the first feeder to the second one

  11. Test picking a component from the other feeder

    Pick from the feeder

2.2 - Setting up the FTP Board

Configuring and running the job

Securing the FTP Board

Note: it is not required that you mount your FTP board in the exact same location as described below. If you follow these steps you will have a slightly easier time setting the location of the board in OpenPnP, but if you need to set up a board somewhere else on the staging plates, that is totally fine, too.

  1. Loosely screw in the universal mounting components in the following locations:

    1. Static Board Mount positioned diagonally, screwed into B28
    2. Dynamic Board Mount positioned vertically, screwed into D28
    3. Dynamic Board Mount positioned horizontally, screwed into B30
    4. Board Support placed in E31
      Install the board mounting hardware
  2. Cut strips of double-sided tape and apply them to the top of the FTP board. Do not cover the fiducial markers, but make sure that each of the pads are covered by tape. The double-sided tape lets the components stick to the board so that you can do a “mock” run of a placement job without dealing with solder paste.

    Apply double-sided tape to the board

  3. Place the FTP board in the holders and push them so that they’re snug against the sides of the board.

    Insert the FTP board

  4. Tighten down the holders. You shouldn’t be able to move the board except by pressing on the tab holding it in place.

  5. If you installed your holders in this location, the bottom left corner of your FTP board should be located around X328, Y94.

Finding the FTP Board Location

The next step is to set the physical location of the FTP board in OpenPNP. You’ll start by setting an approximate location and then fine tune the location using vision. Once the location is set, you can run the job to pick and place components. You’ll likely need to go through these steps a few times to tune the settings.

  1. Navigate to the Job tab in the top-right pane.

    Switch to the Job Tab

  2. In the bottom-right pane, you’ll see the Placements panel. Find the three elements with the IDs: FID1, FID2, and FID3. You can sort the list by Part to find them easily.

    Find each of the board fiducial markers

  3. For each of the three elements, go to the Type column, select where it says Placement and switch it to Fiducial. This tells OpenPnP that these three elements on the board are not components to be picked and placed, but fiducials to be scanned.

    Switch each fiducial component to fiducial type

  4. Back in the top-right pane, double-click on the X and Y values of 0.000 and change them to X328 and Y94 respectively. This will be the rough location of the bottom-left corner of the FTP board.

    Set the XY coordinates of your board

  5. Get the Z axis coordinate used when setting up the feeders, subtract 0.10 from it, and enter the result into the Z coordinate for the board. Setting the Z slightly lower than the actual board height allows the spring-loaded nozzle holder to lightly press components into the board to make them stick.

    Set the Z coordinates of your board

  6. Click the “Position Camera on Board” icon button and check that the center of the camera feed is very roughly lined up with the bottom-left corner of the FTP board.

    Move the top camera to the board

  7. In the lower-right pane, select one of the fiducials to highlight it.

    Highlight one fiducial

  8. Click the “Position Camera” icon button to move the top camera over the fiducial location.

    Move the top camera to one fiducial to check its location

  9. The alignment will probably not be perfect. To fix this, click on the digital readout in the bottom right corner to zero your current position.

    Switch the digital readout to relative mode

  10. Then, move the tool head with the Jog buttons until the fiducial is centered in the reticle.

    Use the Jog buttons to position the camera directly above the fiducial

  11. Read the relative XY position you’ve moved your tool head, and add those values to the board’s X and Y positions. Do not change the position of the fiducial itself in the lower-right pane list as that will throw off the rest of the placements. Only adjust the location of the board itself, not the components relative to each other.

    Get the reading on the digital readout and apply it to the board position

  12. In the lower-right panel, select the other fiducial points in turn, and check their location with the “position camera” icon button.

    Move the top camera to one fiducial to check its location

  13. If all the fiducials are close to the reticle center, you’re ready to run a fiducial scan to get the exact location of your FTP board. If only the first fiducial is centered, your board is probably rotated (ie the bottom edge is not parallel with the X axis). You can still move on to the fiducial scan, but you may need to manually readjust the board so that it is straighter.

  14. Click on the “Fiducial Scan for Location” button. This will automatically move the camera to each of the fiducial locations and use the camera to try to identify the center of the fiducial. If it can find all three, it will automatically update the position and rotation of the board relative to the LumenPnP gantry.

    Automatically set board location

  15. If the fiducial check fails, here are some options for moving forward:

    1. You might need to rotate the FTP board to be more square to the LumenPnP motion system.
    2. You may need to adjust your vision pipeline.
    3. If you’d prefer, you can also fall back on manually defining the board’s location using the “Multiple Placements” icon button.
      Use the board location from multiple placements button to manually set the board location and rotation
  16. To double-check the board’s location, you can repeat step 17. It is also useful to select some of the other placement locations and move the camera to them as well to check that the camera is centered between the metal pads. If the camera is not lining up correctly, see Troubleshooting for help getting things more tightly set up.

Placing Components

  1. Make sure you’ve pulled back the protective tape cover on your feeders and that you have the correct nozzle installed.

  2. It’s time to place your first component. Press the “Single job step” icon button repeatedly until OpenPnP moves to pick up an LED, check it’s orientation over the bottom camera, and then places it on the board.

    Start placing components

  3. If the component was not picked up correctly, you will need to adjust your feeder location or height.

  4. If the component was not identified by the bottom camera correctly, you will likely need to adjust its vision pipeline.

  5. If the component did not stick to the FTP board, you should lower the FTP board’s Z axis location (0.10mm increments are a good starting place).

  6. If the component stuck to the FTP board but was not centered on placement location (on the metal pads), you will need to do some fine tuning. It is useful to place five or so components before attempting to diagnose exactly what’s wrong with your placements.

  7. Continue to click the “Single Job Step” to place the additional components (or click the “Play” icon button and pause the operation when you’re ready.)

It is perfectly normal for your very first set of component placements to have some errors. There are several different sources of placement error that we can address, one at a time. It will take a little trial and error to get placements perfect. Go to the Troubleshooting page for easy instructions.

3 - Next Steps

Next Steps

Congratulations! Your machine now has basic calibration complete. There are still many metrics to tweak and adjust as you go through the process of placing your first board. OpenPnP is a large and complex piece of software, and it will take time to get used to it.

The following links are OpenPnP documentation pages that will help you confirm that your calibration is complete and accurate, and get a job loaded up and running.

  • Issues and Solutions

    • OpenPnP has a wonderful “Issues and Solutions” tab that will help you further calibrate your LumenPnP. It’s highly recommended that you complete the “Calibrations Milestone” prior to using your LumenPnP in production, and that you explore all of the edits that it recommends you make.
  • Job Setup

    • This is an incredibly useful document, illustrating the difference between parts, packages, and placements, and how to import information about your parts into the software. It shows the UI and explains what lots of things do, along with walking you through setting up a job. There’s also information about setting up feeders. We recommend using the ReferenceTrayFeeder and ReferenceStripFeeder. Soon we’ll have our own powered feeder for the LumenPnP, which will have a selectable feeder type in OpenPnP, but that’s still to come.
  • Mods

    • Many folks in the community have developed mods and upgrades to the machine that are all organized here.
  • Qwertymodo Full Calibration Video

    • Community member Qwertymodo has put together a video of doing his calibration from scratch, instead of using the OpenPnP config files in the repository as a starting point. Many folks in the community have found it very useful, especially for understanding all the menus and features OpenPnP has to offer.