I have DC motor with a gearbox to transforms the rotational movement to linear movement and movie a pin back and forward.
I need to know when the pin reaches the two positions: full back or full forward.
The motor is a simple DC brushed one (3V low speed, the current on free movement is around 11.8mA) and it will be driven by an ESP8266 through an H-Bridge.
There're no sensors to detect pin position (and nonot enough space to add them), so my idea is to measure the motor current and when I read a fast increment it means the pin is full forward/backward (motor close to stall).
How can I measure the current and read by a microcontroller to drive the motor via H-bridge?