Golf trolley PWM problem turning OFF battery BMS

Thread Starter

s3elan

Joined Mar 4, 2016
4
A few years ago I decided to build a golf trolley that had cruise control. The objective was that the golf trolley could be set at walking speed and it would maintain this speed regardless of the terrain or gradient and therefore did not require constant manual speed correction. To achieve this I learnt about Pic microcontrollers and how to program in assembly language. More as a hobby I have refined the program over the years and recently decided to increase the frequency of the PWM to reduce the groaning noise at low speed from the 12volt 150 watt Lemac brushed DC motor. I am using a Pic 16f873a with the oscillator running at 6MHz. The PWM frequency is currently 366Hz and although noisy does work perfectly.

Increasing the PWM frequency to around 5400Hz by reducing the Timer2 prescaler from 1:16 to 1:1 results in a significant reduction in the level of noise and seems to make the trolley more responsive to speed adjustments.

My problem is that I am using a Tracer Lipo 30A battery and as soon as I put the trolley under any sort of load the battery BMS turns off completely. I then have to disconnect the battery and reconnect it for it to come back to life.

If I return the PWM to 366Hz everything works perfectly and it is impossible to turn the BMS off by putting the trolley under severe stalling load. The same cutting out problem occurs if I increase the frequency to only 1400Hz.

The output stage uses 3 x IRL540n in parallel. There is a diode across the motor to prevent a back emf if the trolley is pulled backwards.

I am interested to understand what is going on here and is there anything I can do with the circuit design to prevent this happening? May be a smoothing capacitor of some sort?

I obviously don’t have access to the BMS in the battery.

I do have a second Lipo golf battery which does not suffer from the same problem and works perfectly.

Any advice would be welcome. Thanks for taking the time to read through this.
 

jpanhalt

Joined Jan 18, 2008
11,087
Welcome to AAC.

It seems you have identified where the problem is, but not how to solve it. Like you, I suspect the BMS of one battery is seeing a momentary under or over voltage at the battery terminals and is shutting down.

4QD (a British firm that makes trolley controllers) has mentioned increasing the PWM to, say, 18 to 20 kHz. Then the motor inductance itself does some smoothing. That costs nothing to try.

I would also consider a large capacitor ( 10,000 uF) and resistor (smallish ?) as a filter/snubber in series across the battery and test at the 5.4 kHz PWM frequency. That may not be a good idea during charging, but only as a test.
 

Thread Starter

s3elan

Joined Mar 4, 2016
4
Thank you for your prompt reply. I have now increased the Osc from 6MHz to 20Mhz and stepped up the PWM to 19.5Khz. There is a slight improvement in that you have to apply more load than before but the BMS still turns off and is not usable in practical terms. Fortunately I made two identical circuit boards so I can easily return to the original Spec. I will now try the large capacitor and resistor. What size resistor do you think I should try.
Kind regards and thanks again for your help.
 

jpanhalt

Joined Jan 18, 2008
11,087
Thank you for your prompt reply. I have now increased the Osc from 6MHz to 20Mhz and stepped up the PWM to 19.5Khz. There is a slight improvement in that you have to apply more load than before but the BMS still turns off and is not usable in practical terms. Fortunately I made two identical circuit boards so I can easily return to the original Spec.
I thought you were using an MCU to generate the PWM. That should only require a little change in the program, not a new board to go back to the original frequency.
I will now try the large capacitor and resistor. What size resistor do you think I should try.
Kind regards and thanks again for your help.
As a test, I would start pretty small, perhaps 50 to 100 ohms. Be sure is is rated at a few watts. It might get hot. You might even try without a resistor. Some controllers I built for larger motors didn't use a resistor, but then, the the batteries were deep-discharge lead acid without any BMS.
 

Thread Starter

s3elan

Joined Mar 4, 2016
4
To increase the PWM frequency I would have to reduce the PWM resolution so that’s why I went for a higher Osc frequency. I am 71, self taught and a complete novice with regards to MCU’s so I could well have that wrong.

The good news is I fitted a 3300uf 25v capacitor across the battery connections on my circuit board and everything worked perfectly. I reduced it to 1000uf and then to 560uf without any adverse effects. Its now impossible to make the BMS cut out. I have reverted to the 6MHz oscillator running the PWM at 5400Hz as the motor seems to run quietest like this. Increasing the frequency to 20khz and then 49khz made the motor wine. Thanks jpanhalt for all the useful advice.
 

jpanhalt

Joined Jan 18, 2008
11,087
4QD (previously referenced) referred to that capacitor as the "main" capacitor. Its original purpose was to absorb noise (http://www.4qdtec.com/pwm-01.html#cap ).

Glad it worked for you. I didn't have to deal with a touchy BMS and generally used a few thousand uF, the value of which was determined more by what fit than by the capacitance. I was running a Ford 6V long-shaft starter motor at 12V. Quite a few amps.

Thank you for giving us feedback.
 
Top