Let's shuffle bitsblog projects about

Astro stepper

A friend of mine wanted to build an equatorial mount for astrophotograpy.

The sole purpose of an equatorial mount is to make the camera rotate at the same rate than the Earth to always capture the same part of the sky.

As always with this kind of project, you never have exactly the hardware required. That's part of the fun.

It turns out that his only motor available was a unipolar stepper motor. And there was not much libraries available to drive such a motor back at the time.

To add to the fun, to keep the picture sharp and avoid blur, it had to rotate at a very slow pace (one step every 3,523s). Something hard to achieve with stepper motors since each step is, well, a step. One usually work around this limitation by introducing microstepping: driving the motor between steps.

Anyway, I thought the project was fun enough, so I implemented a firmware in rust targeting an stm32f103 (blue pill). It's pretty basic with a signal table computed at build time and output over 4 interleaved pins, with each output having a phase shift of π/4. This approximates a smooth output allowing the motor to slowly rotate without discontinuity.