# Regenerative half H bridges?

A project log for REMB - Raz0r Electric Mountain Board

An electric mountain board, built from scooter parts.

Daren Schwenke 08/27/2019 at 04:195 Comments

For the motor control, I'll be using a half H bridge.  I'm controlling each motor separately, so that's two of them.

A half H bridge will give me 'forward' PWM and 'braking' PWM.

Basically I'm using the circuit used in this article, with a capacitor across the supply, and an added schottky diode across the 'forward' PWM mosfet. I'll get to that bit in a moment...

I've been thinking about how I could implement regenerative braking.

The normal problem with implementing regenerative braking is that your motor voltage has to be higher than the supply voltage to actually put power back into the supply.

A DC motor will spin at a given RPM for a given voltage.  To have a DC motor do regenerative braking would mean you would have to be going down a serious hill or switch in a boost convertor to raise the motor voltage above the supply voltage during braking.

Or... maybe not.

I've been toying with the idea of using the inductance of the motor itself as a DC-DC boost convertor.  The idea works like this.

I'll short the motor with the braking mosfet, briefly.  This will create a high current across the windings of the motor.  The windings are basically a big inductor.  When I stop shorting the windings that inductor current will still want to flow, and the voltage across it will spike.  The motor is already connected to battery + and has a path back to battery - through the 'forward' power mosfet body diode.  Add a decent sized capacitor across the supply rails to soak up and smooth out those spikes and... viola. Regenerative braking with one extra component, but it would suck.

The normal mosfet body diodes are slow to conduct, and have a voltage drop of 0.6-1.2v.  So... I add a schottky diode in parallel to the normal body diode of the 'forward' mosfet.  Schottky diodes are much faster to conduct, and only have a voltage drop of 0.2v.

There are a lot of questions I'll need to answer to make this work well though and there is going to need to be some experimentation.  I'll need to see how fast the 'inductor' decays to time how often I need to short it, how fast and for how long I need to turn on the braking mosfet, will I still need to be applying power to keep the field up for the windings, how will commutation affect the inductance, and will my BMS even allow power to be fed back into it... to name a few.

The good news if it doesn't work at all, I'll still have power and braking with the same circuit  :)

## Discussions

Bharbour wrote 09/02/2019 at 13:23 point

What are you going to do with the energy from the regenerative braking? From the reading I have done, batteries won't accept  enough current to be useful without degrading the battery life. Have seen supercaps mentioned, but not seen it implemented.

Are you sure? yes | no

Daren Schwenke wrote 09/02/2019 at 16:59 point

My discharge rate should peak around 2.5C, so I honestly don't expect to exceed a 2C charge rate with this.  I was just going to use whatever caps I have on hand.  But, yes you would be right if it were much higher than that.  Wimpy motors.

Are you sure? yes | no

Xasin wrote 08/27/2019 at 08:21 point

Good luck with that!
It definitely sounds like a rather tricky thing to do. My main worry would be a commutation right as the short circuit phase of your boost mode has built up a lot of current.

Commuting a winding then could create a large voltage spike not across your own circuit, but the commutator itself!

However, that also depends on how the commutator works, and maybe the current will be able to just flow through an adjacent coil instead.

Keep us posted!

Are you sure? yes | no

Daren Schwenke wrote 08/28/2019 at 04:57 point

The brushes are about 1.5x the width of the armature contact area, so being in contact with at least two at a time will always be true.  Also if you think about it, I will likely be shorting and boosting multiple times per commutation.

Lets say 3k motor rpm and 6 poles on the motor.  That's only 18k commutations per min.

To minimize the audible effect, I would be running my PWM at 30-60 times that rate.

Will the inductor decay time line up to allow that, and is my P channel mosfet fast enough for that.. I don't know.  It will be fun to find out though.  :)

Are you sure? yes | no

Xasin wrote 08/28/2019 at 08:47 point

Either it works and you get a pretty nice regenerative braking, or it'll be a very non-regenerative breaking

Either way, this will be cool :P

Just don't blow up your last ESP Dev board by accidentally connecting Lipo battery power to a GPIO like me >~>

Are you sure? yes | no