Bidirectional Operation of High Step-Down Converter

Photo of author

By Jackson Taylor

Home » Electronics Topics » dsPIC Microcontroller » Bidirectional Operation of High Step-Down Converter

As an Amazon Associate we earn from qualifying purchases.

A bidirectional high step-down converter is a DC-DC converter that can move power in two directions. In the forward direction it lowers a high input voltage to a much smaller output voltage. In the reverse direction it takes power from the low-voltage side and sends it back to the high-voltage side. This page shows the circuit, a PWM program for the controller, and the ideas you need to understand how it works.

Circuit diagram of a bidirectional step-down converter with inverter stage and switches

What a bidirectional step-down converter does

A normal buck converter only passes energy one way, from the source to the load. A bidirectional converter replaces the single diode with a second controlled switch. With two switches, the same inductor and the same circuit can work as a buck converter in one direction and as a boost converter in the other.

This is useful wherever a battery or storage device both supplies and receives energy. Typical examples are:

Hardware Hack

Stop Buying New Batteries for Your Tech

Electronics are expensive, but their power sources don't have to be. Discover the simple engineering trick to recondition dead batteries and bring your gadgets back to 100% capacity.

Watch the Free Video
  • Battery chargers and battery backup systems that charge from a bus and discharge back into it.
  • Electric vehicle drives that take energy from the battery while driving and return it during braking.
  • Microgrids and renewable energy systems that store surplus energy and release it later.
  • Test equipment that cycles batteries or capacitors.

The two operating modes

Step-down (buck) mode

In the forward direction the high-voltage side is the source. The main switch is turned on and off at a fixed frequency. While it is on, current builds up in the inductor and flows to the low-voltage side. While it is off, the inductor current continues through the second switch, which acts as a synchronous rectifier or through its body diode. In ideal conditions the output voltage is the input voltage multiplied by the duty ratio, so a small duty ratio gives a large step-down.

Step-up (boost) mode

In the reverse direction the low-voltage side becomes the source. The second switch now charges the inductor, and when it turns off, the energy is pushed to the high-voltage side through the first switch. The output is higher than the input, set by the duty ratio of the switch that is now doing the charging. You can see this reverse operation in practice in a boost mode in an electric vehicle drive.

See also
GSM BASED POWER THEFT DETECTION SIMULATION PROTEUS USING ARDUINO

Why a high step-down ratio is hard

A very large voltage ratio means the duty ratio must be very small in buck mode and very large in boost mode. This causes a few practical problems:

  • Short on-times. At a small duty ratio the switch conducts for a very short part of each cycle, so the controller needs good timing resolution.
  • Higher switching losses. The high-voltage switch has to turn on and off against the full bus voltage.
  • Current stress. The low-voltage side carries a high current, so the inductor, switches and wiring need to be rated for it.
  • Cross-conduction risk. If both switches in a leg turn on at once, the source is short-circuited. A dead time between the two gate signals prevents this.

Designs that deal with these issues include the non-isolated bidirectional converter with high voltage gain and the soft-switching bidirectional DC-DC converter, which uses an active snubber to reduce switching loss.

Circuit overview

The circuit in the diagram above uses switching devices driven by complementary PWM signals from a microcontroller. The main parts are:

  1. Two switches (MOSFETs or IGBTs) forming a half-bridge leg.
  2. An inductor that stores and transfers energy between the two sides.
  3. Capacitors on both sides to smooth the voltage.
  4. Gate drivers that turn the low-level PWM outputs into signals strong enough to drive the switches.
  5. A microcontroller that generates the PWM signals, including the dead time.

The video above shows the project in operation. If you want a similar project with specific voltage levels, see the 12V to 72VDC version of this project.

PWM program

The program below configures the motion-control PWM module to produce a fixed-frequency signal with a set duty ratio and a dead time between the complementary outputs. It looks like code for mikroC on a dsPIC microcontroller, so check the register and function names against the library documentation for your own device and compiler.

int f=0;
void main()
{
    unsigned int pwm_period, current_duty;
    current_duty = 110;   // duty ratio 50%
    pwm_period = PWM1_MC_Init(50000, 0, 0x11, 0);   // enable 1L and 1H pwm pins
    PWM1_MC_Set_Duty(current_duty, 1);
    PWM1_MC_Start();
    DTCON1 = 5;   // dead time setting
    while (1)
    {
    }
}

What the code does

  • PWM1_MC_Init sets the PWM frequency (50000 Hz here) and enables the 1L and 1H output pins, which drive the lower and upper switch of the leg.
  • PWM1_MC_Set_Duty sets the duty value for channel 1. The 50% comment in the original code depends on the period the library returns, so confirm that your duty value matches the ratio you want.
  • PWM1_MC_Start starts the PWM output.
  • DTCON1 is the dead-time control register. Its value sets the gap between one switch turning off and the other turning on.
  • The empty while (1) loop keeps the program running while the hardware PWM module does the work.
See also
FINDING RASPBERRY IP ADDRESS WITHOUT DISPLAY USING NMAP AND LOGIN WITH PUTTY in windows

The original listing had an extra closing brace and a comment that wrapped onto a second line, both of which stop the code from compiling. They are fixed above.

Practical tips

  • Test at low voltage first and increase gradually.
  • Check the dead time on an oscilloscope before connecting the power stage.
  • Choose switches with a voltage rating comfortably above the highest bus voltage, including spikes.
  • Use short, tight layout on the gate drive and power loops to limit ringing.
  • For fixed one-way step-down needs, a simpler high voltage buck converter may be enough.

FAQ

What is a bidirectional DC-DC converter?

It is a converter that can transfer power in both directions between two DC sources. It works as a buck converter in one direction and as a boost converter in the other.

Why does the program set a dead time?

The dead time makes sure the two switches in the same leg are never on together. Without it, the supply can be shorted through both switches and damage them.

Sustainable Tech

Keep Toxic E-Waste Out of Landfills

Don't throw away your failing laptop, phone, or car batteries. Learn how to recondition them at home in just a few hours. It's better for the planet—and your wallet.

Learn How It Works

How is the output voltage controlled?

By changing the duty ratio of the PWM signal. In a basic open-loop setup the duty ratio is fixed, as in the code above. For a regulated output, you add voltage or current feedback and adjust the duty ratio automatically.

Can this circuit be used for battery charging?

Yes, that is one of its most common uses. In one direction it charges the battery from the high-voltage bus, and in the other it returns energy from the battery to the bus. A real charger also needs current limiting and protection.

Revive Your Dead Electronics

Got a drawer full of dead gadgets or a failing car battery? Instead of paying a premium for replacements, use this simple trick to easily recondition them right from home.

See How It Works