Background:
I'm working with an existing motor+driver board with Vin being supplied by a 4.2V LiPo -> TP4056 Charger Protection Board -> Boost Voltage Regulator. I've also got another subcircuit attached to the end of the TP4056 module through another voltage regulator and diode that powers a microcontroller.
Issue:
The trouble I'm having is that when the motor stalls (or more specifically when it switches between full speed forward to full speed backward) I am getting a high enough current draw that the LiPo protection circuit, the short-circuit protection on the DW01A on the TP4056 board in particular, is shutting down the whole circuit and causing the microcontroller circuit to also shutdown. Needless to say, this is not desired behavior.
So what I'm trying to do is limit the current the motor can draw in the worst case scenario of going back and forth at full speed. Note this happens VERY regularly as this is controlling a balancer robot.
Attempted Solutions:
Here are the things I've tried thus far:
Results:
Stabilizes the microcontroller supply voltage a great deal due to removing the fluctuations from the motor during various draw changes, but does not solve the undesired DW01A cutoff issue.
I'm working with an existing motor+driver board with Vin being supplied by a 4.2V LiPo -> TP4056 Charger Protection Board -> Boost Voltage Regulator. I've also got another subcircuit attached to the end of the TP4056 module through another voltage regulator and diode that powers a microcontroller.
Issue:
The trouble I'm having is that when the motor stalls (or more specifically when it switches between full speed forward to full speed backward) I am getting a high enough current draw that the LiPo protection circuit, the short-circuit protection on the DW01A on the TP4056 board in particular, is shutting down the whole circuit and causing the microcontroller circuit to also shutdown. Needless to say, this is not desired behavior.
So what I'm trying to do is limit the current the motor can draw in the worst case scenario of going back and forth at full speed. Note this happens VERY regularly as this is controlling a balancer robot.
Attempted Solutions:
Here are the things I've tried thus far:
Method 1:
Splitting the microcontroller and motor driver power supplies
Splitting the microcontroller and motor driver power supplies
Results:
Stabilizes the microcontroller supply voltage a great deal due to removing the fluctuations from the motor during various draw changes, but does not solve the undesired DW01A cutoff issue.
Method 2:
Attempt to adjust or tune the overcurrent or short circuit detection voltage/current on the DW01A.
Attempt to adjust or tune the overcurrent or short circuit detection voltage/current on the DW01A.
Results:
As the current sense pin voltage is determined by the resistance of the two ON MOSFETs, and the current needed to trigger the short circuit protection gets smaller the higher this resistance, I'm not sure what I could do other than try to find another dual mosfet with lower R_DS(ON), but this would likely be a great pain to modify such a tiny SMD part on all these one dollar modules just for this one issue.
As the current sense pin voltage is determined by the resistance of the two ON MOSFETs, and the current needed to trigger the short circuit protection gets smaller the higher this resistance, I'm not sure what I could do other than try to find another dual mosfet with lower R_DS(ON), but this would likely be a great pain to modify such a tiny SMD part on all these one dollar modules just for this one issue.
Method 3:
Add a series resistor somewhere to limit the current. Considered 1.) Directly in series with the motor 2.) In series with Vin for the driver circuit 3.) In series with Vin of the voltage regulator governing the driver circuit.
Add a series resistor somewhere to limit the current. Considered 1.) Directly in series with the motor 2.) In series with Vin for the driver circuit 3.) In series with Vin of the voltage regulator governing the driver circuit.
Results:
Putting it at 2 runs the risk of having too high a voltage drop over this resistor leading to too low a voltage over the driver circuit, and I could lose power to that intermittently (something I also want to avoid for reasons not specified here for brevity). So locations 1 and 3 remain. I measured the effective resistance in all these cases during a.) motor full speed with no external restrictions and b.) motor shorted for active braking (highest current draw I can repeatably test) at location 3.
For placement at 3, I measured R_eff to be 14.83 Ohms at unrestricted 100% speed and 1.33 Ohms at shorted motor coil active brake. So if I add on a 1 Ohm resistor in series here, I'd reduce my peak current by about half and be wasting about 0.1 W during normal operation. Not terrible, but not great for a battery powered project either.
Putting it at 2 runs the risk of having too high a voltage drop over this resistor leading to too low a voltage over the driver circuit, and I could lose power to that intermittently (something I also want to avoid for reasons not specified here for brevity). So locations 1 and 3 remain. I measured the effective resistance in all these cases during a.) motor full speed with no external restrictions and b.) motor shorted for active braking (highest current draw I can repeatably test) at location 3.
For placement at 3, I measured R_eff to be 14.83 Ohms at unrestricted 100% speed and 1.33 Ohms at shorted motor coil active brake. So if I add on a 1 Ohm resistor in series here, I'd reduce my peak current by about half and be wasting about 0.1 W during normal operation. Not terrible, but not great for a battery powered project either.
Method 4:
Trying to find an active current limiter circuit I can add on to this somewhere. Have tried adapting the circuit @crutschow presented here, and see a lot of possibilities in this cookbook
Trying to find an active current limiter circuit I can add on to this somewhere. Have tried adapting the circuit @crutschow presented here, and see a lot of possibilities in this cookbook
Results:
I'm not sure if I can adapt the one by @crutschow as it would need to work in reverse as well since the motor will be driven in both directions. I thought about using it at location 3 mentioned in Method 3, but I'd end up still burning the same? amount of power on the R1 resistor right?
The biggest trouble I'm having adapting anything from the cookbook is that I don't have access to the gates of the control mosfets in the H-bridge tb6593fng, so even if I have a great sensing circuit, there's not much I can do with that information is there? I thought about using such a sensing circuit to actively change the PWM signal with the microcontroller, but the loop would be too long (typically 5-15 ms) and miss these 5-50 microsecond current peaks.
I'm not sure if I can adapt the one by @crutschow as it would need to work in reverse as well since the motor will be driven in both directions. I thought about using it at location 3 mentioned in Method 3, but I'd end up still burning the same? amount of power on the R1 resistor right?
The biggest trouble I'm having adapting anything from the cookbook is that I don't have access to the gates of the control mosfets in the H-bridge tb6593fng, so even if I have a great sensing circuit, there's not much I can do with that information is there? I thought about using such a sensing circuit to actively change the PWM signal with the microcontroller, but the loop would be too long (typically 5-15 ms) and miss these 5-50 microsecond current peaks.
Method 5:
Try adding a larger capacitor in parallel with the motor to smooth out any peaks or a zener diode to cut the peaks off.
Try adding a larger capacitor in parallel with the motor to smooth out any peaks or a zener diode to cut the peaks off.
Results:
I was seeing 8-9 V peaks directly over the motor when the normal driving voltage is 6V. I added a much larger capacitor in parallel with the existing one and saw these peaks disappear, but the peak current draw remained about the same (3.2 Amps or so). I'm not all that well versed in the physics of DC motors, so if someone wants to clue me in as to why the current can remain the same with a lower voltage, I'm eager to know. After seeing these results, I abandoned buying and testing an appropriate zener diode, as it appears the peaks in voltage do not directly effect the peak current (still confused on that).
Anyone have any suggestions for things that would be any more efficient than Method 3?I was seeing 8-9 V peaks directly over the motor when the normal driving voltage is 6V. I added a much larger capacitor in parallel with the existing one and saw these peaks disappear, but the peak current draw remained about the same (3.2 Amps or so). I'm not all that well versed in the physics of DC motors, so if someone wants to clue me in as to why the current can remain the same with a lower voltage, I'm eager to know. After seeing these results, I abandoned buying and testing an appropriate zener diode, as it appears the peaks in voltage do not directly effect the peak current (still confused on that).