Close

First jump, first fall

A project log for Motor as Encoder

Inspired by the attempts of other people around the Interwebs, I use a motor as a rotary encoder, but with a different approach.

besenyeimbesenyeim 08/18/2018 at 17:080 Comments

So, after the last successful step, I took a big leap... and then failed.

OK, there was an intermittent one, I determined the motor's coil sequence and made it spin. Also that, what kind of change should I look for.

Then the logical step and the seemingly easiest way was to scan with short current pulses for movement, update the tracking variable, scan accordingly again. Why is this logical? Because implementing haptic feedback is just lengthening the pulse. But no, doesn't work. "Maybe if I make it longer, so it jumps into the next position." No.

The problem is, if I wait too long, it skips steps. If I wait too short, it oscillates mid-steps.

You can take a look at the code where I gave up this side.

Discussions