Motor as generator creating hudge voltage spikes and use of battery

Hello everyone,
I am using a bldc motor with the simpleFOCmini in order to compress a spring.
At some point in my use case, the spring must be released. This can happen in the case of a maximal compression. The potential energy of the spring is converted in kinetic energy. This kinectic energy transforms into electric energy due to back-emf (from my understanding).

I do release the spring by disabling the motor (from the code : m_motor->disable). This must leave the mosfets of DRV8313 open or floating (?)

I killed a powerbank while releasing the spring at his max compression.
The powerbank is either a source or a sink, it should have not like having current flowing while being a source.
I then tried with a lab supply and monitored.
I first wanted to see how it works with the supply off. I can set the condition with tools. I couldn’t see much, 1V (voltage level between + and - of the supply).
Then with supply on, it strarts at 16V (nominal voltage of motor) and reach 32V ! at max during the energy transfert.

My guess is that when I do it with power supply off, the bulk capacitor of the driver absorbs most of the EMF. But when i do it with the supply on, the capacitor is already charged and cannot absorb ?

The shape of the voltage over time during release looks like “load dump” (even if it isn’t technically).

I first expected that the current generated by the motor will be absorbed by the battery. But the voltage levels scared me and searches on internet and this forum conviced me that it is not that simple.

EDIT : I found the courage to experiment it with a battery pack that I knew had little safety (bosch 18V). The voltage do not raise as in the case of the lab supply. The bidectionnal behavior of the battery might be the reason.

I use a 16V,2A nominal motor.

My questions is:

  • What kind of schematic would be easy to implement in order to protect the battery from overvoltage ?

Sincerely,

Hi @nakeze ,

The USB Powerbank has a built in protection. It is designed to prevent over- and under-voltage and over-current. Often it also has under-current protection and switches off automatically if the current draw is too low (that won’t be a problem when running a motor).

The power bank also has a built-in charger which is how the battery is recharged. It is designed to operate either as a USB power source (when powering other devices) or as a sink (when charging) but cannot switch between these modes „on the fly“ - it’s expected that the USB port is disconnected and reconnected to switch between charging and discharging, or at least that you stay in the same mode for a long time, not just 400ms…

So all in all a Powerbank is not a good power supply for motor driving applications and it’s not designed to dynamically sink current for short times like from the BEMF.

A „naked“ battery without protection will work much better, but of course you‘re taking a certain risk… 400ms with 100V spike will work ok, but if you had 100V on there for a long time the current would get huge and you battery might catch fire or explode.

However, a controlled charging circuit isn’t easy. You can probably find some examples in good e-bike ESCs.

A more simple approach is to dump this excess energy into a brake resistor or shunt. If you search for „active shunt“ in this forum you’ll find some discussion and some sample circuits which need only a few components and are simple to implement.

If you decide to implement it, please let us know about it and how the results are… :slight_smile: