Back to home
Trashed scanner revive I got in contact with a very nice company for some parts i liked, but they also gave me 3 trashed Clay Paky scanner heads. Meaning: only the mirror top part. The rest was gone, except for one old backplate with DMX connection and a motor driver PCB.
This pcb looked a bit grimy but had some interesting stuff on it, like ericsson PBL 3771 stepper drivers and the accompanying 3960 controller.
Everything gathered a bit of dust, but easy to clean up! Nothing is bent or broken, so in theory, they should work.

So the idea is: perhaps i can revive the pcb so i can use 6 of the 8 drivers to actually drive those scanner heads!
I can then later see about designing something to attach RGB LED light or lasers..

Now i know.. not everybody gets their hands on these things, i was pretty lucky myself! but it is possible to make one out of some cheap stepper motors, some 3d printed parts and a mirror..
Also all chips are still available, so it is possible to make your own driver board.
Information First of all, the PCB.. it looks like this when i got it, cutting off all unneeded cables..


It did clean up nicely and with some looking around, i got hold of all the important datasheets, specially for the stepper driver and controller.
The CPU on it turned out to be an old ATMEL 89C5220pc. They still are available, but i don't have the firmware that goes in it, and the creator (Pulsar in the UK) does not have an updated firmware i can download..
I do know about reading out the CPU, but they seem to have protected it from dumping that.
Because of this, i opted for replacing the CPU by a nice new faster running arduino nano, which has about the same amount of ports and options, but runs at 16 instead of 11Mhz.
For this, i just made a simple converter on experimental pcb using sockets and pins.
Next to this, the stepper driver and controller seems to be pretty straight forward, and by the looks of things, the connections are pretty standard.
I also found a full schematic somewhere about the whole board, which comes in nice.

Checking, measuring and tracing
With schematics in hand, i measured everything, but it turned out this board is even older!
Things do check out for the most part, but i did find differences:

since CS is bound to GND on all the stepper controllers, all controllers have this active and the settings of A0, A1 and WR determine which controller does what.
The thing about this is though.. when you flip WR positive or negative.. one of the controllers will always pick up the value on the databus!
The reason for doing this is probably because they couldn't spare the 4 extra wr ports, but this setup drives me nuts just thinking about how to code it...

Alterations Not many alterations were made to the pcb... I took out the 4093 nand gates, and attached the connections to wr 5-8 to the solderpads on cpu pins 25 - 28.
I can now use those signals seperate.
I also took off the 2 right most drivers and controllers, perhaps i can do something with those later, but at least i have 2 spares.
No other alterations were made to the board.
Arduino board To use the nano, i made a simple board for it, using headers for the original ATMEL socket and female headers for the arduino. I built the whole thing upside down to keep soldering simple and easy.
It then sticks right on the PCB!
Having that, it is a simple matter of connecting the original CPU pins to the arduino ports..
i soon found out that A6 and A7 cannot be used as output. This sucks, since it would be perfect to drive the 7 data signals on the bus.
Therefore, my port layout is:
With that, i should have well enough signals to make all channels on the PCB do something!
Coding Since i didn't have any example of how to actually drive the stepper controller in combination with the steppers in those heads, i had to experiment a bit.
Pushing data to the controllers is easy enough, it says how to in the datasheet, and the arduino can outperform any of it, even driving all 6 channels i need.
The thing to watch for is the sluggishness of the stepper motor itself. They are older models, so moving them at high speeds is hard, not to mention that they get only 50% power at most on each coil because D6 is bound to GND...
This does however prevent you from ripping the whole thing apart by smashing the stepper into the endstops, which are simple small bolts with some padding.

So, sticking to the timings in the datasheet, is is easy to set up and control those controllers, you simply write one value using A0 for coil A, then A0 high for coil B in the steppers.
Keep in mind, this is translated via a D/A converter to an analog signal, which is then converted again by the driver chip to set a voltage over each respective coil.
This way, you can achieve a lot of microsteps in between full steps.

So i took it pretty straightforward: Create a table lookup for both coils, then simply run through it in either direction to set the correct coil power.
it kinda looks like this:
kernel config
		const byte steplist[STEPSCOUNT][2] = {
	{ 63,   0},
	{ 63,  31},
	{ 63,  63},
	{ 31,  63},
	{  0,  63},
	{ 95,  63},
	{127,  63},
	{127,  31},
	{127,   0},
	{127,  95},
	{127, 127},
	{ 95, 127},
	{  0, 127},
	{ 31, 127},
	{ 63, 127},
	{ 63,  95}
};
Ofcourse, STEPSCOUNT is 16 in this case. Now i only realy have to make an array where i keep track of the position of each stepper and done...

To make things actually work, the arduino needs a small delay here and there to give the stepper motor to react to the signals coming from the driver.
So far, i have not been able to get this delay between steps any lower than 2.5ms to make it move consistently without losing steps..

writing values is a simple affair also.. what it does is mainly: Testing this routine, i get data into the stepper controller consistently correct.

If somebody actually can tell me how clay paky does it, please do let me know, they seem to be able to move those mirrors pretty fast!!
The email address is tec4u - at - spambak -dot- nl

Last, hardware and code is added so this whole thing can be controlled with any standard DMX controller or software.
Finishing To finish things first the electronics goes into a box with a fan. A simple 12V adapter that can handle around 3 amps is well enough to power things.
To connect the mirrorheads, i had a nice deal for 100M of signal wire that has 12 lines in it. This can handle 1 head with 2 steppers plus an optional signal cable. I can't feed a heavy light since the cables are just 0.5mm.
But sending a signal of some sort (perhaps even use it as a can bus) should be possible at a later stage.

Everything is put in a box so we have everything nice and protected, only showing plugs on the outside.
To make life easier, i took 4 times 10 meters (i figure that's long enough for the moment) and attached a so-called 12pin aviation plug at one end.
I did not want to drill holes in the casing of the mirrorhead so i used the existing hole with rubber grommet in it, and attached the cable to the heads directly.
So at least this makes moving and storing things way easier. I might change my mind in the future about this, and add plugs at the head end also.