Menu English Ukrainian russian Home

Free technical library for hobbyists and professionals Free technical library


ENCYCLOPEDIA OF RADIO ELECTRONICS AND ELECTRICAL ENGINEERING
Free library / Schemes of radio-electronic and electrical devices

Power regulators on the microcontroller. Encyclopedia of radio electronics and electrical engineering

Free technical library

Encyclopedia of radio electronics and electrical engineering / Power regulators, thermometers, heat stabilizers

Comments on the article Comments on the article

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%.

Power regulators on the microcontroller

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.

Power regulators on the microcontroller
(click to enlarge)

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.

Power regulators on the microcontroller
(click to enlarge)

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.

Power regulators on the microcontroller

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.

Power regulators on the microcontroller
(click to enlarge)

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.

Power regulators on the microcontroller
(click to enlarge)

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

  1. Biryukov S. Two-channel triac regulator. - Radio. 2000. No. 2. p. 32.33.,
  2. AT89C2051 8-Bit Microcontroller with 2Kbytes Flash. Atmel Datasheet. - vww.atmel.com/atrnel/postscript/firsl_page/doc0368a.gif.

Author: L.Ridiko, Minsk, Belarus

See other articles Section Power regulators, thermometers, heat stabilizers.

Read and write useful comments on this article.

<< Back

Latest news of science and technology, new electronics:

Machine for thinning flowers in gardens 02.05.2024

In modern agriculture, technological progress is developing aimed at increasing the efficiency of plant care processes. The innovative Florix flower thinning machine was presented in Italy, designed to optimize the harvesting stage. This tool is equipped with mobile arms, allowing it to be easily adapted to the needs of the garden. The operator can adjust the speed of the thin wires by controlling them from the tractor cab using a joystick. This approach significantly increases the efficiency of the flower thinning process, providing the possibility of individual adjustment to the specific conditions of the garden, as well as the variety and type of fruit grown in it. After testing the Florix machine for two years on various types of fruit, the results were very encouraging. Farmers such as Filiberto Montanari, who has used a Florix machine for several years, have reported a significant reduction in the time and labor required to thin flowers. ... >>

Advanced Infrared Microscope 02.05.2024

Microscopes play an important role in scientific research, allowing scientists to delve into structures and processes invisible to the eye. However, various microscopy methods have their limitations, and among them was the limitation of resolution when using the infrared range. But the latest achievements of Japanese researchers from the University of Tokyo open up new prospects for studying the microworld. Scientists from the University of Tokyo have unveiled a new microscope that will revolutionize the capabilities of infrared microscopy. This advanced instrument allows you to see the internal structures of living bacteria with amazing clarity on the nanometer scale. Typically, mid-infrared microscopes are limited by low resolution, but the latest development from Japanese researchers overcomes these limitations. According to scientists, the developed microscope allows creating images with a resolution of up to 120 nanometers, which is 30 times higher than the resolution of traditional microscopes. ... >>

Air trap for insects 01.05.2024

Agriculture is one of the key sectors of the economy, and pest control is an integral part of this process. A team of scientists from the Indian Council of Agricultural Research-Central Potato Research Institute (ICAR-CPRI), Shimla, has come up with an innovative solution to this problem - a wind-powered insect air trap. This device addresses the shortcomings of traditional pest control methods by providing real-time insect population data. The trap is powered entirely by wind energy, making it an environmentally friendly solution that requires no power. Its unique design allows monitoring of both harmful and beneficial insects, providing a complete overview of the population in any agricultural area. “By assessing target pests at the right time, we can take necessary measures to control both pests and diseases,” says Kapil ... >>

Random news from the Archive

Efficient solar cells made from multiple hemispheres 25.02.2024

Solar panels typically have a flat structure to maximize the absorption of sunlight, working best when the rays hit them at a certain angle. New research claims that creating tiny domes on the surface of solar cells can improve their efficiency by 36% and 66%, depending on the polarization of the light. In this case, the light will be captured at a wider angle - up to 82 degrees.

The presented development has significant potential for the development of more efficient solar cells that can overcome traditional limitations and find application in various fields where a reliable source of energy is required.

Scientists have previously experimented with different surface shapes, including incorporating spherical silica nanoshells to capture more sunlight and extract more energy from it. For the new study, a team from Abdullah Gul University in Turkey conducted complex simulations of how dome-shaped protrusions improve the efficiency of solar cells.

Scientists investigated photovoltaic cells made from the organic polymer P3HT:ICBA as an active layer located above an aluminum layer and a plexiglass substrate. The whole thing was coated with a transparent protective layer of indium tin oxide (ITO). This sandwich structure was stored across the entire dome, or "hemispherical shell" as the developers call it.

The researchers conducted 3D finite element analysis (FEA), breaking down complex systems into manageable chunks for better modeling and analysis.

Solar cells with bumps showed 36% and 66% improved light absorption compared to flat surfaces, depending on the polarization of the light. The projections allow light to enter from a wider range of directions and at a greater angle - up to 82 degrees.

Although physical prototypes of such solar cells have not yet been created, the simulations carried out are a significant step towards the development of more efficient solar technologies. If these principles are successfully implemented, they could have applications not only in rooftop solar panels, but also in a variety of applications, including wearable electronics, biomedical devices, greenhouses and the Internet of Things.

Other interesting news:

▪ Boiled water is more harmful than filtered water

▪ Gravitational waves could help predict tsunamis

▪ Tesla electric car battery quick change

▪ Nio ET7 electric sedan

▪ 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:

Name:


Email (optional):


A comment:





All languages ​​of this page

Home page | Library | Articles | Website map | Site Reviews

www.diagram.com.ua

www.diagram.com.ua
2000-2024