Design Ideas: June 22, 1995
Microcontroller watches, controls ac power
Samuel Kerem,
Infrared Fiber Systems, Silver Spring, MD
For monitoring and controlling a power circuit from a microcontroller (µC), Fig 1 replaces the conventional technique of a low-value resistor and differential amplifier (with gain set for the expected current value). A control line turns triac Q1 on and off via optoisolator IC2. When an appliance is plugged into J1 and turned on, the voltage drop across Q1 is independent of the current value and sufficient to turn on optoisolator IC3. The phototransistor current of IC3 charges
C1to a logic 1, which is sensed by the µC. When IC2 is on, but the device in J1 is actually turned off (by its own switch), there is no current through Q1, and the sense line is at logic 0 because C1 is discharged through R4.
When the µC turns Q1 off (even though the device in J1 is still switched on and therefore conducting), current flows through pins 1 and 2 of IC3, as well as R3 (a positive-temperature-coefficient resistor with a large resistance change resulting from a small temperature change). In this case, R3 sharply increases its resistance to keep the current flowing through it at about 15 to 20 mA. However, even though C1 is charging to logic 1, the µC "knows" the device is not really on, because it has set power switch Q1 to the off state via the control line. (DI #1722)
| EDN Access | feedback | subscribe to EDN! |
| design features | design ideas |
Copyright © 1995 EDN Magazine. EDN is a registered trademark of Reed Properties Inc, used under license.