sonolink

CNC Camera for double sided PCBs
« on: December 26, 2020, 12:13:46 PM »
Hello Everybody and Merry Christmas!!

I'd need your advice on this please: I have recently installed an endoscope type USB camera on my CNC to reference spots to be able to cut double sided PCBs acurately.

I have tried to align the camera with the Z axis using a mirror to align it's own reflection, but I have found it's extremely dificult, in part because the camera itself is not aligned inside the body that contains it and probably because the mount I have 3d printed is not the best and/or most precise.

My idea is to home the machine, drill reference points on side A of the PCB, do a height map with autoleveller, cut traces on side A, turn the PCB around, reference origin point on side B and cut the rest of the job.

My question is: If I reference the origin point on side B using the same height (since the camera is mounted on the Z axis) that was used when calculating the offset between the camera and the bit I should be ok, right?

Thanks in advance for your help and time :)
Cheers
Sono
Why sleep when you can mix?
M.P.Stavrou


sonolink

Re: CNC Camera for double sided PCBs
« Reply #1 on: December 26, 2020, 12:18:50 PM »
Why sleep when you can mix?
M.P.Stavrou

abbey road d enfer

Re: CNC Camera for double sided PCBs
« Reply #2 on: December 27, 2020, 07:12:11 AM »
My question is: If I reference the origin point on side B using the same height (since the camera is mounted on the Z axis) that was used when calculating the offset between the camera and the bit I should be ok, right?
I understand your question as : "can I get away with doing a new Z-mapping?"
If that's correct, I would say no. Stock thickness is not guaranteed, and in addition there is deformation due to milling/drilling. Certainly the difference would not be huge, but correct milling requires very narrow tolerance.
Who's right or wrong is irrelevant. What matters is what's right or wrong.
Star ground is for electricians.

sonolink

Re: CNC Camera for double sided PCBs
« Reply #3 on: December 27, 2020, 09:39:54 AM »
Hi Abbey,
Thanks for your reply :)

I tried to cut Double sided PCBs with pins in reference holes and the result wasn't bad at all. But not perfect :)

There must be a way to achieve perfect or near perfect double sided PCBs with a CNC using a camera. Since I can't seem to perfectly align the camera to Z (probably because of my DYIng skills, or maybe I'm just approaching it the wrong way), I thought of using the camera deviation as a constant to have a reliable reference in X and Y when turning over the PCB.

I'll test a bit and report back :)
Cheers
Sono
Why sleep when you can mix?
M.P.Stavrou

abbey road d enfer

Re: CNC Camera for double sided PCBs
« Reply #4 on: December 27, 2020, 01:20:51 PM »
Hi Abbey,
Thanks for your reply :)

I tried to cut Double sided PCBs with pins in reference holes and the result wasn't bad at all. But not perfect :)

There must be a way to achieve perfect or near perfect double sided PCBs with a CNC using a camera. Since I can't seem to perfectly align the camera to Z (probably because of my DYIng skills, or maybe I'm just approaching it the wrong way), I thought of using the camera deviation as a constant to have a reliable reference in X and Y when turning over the PCB.

I'll test a bit and report back :)
Cheers
Sono
Since your problem is only with the Z-axis, you may try this.
When you have reversed the PCB, give the bit some slack and draw it out slightly. Then do a GoToZero, the bit will settle at the right height, then secure the bit.
This is what I do when I change bits, which seems to me to be not too dissimilar to changing stock.

But actually, I don't really understand your problem. Don't you have an auto-leveller?
All the people I know that do dual-sided PCB's swear an auto leveller is essential.
Caveat: I don't do PCB's, only mechanical.
Who's right or wrong is irrelevant. What matters is what's right or wrong.
Star ground is for electricians.

sonolink

Re: CNC Camera for double sided PCBs
« Reply #5 on: December 29, 2020, 05:30:57 PM »
Well no, actually my problem is with X and Y axis. Basically, I want to make sure both sides of the PCB are aligned. So I first tried with dowels but honestly it's a bit unreliable or I couldn't make it reliable at least because there was too many variables that could change. So I decided to install the camera to make it more accurate.
The idea is to reference the first side to an origin, creating, as you cut it, reference spots for side B. Then with the camera you reference the machine again using those spots, and cut side B. Then you see how great and marvelous maths, geometry and CNC are!!

Once the camera was installed I noticed that the reference would change depending on the Z height that was used when using the camera. So I thought I had to align the camera so that it wouldn't matter at what height you would reference any spot. That's when I ran into this no way out situation where aligning the camera with the Z axis is very hard using a cheap camera, (the camera isn't even aligned inside it's body to start).
So I was thinking, if I always use the camera at the same height, that variable would be constant, right? If so, I could just disregard it...
So I'm at that point now basically :)

What really bugs me is how to reliably reference X and Y on both sides of the PCB...
And it's driving me kinda crazy to be honest, so all suggestions are welcome!!! ;)

Cheers
Sono
Why sleep when you can mix?
M.P.Stavrou

gyraf

Re: CNC Camera for double sided PCBs
« Reply #6 on: December 30, 2020, 04:27:39 AM »
any decently-priced optics will change distortion with lightning - just sayin'
..note to self: don't let Harman run your company..

abbey road d enfer

Who's right or wrong is irrelevant. What matters is what's right or wrong.
Star ground is for electricians.

sonolink

Why sleep when you can mix?
M.P.Stavrou

abbey road d enfer

Re: CNC Camera for double sided PCBs
« Reply #9 on: January 07, 2021, 05:51:04 AM »
My question is: If I reference the origin point on side B using the same height (since the camera is mounted on the Z axis) that was used when calculating the offset between the camera and the bit I should be ok, right?
I don't think so. The parallax error will be doubled when reversing the PCB.
What is the model of your camera?
I've seen this on erecommended.
https://www.amazon.de/gp/product/B01EWRYXYU
Who's right or wrong is irrelevant. What matters is what's right or wrong.
Star ground is for electricians.


sonolink

Re: CNC Camera for double sided PCBs
« Reply #10 on: January 07, 2021, 07:37:30 AM »
Actually I've got 2 cameras (I only use one). One is similar to the one you linked (endoscope), the other is a USB microscope camera like this:
https://www.amazon.es/dp/B07GSLHLH4/ref=cm_sw_r_cp_apa_i_KgV9FbCM2JKS1?_encoding=UTF8&psc=1

My idea is that by keeping the camera always at the same height the Z axis (Parallax error) can be discarded. Maybe I'm wrong but this is what I'm trying to achieve right now (I hope it's clear and not too tedious):

1- Home the machine, place the copper in a jig and drill 6 reference holes 1 mm diameter. The machine is now in G54 offset mode.

2- Place the machine at one of the known reference points (we known their position from the job), home the Z axis (the limit switch is a known value), put machine in G55 offset mode and zero X and Y origins on the hole.

3- Switch camera on using the K-Dietz plugin (this gives you a crosshair on the screen basically), and place the camera centered above the aforementioned hole. The plugin has controls to place a circle above the crosshair. Size the circle so that it matches the 1 mm hole.
Write down the X and Y values (these are the camera offset) switch the machine to G56 offset and Zero X and Y.

4- Set Z to run the job for the traces on the upper side of the PCB in G55 mode.

5-turn the PCB around in the jig, switch to G56 mode and go to zero. The camera should be looking at a reference hole and Z axis should be homed. Fine adjust the position and zero X and Y. Switch the machine to G91 (incremental moves) and input X and Y offsets written down previously. Now the bit should be above the reference hole. Switch to G55 offset mode and zero X and Y.

6- Run the B side traces after setting Z height for the bit.

There is another function to take into consideration which is the possible rotation of the coordinates system to compensate possible deviations but I'd keep that for after solving the camera question :)

Any thoughts on this procedure while I'm waiting for some copper to arrive? 😉

Thanks for your time and help
Sono
« Last Edit: January 07, 2021, 07:40:38 AM by sonolink »
Why sleep when you can mix?
M.P.Stavrou

abbey road d enfer

Re: CNC Camera for double sided PCBs
« Reply #11 on: January 07, 2021, 10:24:16 AM »
The procedure seems correct, using the reference pont to establish home, as long as you position the camera at the same height, for same parallax error.
I'm interested in your endeavour.
I have a feeling the endoscope could be better centered than the camera.
Who's right or wrong is irrelevant. What matters is what's right or wrong.
Star ground is for electricians.

sonolink

Re: CNC Camera for double sided PCBs
« Reply #12 on: January 07, 2021, 12:37:23 PM »
Excellent news, Abbey!! I always get very inspired and carried away when I get your attention! ;)

The endoscope focal point is 6cm, which means that the 1 mm hole appears a bit small on the screen. So,  I'm 3d printing a mount for the camera right now.

I'll report back asap! Thanks again for your feedback ;)
Sono
Why sleep when you can mix?
M.P.Stavrou

abbey road d enfer

Re: CNC Camera for double sided PCBs
« Reply #13 on: January 08, 2021, 05:00:57 PM »
Excellent news, Abbey!! I always get very inspired and carried away when I get your attention! ;)

The endoscope focal point is 6cm, which means that the 1 mm hole appears a bit small on the screen. So,  I'm 3d printing a mount for the camera right now.

I'll report back asap! Thanks again for your feedback ;)
Sono
have you seen this post where the guy says he opened the endoscope and managed to secure the sensor to the body?
Who's right or wrong is irrelevant. What matters is what's right or wrong.
Star ground is for electricians.

sonolink

Re: CNC Camera for double sided PCBs
« Reply #14 on: January 08, 2021, 05:58:24 PM »
I did indeed Abbey :)
I thought about openng the endoscope but was too afraid of breaking the whole thing. Mine seems pretty sturdy.
I also saw this other post where the guy speaks about the sensor deviation inside the endoscope body and how he fixes it. I never managed to be so precise in manoeuvering the camera alignment though :(
I guess I'd need a more precise mount.
https://www.youtube.com/watch?v=9c-tbv1cgMc

Cheers :)
Sono
Why sleep when you can mix?
M.P.Stavrou

sonolink

Re: CNC Camera for double sided PCBs
« Reply #15 on: January 17, 2021, 11:53:55 AM »
Sorry for the lack of update. I have detected a very slight misalignment in my X axis, not squaring with Y, so I've been trying to sort that out since it's critical for double sided jobs.
I'll be back soon with more info ;)
Why sleep when you can mix?
M.P.Stavrou


 

Related Topics

  Subject / Started by Replies Last post
16 Replies
5006 Views
Last post March 24, 2009, 05:44:10 PM
by guavatone
5 Replies
1813 Views
Last post December 09, 2008, 05:13:20 PM
by livingnote
4 Replies
3543 Views
Last post April 26, 2011, 04:09:43 PM
by Rybow
7 Replies
1044 Views
Last post August 07, 2019, 04:19:37 AM
by Khron