dm00062066

UM1559
User manual
STEVAL-IHM041V1: hardware description
Introduction
The STEVAL-IHM041V1 is a Triac based phase angle control for universal motor speed
control using an STM8S103F3, 8-bit microcontroller, to set the conduction angle of the Triac.
The board may be operated in either open loop mode or in closed loop speed control mode,
with an AC tach, hall sensor or opto sensor feedback. The open loop mode may also be
used as a lamp dimmer.
The board is designed to operate from a 120 V/60 Hz mains, but may be easily modified to
operate on other mains voltages by changing components in the power supply and motor
voltage sensing circuits. Suggested component values for other mains voltages are shown
in the alternate bill of materials.
On power-up, the firmware determines if jumper J4 is installed or not. The board operates in
open loop mode if J4 is not installed and in closed loop mode if J4 is installed. When
operating in closed loop mode, an AC tach or a hall effect device is connected to J3 to
provide speed feedback.
Figure 1.
November 2012
Board image
Doc ID 023542 Rev 1
1/13
www.st.com
Contents
UM1559
Contents
1
Main features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2
Schematic and bill of material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3
Circuit description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
4
Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2/13
Doc ID 023542 Rev 1
UM1559
List of figures
List of figures
Figure 1.
Figure 2.
Figure 3.
Figure 4.
Figure 5.
Board image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
STEVAL-IHM041V1 schematic. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Power supply . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Voltage sensing circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Tachometer interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Doc ID 023542 Rev 1
3/13
Main features
1
UM1559
Main features
●
Input voltage 120 V/60 Hz
–
4/13
230 V/50 Hz (with component change)
●
Motor current 7A RMS
●
Phase control for universal motor drive
●
Open loop or closed loop speed regulation
●
Voltage and current sensing, for sensorless operation (optional)
●
Debug outputs
●
AC tach, hall sensor or opto sensor for speed feedback.
Doc ID 023542 Rev 1
Doc ID 023542 Rev 1
2
1
J3
GND
2K
R31
10K
R32
D2
2K
R29
R28
22K
D3
10K
R33
C7
47nF
R27
200K
2
3
-
+
5V
U3A
LM393
1
5V
R30
10
R24
10K
NC
VFB
5V
5
PB1
5V
GND
R19
47K
L7805AC
NC
gnd gnd
6
7
8
DNI
DNI
PB2
DNI
LED4
C5
0.22uF
LED1
1
GND
TP2
PB3
PB2
PB1
TX
PB3
DNI
9
8
7
6
5
4
3
2
1
PB2
PB1
2.2K
pc6
pc7
swim
ain3
ain4
pa3
Vdd
Vcap
Vss
pb5
pb4
pc3
ain2
oscout pc5
oscin
nrst
rx
tx
pd4
1
2
J4
PB3
STM8S103F3P6
MOV
R25 10
C6
R18
2.2K
GND
5V
0.22uF
1
TP1
C3
220uF 10V
100 R21
2.2K
R23
2.2K
R26
11
U4
2.2K
12
13
14
+
4
-
5V
7
U1B
22K
R11
gate
swim
LED5
DNI
LED3
DNI
5V
ZC
VFB
5V
3
2
MOTOR
8
GND
+
4
1
U1A
5V
DNI
10
R4
VFB
GND
8
+
4
-
U3B
7
TX
GND
J2
2
1
COMMUNICATIONS
5
6
5V
VOLTAGE SENSING
R9 2K
R3 39K
R10 2K
39K
39K
5V
LED2 Red LED
5K R17
5
100
15 R22
16
17
18
19
R20
1K
20
R16
0.01
6
8
R6
R2 39K
R5
STEVAL-IHM041V1 schematic
1
5V
swim
4
in
gnd gnd
out
U2
5V
R14
100K
R12
Q1
T1635T
R13
CURRENT SENSIN G
2
1
Figure 2.
2
J1
4
3
2
1
DEBUG
GND
3
C4
1
470F 10V
2
gate
C1
0.22uF
P1
R1 1K
Schematic and bill of material
3
4
Z1
10V
ZC
POWER SUPPLY
1N4148
D1
100K
100K
TACHOMETER INT ERFACE
115VAC
P2
R15
47
2.2uF 250V
C2
R8
R7
4
MOTOR CONNECTION
2
8
UM1559
Schematic and bill of material
AM12468v1
5/13
Schematic and bill of material
Table 1.
UM1559
BOM
Designator
Part/value
C1
0.22 µF
C2
2.2 µF 250 V
C3
220 µF 10 V
C4
470 µF 10 V
C5, C6
0.22 µF
C7
47 nF
D1,D2, D3
1N4148
J1, J3
4Pos .100 header
J2
2Pos .100 header
J4
2Pos .100 header
LED2
Red LED
LED1, LED3, LED4,
LED5
DNI
P1, P2
2Pos locking 5 mm
Manufacturer
Manufacturer part no.
Panasonic
EF2225
Diodes Inc
1N4148FDICT
STMicroelectronics
T1635T-81
Epcos
S14K275
PB1
6/13
PB2, PB3
DNI
Q1
T1635T
R1, R13,
1 kΩ
R14
100 kΩ
R2, R3, R5, R6
39 kΩ
R4
DNI
R7, R8
100 kΩ
R9, R10, R29, R31
2 kΩ
R11, R28
22 kΩ
R12
MOV
R15
47 Ω
R16
0.01
R17
5 kΩ pot
R18, R22, R23, R25,
R26
2.2 kΩ
R19
47 kΩ
R20, R21
100 Ω
R24, R32, R33
10 kΩ
R27
200 kΩ
R30
10 Ω
Doc ID 023542 Rev 1
UM1559
Schematic and bill of material
Table 1.
BOM (continued)
Designator
Part/value
TP1, TP2
Test point
U1
Table 2.
Manufacturer
Manufacturer part no.
TSV358IYDT
STMicroelectronics
TSV358IYDT
U2
L7805AC
STMicroelectronics
L7805ACD2T-TR
U3
LM393
STMicroelectronics
LM393AD
U4
STM8S103F3P6
STMicroelectronics
STM8S103F3P6
Z1
10 V
Alternate bill of materials for 230 V/50 Hz operation
Designator
Value
C2
1 µF, 400 V
R2, R3, R5, R6
82 kΩ
Doc ID 023542 Rev 1
7/13
Circuit description
3
UM1559
Circuit description
Power supply
The power for the STM8 and the associated control circuit is derived from the mains input
using a capacitive drop power supply followed by a 5 V linear regulator, as shown in
Figure 3.
Figure 3.
Power supply
D1
C2
R15
47
5V
2.2uF 400V
P2
1N 4148
Z1
1
U2
C4
10V
1
220uF 10V
2
2
3
115VAC
GND
4
out
in
gnd
gnd
gnd
gnd
NC
NC
8
C3
470uF 10V
7
6
5
L7805AC
AM12564v1
C2, R15, Z1, D1 and C4 form the capacitive drop supply that provides an unregulated 10 V
to the L7805 linear regulator. Zener diode Z1 sets the peak value of the unregulated supply.
A value of 10 V was chosen to maintain the minimum voltage of 8 V at the input of the
L7805. The power supply section was designed to use with a 120 V/60 Hz mains. The
power supply can be modified to be used on 230 V/50 Hz mains by changing C2.
Component changes needed to modify the board to work on a 230 V/50 Hz mains are
shown in Table 2.
Line sync interface
To synchronize the gate drive for the Triac to the AC mains, the STM8 senses the zero
crossings of the AC mains voltage at the timer1 capture input. A pair of series current
limiting resistors, R1 and R2, connect the AC line input to the timer1 capture input pin. Two
1206 case resistors are used in series to provide sufficient voltage rating. The voltage at the
pin is clamped to 5 V and ground by the internal diodes in the STM8. The values of the
resistors are selected to limit the current to within the allowable range for the STM8.
Triac power stage
Triac Q1 is connected in between the mains and the load and functions as a phase
controlled switch to provide power to the motor. The gating signal is generated by the STM8
at GPIO pins PC6 and PC7. The pins are paralleled in order to increase the available gate
current drive and the control must operate these two outputs in unison.
For best operation, the Triac should be operated in the second and third quadrant, always
using a negative pulse on the gate to turn the device on. Since the STM8 operates from a
positive 5 V supply, it is not possible to directly drive the gate with a negative pulse.
Capacitor C1 AC couples the gate signal from the STM8 to the Triac so that a falling edge on
the output of PC6 and PC7 generates a negative voltage on the Triac gate for turn-on. The
8/13
Doc ID 023542 Rev 1
UM1559
Circuit description
example control software provides a series of “picket fence” pulses to the gate, to improve
the reliability of the gating, always finishing with the pins back high, ready for the next gating.
Current sensing
Shunt resistor R7 is used to sense the motor current during the Triac conduction angle.
Using a value of 0.01 Ω generates a signal that is 10 mV/A. This signal is amplified by U1 to
get a signal of 220 mV/A that is fed into an ADC input of the STM8. With a 5 V full scale
value on the ACD, the circuit can read peak currents up to 22.7 A.
Although the current through R7 is both positive and negative, the inverting configuration
circuit amplifies only the negative current since the amplifier output cannot go below ground.
An alternate configuration would be to add a bias to the amplifier circuit so that at zero
current the output would be half of the full scale voltage, or 2.5 V. In this way both positive
and negative current may be measured but the peak current capability would be reduced by
½ if the gain stayed the same.
The current sensing is included primarily for a sensorless speed control algorithm. The
algorithm senses current during the negative half cycle and performs the speed regulation
calculations during the positive half cycle.
The current sensing is not needed for the open loop or closed loop speed control with
tachometer feedback.
Motor voltage sensing
Figure 4.
Voltage sensing circuit
2 +
2
+
6
2 +
2
+
2 +
6
5!
2
6&"
$.)
0
2 +
2 +
'.$
$0Y
The measured motor voltage is also required for a sensorless speed estimation algorithm of
the software. Since neither side of the motor terminal voltage is at ground potential, a
conventional differential amplifier stage, built around U1A, is used to interface the signal to
the ground referenced STM8 ADC input, as shown in Figure 4. The differential amplifier also
provides attenuation, biasing and resistive isolation. The gain of this circuit is 1 kΩ/78 kΩ.
Since the circuit is biased at 2.5 V out for 0 V in, the input voltage range is +/- 195 V peak
over the full scale range of 0 to 5 V on the ADC input.
Two 1206 case resistors are used in series for the input resistors to provide sufficient voltage
rating. For operation on 230 V/50 Hz mains, the values of input resistors R2, R3, R5 and R6
are changed to 82 kΩ.
Doc ID 023542 Rev 1
9/13
Circuit description
UM1559
The voltage sensing is not needed for the open loop or closed loop speed control with
tachometer feedback.
Potentiometer
PCB mounted potentiometer R8 is connected between 5 V and ground with the wiper
providing an input signal to STM8 ADC input Ain4. This can be used as a general analog
input signal. In the example software, this signal is used as either a closed loop speed
command or an open loop gating phase angle command.
Tachometer interface circuit
For closed loop speed control, a tachometer signal can be connected to connector J3. The
circuit supports a pure magnet pickup coil type, a hall sensor type pulse tachometer or an
opto interrupter or reflector type of pick-up.
Figure 5.
Tachometer interface
6
6
2
+
2
+
2
+
2
+
$
$
,-
#
N&
2
+
2
+
*
2
5!
6&"
2
6
+
'.$
$0Y
For active devices like a hall sensor or opto pick-up, the 5 V power supply and ground is
available on pins 1 (GND) and 4 (5v) and the device output should be connected to pin 3. A
pull-up resistor, R28, is provided for open collector devices, but totem pole outputs can be
accommodated as well.
For AC pick-up coil type devices, the output wires should be connected at pins 2 and 3. The
differential signal is biased to approximately 1/2 of the supply voltage and diodes D2 and D3
clamp the signals to safe levels for the comparator inputs. A small hysteresis in the
comparator should still provide sufficient sensitivity for low speed operation. The sensitivity
can be improved by removing the pull-up resistor R28, which is not actually needed for the
AC tach.
The example software requires a setting of the number of pulses (rising and falling edges)
per rotation to scale the speed calculation.
User and debug interface
Connector J1 is the standard 4-pin SWIM connector for programming and debug
connections.
Up to three pushbuttons can be installed to provide simple command inputs. The standard
board configuration populates only PB1, which is used by the example software as a
start/stop command. The other two pushbuttons may be installed and used by user
10/13
Doc ID 023542 Rev 1
UM1559
Circuit description
developed software. Jumper J4, used by the example software, is connected in parallel to
PB3, so either J4 or PB3 may be used.
The board layout allows for up to 5 LEDs that user developed software can use. Only LED2
is populated on the standard configuration board and the example software uses it to display
motor on/off status.
The two outputs on pins 11 and 12 of the STM8 were designed for a dual function. If a 10uF
capacitor is installed in the position marked for LED3 and LED5, the signal on the positive
terminal of each capacitor can be used as a diagnostic analog output. The capacitor, along
with the 2.2 kΩ series resistor, forms a low pass filter that filters the PWM output from the
STM8 to provide a simple DAC function. The example software uses these two PWM
outputs to provide useful analog diagnostic signals that can be displayed on a scope. By
default, the RPM command (before accel/decel slew limiting) and actual speed are
presented. These signals can also be observed at the test points without the capacitors as a
pure PWM signal.
Note:
The circuit ground of the PCB is “hot” with respect to the AC mains so it is necessary to
operate the board from an isolated supply, such as an isolation transformer, or use an
isolated input oscilloscope to make these observations. This warning also applies to the
connection of a PC to the swim connector. The board must be powered by an isolation
transformer or the connection to the programming dongle must be through an isolating
interface.
Connector J2 is provided to give a serial data output from the UART that may be used for
diagnostics to send data to another board. The example software does not use this function.
Doc ID 023542 Rev 1
11/13
Revision history
4
UM1559
Revision history
Table 3.
12/13
Document revision history
Date
Revision
28-Nov-2012
1
Changes
Initial release.
Doc ID 023542 Rev 1
UM1559
Please Read Carefully:
Information in this document is provided solely in connection with ST products. STMicroelectronics NV and its subsidiaries (“ST”) reserve the
right to make changes, corrections, modifications or improvements, to this document, and the products and services described herein at any
time, without notice.
All ST products are sold pursuant to ST’s terms and conditions of sale.
Purchasers are solely responsible for the choice, selection and use of the ST products and services described herein, and ST assumes no
liability whatsoever relating to the choice, selection or use of the ST products and services described herein.
No license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted under this document. If any part of this
document refers to any third party products or services it shall not be deemed a license grant by ST for the use of such third party products
or services, or any intellectual property contained therein or considered as a warranty covering the use in any manner whatsoever of such
third party products or services or any intellectual property contained therein.
UNLESS OTHERWISE SET FORTH IN ST’S TERMS AND CONDITIONS OF SALE ST DISCLAIMS ANY EXPRESS OR IMPLIED
WARRANTY WITH RESPECT TO THE USE AND/OR SALE OF ST PRODUCTS INCLUDING WITHOUT LIMITATION IMPLIED
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE (AND THEIR EQUIVALENTS UNDER THE LAWS
OF ANY JURISDICTION), OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT.
UNLESS EXPRESSLY APPROVED IN WRITING BY TWO AUTHORIZED ST REPRESENTATIVES, ST PRODUCTS ARE NOT
RECOMMENDED, AUTHORIZED OR WARRANTED FOR USE IN MILITARY, AIR CRAFT, SPACE, LIFE SAVING, OR LIFE SUSTAINING
APPLICATIONS, NOR IN PRODUCTS OR SYSTEMS WHERE FAILURE OR MALFUNCTION MAY RESULT IN PERSONAL INJURY,
DEATH, OR SEVERE PROPERTY OR ENVIRONMENTAL DAMAGE. ST PRODUCTS WHICH ARE NOT SPECIFIED AS "AUTOMOTIVE
GRADE" MAY ONLY BE USED IN AUTOMOTIVE APPLICATIONS AT USER’S OWN RISK.
Resale of ST products with provisions different from the statements and/or technical features set forth in this document shall immediately void
any warranty granted by ST for the ST product or service described herein and shall not create or extend in any manner whatsoever, any
liability of ST.
ST and the ST logo are trademarks or registered trademarks of ST in various countries.
Information in this document supersedes and replaces all information previously supplied.
The ST logo is a registered trademark of STMicroelectronics. All other names are the property of their respective owners.
© 2012 STMicroelectronics - All rights reserved
STMicroelectronics group of companies
Australia - Belgium - Brazil - Canada - China - Czech Republic - Finland - France - Germany - Hong Kong - India - Israel - Italy - Japan Malaysia - Malta - Morocco - Philippines - Singapore - Spain - Sweden - Switzerland - United Kingdom - United States of America
www.st.com
Doc ID 023542 Rev 1
13/13