Regenerative braking on an electric bicycle
There is a tiny problem: regen braking for bicycles doesn't work very well.

I don't know what type of batteries you use. Since you mention 12V, they seem to be lead acid. So, two 12V SLA batteries in series. These have a capacity of, say, 50 Ah. I'm being pretty generous here.

SLA batteries charge at C/10 (roughly) and only if they are sufficiently discharged to accept this current. If they are almost topped up, then they won't accept any charge, so regen braking is not possible.

Anyway. Let's suppose you just climbed a mountain. At the top, your batteries are quite discharged, so they're ready to accept their full C/10 charging current.

C/10 is 5 amps, at 24V this is 120W.

You're going downhill fast. In fact, in a realistic downhill riding scenario, you'll get 1-2 kW from gravity. But you can only recover 120W from this to charge your batteries. So, it's pretty useless. Once you get back down at the bottom of the mountain, you'll have recovered a tiny bit of charge... but just a tiny bit.

Now, you could use modern Lithium cells which can take a much higher charge current. In that case, that could perhaps work, but you'll have to use a smart electronic charger, overdesign the motor to be able to use it as a generator, and go downhill slower, which is no fun.

If you want to use regen braking in the city between traffic lights, it's even worse. On the flat, most of the energy expended is used to push air. The amount that is recoverable at a traffic stop is negligible.

Note things are different for a 2 ton car. In this case it is worth to recover kinetic energy. Not so for a bicycle.

Point being, regen braking is only interesting on a bicycle if you can do it for free (both in terms of energy and money). 

Using a motor with a freewheel, which will allow you to not have the motor drag all the time, even when not using it like when coasting, is much more likely to result in a better range than regen braking.