Power source control for Ebike (two seperate batteries)

Hi everyone,
I am relatively new to electronics, but I have to build a µC based circuit, which will select the power source (one of two 36V Li-Ion batteries) for the ebike controller. I have come up with the circuit below, but I am not sure if this will work. I know that these batteries are dangerous, so I will probably implement ideal diodes on the high sides. What I am not sure about is, if the adc measurement and n-channel mosfets (Nexperia Buk962r5-60e) will operate with the the shared GND with diodes between the batteries. I haven’t determined all of the values yet, as I need to know, if I am on the right path.

There should only be one batterie attached at all times !

Thank you guys!

Is this a class assignment?

IF not, why not put both batteries in parallel?

IF not, why not use a SPDT switch to change batteries?

If this is an assignment, what conditions will cause the batteries to be switched?


Yes this is part of a big assignment.

The idea is to model this after a dual battery system by bosch, which switches between the two batteries, if the voltage difference is bigger than 10 %

I have updated the schematic, so I can have a common ground and implemented an ideal diode with an LTC4357.


IRF512 is a very poor choice.

800 milliohm on-resistance. That's way too large for a high current switch. Think 5 milliohm sort of

And its not logic-level so you can't drive it with 5V at all.

Perhaps you should change your diagram to match the better device you name in the posting BUK962R5-60E ? That's still probably too small, being surface mount it can't have a decent
heatsink fitted. TO247 package is a more plausible size for this sort of application, TO220 might
do at a pinch.

What is the maximum and what is the continuous current rating you need?

I am sorry for the incomplete schematic. I forgot to rename, and didn't have time to change. I will reupload a cleaned up diagram tomorrow. The max current will be 15A but continuous around 10A. The datasheet for BUK962r5 states Rds of 2,5mOhm when full on, so I thought that should be alright.

Edit: You are right. I haven't checked Safe Operating Area :confused:

You need to remember stall current peaks will be a lot more than continuous operating currents,
the devices need to handle these peaks. Which is why a heatsink is probably needed to be
robust. You want the fuse to fail before the MOSFET. You have fuses? Or are the batteries
indivually over-current protected?

So I have done some more research and reconsidered my design. To simplify the circuit I have chosen a high side PMOS set up. This way I can have a shared ground, which makes voltage measurement and switching easier. Also Reverse Battery Protection via PMOS

Q1&2 SQP90P06 | Vgs ±20V | Rdson 0.0067 Ohms | Id -120 A
R5&9 3.3k
R6&10 10k
Other Values not yet determed

When the PMOS are fully turned on at at least Vgs = -7,5V this would give me a Rdson of 0.0088 → 15² * 0.0088 = 1.8 W
A TO220 with attached heatsink should be able to run this , no ?

Your reverse voltage protection won't help you there, the dc-dc converter will have already vaporized!!
Such protection must come first.

You would do well to duplicate the zener protection from that circuit on your other pFETs, 12V zener between
gate and source right close to the FET is a great protection measure.

Ebike batteries can easily vary in voltage by more than 10% in normal operation.
eg starting from a stopped state or going up a steep hill.
Also the battery will rapidly recover voltage wise if the load is removed or reduced.
Is the circuit design to achieve a once over transfer from one battery to the other or will it simply keep switching back and forth to whichever battery has the highest voltage?
If the aim is to switch from one battery to the other when the first battery is close to fully discharged then simply measuring voltage wont achieve this.
You then need some form of coulomb counting to actually measure battery state of charge.

@ MartT okay, do you think that a back-to-back pFET configuration with a dead band time of about 100 ns would solve this problem, or will the inrush current be a problem for the buck in any case ?

@ mauried I know that coulomb counting would be more accurate, but for know it will be alright this way. It is more about the overall topology and the actual switching between the batteries. I guess it wouldn’t be to complicated to implement some coulomb counting ic, I assume ?

The attached schematic is not finished yet, since I haven’t fully figured how to implement the back-to-back configuration. But would this be a better way? (Just consider the upper part)

Gracias !