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 :)