Raster Scan (Electron Microscope) Rotation Algorithm?

Hey, I would do the rotation mechanically (rotate the 2 coils). Saves a shitload of work. This is how your TV set gets its picture straight.

--
Luhan Monat (luhanis 'at' yahoo 'dot' com)
"The future is not what it used to be..."
 Click to see the full signature
Reply to
Luhan Monat
Loading thread data ...

...

If you really mean "yoke", ( ;-) ), then just mount it on a bearing so it can be twirled around the gun. Use a worm and spur gear for fine adjust.

Or, scan orthogonally, grab the picture, and rotate it in software, like with a paint program.

Good Luck! Rich

Reply to
Rich Grise

If the deflection coils are symmetric and can be driven with arbitrary waveforms, and you have a pair of scan sawtooth waveforms or whatever, you can do arbitrary rotation with four multiplying DACs and two summing amps.

D1 = k1 * saw1 + k2 * saw2

D2 = k3 * saw1 + k4 * saw2

where D1 and D2 are the analog deflection amp inputs

Saw1 and saw2 are the old analog x, y sweep sawtooths (sawteeth?)

K1..K4 are digital vals you load from your PC into the multiplying DACs, with the usual sin/cos triggish stuff.

This is cool because K1..K4 do rotation and zooming, too. You can even sort of un-bend trapezoidal distortion, like if you're not hitting a surface straight-on. A little dynamic focussing helps here.

There are more digital ways to do this, too, but quantization issues can get nasty.

Linear Technology has some nice fast 4Q 16-bit mdacs.

John

Reply to
John Larkin

Hi,

I haven't made a whole lot of progress on my electron microscope digitizing project this month, but I hope to finish in the next 6-8 weeks. Perhaps sooner. The last decision is whether to use an MCU or DSP in the project, or to stick with discrete logic as I'd originally planned.

To recap and give some background, the heart (arguably) of a scanning electron microscope consists of a pair of X and Y scanning coils which are driven in a raster-scan pattern not too unlike a television deflection yolk. In fact NTSC scan rates, interlace and all, are sometimes used so that the output can be displayed on a TV monitor.

As it turns out, scan/image rotation is a fairly common feature of high end scopes. I'm wondering what it would take for me to incorporate such a feature into my project. I'm not sure whether or not this feature is limited to digitally controlled scopes: I'd very much like to know.

I'll be driving my coils with 16 bit D/A converters: I want to experiment with ultra-high resolution images blown up to poster size.

Of course rotating the scan in multiples of 90 degress is trivial, but ultimately I'd like arbitrary rotation or at least in 45 degree increments. I could probably get an idea of the algorithm I'm looking for by drawing some superimposed squares, mapping point to point and finding the pattern. For example: if the baseline (non-rotated) image is generated using 0,0 as the upper-left origin and proceeds right and down as it does with traditional TV, then for a 45 degree counter-clockwise rotation I'd load 0,32K in for the origin.

I see a shift problem looming. I think I see the solution, though. Although I'm using 16 bit D/A, software limitations will limit my image to 32K by 32K pixels. In the example above, then, for the baseline image I'd load 16K,16K in as the upper-left origin and 48K,48K as the lower-right end of frame. For 45 degree counter-clockwise I'd load approximately 11K,32K in for the origin: that's 16K divided by 1.414 for X and center of range for Y.

But perhaps you're familiar with this algorithm? Are sin, cos, or tan a necessary part of the algorithm for arbitrary rotation? Do I really need more that 16 bits of D/A resolution to do this right? If the rotation angle is very small, for example such that the origin of the first line is at ~16K,16001K and the end of the first scan line is at ~48K,16K it seems like I might need as much as 30 or 32 bits of resolution to slowly jack up the Y value by one pixel over the course of the scan line.

I should probably be using signed notation in these examples to make them more clear.

Is there a way to do this in the analog domain? In actuall fact I'll probably have 4 D/A converters total, two MDACS for the scanning and two more driving the reference of the MDACS to set gain. Normally the gain dacs would be loaded with the same values to give equal magnification in x and y: in fact a single DAC could be used to set both gains but I want to be able calibrate them. At some level it seems like I'm just changing the "slope" of the scan lines and that perhaps only a pair of analog multiplications is needed: perhaps the output of the X DAC is simply multiplied by a term that varies with the degree of rotation and then multiplied by the Y term. And vice versa?

I can't quite get my head around it, though I think I'm almost there.

Anyone know how this type of thing is done in practice, or have any comments?

-Jeff

Reply to
Jeff Miller

Get a copy of the 'Graphics gems' series of books (Andrew Glassner et al), they discuss drawing lines at arbitary angles in discreet systems in some depth. IIRC "The Bresenham Line Drawing Algorithm" should turn up some possibilities.

One possible method goes like this, Vy = Line + KVx where Vy is the value of the Y deflection signal, Line is the scan line number, Vx is the X deflection value and K is a constant that sets the slope of the line (school geometry). Obviously (0,0) is the point around which this rotation operates. Compute K to give your rotation within the quadrant and play with the signs and deflection drive signals to select the quadrant. I would consider using those two extra DACs to provide a controlled bleed from Vx->Vy and vice versa, if you have no processing power driving the DACs, otherwise just do the math in thee processor to generate the rotation.

There are easy matrix methods for computing the values to feed the dacs to give rotation, scaling & skew around arbitary points, I know that they appear in the referenced series of books but cannot be bothered to look them up now. Your uni library will be easily able to find them.

An easy alternative of course is just to post process the video in software, which offers some useful tricks anyway....

Regards, Dan.

Reply to
Dan Mills

There is scertainly a way to do it in the analog domain - the older Cambrdige Instruments elelctron microsccopes just had four sin and cos tapered pots on one shaft.

Two of the pots were fed with the display's horizontal scan sawtooth (X-waveform) and two with the display's vertical scan sawtooth (Y-waveform) and the microscopes scan coils were fed with a weighed sum of the tese waveforms, weighed according to the postion of the shaft.

A point of detail - the two ends of each of the fours pots were respectively fed with display scan waveform and its inverse.

Later machines used multiplying DACs for the job, though they were a bit dodgy for TV speed horizontal scans.

Once we went over to driving the user display from a frame store, we gratefully stopped driving the scan coils in the microscope at TV rates.

It took rather longer for us to go over to using DACs to drive the scan

- we definitely needed good 16-bit DACs to get a acceptable blank white picture from the 4000 line photomonitor - even a 1/4 LSB error in the output from a 12-bit DAC gave a very obvious line structure on a blank white screen that customers found totally objectionable.

The old machines all used constant current sources driving integrators to generate the scanning ramps, with different FET-input op amps in the horizonal and vertical scan ramp generators. You needed a fast op amp in the horizontal scan generator and they ran quite warm, while you needed a low-input leakage current amplifier in the vertical scan generator, so you wanted a low-powered amplifer that ran cool.

----------- Bill Sloman, Nijmegen

Reply to
bill.sloman

The coils are deep inside the column and can't be moved.

Rotation after the fact is a plenty fine idea. Just about the only reason to do it in the scope, so far as I can imagine, is to avoid artifacts if regularities in the sample beat with the scan lines, a rare occurance I would imagine. And maybe 'cause it looks cool in real time. I'll be carting this scope (a Mini-SEM) around to primary schools.

-Jeff

-Jeff

Reply to
Jeff Miller
["Followup-To:" header set to sci.electronics.design.] On Tue, 05 Apr 2005 10:18:40 GMT, Jeff Miller wrote in Msg.

Rotate the sample?

But really, I'd use multiplying DACs.

--D.

Reply to
Daniel Haude

Screech? Staticly of course, except if you want the image to spin.

I was thinking once of making the saws with two more dacs, so then you could know the addresses at all times, so then you could have a focus lookup table. Not per pixel, but in a reasonably-sized checkerboard.

But my career in sem electronics ended at that point, about when the lawsuits began.

John

Reply to
John Larkin

To start with, you'll never get 16 bits from 16bit DACs. When you rotate the image digitally with the rotation matrices, you shouldn't consider more than 4k pixels per side. This due to the limited resolution of the DAC.

Rene

--
Ing.Buero R.Tschaggelar - http://www.ibrtses.com
& commercial newsgroups - http://www.talkto.net
Reply to
Rene Tschaggelar

Heh heh. Well the scan coils are embedded deep in the column.

-Jeff

Reply to
Jeff Miller

Jeff Miller wrote:

Mmmm hmmmm. That's about where I was headed.

Screeeeech.... what usual sin/cos stuff? Dynamically? Or statically, ie: knowing desired angle of rotation you calculate a pair of sin/cos values and load them into the appropriate (static) K's and then "go".

Mmmm hmmm, dynamic focus is next on the agenda: I might try dynamic astigmatism correction as well. I'm even considering "zoned" or pixel-by-pixel (ie: digital dynamic) focus: auto-tuned by FFT'ing the samples and optimizing for the higher frequencies, of course :)

I think I've heard about those linear parts.... was it you mentioned them before?

-Jeff

Reply to
Jeff Miller

Check out this link:

formatting link

The old vector based video games (and terminals) were pretty cool -- nostalga for them has led me to California Extreme once to play some of those old classics.

Reply to
Joel Kolstad

Hmm, I think I have one of these (two actually) in the basement, I may take a peek. 200's or 250's.

That's a valuable point. I was thinking I might still have to incorporate reversal of the sense of the scanning coils: otherwise I'd be dealing with some pretty steep slopes (read: undefined). But in fact I don't think I'll have to electrically swap poles, just... logically swap them, if you catch my meaning. It seems to me this inverse-drive arrangement you describe is designed to solve the same problem: keeps all the "slopes" resonable values between -1 and 1.

Hmmmm. I'm not sure I see _exactly_ what the problem might be, especially on a blank white screen. But don't feel compelled to elaborate.

I think I see that. You certainly wouldn't want the input of your vertical op-amp to suck back out a significant fraction of the constant current you were using to fill the integrating caps. Worse still would be an amp whose input current changed with applied voltage as well as being a significant fraction: read vertical nonlinearity.

You wouldn't happen to have schematics or at least wiring/connection diagrams for the Stereoscans, would you? I'm starting my project with a Mini-SEM, with an eye toward taking it around to primary schools: and I got schematics with that scope. Secondarily I want to be able to toss the consoles on my Stereoscans but I didn't get any docs with them.

-Jeff

Reply to
Jeff Miller

My Mini-SEM deosn't have stage rotation.

The number of MDACS I'll be using seems to be climbing. Oh well. Looks like I'll have to design a PC board for them as opposed to using evaluation modules.

-Jeff

Reply to
Jeff Miller

Somebody reportedly makes a tiny (lipstick size?) SEM column that sells for a few thousand dollars. It's just a commercial hot electron gun, a lens element or two, and an electrostatic deflection structure, which is just 8 round rods arranged in a circle, four at DC and four driven with deflection voltages. One of them, one electron multiplier, and a vacuum pump, and there you are. Oh, some electronics, too.

John

Reply to
John Larkin

Hi,

I want to chuck the console(s) for three reasons. WRT my Mini-SEM, I want to be able to bring it around to primary schools. The console is the only thing too heavy for one person to move around. Luckily the HV power supply is in a seperate enclosure. I don't suppose I'll actually trash the console, just put it in long-term storage.

Secondarily, the consoles for my Stereoscans take up too much real estate in my home lab. I only have about 300' sq. ft, and have a wide range of interests.

Finally, I hope to find a FESEM column on Ebay that's been orphaned from its console fairly cheap. There was one kicking around for about 6 months but I don't see it listed anymore, perhaps it was sold or the seller gave up and scrapped it.

The specs of my design are very similar to those of the units you mention. Mine will use 14 bit A/D converters, I think. Analog Devices has some nice 16 bit parts just around the corner but I don't think I'll be able to wait. My design will have up to 8192*8192 imaging native as opposed to 4K*4K in those desings you mention. Up to 32K * 32K can be acheived by tiling as 32K * 2K blocks.

My initial solution will cost

Reply to
Jeff Miller

Ah, OK no problem.

Exactly what I had in mind. Definiteley something to think about "for later" as most imaging at high mags deson't benefit from dynamic focus.

Yeah per pixel would take a ridiculous amount of memory.

-Jeff

Reply to
Jeff Miller

You can buy replacement hot sem cathodes, lanthanum hexaboride tips or something. They wear out, so are basicly an expendable; I don't think they're expensive.

The cold-cathode tips only work in ultrahigh vacuum, which wouldn't be feasible for a low-cost sem.

Classic TEMs don't scan, and have an elaborate and expensive set of condensing and expanding magnetic lenses.

John

John

Reply to
John Larkin

Ah, the joy of having an Asteroids machine in the garage.....

Cheers Terry

Reply to
Terry Given

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.