When building the boost power supply,
remember that — depending on the
components chosen in the design —
high voltages can be generated. Care
should be exercised to avoid electrical
shock. Capacitors can hold energy after
the power is removed from the circuit.
— by Robert Lang
In Part 1, we covered the theory of
how a boost power supply works.
We introduced pulse width modulation (PWM) and explained how to get
the 18F2455 PIC to output a square
wave with a given period and duty factor. We covered the important parameters in designing the boost power supply and used the free LTSPICE program
to come up with a possible design.
This month, we will build the
power supply designed last month on
a printed circuit board. We will write
the software needed to drive the PIC
in a freely downloadable version of the
C language. We will discuss the software that drives the A/D conversion,
the LCD display, and the pulse width
modulation. Then, we will program the
microprocessor with the software. I
will mention some of the pitfalls in
designing a switching power supply
and, finally, test the power supply.
The boost power supply can easily
be built on a breadboard or printed
circuit board (PCB). Figure 1 is the
schematic for the actual circuit that was
built. Several components were added
to the circuit from the basic design last
month. The first of these is the 18F2455
microprocessor that was modeled as a
square wave generator last month. In
this circuit, the PWM output pin RC2
(pin 13 on the PIC18F2455) is used
to drive the MOSFET that charges and
discharges the inductor.
The PIC18F2455 can control an
LCD display, so an optional LCD
display was added along with the R9
potentiometer that is the LCD’s contrast
control. The LED D3 was added to flash
periodically as an indicator that the
PIC18F2455 is programmed and operating properly. The R10 potentiometer
was added to allow a user to fine tune
the LCD’s display of output voltage to
match the actual output voltage.
The R1 potentiometer was added
to allow the user to set the desired output voltage. The microprocessor will
attempt to maintain this output level
by changing the ON time of the PWM.
The output voltage at test point #1 is
fed to the analog-to-digital converter
point RA0 (pin 2 on PIC18F2455),
where it is converted to a digital value.
This digital value is compared to the
desired output voltage, and the
difference is used to increase or
decrease the ON time of the PWM.
The programming connector — T4
— and its associated components,
were added to allow the 18F2455
PIC to be reprogrammed without
■ FIGURE 1. Boost power
October 2006 67