English
Language : 

AN863 Datasheet, PDF (19/22 Pages) STMicroelectronics – Improved sensorless control with the ST62 MCU for universal motor
IMPROVED SENSORLESS CONTROL WITH THE ST62 MCU FOR UNIVERSAL MOTOR
ANNEX 3 MONITORING ON A PC COMPUTER SCREEN
In order to monitor various variables during the motor characterization, an RS232
connection is provided in the micro-controller software between the ST6 and a per-
sonal computer. In the program “regul.asm”, two data bytes are sent to the PC every
mains cycle: on negative half-cycles, the measured current it0 is sent, and on positive
half-cycles, the calculated firing delay td is sent. The instructions used to send this
data are the following:
for the it0 byte:
ld a,it0
call rs232
and for the td byte:
ld a,td
call rs232
When it is called, the rs232 subroutine sends at 19200 bauds on port pin PA3 the
data byte contained in the accumulator. This takes approximately 0.5 mS. Replacing
it0 or td by another register or RAM variable allows to send any intermediate calcula-
tion result or variable (coefficient from look-up table, proportional term, integral term,
current error...). To connect the PA3 and VDD micro-controller pins to the PC require
a level amplification (to boost the signal level from 0-5 volts to -5 / +5 volts) performed
by a Maxim MAX232 circuit, and galvanic isolation, performed by an optocoupler (see
Figure 13). The 9-pin connector must be connected to the COM1 serial port of the
PC.
On the PC side, two executable programs are provided: NUMBER.EXE and
VISU.EXE.
NUMBER.EXE, executed on the PC while the motor is running, displays on the
screen two rows of data in decimal format representing the evolution in time of the re-
ceived data it0 and td. The two rows scroll down the screen, and at the same time are
stored in a text file named NUMBER.PRN. Hitting any key stops the program execu-
tion. The data file NUMBER.PRN remains, available for latter use. It can be imported
into a spreadsheet program for example, to visualize the curves representing in time
domain the evolution of it0 and td.
Program VISU.EXE, on the other hand, allow to display graphically in real time the
time domain evolution of it0 and td. The attached file EGAVGA.BGI must be present
in the same directory, and the PC must have a VGA (or better) screen, as the graphic
is displayed in 640x480 pixels resolution. Hitting any key (except “e”) stops tempo-
rarily the curves drawing, so the user can pause to examine a detail of the display.
19/22