rasterizing laser on spinning hexagon mirror

I am designing a PCB etching machine. I will use a linear table for Y axis to advance the PCB mounted to it as the base table platform. As the PCB advances, my UV laser will run X axis.

I am coating my board with my own chemistry of dichromate that will react solid to the 450nm laser I am using.

MY concept is, I tape a coated PCB to the table - hit "print" on the software (I write in .NET Visual Studio) - will output a serial stream to the Arduino. The machine takes blank pcb, runs and rasterizes pattern with the same accuracy of a laser printout.

I have all the motor control down, and the Visual Studio program to interpret a bitmap to drive whatever I want.

I pulled this device from a laser printer. It is the business part of the machine housing laser. A hexigon forward facing mirror motor mounted with built in brushless motor driver. I apply voltage and the mirror spins. I will mount FIRST a red dot visible laser diode for testing aimed in same location I pulled the laser printer laser, at the rotating mirror. It will bend laser 90 degrees and left-to-right based on whatever angle the mirror is at.

Here is where I need help please. The Arduino project has to take my serial stream, and drive the laser on/off to the exact clock of the spinning motor. It has to repeat a flashing sequence at the start angle of one face on hexigon and end at the end of hexigon. Repeat for the other 5 sides of hexigon to make 1 full rotation. Then advance to the NEXT line from serial data stream, and repeat the loop.

I estimate motor spinning at 10k rpm. The slowest this will run at idle is 1,000 rpm. I still need to probe the motor driver for an rpm/tachometer pulse signal to synchronize the arduino output. I am sure I can drive motor with clock signal to precise rpm, but i do not yet know how I can measure the rpm yet on this spinning mirror.

I figure this design is much like those bicycle wheel LEDS that do persistance of vision to show words on a spinning wheel.

I was hoping someone here had seen a project and had any links, if anyone remember seeing a project like this. I have searched google on my own, but can not find some code samples. It is still difficult for me to configure the timers, and calculate machine cycles to millseconds or nanoseconds.

It sounds like an ambitious but interesting project. I have not had any experience with anything similar, but I can at least make a suggestion here:

but i do not yet know how I can measure the rpm yet on this spinning mirror.

You could have a separate laser/sensor pair mounted perpendicular to the axis of the rotating mirror. The sensor would be covered with a slot so that only when a face of the mirror is at exactly 90 degrees to the sensor would it detect the light from the laser. That is, the sensor would be triggered 6 times during the rotation of the hexagonal mirror. The rotational speed of the mirror could then be calculated from the interval between sensor pulses.
1000 pulses per second from the sensor would indicate a rotational speed of 10,000 RPM (assuming a 6 face mirror).

Ok good idea. I use a light sensor. This could be an easy way for me to physically move the mount to match where I want the start of my line. Then I can have something to compare oscillioscope probing, and find the lead on thr motor driver that has the motor angle.

This is not a common project, it took me a long time to gather what I could about reverse engineering a laser printer for re-purposing. Most all older laser printers have the same hex mirror motor assembly. It would actually be possible to modify the printer to accept sensitized pcb and just print the etch pattern using its own steppers and feed rollers.

While I impatiently wait for some high speed photo diodes to be shipped to me, I discovered some more research. Someone else has created their machine, using a hexagon mirror system found in laser printer. Unfortunately the project is old and the link to their source coded has decayed. They re-purposed the mechanics on a flatbed scanner for the x-axis, using hexagon mirror for y-axis to raster the printed circuit board.

Laser exposer project

Under "Electronics" section, the person explains:

It has 12V powersupply, a speed control pin, which accepts a strange range of voltages, and a symmetrical frequency generator output (FG). This output is a zig zag shaped induction loop around the motor, which generates a feedback frequency of how fast the motor is going. This is fed to the AVR's analog comparator. The microcontroller locks this signal to a reference frequency of 2kHz, which yields 55.555555555555... rotations of the motor per second, and 333.333333...Hz scanrate."

A "symmetrical frequency generator output (FG)" goes above my head, I do not know what that is - how it works, or what to do with it. I do not know how to make a circuit to sense this type of signal. I am also a newbie when it comes to using an analog comparator - up until now I use analog input pins to sense potentiometer signal, for joysticks or interface dials.

I'm not sure there is so much to understand there.
The motor is wound with additional coils which generate a signal relative to the activity of the motor. That signal is 6 equally spaced pulses per motor revolution. I guess that is what is meant by symmetric frequency generator in this context.
The (maybe indirect) output of these coils is fed into the analog comparator of the attiny2313 mcu. That gives a clean pulse with a frequency of 6 times the motor speed. The mcu uses a 2KHz clock to measure the signal from the motor coils and switches the motor control pin as needed to achieve a constant motor speed. 55.55 Revs/sec from the motor gives a 333.33 Hz signal because the sensor coils give 6 pulses per motor revolution. 6 ticks of the 2KHz clock also give a frequency of 333.33 Hz.

Of course, if the motor in your system does not have the sensor coils, then you'll need your other solution.

You saw the schematic:

And here is how the (AVR) internal analog comparator can be used:
https://www.gammon.com.au/forum/?id=11916

You may need to worry about jitter on that pulse signal, for laser scanning you probably need something like
resulution of 10 minutes or arc or better, which at 10krpm is 1.6µs - if the signal from the motor has significant
jitter you'll have to implement a PLL to clean it up (either locking the motor to a quartz defined reference, as mentioned above, or locking a VCO to the physical motor). The mechanics have very low phase noise due to
the inertia of the rotor, and so a PLL can work wonders even from a fairly noisy
sync signal if the PLL bandwidth is low enough.

Anyway worth trying using the sync directly initially to see how much jitter you get - it might be OK for
your purposes, and its certainly simplest.

What I do not understand was the terminology. When I went to the site -reasons unknown, 1/2 the page was in German, and the rest of the project links were in German. I had to use Google-translate to get what I could.

I do have an oscilloscope that I am still learning how to operate. If the "Symmetrical frequency generator output (sFG)" signal is something that can show up as a pulse, then I can find it. If it was not a square wave pulse, then I probably did not recogonize it. Should signal output be a standard digital pulse, or are we talking about some analog sine-wave kind of thing?

The hexagon board has 5 pins, 2 pins are the motor power +12v or +24v I still can not confirm, I just run at +12. Ground pin. 3 other pins, 1 pin enables the motor to spin, 1 pin is the clock-pulse INPUT pin that controls the speed. The OTHER pin must be the mystery feedback signal that I will trace on the oscilloscope. I just realized now I should probably also spin it by hand to see what the scope reads as well. With a tachometer signal right off the motor driver itself, helps me a lot to synchronize the diode laser timing.

If I have this right, you have:

a motor with 6-facet mirror spinning at ~ 10,000 rpm
roughly 160rps * 6 facets = 960 facets/sec or roughly 1mS/facet
To beam UV onto a PCB at, say, 600DPI over 6 inches = 3600 dots in 1mS
which is approx. 0.27uS/dot.

I think you will have to really accurately govern the motor speed to something which matches data coming out of the processor. i.e. Figure out a UV modulating pulse stream out of the CPU at around .27uS/dot, the actual granularity will depend on the CPU clock etc.

Then work out what motor speed will match that 'dot rate'

To trigger the dot line generation you'll need an opto on the bed - i.e. next to the PCB. At this position you only need it to be repeatable to 1/2 a dot or so ( bit under 1/1000th of an inch ). Trying to measure this on the motor itself will be trying to measure an angle of only:

Each facet draws 600dpi over 6" = 3600 dots, 6 facets = roughly 6 x 3600 = 21,600 in one rev
Rotational accuracy reqd is 360 degrees / 21,600 = very very small angle

Yours,
TonyWilk

I took picture of my oscilloscope reading. I hooked my scope up to the:

(yellow) signal wire from the hexagon motor
(blue) signal from the TEMT6000 phototransistor

Unfortunately I am not a whiz at tuning in the scope. I also have no way of running this motor at low speed. The lines are shaky for reasons - who knows why. And in case anyone else wants to do this same thing - I just found out that, when I run the mirror, the laser beam is so much easier to line up with my jig since it would be in a line, instead of trying to push that mirror around delicately without touching the perfectly polished mirror surface.

Anyway. I can see there are 7 signals for every 1 signal of the motor pulse. Yes, there are 7 sides of the mirror, makes this a HEPTAGON polygon mirror, not a hexagon. I have the clock signal into the motor driver 6k pulse TONE() out from Arduino.

I have no way of slowing down this motor to spin, so it either goes faster than I can see or I spin with my hands. The motor out tachometer pulse appears to be very low voltage so I need to make a transistor or opto coupler circuit if I want to use an interrupt signal to match the timing pulse of the actual motor. I am only running at 12 volts. I believe this module expects to get 24 volts - it could go faster - but I want accuracy now, not speed.

I finally had the first huge breakthrough tonight. After hours of playing with frequencies and guesswork - I discovered that my pins on the driver board were wrong. Pin #1 is a clock pin, and pin #3 is an enable pin. Once I swapped them out, it cleared up whole bunch of wierd problems.

I was able to get my first stable consistent DOT pattern!

I was able to get my first stable consistent DOT pattern!

Nice!

Unfortunately I am not a whiz at tuning in the scope. I also have no way of running this motor at low speed. The lines are shaky for reasons - who knows why.

Referring to your 'scope picture in the earlier post:
It looks like you have the 'scope triggering on Channel 1 and the Trigger Level (indicated by the "1>" at bottom left edge) is right at the bottom of the waveform - Move the trigger level up to the middle of the waveform and try using Normal vs. Auto triggering.

Unfortunately the project is old and the link to their source coded has decayed.

Laser exposer project

This may be the source for the original project you linked:

Yours,
TonyWilk