You are on page 1of 2

783112

Universal PWM Driver


IC2
V+ 7805 +5V

LC DISPLAY
C7 C4 C1 C3 C2 C6

VDD
VSS

R/W
VO
RS

D0
D1
D2
D3
D4
D5
D6
D7
A
K
E
470u 100n 470u 100n 220u 100n
25V 25V 10V 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

V- 7915
R1 R2 +5V
IC1
4k7
1k
R1

180R
+5V
1 3 5 7 9 11 13 15
K4
LCD
D2 D1
2 4 6 8 10 12 14 16
+5V
BAT81 BAT81
C5 +5V
R8 R9 R4
4k7

4k7

10k

100n

R7
R5
R6
RW LCD
RS LCD

D4 LCD
D5 LCD
D6 LCD
D7 LCD
E LCD

14
4k7
4k7
VDD 4k7 K2
17 IC3 6 SA 1 S
RA0/AN0 RB0/INT
J1 18 7 SB 2
RA1/AN1 RB1/RX/DT
MODE 1 8 SC 3
3 RA2/AN2/REF RB2/TX/CK C
2 9 4 D3
2 B RA3/AN3/CMP1 RB3/CCP1
3 10 5 PWM-2
A RA4/TOCLK/CMP2 RB4/PGM
A B
4 11
1 RA5/MCLR/VPP RB5
15 12 ROTARY
RA6/OSC2/CLKOUT RB6/T1OSO/T1CLK/P SWITCH
16 13
K1 RA7/OSC1/CLKIN RB7/T1OSI/PGD
T2
1
PIC16F628
VSS 6 2x PWM
2 BYW32
5 R10
3 2 7
47R INA OUTA
D4
4
IC4
5
2x
IRF9540 PWM-1
R11 MC34151
S1 4 5
47R INB OUTB T1
ICSP

3
RESET

090856 - 11

Herbert Musser (Austria) and


Alexander Ziemek (Germany) tal rotary encoder. This is accompanied by is capable of working at even higher currents,
a mode switch used to select the operat- but then careful attention must be paid to the
PWM drivers are used in analysing, testing, ing mode from among ‘off’, ‘PWM’ and ‘full cross-sectional area of the conductors: tin the
installing and powering all kinds of electronic power’: a three-position centre-off switch current-carrying circuit board tracks, or add
and electrical devices. We have published a is suitable. The two controls are connected wires in parallel with them.
few designs in Elektor over the years: here we via headers (K2 and J1). The current settings The motor drive application was foremost in
present a ‘de luxe’ version suitable for a very of the circuit are shown on a standard LCD the authors’ minds when designing the cir-
wide range of applications. As usual the soft- panel with two rows of sixteen characters, cuit. A useful feature in this application is the
ware for the project (source code and hex file) which is connected to the PCB via a standard ‘boost function’, which helps DC motors to
can be downloaded for free from the accom- connector. start up reliably. The output is switched on
panying pages on the Elektor website [1], and at full power for the configured boost time,
ready-programmed microcontrollers are also At the heart of the circuit is a PIC16F628 micro- regardless of the PWM duty cycle setting in
available. Additionally, the authors’ Eagle controller (a PIC16F628A may also be used). force.
design files for the printed circuit board are An output stage consisting of two power FETs For reasons of safety, when the circuit is pow-
available for download. wired in parallel, along with heavy-duty fly- ered up the output will remain off until the
back diodes, allows the circuit to drive DC mode switch is set to ‘off’ and then to one
The main user control, used for adjusting motors at up to 30 V and rated currents of up of the ‘on’ settings. This means, for exam-
almost all the settings, is an Alps incremen- to 10 A directly and comfortably. The circuitry ple, that a connected motor will not sud-

7/8-2010 elektor

Personal Download for QWER, WEqed | copyright Elektor


denly start up when the electricity supply is The menu includes the following options: The settings are stored in the EEPROM of the
restored after a power cut. Boost: on / off PIC16F628 and so are not lost when power
Boost time: 1 second / 2 seconds / 5 seconds is removed.
In normal operation the display shows the PWM frequency: 1 kHz / 2 kHz / 5 kHz
current PWM frequency and the duty cycle (as PWM step: 1 % / 2 % / 5 % / 10 % The authors’ prototype of this circuit has
a percentage). The duty cycle can be adjusted given sterling service, outputting a clean and
using the incremental encoder. Choosing ‘exit’ leaves the set-up menu. stable drive waveform even at a frequency
of 5 kHz.
The basic settings can be configured in the The ‘PWM step’ parameter determines the (090856)
set-up menu. This menu is reached by setting amount by which the duty cycle increases or
the mode switch to ‘off’ and pressing in the decreases in PWM mode for each step of the [1] www.elektor.com/090856
incremental encoder for a few seconds. rotary encoder.

elektor 7/8-2010 

You might also like