Redundant power supply with sine output. Part 2. Development of an electrical circuit diagram

    Prologue


    In a previous article , the formulation of the problem for the development of a low-power backup power source for 60 W with a sine output for the circulation pump of the heating system was considered. The concept of the implementation of this device was chosen. This article will discuss the development of the electrical circuit of the device, with the necessary calculations to select the ratings of the components that make up the device.

    Armed with CADs and textbooks, drafts, pencil and GOOGLE, we’ll start designing. Let's start with a simple one - the device’s power system.


    Catering


    To power the circuit elements, we need three types of DC bus at 12, 5 and 3.3 Volts.

    Twelve-volt bus - the main. It is the power supply of the bridge, which injects current into the low-voltage winding of a linear network transformer. From it we feed the driver of the transistors included in the bridge. Network switching relays will also be powered from this bus.

    A five-volt bus is needed to power the ACS712 current chip, logic chip, character LCD, etc.

    Three-volt bus will power the "brains" of the device - MK STM32F100C8T6B.

    Lyrical digression
    For clarity, pieces of the circuit were drawn in Proteuse v 7.7. Its libraries do not have all the components used, so some components are replaced with analogues. The final, complete diagram will be in CAD format Dip Trace. With all approved components. But this is already in the next article.

    Such a scheme was born: The picture is clickable. 5 and 3.3 Volt bus shapers are organized on 1% LDO stabilizers of the NCP1117STxx type. The analog power supply of the ADC module is taken from the 3.3 Volt bus through inductance, smoothing and blocking capacitors. Analogue land should also be divided. But this is not the case in this scheme, since the measurements are not critical, and an error of a couple of digits will not lead to a “breakdown" of the device. We apply a software filter - a moving average and can even achieve errors in one category.






    Current measurement and overload protection


    The ACS712ELCTR-05B-T current sensor is an integrated circuit. Current detection occurs on the Hall effect. This sensor allows the MK to measure both forward and reverse current. Other characteristics can be found in its pdf . Sensor output is analog. Midpoint corresponding to zero current = 2.5 V. Gain 185mV per 1 Amp. Although the sensor detects high currents, only linearity is distorted, and at a certain current it enters saturation. So to coordinate the output of the sensor with MK, put a voltage divider. And divide the scale in half. The ADC MK bits are enough for acceptable accuracy.

    For high-speed protection against overload or short circuit in the low-voltage winding of a linear transformer, install a current shunt. The signal from the shunt is forced on the op-amp and on the comparator we assemble a comparison circuit with a latch. Overload data will be driven into the MK, and also with this signal we will close ALL bridge keys.

    A short video, simulating the operation of current protection, is presented below.



    Power part


    The power part of the RIP is shown in the figure. The picture is clickable. The transistor bridge "relies" on the current shunt, to provide high-speed protection. The bridge output through an LC filter, designed for a cutoff frequency of ~ 1 kHz, is fed to the low voltage winding of the transformer. We should talk about the filter and the transformer in more detail. The calculation of the filter was carried out in the program "Calculator RL" link to the so-called off. I can’t find the site. Therefore, the archive with the calculator posted here . Here is the calculation screen.










    The resulting inductance of 10 milligenry is quite impressive. But the capacity was decent. Since we have a change at the output from the filter, you can’t do with a polar capacitor. He laid two ceramic capacitors in parallel in the circuit - 4.7 microfarads, X7R, 25V (1206).

    The calculation of the throttle according to the data obtained was performed in the Coil32 program. Here is a link to the archive with the program. I chose a ferrite ring for such a throttle with the following parameters: Ring N87 R25x15x10. Here is the calculation screen in the program.



    It turned out 70 turns of wire with a diameter of 1 mm, to ensure the required inductance. It is quite acceptable for manual winding.

    The choice of transformer fell on the TTP-60 type toroidal transformer, with a secondary voltage of 9 volts. The calculation is simple. An alternating voltage of 9 volts gives an amplitude of 12.7 volts. The voltage of a charged battery is about 13 volts. So we can more or less get 220 volts at the output. To charge the battery, of course not enough. Therefore, there is a suggestion to get the secondary winding of turns 5-6. That is, a low-voltage winding with a tap turned out. From the extreme terminals of the winding, we remove the increased voltage to charge the battery during operation from the network. And we apply voltage from the bridge to the extreme and middle terminal when we are working from the battery. By the voltage taken from the extreme terminals of the winding, we judge the voltage in the high-voltage winding during operation from the battery, feedback for adjustment.

    Bridge transistors are controlled from the MK through the IRS2101S half-bridge drivers. The management of the upper keys is carried out according to the bootstrap scheme. The P-channel charging transistor is controlled by a conventional bipolar. The smoothing charge choke has the same dimensions and design values ​​as the choke in the LC filter after the bridge.

    Network Detection and Switching


    For network detection, a capacitor power circuit is used. The voltage is turned on to the optocoupler. The output of the optocoupler is driven into the MK to control the availability of the network. The diagram is shown below. The picture is clickable. Mains voltage through a quenching capacitor, diodes, a zener diode, smoothing capacitors, a current-limiting resistor is fed to the optocoupler LED. Exit goes to MK. Relays that switch the network to the load are controlled by MK. Current protection is implemented on the op amp and comparator. The output of the comparator diverges into two transistors. One to enter the signal into the MK, the second to close all bridge transistors. The figure below shows the driver enable circuitry for the bridge. The picture is clickable. All standard, according















    datasheet for driver IRS2101S.

    Bridge pulse shaping circuit


    In order not to burden the MK with useless work, the formation of the signals of the bridge pulses is collected on the logic I. Three signals are required from the MK. One sinusoidal PWM per period, as well as two discrete signals, the first half-wave and the second. The implementation of this approach is shown in the figure. The picture is clickable. Overcurrent, established in MK and duplicated by LED. The control of the charging P-channel transistor is organized on a bipolar NPN transistor.






    The logic of the bridge will be as follows. 20 kHz PWM will be modulated by a sine table in the amount of 400 values. The transfer of values ​​to the PWM register will be organized through DMA. After loading half of the buffer, i.e. 200 values, one half-cycle, the DMA will cause an interrupt, where the signals MCU_P_1 and MCU_P_2 will mutually invert. After loading the entire buffer, in the interrupt from the DMA, the signals MCU_P_1 and MCU_P_2 will be inverted back. And further in a cyclic mode. A constant half-wave level will be supplied to the upper arm transistor, and a sinusoidal PWM to the lower key of the opposite arm. The next half-cycle is another pair of transistors.

    During overcurrent, the NPN transistor Q7 will provide a low level at the logic input, which in turn will lead to a low level at the logic output and, as a result, locking ALL bridge transistors.

    Hardware platform


    Three-volt bus will power the "brains" of the device - MK STM32F100C8T6B.

    As mentioned above, MK will be from ST STM32 family. What determines such a choice?

    • MK has a low cost. Opportunity analogs from ATMEL or PIC have even higher prices, with a bit capacity of 8 bits.
    • The presence on board 12-bit ADC, DAC, DMA controller.
    • 32 bit core capacity.
    • Increased memory capacity of programs and data.

    In a word, he wins in many positions.

    To indicate the operation of the device and output the necessary data, a sign-synthesizing LCD with a control controller KS0066 (HD44780) will be used in the circuit. There are a lot of libraries for working with such a display in RuNet.

    The connection diagram of the display to the controller is as follows. The picture is clickable. Connection is direct. MK ports are directly connected to the display. The conjugation of 3 volt and 5 volt logic was not performed. Problems may arise here, and MK conclusions will have to be configured as open collector outputs, and the lines should be pulled up to 5 volts, and MK outputs themselves should be used tolerant to 5 volts. As the saying goes, life will show, but when developing a printed circuit board, it is necessary to lay this "update".






    Custom buttons are required to organize navigation through the menus and parameters displayed on the display.

    Additional calculations


    To calculate the bootstrap capacitor, we use the method proposed in this article . At the end of the description there is an example of calculating the necessary capacity of a bootstrap capacitor. Take it as a basis and recount for our realities.

    We decide on the parameters of the circuit:

    • V IN, MAX = 15V maximum input voltage,
    • V DRV = 12V driver supply voltage and the amplitude of the control signal,
    • dV BST = 0.5V ripple voltage across capacitor C BST in steady state,
    • dV BST, MAX = 3V maximum voltage drop at C BST before the undervoltage protection circuit operates or the amplitude of the control signal becomes insufficient,
    • f DRV = 100 Hz conversion frequency, since our capacitor operates in the interval of 10 ms,
    • D MAX = 1 maximum duty cycle at minimum input voltage.

    Characteristics of the components used:

    • Q G = 24 nC total switching charge IRLZ44ZS at V DRV = 5V and V DS = 44V,
    • R GS = 10K resistor value R GS ,
    • I R = 10uA leakage current of the diode D BST at the maximum input voltage and its transition temperature TJ = 80 ° C,
    • V F = 0.6V voltage drop across the diode D BST at a current of 0.1A and a transition temperature TJ = 80 ° C,
    • I LK = 0.13mA leakage current of the level shift circuit at the maximum input voltage and crystal temperature TJ = 100 ° C,
    • I QBS = 1mA current consumed by the top-level driver.





    We select the calculated value from the standard series. Take the type of capacitor tantalum, to reduce the leakage current of the capacitor itself. Altogether, 47 μF x 25 V, type D, is obtained.

    We calculate the capacitor charge current, thereby choosing a diode.



    So a diode designed for a direct current of 1 A will cope with this task.

    Conclusion


    This article developed the electrical circuit of the RIP. Now we will put together all the pieces of the circuit together. And on the basis of the already approved scheme, we will develop the topology of the printed circuit board. I will present the PCB layout and the generalized electrical circuit with the specification for the components in the next article.

    I will write the software implementation of the device’s functionality in a separate article. There is an idea to implement in the program many interesting solutions, for example, PID regulation of the output voltage when working from the battery.

    Epilogue


    With this article, I wanted to bring to court the public and experienced hams and non-amateurs too, schematic solutions. Perhaps an attentive reader will find any critical errors in circuitry or suggest a more correct execution of individual nodes. There is some simpler solution for the nodes or to increase the reliability to introduce additional circuit solutions.

    PS
    Links to all parts of the cycle:

    1. Development of a low-power backup power supply with a sine output. Part 1. Statement of the problem.
    2. Development of a low-power backup power supply with a sine output. Part 2. Development of an electrical circuit diagram.
    3. Development of a low-power backup power supply with a sine output. Part 3. Work on bugs

    Also popular now: