ENCYCLOPEDIA OF RADIO ELECTRONICS AND ELECTRICAL ENGINEERING Power regulators on the microcontroller. Encyclopedia of radio electronics and electrical engineering Encyclopedia of radio electronics and electrical engineering / Power regulators, thermometers, heat stabilizers The article describes two thyristor power controllers for inertial load. The use of microcontrollers makes it possible to use a special algorithm for uniform distribution of current pulses in the load and to obtain a high switching frequency even with a power control step of 1%. The first device is designed to control the power in the load, designed for mains voltage. The second works with a low-voltage load, which is not galvanically connected to the network. In addition, this regulator provides power stabilization in the load during fluctuations in the mains voltage. To control the inertial load, thyristor power controllers are used, which operate on the principle of supplying several half-cycles of mains voltage to the load, followed by a pause. The advantage of such devices is that the switching times of the thyristors coincide with the moments when the mains voltage passes through zero, so the level of radio interference is sharply reduced. In addition, such a device, unlike a phase-controlled regulator, does not contain analog threshold elements, which increases the stability of operation and simplifies adjustment. Since switching occurs only during the transition of the mains voltage through zero, the minimum portion of energy supplied to the load is equal to the energy consumed by the load in one half-cycle. Therefore, to reduce the power control step, it is necessary to lengthen the repeating sequence of half-cycles. For example, to get a step of 10%, a sequence of ten half cycles is needed. On fig. 1a shows the sequence of pulses on the control electrode of the thyristor for a power load of 30%. As you can see, the thyristor is open during the first three half-cycles, and closed in the next seven. This sequence is then repeated. The switching frequency of such a regulator for any power less than 100% is equal to 1/10 of the half-cycle repetition rate. It would be much more logical to distribute the half-cycles during which the thyristor is open, if possible, evenly over the entire sequence [1]. In the general case, the problem of uniform distribution of any number of pulses N in a sequence of length M (when N is less than or equal to M) is solved by the Bresenham algorithm. which is usually used in raster graphics to plot oblique segments. This algorithm is implemented using integer arithmetic, which greatly simplifies its programming. On fig. 1,6 shows the sequence for the same power of 30%. but using Bresenham's algorithm. In the latter case, the switching frequency is three times higher. It should be noted that the gain is more noticeable with a small power control step. The basis of the power regulator (Fig. 2) is the DD1 АТ89С2051 microcontroller from ATMEL [2]. A low-power TT transformer was used for power supply. which, together with the use of optothyristors, provides galvanic isolation from the network. This makes the device more electrically safe. Another useful property of the regulator is that it can be used with loads designed for different operating voltages. To do this, it is enough to apply the required voltage to the thyristors from an additional transformer. You can, for example, power a low-voltage soldering iron. It is only necessary that the voltage and current do not exceed the maximum allowable values for the applied thyristors. Regulate the power in the load with the buttons SB1 and SB2. A short press on one of the buttons will increase or decrease it by one step, while holding the button causes a monotonous change in power. Simultaneous pressing of two buttons leads to turning off the load if it was turned on before or turns on the maximum power if the load was turned off. The value of the power in the load is displayed on the LED seven-element indicators HG1-HG3. To reduce the number of elements, a dynamic indication implemented in software is used. The indicator cathodes are connected to the ports of the microcontroller, the anodes include transistors VT3 and VT4. controlled by indicator scan signals. In the highest digit, only one can be indicated, so elements B and C are connected to the same port through resistors, and the anodes of the HG1 and HG2 indicators are combined. The impulse current of the elements is limited by resistors R10-R18 at a level of approximately 15mA, which is less than the maximum allowable current for the ports (20mA). but enough to get the required brightness. The analog comparator built into the microcontroller binds to the moments when the mains voltage passes through zero. AC voltage is supplied to its inputs through the limiters VD5R2 and VD6R3 from the secondary winding of the power transformer. The role of the limiter for the negative half-cycle of the mains voltage is performed by the diodes of the rectifier bridge. Switching of the comparator occurs at the moments when the mains voltage passes through zero. The comparator output is interrogated by software, and as soon as a change in its state is detected, a control signal appears at the thyristor control output (microcontroller port P3.2) to turn them on. In the case when the current half-cycle is to be skipped, this signal will not be. Then the HG4 indicator turns on for 3 ms. At this time, the closed state of the and buttons is checked. if necessary, the value of the current power is changed. After that, the control voltage is removed from the thyristors and the indicators HG4 and HG1 are turned on for 2 ms. Further, within 4 ms, a new change in the state of the comparator is expected. The signal from port P3.2 goes to a switch made on transistors VT1 and VT2, which is used to control the emitting diodes of optothyristors. For switching the load, two optothyristors connected in anti-parallel are used. Their emitting diodes are connected in series. The current emitting diodes - approximately 100 mA - sets the resistor R1. The regulator can operate in two modes with different power control steps. The operating mode is selected by solderable jumper S1. Its position is polled by the microcontroller immediately after reset. In position 1, shown in the diagram, the power adjustment step is 1%. In this case, the indicator displays numbers from 0 (0%) to 100 (100%). In position 2, the step is 10%. The indicator displays numbers from 0 (0%) to 10 (100%). The choice of ten gradations in mode 2 is due to the fact. that in some cases (for example, control of an electric stove), a small power adjustment step is not needed. If the regulator is supposed to be used only in this mode, the HG1 indicator and resistors R17, R18 can be omitted. Generally speaking, the device allows you to arbitrarily set the number of power levels for each mode. It is only necessary to enter the desired gradation value for mode 0005 into the program code at address 1Н, and for mode 000 at address 2ВН. You just need to remember that the maximum number of gradations in mode 1 should be no more than 127, and in mode 2 - no more than 99 because the hundreds display is not possible in this mode. If the load current does not exceed 2 A. optothyristors can be used without heat sinks. At a higher current, they are installed on heat sinks with an area of 50 ... 80 cm '. When the load is supplied with a voltage of less than 50 V, the optothyristors can be of any class (in terms of voltage). When working with mains voltage, the class of optothyristors must be at least 6. Power transformer - any low-power one with a voltage on the secondary winding of 8 ... 10 V and a permissible current of at least 200 mA. Diodes FR157 (VD1-VD4) are interchangeable with KD208 KD209 or KTs405 rectifier bridge with any letter index. The DA1 7805 stabilizer chip (domestic analogue KR142EN5A, KR1180EN5) does not require additional heat sink. Transistors VT2-VT4 - any low-power pn-p structures. Instead of VT1, transistors KT815, KT817 with any letter index are applicable. However, it is necessary to select the resistor R5. Diodes VD5. VD6 - any low-power silicon, for example, KD521, KD522. Buttons SB1 and SB2 - any small without fixing, for example, PKN-159. Indicators HG1 - HG3 - any seven-element with a common anode, the required brightness of the glow. Capacitors C1. C3, C6 - any oxide, the rest - ceramic. Resistor R1 - MLT-0,5, the rest - MLT-0.125. It is even more convenient to use surface mount resistors, for example. PH1-12. The regulator does not need adjustment if it is assembled from known good parts, and the microcontroller is programmed without errors. It is still advisable to check the correctness of the binding to the frequency of the mains voltage. To do this, synchronize the oscilloscope with mains voltage and make sure that the display scan pulses (RXD and THO signals of the microcontroller) are synchronous with the mains and have twice the mains frequency. It happens that when a load is connected due to interference, synchronism is broken. In this case, it is necessary to connect a capacitor with a capacity of 12-13 pF between the inputs of the comparator (pins 1000, 4700 of the microcontroller). The microcontroller program codes are given in Table. one. With a control step of 1%, the mains voltage instability is the main source of power setting error. If the load is not galvanically connected to the network, it is easy to measure the average value of the voltage applied to the load and keep it constant using the feedback circuit. This principle is implemented in the second regulator. The functional diagram of the device is shown in fig. 3. To operate in the automatic control mode, two Bresenham modulators (Mod. 1 and Mod. 2) are used, which are implemented in software. The input of the first receives the code of the required power, which is set by the control buttons. At its output, a pulse sequence is formed, which is fed through a low-pass filter (Z1) to the inverting input of the comparator. Its non-inverting input after the low-pass filter (Z2) receives the voltage removed from the load. From the output of the comparator, a one-bit error signal is fed to the input of the microcontroller, where it is subjected to digital filtering. Since the digital filter (DF) operates synchronously with the modulators, effective suppression of ripples at the repetition frequency of the output pulse sequences and its harmonics is ensured. From the output of the digital filter, an eight-bit error signal is fed to the integrating controller (IR). To improve accuracy, the integrating controller operates in a sixteen-bit grid. The lower eight bits of the output code of the controller are fed to the input of the modulator Mod. 2, at the output of which a pulse sequence is formed, fed to the thyristor control. Such a controller is very similar in circuitry to the one described above, so it makes sense to dwell only on its differences. On fig. 4 shows a different part of the circuit. The remaining pins of the microcontroller DD1 are not shown in the diagram. They are connected the same way. as in fig. 2. Since the available I / O ports of the microcontroller were not enough, we had to abandon the use of the built-in comparator. Instead, the regulator uses a dual comparator DA2. On one (DA2.1) a binding unit is assembled to the moments of transition through zero of the mains voltage. Due to the peculiarities of the LM393 microcircuit, a resistor R19 had to be added to this node, which, with resistors R2 and R3 (see Fig. 2), forms a voltage divider that reduces the negative polarity voltage at the comparator inputs. The signal (mains frequency meander) from the output of the comparator is fed to the input of the microcontroller P3.2. The second comparator (DA2.2) is used in the feedback circuit. A single-bit error signal is input to the microcontroller P3.5. The inputs of the comparator are equipped with a low-pass filter. formed by the elements R23, C7 and R24, C8. The signal from the output of the modulator (output of port P3.4 of the microcontroller) is fed to the input of the low-pass filter through the divider R22R26. which is necessary because the comparator cannot operate with an input voltage close to the supply voltage. The amplitude of the pulses after the divider is about 3,5 V. The stability of the amplitude is determined by the stability of the +5 V supply voltage, which is used as an exemplary one. The voltage removed from the load is fed to the input of another low-pass filter also through the divider R20R21. This is how he is chosen. so that at the rated voltage of the network and the power in the load of 100%, the voltage at the output of the low-pass filter is 3,5 V. The signal from the output of the RZ.Z microcontroller is fed to the transistor switch that controls the optothyristors. The network transformer has an additional winding (111), to which a controlled rectifier is connected, formed by optothyristors VS1. VS2 and diode assembly VD7. from which they feed the load. Control buttons to save microcontroller ports are connected differently than in the previous device. There is a gap in the regulator cycle when the indicators are off. At this time, it was possible to scan the buttons along the indicator control lines. Thus, the three buttons use only one additional line: this is the return line connected to the port pin P3.7. The third button was needed for the "Automatic" mode. Immediately after switching on, the device is in manual control mode, i.e. it is functionally equivalent to the controller described above. To enable automatic control, simultaneously press the "Automatic" and "+" buttons. In this case, the LED HL1 "Automatic" lights up. In this mode, the controller automatically maintains the set power. If you now press and hold the "Automatic" button, then you can see the current state of the regulator on the indicators. When the mains voltage has decreased so much that it is not possible to maintain power, the "Automatic" LED starts flashing. You can turn off the automatic control mode by simultaneously pressing the "Automatic" and "-" buttons. The codes for the firmware of the microcontroller program of this regulator are given in Table. 2. When the load current is more than 2 A, the optothyristors should be installed on the heat sink. The heat sink plate of the optothyristor housing is connected to the anode, so the devices can be mounted on one heat sink in the device. In place of VD7, it is desirable to use an assembly of Schottky diodes (or two separate Schottky diodes, for example, KD2998A). In extreme cases, you can use conventional diodes, designed for the required load current. Good results can be obtained with diodes of the KD2997 series. KD2999. KD213. The LM393 comparator is produced by Integral software under the designation IL393. You can also use two separate comparators, for example, LM311. Instead of the KP505A transistor, it is permissible to use a bipolar transistor of the KT815, KT817 series by including a 2 kΩ resistor in the collector circuit of the VT1 transistor. The rest of the requirements are the same. as for the controller described above. When adjusting the regulator, a load is connected to it and the rated mains voltage is supplied (for example, using LATR). Then, setting the maximum power (100%). Trimmer resistor R21 ensures that the voltage difference at the inputs of the comparator 0A2.2 is close to zero. After that, reduce the power to 90% and turn on the "Automatic" mode. By adjusting the resistor R21, match (with an accuracy of ± 1) of the installed power and the readings of the indicators in the control mode of the state of the regulator (when the "Automatic" button is pressed) is achieved. Literature
Author: L.Ridiko, Minsk, Belarus See other articles Section Power regulators, thermometers, heat stabilizers. Read and write useful comments on this article. Latest news of science and technology, new electronics: Machine for thinning flowers in gardens
02.05.2024 Advanced Infrared Microscope
02.05.2024 Air trap for insects
01.05.2024
Other interesting news: ▪ Boiled water is more harmful than filtered water ▪ Gravitational waves could help predict tsunamis ▪ Tesla electric car battery quick change ▪ Wearable biosensors from old CDs News feed of science and technology, new electronics
Interesting materials of the Free Technical Library: ▪ section of the site Audio and video surveillance. Selection of articles ▪ article Logistics. Lecture notes ▪ article Why table tennis is incorrectly called ping-pong? Detailed answer ▪ article Boat for calm water. Personal transport ▪ article Light and powerful RA. Encyclopedia of radio electronics and electrical engineering ▪ article Plate - grinding wheel. Focus secret
Leave your comment on this article: All languages of this page Home page | Library | Articles | Website map | Site Reviews www.diagram.com.ua |