I have a gearbox which transforms the rotational movement to linear movement. It drives a pin which moves back and forward using a DC motor.
I need to know when the pin reaches the two "end-stops" (full back/full forward).
The motor is a simple brushed one and there're no sensors to detect pin position (and not enough space to add them), so I though to measure the motor current and when I read a fast increment it means the pin is full forward/backward.
The motor is 3V low speed and the current (free movement) is around 11.8mA.
How can I measure the current and read by a microcontroller to drive the motor via H-bridge? It will be cool to have an IC (eg. controlled via I2C) which act as H-bridge and current meter.