Current limiter circuit is used to limit the current flowing
through. This circuit is added right after the power supply to
the H-bridge circuit to prevent the motor being stalled and
protect the MOSFET. As shown in the data sheet of the DC
motor, the stalled current is 3A. So the design of this current
limiting circuit is to limit the current that above 3A as shown
in Fig. 4. Basically, this circuit consists of two op-amps. U1
as differential amplifier which is use to amplified the voltage
drop across the sense resistor (Rs) since the Rs is very small
and the voltage across it is also very small. U2 used as a
comparator to compare the input voltage with the reference
voltage. If the current flow across is too high, which means
that the output voltage of U1 is higher than the reference
voltage, there will be output coming out from U2 and turn on
the transistor Q1. As Q1 being turn on, the PWM signal will
be grounded instead of feed into the MOSFET of H-bridge.
So there will be no current flowing through the MOSFET as
well as the motor. It prevents the motor being stalled, protect
the MOSFET and saves the current consumption