Software Description

 

 

UVIC ELEC 499

Design Project

Summer 2011

Supervisor: Dr. Bhat

 

Home

Overview

Hardware

Software

Group

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:

 

 

 
https://lh6.googleusercontent.com/mkGX_ga3lauuxxOQRc1QbO3FCWCrq4TvLM1QyIcwWussThuCo7uiS36BvOsEJbzY4L1VdqHDWvs6HI5bYu7TQujIMCrIbrGGpGMorFMOOobq0f6Y9LE

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

waveforms.

- 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.