BYTE | 0 | VSD Address (0-7) | 0 | Speed Command Data (bits 7:4) |
| 2 | VSD Address (0-7) | 1 | Speed Command Data (bits 3.0) |
Many "analog" drives use a sawtooth wave generator and a
comparator circuit to generate the required PWM signal but often the pulse
frequency is limited to only a few 100Hz. This design uses the internal PWM
hardware module in a PICAXE-08M micro and the pwmout software command.
This ‘digital’ approach resulted in a stable drive capable of up to 32kHz.
Software running in the PICAXE generates additional FWD and REV
signals, which are then logically combined with the PWM signal to produce the
appropriate gate signals (G1-G4) for four power Mosfets Q1-Q4 arranged in a
conventional H-bridge.
It is very important with H-bridge configurations to ensure
that both devices on one side of the bridge are NEVER switched on
simultaneously, otherwise they will be destroyed. This is achieved by having
"dead time" and is provided by flipflops comprising IC2c&d and IC5c&d.
The RC circuits at pins 10 & 12 of the Schmitt trigger NAND gates ensure
that, for example, the gate drive pulse for Q1 is removed 100ns before the drive
pulse is applied to the gate of Q2, and vice versa.
By using both P-channel & N-channel power Mosfets, the need
for the usual supplementary power supply to drive the gates of the high-side
Mosfets is avoided.
The TLP251 photocoupler devices not only provide the necessary
low-impedance drive for the Mosfet gates very simply, they also provide optical
isolation from the potentially noisy 24V, high-current circuitry.
In the software, an 8-bit speed command is sent to the PICAXE
as two bytes of data via a serial input at pin P4. Each byte contains four bits
of address data and four bits of the speed command data. This approach allows up
to eight drives to be controlled from one RS232 serial port. The baud rate is
2400bps (8N1 frame).
The 8-bit speed command expected by the PICAXE software is a
‘2s-complement’ binary number in the range +127 to -128. Full forward speed
corresponds to +127 and full reverse speed corresponds to -127, with stationary
corresponding to zero.
A speed command of -128 disables the drive by clearing both the
FWD & REV signals, which results in all four Mosfets being switched off.
This feature could be useful on those occasions when it is preferred that the
motor coast to a stop rather than coming to a "controlled" stop with
regenerative braking.
This circuit is very energy efficient. Apart from being
regenerative, the switchmode operation ensures that power dissipation in the
Mosfets is very low. When driving a 250W (12A) motor, and with minimal
heatsinks, the Mosfets remain cool to the touch. Since each Mosfet is rated at
above 40A, the drive should be capable of controlling motors up to 1kW with
appropriately sized heatsinks and wiring.
Note that a suitable fuse or other short-circuit protection
will be needed for the 24V supply line.
The TLP251 devices are available from RS Components (Cat.
2610104), and the IRF4905 & IFRZ44 Mosfets are available from Oatley
Electronics for about $6 a pair. The PICAXE-08M can be obtained from MicroZed
for under $6, giving a total cost for all the semiconductors of around $50.
The software will be available on our website for
download.
Neville Armstrong,
Templestowe, Vic.