Pixmicro is a webcam viewer with some extra features to make it useful together with a camera guided PCB drill JIG described here.
The main features that makes it useful together with the JIG is support for a movable cross-hair and a circle detection function optimized for detecting holes etched in the copper of a PCB or drilled through it.
Whenever the cross-hair is placed over a hole in the PCB a circle is drawn where Pixmicro think the edge of the hole is. Pressing a “Calibrate” button will center the cross-hair in this hole. It also render an aiming guide to help you center the hole where the drill bit will enter after calibration.
Using Pixmicro together with the drill jig is fairly straight forward. First you drill a calibration hole in a part of the PCB that is going to be trimmed away (or in a scrap PCB or anything else that leaves a clean hole with enough visual contrast). Then you move the cross-hair over the hole. You should now see a blue tinted circle around the edge of the hole indicating that Pixmicro has detected it. If this don’t happen, you might need to adjust the “Threshold” and “Roundness” sliders to make it properly detect the hole. When it properly detects the hole, you can click the “Calibrate crosshair” button to make it automatically center the crosshair over the calibration hole.
Now you are ready to start drilling the PCB. Move the PCB so the first pad you want to drill is under the crosshair. The pad should have a small hole etched in it for aiming. I post-process the drill-file to make all holes 0.3mm in diameter regardless of actual drill-size. This give a nice aiming point and the small size assures that even if I’m not hitting center 100% I will still have copper to the edge of the hole.
When the crosshair enter the hole, you should see the blue tinted circle again. If you are close enough to the center, you will get a horizontal and vertical aiming guide. When both aiming guides align with the crosshair you have it perfectly centered and are ready to drill. The distance from the aiming guides to the crosshair is 3 times the actual offset from center. This to make it easier to tell when the aim is perfect.
In the first picture the aim is off a bit and the vertical indicator is red to indicate that it is off by a fair bit, and the horizontal indicator is yellow since it is a bit closer.
In the second picture the PCB has been moved a bit down and to the right. The horizontal aim is now perfect and the vertical aim is almost perfect (aiming guide is now green).
If you notice that the drill bit start moving away from the crosshair in a consistent direction the jig might have lost calibration slightly (something moved). If so it can easily be re-calibrated by clicking the “Calibrate crosshair” button again after drilling a hole.
In the “Windows” menu you can open/close 3 different windows. This windows are by default docked along the right edge of the main window, but can be dragged off and made floating. They can also be re-docked along any of the main window edges/corners or combined with each other in a tabbed view.
The windows have the following functions:
This window allow you to select witch camera to use if multiple cameras are connected to the computer. It also allow you to flip the camera image along any of the two axis. This is useful for the camera jig as the camera is mounted below the PCB and moving it forward on the jig would move it downward on the screen unless you where able to flip the image vertically.
The “Hole detect” window allow you to enable / disable the hole detector and to adjust how it detects the hole and how it present the result.
The hole detector have the following controls:
- Enable - Enable / disable the hole detector.
- Freeze center color - By default the edge of the hole is defined as the point where the color differ enough from the color at the center of the crosshair. By ticking this check box you freeze the color used as a center reference to whatever is currently below the crosshair. This can make the detection a bit more stable if the color the camera detect at the center of a hole vary a bit between frames.
- Center color - Show the color currently used as a center reference. Unless “Freeze center color” is checked, this is the color currently under the crosshair center.
- Marker color - The color used to indicate the hole when detected. Clicking it will open a color picker dialog allowing you select a new color. Move the dialog off a bit to see the changes in real-time.
- Marker alpha - The transparency of the hole indicator.
- Marker width - The thickness of the circle drawn to indicate the detected hole.
- Threshold - Slider selecting how different the color needs to be from the center color for it to be considered the edge of the hole.
- Roundness - The hole is detected by tracing 16 “spokes” from the center of the crosshair and outwards until the edge is detected. Then the longest and shortest spokes are ignored before the hole center and radius are calculated. In a perfect circle all spokes have the same length. In a square the spokes going diagonally will be longer than those going horizontal and vertical. The Roundness slider select how much the spoke lengths are allowed to vary before the detection is rejected.
- Calibrate crosshair - Clicking this button will move the crosshair to the currently detected hole center if any.
The “Edge detect” window allow you to enable / disable an edge detect filter and to adjust it’s sensitivity. This window is closed by default, and is mostly a result from me experimenting with the OpenCV image processing library. I hope to add more useful filters later.
The latest version can be downloaded here:
Older versions can be found here:
Pixmicro is released under the GPL license, and the sources can be fond on github: http://github.com/kavionic/Pixmicro