Fiducial camera calibration/ focus

Started by George04, February 13, 2012, 02:25:51 PM

Previous topic - Next topic

George04

Does anyone have any info on setting up the focus on the fiducial camera? The one on my RV4s is in focus 1-2mm below the pcb surface . I have attached a document which has calibration info for the OTF and fixed cameras on the RV machines but it does not mention the fiducial camera. Is there a similar document anywhere for the fiducial camera?
George

Mike

Tf the fid cam is moved you need to redo the grid calibration, so if focus is  the only problem it may be best left alone - I find it's often easier to do the fid correction manually than use the auto mode, and a slight unfocus may not be too much of a problem.

It should be possible to remove & replace the camera if you set up an accurate position and rotation reference on the bed beforehand to realign to - e.g. set up a new job or feeder and use 'move to centre of placement area' to get a repeatable absolute position, stick a label with a cross-line big enough to fill the field of view carefully to line up with the camera crosshairs.

I have had a fid cam apart a long time ago, but don't recall how the lens worked or whether it's adjustable without moving the camera - I think the illuminator may be in the way -  I think the make/model may be printed on the end, so may be worth looking for manufacturer info.
if the glass of the lens is exposed (don't recall if there is a window), it may be possible to use a piece of soft rubber to try turning it, although if it's loose enough to turn like that it may be too loose to stay in place.


George04

Ah!! The thorny problem of 'The Grid Calibration' rears its head. What is the story about this. I have read in other threads about Calibration kit, Lighting rigs etc but no detail about procedure, are there any documents about this?
I take your point about leaving it alone, but thats just me I can't, I have worked with small cameras a lot, the result of which is that cameras that are out of focus must be fixed! The only reason this camera is not already in bits is that I do not want to upset 'The Calibration' until such time as I can guarantee it can be put back in the same place/orientation. The method you have outlined sounds like a good starting point but I wish the software also provided real time xyza data or a 'confidence test' based on known fixed points. Perhaps it does and I haven't yet found them. The fid cam looks like a standard Watec-704R-CCIR and the datasheet is attached.
George

Mike

The cal procedure is not documented but I suspect it is probably just needs someone to spend some time experimenting to figure it out. As long as you remember to save your cal file, you won't lose anything 
My understanding is it uses a 0.5" pitch grid of circles, and the arm images each one to measure its position, in a process that takes several hours.
This drawing is believed to be the grid : http://electricstuff.co.uk/forum/index.php?PHPSESSID=1cd117b9925fc7bba0ed5a00e2973308&topic=59.0

The way I would approach this would be to get the grid printed as a transparency on a typesetter or photoplotter, and back-illuminate it with a backlight assembly from an old monitor or LCD TV, possibly with an additional sheet of white translucent acrylic, as the funky optics in LCD backlights make the light quite directional, which may have odd camera effects. You may also need something to reduce the intensity to what the camera likes.

What is not known is whether the grid needs to be at a specific absolute position - if so this would probably be clear from where it starts looking when doing the cal procedure.

Gopher

Impressive progress and discoveries being made, good stuff.

George04

In order to get a feel for this calibration procedure and gain the ability to remove and replace the fidcam for focus adjustment without losing the calibration I decided to print out the Grid drawing on an A0 printer. I have used this as a guide and in conjunction with an analysis of the rvdata.dat file it seems that the 0,0 position is 6.5 inches from the left edge of the machine plate approx 0.75 inches back from the line of three countersunk screws from the front of the same plate. This is the X axis which runs from 0,0 to 27.5 inches across the machine (width of the grid drawing). The Y axis runs from 0,0 back for 21.5 inches.To confirm this I used the placement centre which is offered when setting up the reject bins. The placement centre was at 13000,8000 which I measured by setting it as a reject bin and looking at the values the machine stored in the rvdata file. I used this technique many times across the plate to confirm this in order to understand the what was going on. This has allowed me to mark the plate at various points with fiducials so I can now remove the fidcam and replace it without recalibrating.
I don't see how the grid drawing we have attaches to the machine, according to the chassis plate drawing there are two reference points which are the 6mm dowel pins which locate the rear pcb guide, perhaps there is an 'attachment' which would allow this. If someone has seen a grid being used perhaps we could get a description of how it was attached/used  and what it was made of.  The drawing cal04.pdf may or may not be relevant.
The file attached is derived from rvdata.dat but has all bar one coordinate pairs removed (several thousand pairs) which are almost all negative numbers although some are zero. The comments are mine and identify the variables found so far but it is a work in progress. I found it is possible to switch round the reject bin coordinates by careful manual text editing, this speeded up the testing no end. l would be interested in looking at rvdata.dat files from other peoples machines so please post them.
George

Mike

A couple of dats attatched - my RV4s and an old RV1s

Note there appear to be 2 cal file versions out there - the standard install includes a later version of place.dll in the zip, but if this is placed in the working dir it appears  to want to recalibrate, so I suspect the dat file depends on which dll was used during calibration - may or may not be backwards compatible.

Something I'm unsure of is whether the cal grid data is a list of offsets between the camera position and nominal nozzle position over the placement area, or offsets between the nominal and actual nozzle positions. i.e. is it just used for fid correction, or to adjust placement positions.
Should be possible to determine this by tweaking some cal data values in a specific area and  seeing if the nozzle position changes.

I'm sure someone here (other than Dave) has seen a cal being done and can comment on the hardware used - my guess is the cal grid is fixed to some sort of mechanical jig. This thread mentions a cal plate and lighting rig :
http://electricstuff.co.uk/forum/index.php?PHPSESSID=4a3aca8881308d421adb72400fbca591&topic=31.0

My guess is the plate is a metal or plastic plate as per that drawing, with the grid pattern stuck, printed or engraved on it.

Even illumination from all directions is obviously important, and my guess is the age of the machine means a thin enough LED backlit grid would have been costly, so this rig is possibly an arrangement to illuminate from above. 

I wonder if an alternative would be to use the inbuilt (or additional) ring-light and do it in darkness to avoid the effects of shadowed ambient light.

Gopher

The only time something went wrong with our machine that may have meant a re-cal was needed, VSMT took the machine away for a week or 2 so sadly it was not witnessed. The other procedure George posted I have seen done and I attempted to make notes to replicate but they were sadly incomprehensible so at least I can now do that. :)



Ed

a while back i offered to do a training session on how to do the cal.. not a single taker.......i will be selling the equipment for this soon. :)


George04

Hi Ed
Im interested in a training session and/or the calibration equipment, what's the deal?
Regards
George
PS
I'm not sure about the meaning of your second post, but despite what you hear in the movies, its over or out but never both!  ;D