Design of the basic hardware
I started designing the hardware around the linear guide rail. Requirements were simple: 40mm movement and, height of the whole assembly as low as possible.
So I started sketching on my notepad and searched ebay for a suitable stepper motor. I found a nema 8 stepper, that was short enough to allow a directly mounted lead screw and 200 steps per revolution, which together with a M5 screw results in exactly 4μm movement per step. I don't think this assembly can achieve this precision, but this means, that the 8μm per scan-line are exactly two steps, which is very good. Note that these are full steps, not micro steps. Microstepping will not really help to improve positional accuracy. There was a hackaday article about that some time ago, but I don't want to look it up now.
This is how these sketchs usually look like. There are a lot of rapid changes while each part gets refined, and refined again after thinking about how it moves, and how it fits together. So it looks a bit rough at the end, and the apple cider I just poured over it while writing this log didn't help...
After enough hand drawn iterations a 3d model of the whole assembly was made. This is not only useful because most parts will be 3d printed, but the 3d visualisation also makes it easier to find any problems of moving components not having enough clearance, not reachable screws, etc.
The first image shows the side where it gets mounted to the camera. The long part inside the window with the cross on top is the sensor. At the top corner. The two flat plates will be made out of mdf and everything else will be 3d printed. The linear axis has adjustable mechanical endstops, and adjustable endstop switches on both ends.