Software Description




Design Project

Summer 2011

Supervisor: Dr. Bhat







Project Report

Progress Report #1

Progress Report #2

Project Poster



The primary goal of the software for our project was to produce the variable duty cycle control signals

that would ultimately be used to switch the power MOSFETs. The control signals output by the code were

designed to be complimentary square waves, with a small delay during the state changes from low to

high. This delay was approximately 100 nanoseconds, and ensured that there was never a switching state

where both of the power MOSFETs would be switched on, an important consideration as that particular

switching state would cause a short in the power circuit. The desired waveform is shown below, with an

exaggerated switching delay to emphasize the timing considerations:

The program itself had five primary sections:

- variable declaration: defined the intended functionality of the Arduino Uno I/O pins and initializes two

integers used to monitor the voltage of the potentiometer controlling the duty cycle of the output


- the setup() subroutine: configured the digital I/O pins, defined the interrupt service routines (ISR) and

configured the PWM control register.

- the loop() subroutine: adjusted the duty cycle of the PWM output according to the voltage applied

across a potentiometer.

- the PWMreset() subroutine: reset the PWM control signal in order to maintain synchronization between

the voltage source and the switching signals.

- the PWMgenerator() subroutine: created the variable duty-cycle PWM MOSFET driver signals that would

be sent to the MOSFET driver ICís.