Arduino Based Output Voltage Control of Bidirectional Converter for HEV’s

DOI : 10.17577/IJERTCONV3IS16108

Download Full-Text PDF Cite this Publication

Text Only Version

Arduino Based Output Voltage Control of Bidirectional Converter for HEV’s

G. Gurusivakumar

P.G. Student-Department of EEE Sri Sai Ram Engineering College

Chennai, India

Mr. R. Azhagumurugan

Associate Professor-Department of EEE Sri Sai Ram Engineering College

Chennai, India

AbstractPWM or Pulse Width Modulation based control of power electronic circuits is most common method used for controlling output voltage of bidirectional converter. Various modes of operation of bidirectional converter is discussed. A low cost micro-controller board, Arduino, has been used to implement the PWM control technique thus avoiding the need for complex hardware circuitry. MATLAB/SIMULINK is used to design the bidirectional converter.

Index TermsArduino, Bidirectional Converter, Pulse Width Modulation (PWM).


Bidirectional DC-DC converters serves the purpose of stepping up or stepping down the voltage level between its input and output along with the capability of power flow in both the directions. Bidirectional DC-DC converters have attracted a great deal of applications in the area of the energy storage systems for Hybrid Electric Vehicles. Arduino Uno Microcontroller board has been used to produce the SPWM output pulse based on reading the analog input signals. We can use Simulink to program algorithm that run on Arduino which can be downloaded to the Arduino board, thus making it a stand-alone device which receives inputs and provides outputs accordingly.


Pulse Width Modulation, or PWM, is a technique for getting analog results with digital means. Digital control is used to create a square wave, a signal switched between on and off. This on-off pattern can simulate voltages in between full on (5 Volts) and off (0 Volts) by changing the portion of the time the signal spends on versus the time that the signal spends off. The duration of "on time" is called the pulse width. To get varying analog values, you change, or modulate, that pulse width. If you repeat this on-off pattern fast enough, the result seems as if the signal is steady at value between on or off.


The Arduino Uno is a microcontroller board based on the ATmega328. It has 14 digital input/output pins out of which 6 can be used as a PWM outputs, 6 analog inputs, a 16 MHz ceramic resonator, a USB connection, a power jack, an ICSP header, and a reset button. It contains everything need to support the microcontroller, simply connect it to a computer with a USB cable or power it with an AC to DC

adapter or battery to get started. We have used the Simulink Support Package for Arduino Uno Hardware for communicating between MATLAB and Arduino. A library of Simulink Blocks is provided by the support package which allows access to Arduino I/O pins and Serial Port. The package allows implementation of Simulink Models in Arduino board such that the board acts as stand-alone hardware.

In order to interface both the devices we need to install the MATLAB Support Package for Arduino hardware. The package is installed by using Run on Target Hardware option from the Tools menu in MATLAB Simulink model. The Algorithms written in Simulink model will be directly dumped into the Arduino Uno board over an USB cable.

The generation of PWM is illustrated in Fig.1. Here the generated PWM pulses are dumped into the fifth pin (PWM) of the Arduino board.

Fig. 1 Generation of PWM pulses in MATLAB/SIMULINK

A.Reading Analog Input

The analog input pin of the UNO board can have a maximum value of 7-12V, so we have to limit our analog input to 5V. The 10-bit ADC converts the input voltage into a digital value between 0-1023; this value needs to be scaled down by a proper factor (1/1024) to give the actual digital value. Similarly the PWM pin on the board gives an output of duty cycle 0.0 for an input of 0 and duty cycle 1 for the input

255. Hence for a duty cycle of 0.5, the value of 127.5 is used as the input.

B. Writing Digital Output

The digital write signal is used to produce the PWM pulses, which is to be sent to the gate terminal of the MOSFET switch. Since the output from the Arduino board is

just 5 V it is not enough the MOSFET switch. So the TLP 250 optical isolator is used to drive the switch and it is also used for isolation between the controller and switch.


Bidirectional DCDC converters are used to transfer the power between two dc sources in either direction. These converters are widely used in applications, such as Hybrid Electric Vehicle energy systems. In HEVs, Bidirectional DC- DC converters are employed to link up the high voltage DC bus to the electrical storage system. In HEVs the bidirectional converter will be used to transfer the energy between the battery and the motor through a dc bus. During motoring mode the converter will be working in step-up mode, at this time battery is on low voltage side and dc bus is on high voltage side. During the regenerating mode the converter will be working in step down-mode. A Bidirectional converter is taken [1] from the Fig.1 in order to achieve the interface between the Arduino Uno and MATLAB.


  1. Discharging Mode

    During discharging mode the energy flows from battery to DC bus through the bidirectional converter. Here the converter will be working in step-up operating mode. The circuit model of the step-up mode is represented on Fig. 2.

    Fig. 2 Bidirectional Converter in Step-up mode

  2. Charging Mode

During charging mode the energy flows from DC bus to battery through the bidirectional converter. Here the converter will be working in step-down operating mode. The circuit diagram for the same is represented on Fig 3.

Fig. 3 Bidirectional Converter in Step-down mode


A 14/42-V prototype circuit is built in the laboratory for the automobile dual-battery system. The hardware setup for the bidirectional converter in step-up mode is illustrated in Fig. 4. The generation of PWM pulses is illustrated in Fig.5. The generated PWM pulses will be transmitted to the converter through opto coupler.

Fig. 4 Hardware Setup for Bidirectional Converter in Step-up mode

Fig. 5 Generation of PWM pulses by Arduino

The output voltage is sensed and it is compared with reference voltage. The error signal is given to controller. In the controller the output voltage across the load is given as

feedback and compared with set point. The Arduino Uno reads the value from the specified analog pin. The input voltage coming to the controller will be mapped between 0 to 5V as an integer values between 0 and 1023. For doing this job the board has 6 channels.


  1. Bidirectional Converter

    In order to verify the performance of the converter the proposed model is simulated in MATLAB/SIMULINK with following electrical specifications. The battery side voltage(VL) and dc bus side voltage(VH) of the bidirectional converter is taken as VL= 14 V, VH= 42 V, the output power Po = 200 W, the capacitor and inductor values will be taken as C = 330 F, L = 15.5 H respectively. Since we have used an Arduino PWM output for gating the MOSFET gate, the switching frequency is 10 kHz. Fig. 6, & Fig. 7 shows the SIMULINK model; Fig. 8 and Fig. 9 shows the output respectively.

    Fig. 6 MATLAB/SIMULINK model for Bidirectional Converter in Step-up mode

    Fig. 7 MATLAB/SIMULINK model for Bidirectional Converter i Step- down mode

  2. Overall Drive Train

The overall drive train is built by connecting the Bidirectional Converter in between the DC bus and the battery. It consists of a boost converter, inverter, DC bus and Bidirectional Converter. The required voltage of the DC bus is produced by boost converter.

Fig. 8 Simulation of Overall Drive Train for HEVs

Fig. 9 Simulation waveform of Output voltage and current in Step-up mode

Fig. 10 Simulation waveform of Output voltage and current Step-down mode

Fig. 11 Simulation waveform of Output voltage and current for the HEV drive train.


In this paper, PWM pulses are produced by a simple interface between MATLAB and Arduino Uno controller. A bidirectional converter is proposed to verify the bidirectional power flow which is necessary in HEVs. The proposed converter is simulated by using MATLAB/SIMULINK and output waveforms are plotted. Hardware setup is implemented for the same in order to verify the output voltage.


  1. Akarsh Sinha, M. Pavithra, K.R. Sutharshan, Arduino based pulse width modulated output voltage control of a dc-dc boost converterusing Proportional, Integral and Derivative control strategy, Australian Journal of Basic and Applied Sciences, 7(11) Sept 2013.

  2. S. Preethi, I. Mahendiravarman , Matlab /Simlink based closed Loop Control of Bi-Directional DC – DC Converter,International Journal of Engineering Science and Innovative Technology (IJESIT) Volume 3, Issue 5, September 2014.

  3. Christian Kranz, Complete Digital Control Method for PWM DC-DC Boost Converter, Power Electronics Specialist Conference, PESC '03 Volume 2, 2003.

  4. Lizhizhu A Novel soft commutation Isolated Boost Full bridge ZVS-PWM DC-DC converter for Bidirectional High Power applications in IEEE Transactions on Power Electronics Vol.21, No.2, March 2006.

  5. Wong N, Kazerani M, A review of bidirectional on-board charger topologies for plugin vehicles, In: Proc. of the 25th IEEE Canadian Conference on Electrical & Computer Engineering (CCECE), 2012.

Leave a Reply