Hi @PM490 - the sensor you linked to is an optical flow sensor for multicopter. That thing has optics attached for a view far away. Of course one could design a new optic part, but actually, I think a standard mouse sensor would make your life easier, as there is no need to figure out a new optical setup.
If you google “Ardunio mouse sensor”, you will find all kind of discussions as well as software examples. The last time I was concerned with similar stuff was when this part was still sold, but there should be newer options.
Yes, the trusted TMC2208… - I actually use these drivers in my own setup, which is very similar to the setup you described in your post. So let me go into some details of how my scanner developed.
Here’s an overview of the system:
It’s a mostly 3D-printed scanner. The only parts - besides steppers and camera - which I did not succeed in printing are two tiny sprocket rollers which are visible in the above image left and right to the film gate. They were originally part of an Eumig Super-8/N-8 projector and sourced from an Ebay buy.
Here’s a closer look at the transport mechanism with the Eumig rollers:
The roller is driven by a stepper motor via a belt drive:
The ratio of the belt drive was chosen so that a movement of one Super-8 frame corresponds exactly to 400 step pulses.
The initial idea was to send after each capture 400 steps to the motor to advance exactly one frame. For initial frame adjustment up and down, a smaller number of pulses would be used. And indeed, that was my original setup and it kind of worked ok.
What I discovered too late in the whole design process was the fact that the sprocket teeths were substantially smaller than the film sprocket itself. So they were a bad choice for defining the sprocket position precisely. While the film frame stayed in the camera view, it was dancing up and down noticably from frame to frame. That was mainly due to some slight variations in friction between the film and transport mechanism.
Initially, I tried to solve this problem by varying the tension between the takeup spools, but that didn’t really improve things (except tearing some film stock apart ). So I developed the sprocket registration algorithm linked in the above post to solve this problem in the post production. Well, this solved the issue, basically. I still had some too large deviation of the Super-8 frame at the positions of some (badly performed) cuts of the material.
Only in hindsight I realized that the sprocket registration algorithm is so fast that I could run it in realtime during capturing. So the procedure I implemented is the following: once a stack of images is captured by the camera (I capture 5 images with different exposures for each frame), the darkest of these pictures is run through the sprocket detection algorithm. The darkest picture has always the best definition of the sprocket. The detected sprocket position is now compared to the center of the camera frame. If there is a deviation, a correction in the opposite direction is applied to the next 400 steps send to the stepper (remember, that’s one frame advance).
In actual scanning, the correction is quite small, it usually does not get larger than +6 steps or smaller than -6 steps.
So far, I did not have a failure of the sprocket algorithm on badly defined sprockets. The reason are some build-in sanity checks on the detected sprocket position and sprocket size. If any of these checks fail, the correction is simply skipped during that specific scan. An example for a frame where the sprocket detection failed is actually the HDR_00017.png image shown in one of the above posts. That’s the actual scan, and as you can see, the (missing) sprocket is approximately centered in the image anyway (utilizing that the change between the previous and the current position is usually small).
This approach gives me a quite stable scanning environment, mastering, as planned, also some unprecise cuts which were originally a problem for my setup. It’s not perfect, the frame is still moving up and down a little bit in the scans, so I still have to add another frame registration step in post production.
Have fun with your family in these weird times!