Skip to content

Commit

Permalink
updates debug page to have cards, and separate pages for placement is…
Browse files Browse the repository at this point in the history
…sues
  • Loading branch information
sphawes committed Feb 17, 2024
1 parent 090f925 commit 71a12e7
Show file tree
Hide file tree
Showing 111 changed files with 216 additions and 52 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .cache/plugin/social/Roboto-Black.ttf
Binary file not shown.
Binary file added .cache/plugin/social/Roboto-BlackItalic.ttf
Binary file not shown.
Binary file added .cache/plugin/social/Roboto-Bold.ttf
Binary file not shown.
Binary file added .cache/plugin/social/Roboto-BoldItalic.ttf
Binary file not shown.
Binary file added .cache/plugin/social/Roboto-Italic.ttf
Binary file not shown.
Binary file added .cache/plugin/social/Roboto-Light.ttf
Binary file not shown.
Binary file added .cache/plugin/social/Roboto-LightItalic.ttf
Binary file not shown.
Binary file added .cache/plugin/social/Roboto-Medium.ttf
Binary file not shown.
Binary file added .cache/plugin/social/Roboto-MediumItalic.ttf
Binary file not shown.
Binary file added .cache/plugin/social/Roboto-Regular.ttf
Binary file not shown.
Binary file added .cache/plugin/social/Roboto-Thin.ttf
Binary file not shown.
Binary file added .cache/plugin/social/Roboto-ThinItalic.ttf
Binary file not shown.
9 changes: 9 additions & 0 deletions docs/misc/photon/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@ The following is the basic Photon packet structure.

The packet is made up of two parts: the header and the payload. The header contains exactly five bytes: "to" address, "from" address, packet ID, payload length, and the CRC. The payload *always* has at least one byte, either a command ID or a status. The payload can have optional further bytes.

``` mermaid
graph LR
A[Start] --> B{Error?};
B -->|Yes| C[Hmm...];
C --> D[Debug];
D --> B;
B ---->|No| E[Yay!];
```

## Header Bytes

### To Address
Expand Down
8 changes: 8 additions & 0 deletions docs/openpnp/debugging/feeder-rotation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# 90 degree offset

![parts rotated 90 degrees from their intended rotation](img/feeder-rotation.png){: style="width:60%;margin-left:10%;"}

If some of your parts are placed with a 90 or 180 degree offset, there are a couple potential root causes:

- **The feeder's rotation value needs adjustment.** When setting the position of a feeder, the rotation value you enter is equal to the initial rotation angle that the part is picked at. Adjust the `Rotation` field for the feeder of the part you notice is being placed incorrectly in increments of 90 degrees.
- **The part's vision pipeline needs adjustment.** If your rotation offset is consistently 90 or 180 degrees this is less likely, but it could still worth [adjusting that part's vision pipeline](../../vision-pipeline-adjustment/5-part-identification-pipeline.md).
13 changes: 13 additions & 0 deletions docs/openpnp/debugging/global-offset.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Global offset

![parts placed with a consistent global offset](img/global-offset.png){: style="width:60%;margin-left:10%;"}

If parts are universally placed with an offset in the X and/or Y axis, there are a few potential root causes:

- **Bottom camera position needs adjustment.** If OpenPnP's understanding of where the bottom camera is located is incorrect, part placements can also be incorrect. Perform a [nozzle offset calibration](/openpnp/calibration/6-nozzle-offset/) on one nozzle, then immediately [set the bottom camera position](/openpnp/calibration/7-bottom-camera-position/) without rotating the nozzle.
- **Fiducial calibration pipeline needs adjustment.** If OpenPnP incorrectly detects your fiducials and instead thinks a silkscreen marking or footprint pad is the fiducial, all of the locations on your board will be shifted. [Make sure your fiducial pipeline is correctly identifying your PCB's fiducials.](/openpnp/vision-pipeline-adjustment/3-pcb-fiducial-pipeline/)
- **Both nozzles need offset calibration adjustment.** It's possible that both of your nozzle offsets need adjusting. [Make sure your nozzle offsets are correct.](/openpnp/calibration/6-nozzle-offset/)
- **The LumenPnP skipped steps during motion.** If the LumenPnP's stepper motors encounter too much resistance, they can "skip steps" and lose their position. The way to confirm that this has happened is by navigating to `Machine Setup -> Heads`, clicking on `ReferenceHead H1` clicking the "Move camera to position" button next to the Homing Fiducial coordinates. If the camera is not centered on the homing fiducial, your machine has likely skipped steps. This can happen for a number of reasons:
- The machine's gantries interfered with something in the pick area, or something in your workspace. Check to make sure the machine is free to move easily and no cables are getting caught or tangled.
- LumenPnP models from v3.1 onward come with linear rails. These rails require proper lubrication to operate correctly. Lubricate your rails with the included lubrication packet.
- If you've increased your machine's travel speed, it's possible this is the reason for skipped steps. If the motors aren't capable of moving the machine at the requested speed, they will skip steps. Try lowering the machine's travel speed by navigating to `Machine Setup -> Drivers -> GcodeDriver GcodeDriver -> Driver Settings` and lower the value in the `Max. Feed Rate [/min]` field.
Binary file modified docs/openpnp/debugging/img/nozzle-offset.png
80 changes: 32 additions & 48 deletions docs/openpnp/debugging/index.md
Original file line number Diff line number Diff line change
@@ -1,63 +1,47 @@
# Debugging Placement Errors
---
glightbox: false
---

You might have found an inaccuracy or error when placing parts. This page address these errors, and how to go about fixing them. You might encounter a couple of these errors at once, so choose one to address before moving on.

## Part placement is seemingly random

![random offsets and rotations](img/random-offset.png)

If your parts are being placed with seemingly random offsets and rotations, there are couple potential root causes:

- **The board's Z position is too high.** If the nozzle isn't pushing the part into the board, it's dropping a short distance onto the board, and not being placed accurately. Lower the board's Z axis location in `0.10mm` increments until you see that the nozzle tip is just barely pushing into the board.
- **The part's height value is too large.** If OpenPnP thinks the part is taller than it is, it'll try to place the part too high up, even if the board Z position is correct. Select the relevant part in the `Parts` tab and lower the height value to be accurate.
- **Lack of suction force from the nozzle tip.** If your nozzle is correctly pushing the part into the board and you're still getting a seemingly random offset, it's likely a lack of suction on the nozzle tip. When the LumenPnP head moves, the part will still stay attached to the nozzle tip, but can rotate and shift because it isn't being held onto the nozzle tip with enough force. We call this shifting "pirouetting." There are two potential solves:
- Use a larger nozzle tip for that part. The larger the nozzle tip diameter, the more suction force the part is held with.
- Especially for the smallest N045 nozzle tip, some solder paste can get stuck in the tip, reducing suction force. If you cannot see a tiny circle of light shining through the tip when held up to a light, you might need to clean the tip with a thin wire and some isopropyl alcohol.

## Every part placed **with a specific nozzle** is offset in X and/or Y
# Debugging

![parts placed with a consistent global offset for only one nozzle](img/nozzle-offset.png)
This page is a central repository for debugging OpenPnP errors.

If parts placed with a specific nozzle have a consistent offset in the X and/or Y axis, there are a couple potential root causes:
## Placement Errors

- **The nozzle offset for that nozzle needs adjustment.** If OpenPnP doesn't have an accurate idea of how far away a nozzle is from the top camera, it's going to place them with that inaccuracy. [Adjust that nozzle's offset](/openpnp/calibration/6-nozzle-offset).
- **The bottom vision pipeline for your parts needs adjustment.** OpenPnP decides how to place parts onto your board based on what it sees in the bottom camera view. If a bright light or reflective surface in view of the camera is making OpenPnP think your part is a different size than it is, you'll see a placement offset. [Adjust your part identification pipeline](/openpnp/vision-pipeline-adjustment/5).
- **The nozzle's tip calibration needs adjustment.** When OpenPnP performs a nozzle tip calibration, it profiles any runout in the nozzle tip. If this calibration does not correctly identify the nozzle tip, it can cause placement errors. [Adjust your nozzle tip calibration pipeline](/openpnp/vision-pipeline-adjustment/4-nozzle-calibration-pipeline/).

## Every part placed **with either nozzle** is offset in X and/or Y

![parts placed with a consistent global offset](img/global-offset.png)

If parts are universally placed with an offset in the X and/or Y axis, there are a few potential root causes:

- **Bottom camera position needs adjustment.** If OpenPnP's understanding of where the bottom camera is located is incorrect, part placements can also be incorrect. Perform a [nozzle offset calibration](/openpnp/calibration/6-nozzle-offset/) on one nozzle, then immediately [set the bottom camera position](/openpnp/calibration/7-bottom-camera-position/) without rotating the nozzle.
- **Fiducial calibration pipeline needs adjustment.** If OpenPnP incorrectly detects your fiducials and instead thinks a silkscreen marking or footprint pad is the fiducial, all of the locations on your board will be shifted. [Make sure your fiducial pipeline is correctly identifying your PCB's fiducials.](/openpnp/vision-pipeline-adjustment/3-pcb-fiducial-pipeline/)
- **Both nozzles need offset calibration adjustment.** It's possible that both of your nozzle offsets need adjusting. [Make sure your nozzle offsets are correct.](/openpnp/calibration/6-nozzle-offset/)
- **The LumenPnP skipped steps during motion.** If the LumenPnP's stepper motors encounter too much resistance, they can "skip steps" and lose their position. The way to confirm that this has happened is by navigating to `Machine Setup -> Heads`, clicking on `ReferenceHead H1` clicking the "Move camera to position" button next to the Homing Fiducial coordinates. If the camera is not centered on the homing fiducial, your machine has likely skipped steps. This can happen for a number of reasons:
- The machine's gantries interfered with something in the pick area, or something in your workspace. Check to make sure the machine is free to move easily and no cables are getting caught or tangled.
- LumenPnP models from v3.1 onward come with linear rails. These rails require proper lubrication to operate correctly. Lubricate your rails with the included lubrication packet.
- If you've increased your machine's travel speed, it's possible this is the reason for skipped steps. If the motors aren't capable of moving the machine at the requested speed, they will skip steps. Try lowering the machine's travel speed by navigating to `Machine Setup -> Drivers -> GcodeDriver GcodeDriver -> Driver Settings` and lower the value in the `Max. Feed Rate [/min]` field.
You might have found an inaccuracy or error when placing parts. This page address these errors, and how to go about fixing them. You might encounter a couple of these errors at once, so choose one to address before moving on.

## Parts are placed offset **relative to the part's orientation**
::cards:: cols=3

![parts placed offset relative to the part's orientation](img/part-offset.png)
- title: Random offset
content: Parts are placed seemingly randomly.
image: img/random-offset.png
url: random-offset.md

If parts are placed offset **relative to the orientation of the footprint**, there are a couple potential root causes:
- title: Global offset
content: Every part is shifted the same amount in X and Y
image: img/global-offset.png
url: global-offset.md

- **The vision pipeline is inaccurate**. When OpenPnP processes the bottom vision image of a component on a nozzle, it's identifying the part's boundaries and uses that information to place it accurately. If OpenPnP incorrectly finds the boundaries of your part, it will place it inaccurately as well. This usually happens because the nozzle tip is visible by the bottom camera, and OpenPnP incorrectly thinks it's part of the component on the tip. To fix this:
- Lower your bottom camera's exposure according to [the instructions for nozzle tip calibration](/openpnp/calibration/8-nozzle-tip-calibration/nozzle-tip-calibration/).
- [Adjust your bottom vision pipeline](/openpnp/vision-pipeline-adjustment/5-part-identification-pipeline/) to make sure OpenPnP is correctly finding your component.
- title: Nozzle offset
content: All parts placed with a certain nozzle have offset
image: img/nozzle-offset.png
url: nozzle-offset.md

## Parts are rotated 90 or 180 degrees
- title: Part offset
content: Parts have offset relative to part's orientation
image: img/part-offset.png
url: part-offset.md

![parts rotated 90 degrees from their intended rotation](img/feeder-rotation.png)
- title: 90 degree offset
content: Parts are rotated in increments of 90 degrees
image: img/feeder-rotation.png
url: feeder-rotation.md

If some of your parts are placed with a 90 or 180 degree offset, there are a couple potential root causes:
::/cards::

- **The feeder's rotation value needs adjustment.** When setting the position of a feeder, the rotation value you enter is equal to the initial rotation angle that the part is picked at. Adjust the `Rotation` field for the feeder of the part you notice is being placed incorrectly in increments of 90 degrees.
- **The part's vision pipeline needs adjustment.** If your rotation offset is consistently 90 or 180 degrees this is less likely, but it could still worth [adjusting that part's vision pipeline](../../vision-pipeline-adjustment/5-part-identification-pipeline.md).
## Miscellaneous Errors

## Part not picking
### Part not picking

![part fails picking](img/mispick.gif)

Expand All @@ -67,7 +51,7 @@ If the nozzle is not picking parts consistently, there are a few potential root
- **The feeder Z position is set too high.** If the machine is told to pick a part slightly too high, the nozzle tip doesn't make a good seal on the part, and fails to pick. This is solved by adjusting the [feeder's height](../1-installing-the-feeders/index.md).
- **Lack of suction force from the nozzle tip.** Especially for the smallest N045 nozzle tip, some solder paste can get stuck in the tip, reducing suction force. If you cannot see a tiny circle of light shining through the tip when held up to a light, you might need to clean the tip with a thin wire and some isopropyl alcohol.

## "No result found" error
### "No result found" error

![no parts found error](/openpnp/vision-pipeline-adjustment/images/no-parts-found.png)

Expand Down
10 changes: 10 additions & 0 deletions docs/openpnp/debugging/nozzle-offset.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Nozzle offset

![parts placed with a consistent global offset for only one nozzle](img/nozzle-offset.png){: style="width:60%;margin-left:10%;"}

If parts placed with a specific nozzle have a consistent offset in the X and/or Y axis, there are a couple potential root causes:

- **The nozzle offset for that nozzle needs adjustment.** If OpenPnP doesn't have an accurate idea of how far away a nozzle is from the top camera, it's going to place them with that inaccuracy. [Adjust that nozzle's offset](/openpnp/calibration/6-nozzle-offset).
- **The bottom vision pipeline for your parts needs adjustment.** OpenPnP decides how to place parts onto your board based on what it sees in the bottom camera view. If a bright light or reflective surface in view of the camera is making OpenPnP think your part is a different size than it is, you'll see a placement offset. [Adjust your part identification pipeline](/openpnp/vision-pipeline-adjustment/5).
- **The nozzle's tip calibration needs adjustment.** When OpenPnP performs a nozzle tip calibration, it profiles any runout in the nozzle tip. If this calibration does not correctly identify the nozzle tip, it can cause placement errors. [Adjust your nozzle tip calibration pipeline](/openpnp/vision-pipeline-adjustment/4-nozzle-calibration-pipeline/).

9 changes: 9 additions & 0 deletions docs/openpnp/debugging/part-offset.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Part offset

![parts placed offset relative to the part's orientation](img/part-offset.png){: style="width:60%;margin-left:10%;"}

If parts are placed offset **relative to the orientation of the footprint**, there are a couple potential root causes:

- **The vision pipeline is inaccurate**. When OpenPnP processes the bottom vision image of a component on a nozzle, it's identifying the part's boundaries and uses that information to place it accurately. If OpenPnP incorrectly finds the boundaries of your part, it will place it inaccurately as well. This usually happens because the nozzle tip is visible by the bottom camera, and OpenPnP incorrectly thinks it's part of the component on the tip. To fix this:
- Lower your bottom camera's exposure according to [the instructions for nozzle tip calibration](/openpnp/calibration/8-nozzle-tip-calibration/nozzle-tip-calibration/).
- [Adjust your bottom vision pipeline](/openpnp/vision-pipeline-adjustment/5-part-identification-pipeline/) to make sure OpenPnP is correctly finding your component.
11 changes: 11 additions & 0 deletions docs/openpnp/debugging/random-offset.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Random offset

![random offsets and rotations](img/random-offset.png){: style="width:60%;margin-left:10%;"}

If your parts are being placed with seemingly random offsets and rotations, there are couple potential root causes:

- **The board's Z position is too high.** If the nozzle isn't pushing the part into the board, it's dropping a short distance onto the board, and not being placed accurately. Lower the board's Z axis location in `0.10mm` increments until you see that the nozzle tip is just barely pushing into the board.
- **The part's height value is too large.** If OpenPnP thinks the part is taller than it is, it'll try to place the part too high up, even if the board Z position is correct. Select the relevant part in the `Parts` tab and lower the height value to be accurate.
- **Lack of suction force from the nozzle tip.** If your nozzle is correctly pushing the part into the board and you're still getting a seemingly random offset, it's likely a lack of suction on the nozzle tip. When the LumenPnP head moves, the part will still stay attached to the nozzle tip, but can rotate and shift because it isn't being held onto the nozzle tip with enough force. We call this shifting "pirouetting." There are two potential solves:
- Use a larger nozzle tip for that part. The larger the nozzle tip diameter, the more suction force the part is held with.
- Especially for the smallest N045 nozzle tip, some solder paste can get stuck in the tip, reducing suction force. If you cannot see a tiny circle of light shining through the tip when held up to a light, you might need to clean the tip with a thin wire and some isopropyl alcohol.
103 changes: 103 additions & 0 deletions docs/stylesheets/neoteroi-cards.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
.nt-cards.nt-grid {
display: grid;
grid-auto-columns: 1fr;
gap: 0.5rem;
max-width: 100vw;
overflow-x: auto;
padding: 1px;
}
.nt-cards.nt-grid.cols-1 {
grid-template-columns: repeat(1, 1fr);
}
.nt-cards.nt-grid.cols-2 {
grid-template-columns: repeat(2, 1fr);
}
.nt-cards.nt-grid.cols-3 {
grid-template-columns: repeat(3, 1fr);
}
.nt-cards.nt-grid.cols-4 {
grid-template-columns: repeat(4, 1fr);
}
.nt-cards.nt-grid.cols-5 {
grid-template-columns: repeat(5, 1fr);
}
.nt-cards.nt-grid.cols-6 {
grid-template-columns: repeat(6, 1fr);
}

@media only screen and (max-width: 400px) {
.nt-cards.nt-grid {
grid-template-columns: repeat(1, 1fr) !important;
}
}
.nt-card {
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 1px 5px 0 rgba(0, 0, 0, 0.12);
}
.nt-card:hover {
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.24), 0 3px 1px -2px rgba(0, 0, 0, 0.3), 0 1px 5px 0 rgba(0, 0, 0, 0.22);
}

[data-md-color-scheme=slate] .nt-card {
box-shadow: 0 2px 2px 0 rgba(4, 40, 33, 0.14), 0 3px 1px -2px rgba(40, 86, 94, 0.47), 0 1px 5px 0 rgba(223, 167, 0, 0.64);
}
[data-md-color-scheme=slate] .nt-card:hover {
box-shadow: 0 2px 2px 0 rgba(0, 255, 206, 0.14), 0 3px 1px -2px rgba(33, 156, 177, 0.47), 0 1px 5px 0 rgba(245, 191, 30, 0.64);
}

.nt-card > a {
color: var(--md-default-fg-color);
}

.nt-card > a > div {
cursor: pointer;
}

.nt-card {
padding: 5px;
margin-bottom: 0.5rem;
}

.nt-card-title {
font-size: 1rem;
font-weight: bold;
margin: 4px 0 8px 0;
line-height: 22px;
}

.nt-card-content {
padding: 0.4rem 0.8rem 0.8rem 0.8rem;
}

.nt-card-text {
font-size: 14px;
padding: 0;
margin: 0;
}

.nt-card .nt-card-image {
text-align: center;
border-radius: 2px;
background-position: center center;
background-size: cover;
background-repeat: no-repeat;
min-height: 120px;
}

.nt-card .nt-card-image.tags img {
margin-top: 12px;
}

.nt-card .nt-card-image img {
/* height: 105px; */
width: 98%;
margin: 1%;
}

.nt-card a:hover,
.nt-card a:focus {
color: var(--md-accent-fg-color);
}

.nt-card h2 {
margin: 0;
}
Loading

0 comments on commit 71a12e7

Please sign in to comment.