Bidirectional converter with battery and microcontroller

Thread Starter

jacky1997

Joined Oct 30, 2015
37
Good day,

I'm trying to design a bidirectional dc-dc converter with battery as supply and a microcontroller to control the converter. I want it to be bidirectional so i can recharge the battery with a generator. The converter works as a boost converter when the battery is discharging and it works as a buck converter when the generator is on to recharge the battery.

The problem that i've found is that the microcontroller has to be supplied the whole time. But if i supply the microcontroller with the battery, the battery won't be able to supply it when it's recharging. And when this happens the converter won't work when the generator is on.

Any solutions to fix this problem guys? Any help would be appreciated.
 

Papabravo

Joined Feb 24, 2006
22,065
AFAIK there is no such thing as a bi-directional DC-DC converter. Such a device would come close to being an over unity device.
 

Papabravo

Joined Feb 24, 2006
22,065
An over unity device is one that will allow the extraction of energy allowing it to run forever. An electronic version of a perpetual motion machine.
 

Thread Starter

jacky1997

Joined Oct 30, 2015
37
Maybe i didn't describe it well, i'm not really trying to make an over unity device.
I just want my battery to be recharging with the work of the converter while the microcontroller is being supplied by the battery. I'm getting a bit confused so there might be a misunderstanding as well o_O
 

Papabravo

Joined Feb 24, 2006
22,065
Maybe i didn't describe it well, i'm not really trying to make an over unity device.
I just want my battery to be recharging with the work of the converter while the microcontroller is being supplied by the battery. I'm getting a bit confused so there might be a misunderstanding as well o_O
I think you described what you want to do fairly well. I still don't think it is possible to do that. I think the best you can hope for is two devices, one for each direction, and you choose one direction at a time. Either the battery is supplying the load, or the generator is charging the battery. You cannot do both things at the same time.
 

Thread Starter

jacky1997

Joined Oct 30, 2015
37
I think you described what you want to do fairly well. I still don't think it is possible to do that. I think the best you can hope for is two devices, one for each direction, and you choose one direction at a time. Either the battery is supplying the load, or the generator is charging the battery. You cannot do both things at the same time.
Thanks for the replies man! Now i know it's impossible.
I'll try something different i guess.
 

Papabravo

Joined Feb 24, 2006
22,065
Thanks for the replies man! Now i know it's impossible.
I'll try something different i guess.
A cellphone allows a USB connection to charge the battery while the battery supplies the phone. It is two voltage sources, the charger and the battery, connected to a load, the phone, in such a way that the phone does not care where the power is coming from. It is not quite what you described, but might ultimately meet your requirements.
 

DickCappels

Joined Aug 21, 2008
10,661
Last edited:

Papabravo

Joined Feb 24, 2006
22,065
le
Let's see if this meets the TS's requirements.
The first paper above does not claim that it can operate in both directions simultaneously. I thought that was one of the TS's requirements.
 

Thread Starter

jacky1997

Joined Oct 30, 2015
37
I knew it was a bit unclear :oops:
It doesn't have to be simultaneously.
I just have to turn the microcontroller on without using the battery to supply it.
But the battery is my only source.
I'll check the links and see what i can do.
 

Thread Starter

jacky1997

Joined Oct 30, 2015
37
I've read the documents, but it's still hard to understand how they supply their microcontrollers.
First document doesn't really show how they supply their microcontroller
Second document gives an error.
Third document has mutiple supplies, which i can't do in my design.
Fourth document only shows 1 Vin for the microcontroller and a logic supply brick. I assume they use the logic supply brick to supply the microcontroller as well.
Fifth document says: "When I used the circuit between two 4V lead-acid batteries, a comparator adjusted the switch ratio to drive charge in the desired direction. The circuit automatically replaces charge drained from one battery to the other. In a short-battery-life application, the 2.5-mA standby current from each battery may be negligible." Does this mean that the microcontroller will be supplied by the output of the converter instead when the battery is charging?

I've also uploaded a simple schematic of what I'm trying to do.
Untitled Diagram.png
 

DickCappels

Joined Aug 21, 2008
10,661
I have replaced the missing character in the second link in post #9. None of the references circuits is a complete solution, merely examples of bidirectional DC to DC converters. You would have to adjust the designs to meet the needs of your particular system.

You can probably apply an old and proven solution to your battery conundrum.

upload_2018-2-27_16-3-20.png
The circuit above illustrates the idea of diode-ORing two power sources. Since apparently your battery, generator, and microcontroller share a common ground, which would make this possible. There are also schemes that use relays and MOSFETs to switch between power sources. in many cases the cost of the small diode drop is low compared to the effort and increased complexity necessary to add active switches.

You would probably need a regulator(s) between the power sources and the diodes if your microcontroller cannot tolerate the wide voltage swings that may otherwise be present. The addition of the regulator or regulators is a design choice.
 

Thread Starter

jacky1997

Joined Oct 30, 2015
37
Will there ever be a situation where the battery is at too low a voltage to power the microcontroller?
No it will not. The batteries will vary between 5.4V and 8.4V and I'm using an opamp to increase this voltage to 7-12V which is perfect for my microcontroller (atmega328p).

I have replaced the missing character in the second link in post #9. None of the references circuits is a complete solution, merely examples of bidirectional DC to DC converters. You would have to adjust the designs to meet the needs of your particular system.

You can probably apply an old and proven solution to your battery conundrum.

View attachment 147112
The circuit above illustrates the idea of diode-ORing two power sources. Since apparently your battery, generator, and microcontroller share a common ground, which would make this possible. There are also schemes that use relays and MOSFETs to switch between power sources. in many cases the cost of the small diode drop is low compared to the effort and increased complexity necessary to add active switches.

You would probably need a regulator(s) between the power sources and the diodes if your microcontroller cannot tolerate the wide voltage swings that may otherwise be present. The addition of the regulator or regulators is a design choice.
This won't be possible, because I'm designing a rechargeable system for a wearable. So I want it to be as small as possible. And adding another power supply wouldn't be good.

What I'm wondering right now is: Will the microcontroller immediately receive power from the node between the battery and the converter if the generator is on? When the generator is on the microcontroller will immediately turn the converter into a buck to recharge the battery. It's pretty hard to explain this, because English isn't my native language.
 

Papabravo

Joined Feb 24, 2006
22,065
English is far from the only problem. Event sequencing in electronic systems is also a problem. Opamps are not well suited to provide power to a load. You said: "...batteries will vary between 5.4V and 8.4V and I'm using an opamp to increase this voltage to 7-12V ". This will not work out well. You need to slow down and understand basic systems better than you apparently do. If I were you I would break this task down into simpler components and understand how they work and interact. Swinging for the fences, trying to do it all at once, will lead to disaster and disappointment.
 
Top