Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You can't. Once your device is switched-off, you can't know what position it will start up in. The easiest option is to have an initialization routine that will move the motor to a known position. For instance, move it all the way clockwise until it jams (assuming there's a limited range of motion) or until it signals a button, whatever that it has reached a position. This is known as calibration or zeroing.


What I mean is that the item it is turning is marked, so I can detect it's position. Using infrared perhaps?


You can get motors with encoders built into them that are very, very accurate. You can decode their pulses into position with a quadrature decoder like the HCTL-2020.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: