I'm a hobbyist and I've designed and built (fabbed a small circuit board, schematic attached) a circuit to power a brushless DC motor using a solar panel which also charges a stand-by battery and powers other support circuitry.
The small 2S Li-Po battery will source about 3A current when needed by the motor and can tolerate about 150-200mA when charging, up to about 8.4V. The solar panel can source up to about 3A of current to supplement the battery to power the motor and, at low current demand, can reach over 9V. When not powering the motor, the Solar_Motor voltage and current can be controlled to charge the battery at a low rate. When the voltage difference (Solar voltage - Battery voltage) is less than about 0.75V I can PWM the signal to the NPN transistor to control the FET to limit the current and voltage presented at the battery for charging. I can turn the transistor off and no measurable current flows from solar to battery. Note that the D1 diode has a lower forward voltage than the protection diode in the FET for when the motor demands large current from the battery, so I don't think I have damaged that protection diode or the FET.
But I think I've done something naïve or ignorant with the circuit and here is my problem: When the solar voltage exceeds about 0.75V above the battery voltage, I can reduce the PWM duty cycle on the base of the transistor to 0 and current still flows. I need to control the current in order to protect the battery while charging. In fact, if I hard-code the output labeled DIO_Low to LOW (near 0V potential) and increase the 'solar' (a bench supply for testing) voltage difference to 0.75V or more, I see the current flow into the battery slowly increase as I increase the voltage difference.
The problem seems to be related to the relative voltage between Solar_Motor and VBatt, not the absolute voltage of Solar_Motor because I have tested with different states of charge on VBatt with varying Solar_Motor voltage and the problem only occurs when the difference exceeds about 0.75 Volts.
I have tested resistance when the circuit is unpowered and am fairly confident there aren't any unintended solder 'whiskers' bridging any parts of the circuit. I think the crux of the problem may lie in a subtlety of the semiconductors that I don't fully appreciate. Or maybe I have just done something dumb (?). Thanks, if you can help.