Calibration

Started by spiyda, August 16, 2016, 05:16:21 PM

Previous topic - Next topic

Mike

Re. photoplots, my PCB place charges me £10 per layer. They use http://www.phillipsdigital.co.uk/

spiyda

A quick update of what I learned this evening.

Something I missed earlier,

The camera needs to either be spot on the centre of the z axis  (actually quite difficult to achieve)
and it needs to be aligned with the axis also.
or it needs some kind of adjustment.

I knew it had to be reasonable but I assumed that the reversing of the camera would compensate. It has to be quite a bit better than my first attempt and the greater the distance of the camera from the grid, the better it needs to be aligned. The software does compensate, but I would guess that it is only up to maybe half a dot diameter.

I used a nylon bolt through the center to locate it, but they do flex a bit and although the camera was close to centre, it was out of alignment with the axis.

It needs to be pretty close to centre and on axis because, when the camera is reversed and the arm returns to where it started the grid calibration for the second pass the dot needs to be close enough to the middle of the field of view to be imaged correctly.

Mine wasn't .......... so the second pass failed.  :(

I will need to re-engineer the camera mount, probably by making a dummy nozzle holder and centering it up before fitting.
It may mean it needs a different material for the bolt if i stay with my current mounting method, but that is just minor tinkering.
I can take the opportunity to fit the smaller camera (which finally arrived) and tidy up the wiring a tad.
Basically it needs a proper engineered mount !  (but i suppose we knew that already)

To be honest, the first attempt was a bit of a lash up but it fulfilled its function and I learned from it!

On the bright side, a cheaply (and to be honest not very well) printed grid worked pretty well.  It gave me a chance to adjust the brightness of the LEDs, the distance of the camera from the grid, and the initial threshold setting.

The first pass went through with no intervention with just a couple of dots multiple imaged by the software.
I don't know exactly why they were multiple imaged, but it could either be the xy coordinates were outside a soft limit, it could be that the lighting was a little different or in some cases it could be where the arm changes direction (which is where any wear or slackness of the belts would affect it)

I was chuffed that it went smoothly enough that none of the dot positions failed imaging and needed to be set by calculation.



Onward and upward !




spiyda

Almost finished the new camera mount, just need to mount the LEDs.

It has three M2 mounting screws with springs behind to allow adjustment.

All mounted on an aluminium support machined to fit the shaft of the "Z" axis and tapped for the screws



ready to play over the weekend  :)


Sixexe

Very nice work!  Where did you get the camera and lens from?

spiyda

Quote from: Sixexe on September 24, 2016, 07:16:03 PM
Very nice work!  Where did you get the camera and lens from?

I was tempted to use a usb webcam or a rasberry pi camera module and a raspberry pi, which has of course a composite video output.
I have a couple of Pi 2s that would do it, but a pi zero also has the composite video output and would be the cheapest.

but a mate had a couple of composite video cameras in a drawer from years ago when we made CCTV cameras, so I used one of those, with one for a spare!

Hopefully I will be trying it out tomorrow.

Mike

CCTV board cameras are less than a tenner on ebay, so no problem finding something useable & cheap

spiyda

Tried a run through with the new camera, mount and illuminator. (still using the fairly poor grid)

Good news is that it ran through the Grid Head process without a hitch.

The head was reversed after the first pass and it completed the second pass OK.

I then ran the Test Head Grid process,

The test grid processed just imaged a limited number of dots.  (probably 6, but I wasn't counting, see below)

At the end of the Test Head Grid process, it gave this data



I haven't analysed it yet but my guess is that it is the deviation from the position recorded in the grid head data to the imaged dot at the 6 test positions.

I have no idea at this stage whether it is a good or bad result, time will tell.



I did try the next step, Grid Fiducial, but I think the fid camera needs its axes aligning as it failed during the process.

I will analyse how it failed another day and figure out how it should be initially aligned.


spiyda

Once I realised I hadn't swapped the digitiser input lead back to the Fiducial camera when trying to run the "Grid Fiducial" things became easier ! ::)

The Grid Fiducial routine is now runs smoothly, even with the extra illumination from the new camera illuminator !

The Test Fiducial grid results in the dialog below, again,  not exactly sure whether it is good or bad !

A couple of things, the offset needs to be set reasonable close by imaging a datum first with the new camera then the fid camera.
Without that, the Grid Fiducial routine fails because after a fairly large change in arm position, the dot is outside the imaging area.

I imagine it is also important to line up on the same dot when starting the grid routines.  (I probably didn't, time will tell)

Very close to having a set of numbers to play with , in fact I will upload the data so far to my website in case anyone want to take a look

http://www.spiyda.com/temporary/rvdata.dat
http://www.spiyda.com/temporary/rvdata.old

To be honest, at this stage I'm getting a bit fed up of the chase, I could do with spending some time earning bread and butter !

It did cross my mind that I probably should have checked the belt tightness before I started.




is anyone still out there or have you all given up and gone home !


Jason

This thread is the main reason i'm logging in every day.
I'm sure there's a long list of people out there awaiting the next episode, like me.

spiyda

Thanks for that ! I won't give up just yet then !

I did run through the processes a couple of times today and learned that the starting point  is critical (at least on my setup)

Its not marked on the grid, but I'm homing in on the sweet spot to start the grid processes from.

I suppose its the first quantifiable data that you can't derive directly from the software or dxfs.

Unfortunately, it takes a good while to run through to test. (each pass is approx 30 minutes and three passes to do the grids)

The idea being to image an area centered on the center of the grid, but without the arm becoming hyper-extended, or the fid cam dropping off the edge.

Too far forward and the arm cannot extend far enough to image the frontmost dots.
Too far back and the arm fouls on the central pillar.

At the moment it seems to be 5 dots from the left and 26 dots from the front (for the Grid Head)
but starting from that position, the Grid Fiducial drops off the back of the grid

My assumption that both the Grid Head and Grid Fiducial start on the same spot may not be true

If I'd realised I would have to work this out I would have made more careful observations earlier !

spiyda

Okay,  so I ran through the Grids several times

Gridding the head from 5 from the left and 26 from the front completes successfully
Gridding the fid cam from 7 in from the left and 24 from the front also completes successfully.

I've tried the spots around those and they all fail, either due to moving off the spots, over extending the arm, colliding with the pillar
or just moving over the edge of the grid.

Certainly the mid point 6, 25  fails for both

I really expected there to be a common start point :-(

the Test results for the final runs was

Head
X1  3      Y1 -2
X2  3      Y2  5
X3 -1      Y3 -2
X4  2      Y4 -2
X5  7      Y5  1
X6  1      Y6  1

Fid
X1  3      Y1  4
X2  4      Y2  1
X3  0      Y3  1
X4  8      Y4  0
X5  6      Y5 -1
X6  5      Y6  5


I've updated the new DAT file to compare with the one that came with the machine in 2000

http://www.spiyda.com/temporary/rvdata.dat           original machine dat from 2000
http://www.spiyda.com/temporary/2rvdata.dat         dat I was recently using for placing
http://www.spiyda.com/temporary/3rvdata.dat         dat generated by the calibration process  (grid head and grid fid only)

I'm kind of stuck now...   any thoughts ?

Do I proceed assuming these are correct.



Jason

> I really expected there to be a common start point :-(

Does the difference between start points equate to roughly the distance between head and fidcam?
If so, this might make some sense as the arm would be in the same starting position.

or, just to throw in another complication:

Are we sure that the camera should be attached directly UNDER the head shaft?
I wonder whether the camera would be located accurately by the head shaft but actually be offset from it allowing for a larger camera.
Would a miniature camera of the size that you are using have been normal back in the day?

spiyda

Quote from: Jason on September 29, 2016, 07:30:33 PM
> I really expected there to be a common start point :-(

Does the difference between start points equate to roughly the distance between head and fidcam?
If so, this might make some sense as the arm would be in the same starting position.

or, just to throw in another complication:

Are we sure that the camera should be attached directly UNDER the head shaft?
I wonder whether the camera would be located accurately by the head shaft but actually be offset from it allowing for a larger camera.
Would a miniature camera of the size that you are using have been normal back in the day?

Thanks for the thoughts..   

The distance between the dots that seem to work is approx 35mm
the distance from the head shaft to fid cam is approx 55mm

to get the difference between the dots to be the same as the fid cam offset would mean the dots would have to be 3 different in x and y
eg  5,26  3,23  but that is well outside the range of where the calibration process would run.


The idea that the camera should be mounted under the shaft
1.  If I was designing a calibration process, that is where I would mount it.
2.  The dialog that asks for the camera to be rotated 180 degrees suggests it is mounted on something that rotates

and oddly enough, the camera boards that I am using actually date from around 1998, so they were available and probably cheaper than now !

Mike

Quote from: spiyda on September 29, 2016, 12:51:24 AM
I'm kind of stuck now...   any thoughts ?
I'd think the thing to do would be to do a test placement with pre- and post- calibration data to compare the errosrs.

spiyda

Quote from: Mike on September 29, 2016, 10:43:56 PM
I'd think the thing to do would be to do a test placement with pre- and post- calibration data to compare the errosrs.

I think you are right Mike,

I'm pretty sure the linearity / scaling will be correct, the process went too smoothly to not be correct.
The issue is whether the Fid cam is any better

I'll remove the grid, put the head camera back on, set the offset correct in the centre of the work area,
and see what its like at various places within the working area.

If its well out, at least a pattern may emerge. !

I need to remove the grid to do the rest of the calibration anyway.

I don't actually know how good the fid camera to head offset compensation is when the machine is set up perfectly ...
In theory, it should be possible to  use the fid cam to set up the feeders and tool pick up points....  but at least I now have the camera for that !