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

Return to the regular view of this page.

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 - 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. To use our defaults, follow the instructions below.

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.

Windows

  1. Download and install 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.

    1. If your machine’s version begins with v2, pick the most recent release starting with v2.
    2. 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 four configuration files you need: machine.xml, packages.xml, parts.xml, and vision-settings.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. Navigate to:

    1. On Windows Vista and newer: C:\Users\[username]\.openpnp2.
    2. On Windows XP and older: 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, parts.xml, and vision-settings.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 and vision libraries.

MacOS

  1. Download and install OpenPnP 2.0 for Mac here.

  2. Go to the LumenPnP Releases Page.

  3. Find the latest release that is compatible with your hardware.

    1. If your machine’s version begins with v2, pick the most recent release starting with v2.
    2. 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 four configuration files you need: machine.xml, packages.xml, parts.xml, and vision-settings.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 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, parts.xml, and vision-settings.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 and vision libraries.

Next Steps

Our next step is to Connect To The Machine..

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 and getting familiar with OpenPnP’s UI.

  1. Connect your LumenPnP to your computer using the included USB cable

  2. Open OpenPnP on your computer. You should now see the OpenPnP UI:

    OpenPnP's basic UI

Com Port and Baud Rate

Before connecting to the LumenPnP, you need to set which USB port 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.

    Expanding the Machine Config options

  3. Under Drivers click on GcodeDriver GcodeDriver. Below the list of machine settings you’ll find the details of the GcodeDriver.

    Reviewing the GcodeDriver options

  4. In the Configuration tab, check the Baud and Port settings.

    1. Set the Baud to 115200
    2. On Windows, Set the Port to the option in the format: COM2.
    3. On Mac, Set the Port to the option in the format: cu.usbmodem<a-lot-of-numbers>
    4. On Linux, Set the Port to the option in the format: ttyACM0.
      Changing the Port and Baud Rate
  5. Click Apply in the lower right corner to save your changes.

    Apply baud rate and port

Bottom Camera Config

Now we’ll set up the cameras. The big red “X” in the camera views means that OpenPnP isn’t receiving the webcam feed. We’ll specify which webcam is which.

  1. In the top-left corner, change the camera view to one of the “Show All” options. You should then see two camera feeds that are black, and have red X’s on them.

    show both camera feeds

  2. Again, navigate to the Machine Setup tab.

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

  4. Click on Cameras > OpenPnpCaptureCamera Bottom.

    Finding the Bottom Camera Settings

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

    Switching to the camera device settings

  6. In the Device drop-down, choose PnP Bottom Camera.

    Selecting the correct device for the Bottom Camera

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

    setting bottom camera resolution

  8. Click the Apply button in the bottom right. You should then see the camera display start showing the feed from the camera, or at least see the red X disappear. We’ll fix the exposure next.

    Saving changes to the Bottom Camera Config
    Bottom camera is now on

  9. Adjust the exposure to make the camera feed more reasonable. On some computers, you can toggle Automatic Exposure on, and then back off again to set it correctly. Do not keep auto exposure turned on. You can come back to adjust the exposure later at any time.

    Adjust exposure

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 Top Camera.

    Selecting the correct device for the Bottom Camera

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

    setting top camera resolution

  7. Click the Apply button in the bottom right. You should then see the camera display start showing the feed from the camera, or at least see the red X disappear.

    Saving changes to the Top Camera Config

  8. Adjust the exposure to make the camera feed more reasonable. Both cameras should now be working.

    Adjust exposure

Connecting to the LumenPnP

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

    Connect to the LumenPnP

  2. The power button will turn red when OpenPnP has connected to your machine. If this doesn’t work, check your port and baud rate.

    having successfully connected to the LumenPnP and cameras

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

    saving the machine config

Next Steps

Next, we’ll work on the the camera’s Fisheye Calibration.

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. 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. See the original OpenPnP documentation for reference.

This calibration uses a specific pattern of dots to correct for any fisheye effect in your webcams

  1. If you have a v2 LumenPnP kit, you can find this pattern is on the back side of your datum board (shown below).
  2. If you have a v3 semi-assembled LumenPnP machine, you can find this pattern on the back side of the FTP board in your Getting Started Kit.
  3. If you’re having a hard time getting the camera to pick up on the pattern on the datum board or FTP board, you can print out the original Circle Grid Camera Calibration Patterns here.
The calibration grid pattern

Bottom 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. Click on Cameras > OpenPnpCaptureCamera Bottom.

    Finding the Top Camera Settings

  4. In the lower detail pane, switch to the Lens Calibration tab.

    Switching to the lens calibration tab

  5. Click Start Lens Calibration.

    Starting bottom camera lens calibration

  6. Hold the pattern under the top camera as shown below. Use the camera view in OpenPnP to move the pattern into focus. If you can’t get the whole pattern in focus and in the field of view, screw in the lens a few turns to adjust the camera’s focal distance and try again.

    holding the calibration grid below the camera

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

    The calibration grid pattern

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

    the apply calibration checkbox is checked

Top 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 Top.

    Finding the Top Camera Settings

  4. Continue with the same steps starting from number 4 above.

Next Steps

Next, we’ll work on homing your machine with the Homing Fiducials.

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 by pressing the power button (if you haven’t already).

    Connect to the LumenPnP

  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. 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. You will may still get one of two error messages: FIDUCIAL-HOME no matches found. or Nozzle tip calibration: not enough results from vision. Check pipeline and threshold This is normal; ignore the errors for now.

    Home the machine

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. Click on Heads > ReferenceHead H1.

    Reviewing the ReferenceHead options

  4. In the bottom right details pane, 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. Turn on the LED ring lights by pressing the LED button (if they’re not already on).

    Turn on the LEDs

  9. Rotate the Top Camera lens until the board is sharply in focus. If you’re having trouble, try using the community-created lens adjustment tool.

    the homing fiducial in focus

  10. Go back to the Jog tab in the “Machine Controls” pane.

    Switch to the jog tab

  11. Set the Distance slider to 0.1 for more precise movements.

    Make the jog controls more precise

  12. 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.

    use the jog controls to move the machine
    Center the homing fiducial in the camera view

Double-Check Camera Exposure

As before, we’re going to double-check our camera exposure.

  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. Right click on the camera feed to enable the image info card. This will give you the brightness histogram of the image. In the next step, you’ll want to tune your exposure and other camera settings so the image isn’t too bright or too dark. The histogram can help: make sure the graph isn’t going all the way to the edges of the X axis in the histogram, and that will make sure all of the image’s details are available for the computer to use when it is looking for the homing fiducial.

    enable the image histogram
    a good histogram
    a bad histogram

  1. Adjust the exposure and other camera settings. The goal is to make the image clear and have a lot of contrast, without being too bright or too dark overall. In some cases you can simply check the Auto checkbox for Exposure, then uncheck it to save the automatically set value.
    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. You may still get an error about nozzle tip calibration, which is normal. We’ll be working on that next.

    Home the machine

  1. If your machine positions correctly over the homing fiducial but you receive the error: FIDUCIAL-HOME no matches found., you should double-check your camera settings. If they seem alright, you may need to adjust your vision pipeline.
    A first attempt at homing the LumenPnP

Next Steps

Next is the MM/Pixel Calibration.

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. This next step calibrates the relationship between pixels and millimeters to make our cameras more accurate. You might have found that if you drag the reticle on the camera view around, the LumenPnP will move to the highlighted location. But you have probably also found that the movement is not very precise. We’ll be fixing that in this calibration.

Top Camera Calibration

  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. Click on Heads > ReferenceHead H1.

    Reviewing the ReferenceHead options

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

    Position top camera over homing fiducial

  5. Click on Heads > ReferenceHeadH1 > Cameras > OpenPnPCaptureCamera Top.

    Select the top camera

  6. Go to the General Configuration tab.

    Go to the general configuration tab

  7. Scroll down to Units Per Pixel.

    The top camera's units per pixel section

  8. Set the X and Y Object Dimensions to 5.

    Set the object dimensions for automatic calibration

  9. Jog the machine so that one of the golden guideline squares on the datum board are visible in the top camera’s view. The whole square must be visible. Zoom out of the camera feed with the scroll wheel if necessary.

    The square guideline on the datum board

  10. Then click the Measure button.

    Click the measure button

  11. A box with drag handles will appear in the camera view. Drag the box so that it lines up with the lines on the datum board; they are exactly 5mm x 5mm. Make sure that you are aligning the bounding box with the center of the lines as shown in the image below.

    Drag the box to the center of the outline square on the datum board.

  12. Once you have it perfectly outlined, click Confirm. The new calibration numbers will populate the Units per Pixel fields. They should be relatively close to the default values.

    Confirm the test

  13. Click Apply to save the changes.

    Apply the new settings

  14. To confirm, drag the reticle on the top camera view to move the machine. The camera center should move exactly where you tell it to. If it’s inaccurate, try doing the calibration again or tweaking the values in the fields.

Bottom Camera Calibration

  1. Install an N24 nozzle on the left tool head.

    Install a N24 nozzle

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

    Selecting the Machine setup tab from the main screen

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

    Expanding the Machine Config options

  4. Click on Cameras > OpenPnPCaptureCamera Bottom.

    Select the bottom camera

  5. Go to the Position tab.

    Go to the Position tab

  6. Click on the “Position nozzle over location” button

    Position nozzle over camera

  7. Use the jog controls to move the nozzle directly over the center of the bottom camera. Do not adjust the Z-axis.

    Jog the nozzle over the camera
    Jog the nozzle over the camera

  8. Twist the lens of the bottom camera until the tip of the nozzle is in focus.

    Jog the nozzle over the camera

  9. Go to the General Configuration tab.

    Go to the general configuration tab

  10. Scroll down to Units Per Pixel.

    The bottom camera's units per pixel section

  11. Set the X and Y Object Dimensions to 4.

    Set the object dimensions for calibration

  12. Then click the Measure button.

    Click the measure button

  13. A box with drag handles will appear in the camera viewfinder. Drag the bounding box around the nozzle tip so that it’s perfectly tangent to the edges; they are exactly 4mm x 4mm.

    Drag the box to the edges of the nozzle.

  14. Once you have it perfectly outlined, click Confirm. New numbers should populate the Units per Pixel fields. They should be relatively close to the default values.

    Confirm the test

  15. Then click Apply to save the changes.

    Apply the new settings

  16. To confirm, drag the reticle on the bottom camera view to move the machine. The nozzle tip should move exactly where you tell it to. If it’s inaccurate, try doing the calibration again or tweaking the values in the fields.

Next Steps

Next is Nozzle Offset Calibration..

6 - Nozzle Offset Calibration

Calibrating the offset of the nozzle from the top camera

Now we need to tell OpenPnP how far the nozzles are away from the center point of the top camera. There are multiple strategies you can use to calculate this. One way is to use OpenPnP’s built in Offset Wizard. You can read the OpenPnP docs about this step here.

  1. Install an N045 nozzle on the left toolhead.

    Install the N045 nozzle

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

    Selecting the Machine setup tab from the main screen

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

    Expanding the Machine Config options

  4. Click on Heads > ReferenceHead H1 > Nozzles > ReferenceNozzle N1

    Open the Nozzle N1 settings

  5. Click on the Offset Wizard tab.

    Offset wizard settings

  6. Confirm that the Include Z? checkbox is unchecked.

    do not use the include z checkbox

  7. Read the instructions that OpenPnP provides in this window. This guide will use the homing fiducial as the starting point, instead of using putty or flour. But those are valid strategies as well if you’d prefer them.

  8. Select the Nozzle: N1 - N045 (Head:H1) from the machine controls dropdown.

    Select nozzle from machine control dropdown

  9. 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.

    Jog controls
    Nozzle almost touching homing fiducial
    Nozzle touching the homing fiducial

  10. Click Store nozzle mark position. Do not navigate away from the Heads > ReferenceHead H1 > Nozzles > ReferenceNozzle N1 tab while running the wizard.

    Store the nozzle's position

  11. Raise the nozzle off the datum board.

    raise the z-axis

  12. Jog the X and Y axes to bring the top camera directly centered over the homing fiducial. Again, do not switch away from the Offset Wizard tab.

    bring the top camera over the homing fiducial

  13. After centering the homing fiducial in the top camera view, click Calculate nozzle offset.

    calculate the nozzle offset

  14. Click Apply to save the nozzle offset change.

    click the apply button

  15. If you have a v3 semi-assembled LumenPnP machine, start again from step 1 to calibrate your right nozzle. Place the nozzle on your right toolhead, and use Heads > ReferenceHead H1 > Nozzles > ReferenceNozzle N2 section.

Next Steps

Next is Bottom Camera Position.

7 - 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. 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. Click on Cameras > OpenPnpCaptureCamera Bottom.

    Select the bottom camera

  4. Click on the Position tab.

    Select the position tab

  5. Set the camera’s Z-axis location:

    1. If you have a v2 LumenPnP kit with only one nozzle, set the Z axis value to 31.5mm.
    2. If you have a v3 semi-assembled LumenPnP with two nozzles, set the Z axis value to 61mm.
      Set the z position
  6. Home your LumenPnP to make sure your toolhead’s location is accurate. As before, ignore the Nozzle tip calibration: not enough results from vision. Check pipeline and threshold error if it appears.

    Home the machine

  7. Jog the toolhead off to the side so that it isn’t aligned with any calibration points. This will make it easier to see if the nozzle is lined up with the bottom camera.

    Jog the toolhead

  8. Select the Nozzle: N1 - N045 (Head:H1) from the machine controls dropdown.

    Select nozzle from machine control dropdown

  9. Click the “Position tool over location” button to bring the left nozzle very roughly above the bottom camera.

    Position the toolhead over the bottom camera

  10. Jog the toolhead until the left nozzle is directly in the center of the bottom camera’s vision.

    Position the toolhead over the bottom camera precisely

  11. If the tip of the nozzle isn’t in focus, rotate the bottom camera lens to set it in focus. Re-center the nozzle in the camera view if necessary.

    Focus on the tip of the nozzle

  12. Click the “Capture Toolhead Location” button to calculate the correct position for the bottom camera.

    Store the camera location

  13. Click the Apply button to save the new camera position.

    Save the camera location

  14. Try homing your machine again. If you get the Nozzle tip calibration: not enough results from vision. Check pipeline and threshold error, you will need to tune your Bottom Camera Vision Pipeline.

    Home the machine

Next Steps

Next is Backlash Calibration.

8 - Backlash Compensation

Calibrating Backlash Compensation

Semi-assembled (v3) LumenPnP machines should have only a limited amount of backlash in each axis and the default machine configuration in OpenPnP will typically account for it. This step is optional, and only necessary if you are still having issues with backlash. Read the OpenPnP docs page about automatic backlash compensation here.

Set Up Acceleration Control

  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 if necessary.

    Expanding the Machine Config options

  3. Select GcodeDriver GcodeDriver from the list.

    Select the gcode driver

  4. Switch to the gcode tab.

    Select the gcode gcode-tab

  5. Select MOVE_TO_COMMAND in the setting drop-down.

    Select the move_to_command option

  6. Paste the following into the large text box:

{Acceleration:M204 S%.2f}
G1 {X:X%.4f} {Y:Y%.4f} {Z:Z%.4f} {A:A%.4f} {B:B%.4f} {FeedRate:F%.2f} ; move to target
Replace the move-to command
  1. Click Apply to save your changes.

    save the move-to command

  2. Switch to the Driver Settings tab.

    switch to driver settings tab

  3. Change the Motion Control Type to ConstantAcceleration. Note that you may want to change this back to ToolpathFeedRate when you’re done running the backlash calibration.

    switch to constant acceleration

  4. Click Apply to save your changes.

    save the driver settings

Running The Calibration

  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” if necessary.

    Expanding the Machine Config options

  3. Click on Axes > ReferenceControllerAxisX.

    Select the x-axis

  4. Select the Backlash Compensation tab.

    Select the backlash compensation tab

  5. 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.

  6. 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.

    results of the backlash calibration

  7. Restart from step 10 with the Y axis selected.

Next Steps

Next is Automatic Toolchanger Calibration.

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 components. By default OpenPnP will pause a job and wait for you to manually change a nozzle tip, but it can be more efficient to set up automatic tool changing. Perform the following optional steps for each of the nozzle tips you’ll be switching between. We recommend reading the OpenPnP Wiki page about this as well.

  1. Insert the labeled nozzle tips into the holder in their respectively labeled slots.

    Nozzles inserted into the nozzle holder

  2. Apply some lubricant to the end of your nozzle holder with the lubrication packet included with your nozzles. This is important for repeatably fully attaching the nozzles without damaging the rubber O-rings around the holder.

    applying super lube to the nozzle holder

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

    Selecting the Machine setup tab from the main screen

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

    Expanding the Machine Config options

  5. Select the nozzle you’re working with. For example: Nozzle Tips > ReferenceNozzleTipN045

    Select nozzle tip

  6. Select the Tool Changer tab.

    the tool changer tab

Capturing Positions

Now we can start capturing positions. Automatic nozzle changing works by replaying four position commands either forward or backward to 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. Note that the instructions below are for the N045 nozzle tip, but you should use whichever tip you’re setting up.

  1. Install the N045 nozzle onto the tool head by hand.

    Install the N045 nozzle

  2. Jog the nozzle until it is directly in front of the N045 slot in the tool changer.

    nozzle positioned in front of slot

  3. Adjust the Z height until it’s clear it’ll slide into the rack.

    nozzle aligned with changer

  4. Double-check the toolhead is aligned with the slot in the Y axis so that only a X movement would be necessary to slot it into place. It may be a good idea to test-fit the nozzle into the slot by jogging the X axis only.

  5. Capture the nozzle position for the Last Location.

    set the last tool position

  6. Move the nozzle into the slot by jogging the X axis in 0.1mm increments. Try to ensure there’s no lateral strain on the nozzle holder in the Y axis. Continue until the nozzle is fully slotted into the nozzle holder.

    the nozzle seated into the slot

  7. Capture the Third Location nozzle position.

    set the 3rd tool position

  8. 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 approximately two millimeters. The spring in the CP40 holder will take up these few millimeters to avoid damage to the tool head. You may find that a larger or smaller movement gets the nozzle tip seated completely, so feel free to experiment.

    the nozzle pressed into the toolhead

  9. Capture the Second Location nozzle position.

    set the 2rd tool position

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

    toolhead positioned over the nozzle

  11. Capture the First Location nozzle position.

    the nozzle pressed into the toolhead

  12. 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.

    buttons for playing through the tool change

  13. Apply the changes to the tool changing positions.

    save the tool changing positions

  14. Repeat the above steps for each of the nozzles you’re using. See also the “Cloning Settings” section in the OpenPnP docs.

Enable Automatic Tool Changing

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

  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 if necessary.

    Expanding the Machine Config options

  3. Select Heads > ReferenceHead H1 > Nozzles > ReferenceNozzle N1.

    Select reference nozzle 1

  4. Switch to the Tool Changer tab.

    nozzle tool changer tab

  5. Check the Automatic Tool Changer Enabled? box.

    enable auto tool change

  6. Click Apply to save your changes.

    save changes

  7. Select Heads > ReferenceHead H2 > Nozzles > ReferenceNozzle N2.

    Select reference nozzle 2

  8. Switch to the Tool Changer tab.

    nozzle tool changer tab

  9. Check the Automatic Tool Changer Enabled? box.

    enable auto tool change

  10. Click Apply to save your changes.

    save changes

Next Steps

Next is the FTP.