0-3A 0-30V Switching Digital Power Supply

In the switching dc-dc digital power supply project with 0-30V voltage and 0-3A current adjustment, ATMEGA644 microcontroller was used in the control stage. The system is designed as dual ATMEGA644, which controls 2 power stages and displays voltage and current information on LCD screens. In the switching power supply driver power stages, LT1074 5 amp step-down dc-dc regulator integrated is used at the input, and then LT1084 5 amp adjustable dc-dc regulator integrated is used. The current is made by the LT6105 current sensing integrated circuit over a 0.02 ohm resistor, and voltage adjustments are made by the control stage with voltage divider resistors connected to the output.

A toroidal transformer was used as the voltage source, 230v primary input and secondary outputs are 32V AC 3.2A 7V AC 0.1A 7V AC 0.3A.
There are source eagle cad pcb diagram drawings and ATMEGA644 code files for the 0.3A 0.30V Adjustable Laboratory power supply.

0-3A 0-30V Power Supply MCU Power Solid Circuit Diagrams 

drawing1Figure 1 - Circuit Diagram

drawing2aFigure 2 - Circuit Diagram 2

Design of the linear part of the power supply

The linear stabilizer is based on the application of a classic three-terminal stabilizer. It can be used, because the power loss on it will be about 7 W in the worst case. The linear stabilizer used is LT1084, it is similar to the well-known LM317, but compared to it it has improved parameters and is designed for a higher current without the need for a booster transistor. The design is based on a basic circuit with an output resistive divider and a supply voltage of one polarity. In this connection, it is not possible to achieve a value of output voltage lower than 1.25 V, which is the value of its internal voltage reference. For more details see figure 3 below

drawing12

Figure 3 - Connection of the linear part of the power supply

Voltage regulation from zero can be achieved by connecting a sensing divider to a negative potential instead of a 0 V potential. For this case, a voltage reference of 1.25 V of the LT1004 circuit was chosen, which is suitable for this purpose. This reference is obtained from an auxiliary negative voltage source of -5 V. The resistance value of the resistor R13 can be determined from:

drawing13where V− is the value of the supply negative voltage in V.
The second modification is the replacement of a divider in the order of hundreds of ohms with a divider in the order of kΩ [21]. R15=10 kΩ, RU = 250 - 260 kΩ. The value of R13 must be chosen higher so that the range of output voltage regulation is not limited due to the potentiometer tolerance. Such a large value of the divider in conjunction with the voltage follower allows for easier fine regulation of the voltage and reduces the current through the divider. The circuit is completed with an input and output capacitor, including a capacitor between the ADJ pin and GND.

With the linear stabilizer used, it is necessary to ensure a minimum current consumption. Since the output voltage is regulated by a divider with a relatively large total resistance (see above), the need for minimum current consumption cannot be satisfied by this option. Failure to ensure the minimum current consumption was reflected in the simulation and practical implementation by increasing the voltage to the maximum value, which made it impossible to set the output voltage at the no-load capacity. A certain current consumption can be provided by a fixed output resistor, however, its value would have to be relatively small to ensure a minimum consumption for all output voltages and thus a relatively large power loss would arise on it. The consumption is determined by a simple current source, which consists of transistor T1, adjustment divider R16, R17 and emitter resistor R20. The base voltage is derived by means of a divider from the stabilized voltage value (the same voltage that is supplied to the OZ) and the value will be constant. Resistor R20, respectively. R17 can be adjusted to a given current. In our case, the value is about 5 mA. The current will vary in a relatively small range due to the output voltage, but the exact value of the current is not important for the application (within mA units). At a given current, a permissible power loss of approximately 130 mW occurs on the transistor.

Auxiliary voltage sources

The first auxiliary power supply consists of stabilization of the input voltage. Stabilization of this voltage has proven itself for the power supply of OZ, current sensing circuit and current source and optocouplers. Stabilization is carried out by the LM317 stabilizer, which is in the TO-92 case. The power loss on it, despite the higher consumption of optocouplers, is within the permissible limits. The calculation of the output divider for setting the output voltage can be done using the equation given in Chapter 1.7.4, the input and output capacitors are sufficient with a value of 100 nF (practically tested).

An auxiliary negative voltage source is used for the possibility of regulating the voltage from the value
0 V. Since the possibility of separate winding meant only a slight increase in the price of a custom transformer, this option was chosen as the most reliable, although in many designs this issue is often solved by a voltage doubler. The power supply consists of a 7905 fixed stabilizer, which is powered from an auxiliary rectifier.

Current limitation of the source

Current limiting is a possibility to solve in several ways in general. In the case of a proposed resource, the following options can be used

  • Use of adjustable current limit for switching stabilizer
  • Use of the shutdown function in a switched stabilizer
  • Linear Stabilizer Feedback Control
  • An external current limiting circuit downstream of the linear stabilizer output.

The first option would be the most reliable and least complex, but the switching stabilizer circuit (LT1074) has the ability to regulate current from about 1 A (given by the lowest possible DCL value of the circuit [15]. The second option cannot be used when a mere current limitation is required. The implementation of the fourth option is relatively simple and good features can be achieved, however, in terms of power dissipation, it is the least efficient option (the circuit practically behaves in a variable resistance on which power dissipation arises). The current limitation of the linear regulator itself is limited only by the design of the stabilizer and is fixed at a value of approximately 5 A.
The current limitation is solved by controlling the voltage of the linear stabilizer itself. A bipolar NPN transistor is connected between the ADJ pin of the LT1084 circuit and the negative potential. The wiring of this current limiting circuit is shown in Figure 4 below (the linear controller circuit is drawn in a simplified way).

drawing14

Figure 4 - Current limiting circuit and its connection to a linear regulator

Connecting the emitter of the transistor to a negative potential is necessary due to the limitation of the current from small current values, i.e. to achieve the possibility of a low (zero) output voltage. The base of the transistor is connected to the output of the operational amplifier, so the transistor is controlled by this OZ. To determine the value of the current through the load, the output of the circuit for measuring the current is used (the principle is described in more detail, among other things, in Chapter 2.11 below), which is also used for the current measurement itself. The op-amp works as a universal algebraic element with a transfer of 1 (provided by suitable resistor resistors R27,R29 – R31 = 30 kΩ). The operational amplifier must also have a negative power supply, due to the connection of the transistor emitter to a negative potential, otherwise the output voltage could not be limited to a value lower than 1.25 V). The non-inverting input IC9 (OZ) is supplied with a voltage directly proportional to the measured current (1.5· I) and a negative voltage obtained by a conventional diode (approximately 0.65 V). On the inverting one, the threshold voltage level set by the divider R27, R28 (R28 is a potentiometer). This connection has approximately the following function:

UOUT, OZ = [(- 0.65) + 1.5· IZ]NEINV-[UR_I]INV

where UOUT, OZ is the output voltage of the OZ that is applied at the base of the transistor, IZ is the current of the load and together with the coefficient of 1.5 forms the voltage applied to the non-inverting input and UR_I the voltage is applied to the inverting input, which is derived from the setting of the potentiometer to set the maximum current. The value of -0.65 is approximately the value of the voltage in V applied to the non-inverting input.
From the above equation it can be seen that for the current of the load 3 A on the non-inverting input it will be approximately 3.85 V, for the regulation by a transistor, the voltage for the full control range at the inverting input must be in the range of about 0 – 4.7 V, which is determined by the resistive divider R32-R_I. Negative voltage is included on the non-inverting input due to the limitation of the current of small values, when it would not be possible to achieve the output negative voltage OZ at these voltage values on the individual inputs . The D12 diode provides only a negative voltage at the OZ output.
The wiring was tested both in the form of a simulation and in the form of a physical prototype and showed the desired properties.
Figure 5 shows the dependence of the output current of the source on time, where the parameter is the value of the potentiometer for adjusting the current. Its resistance was varied in values: 4000 (corresponds to a maximum current of approximately 3 A), 3500, 3000, 2000, 1000, 500, 300, 400,
300, 200, 100, 50, 20, 10 Ω (current value close to zero). In this case, the power supply was loaded with a resistive load of 1 Ω. Figure 6 shows the maximum current depending on the potentiometer setting for the maximum output current. The values of the potentiometer setting are only approximate, in the simulation there was no voltage for the divider derived from the auxiliary stabilizer.

drawing15

Figure  5 - Simulation of current limitation circuit

 

drawing16

Figure 6 - Dependence of the maximum current on the setting of the potentiometer for current regulation

 

Voltage measurement

The voltage measurement circuit consists of an input divider to reduce the measured voltage in a suitable ratio and an optical isolation, which is the subject of a separate chapter. The output of the measurement circuit is then connected to the A/D converter of the microcontroller, whose reference voltage will be 5 V. Voltage measurement will be in the range of 0 - 30 V. The reference voltage is obtained from the input stabilizer. Of course, this option is not suitable, as the output voltage will not be fully stable (fluctuating consumption due to the power supply of the relay coil, accuracy of setting, etc.), but practical testing has shown that this option does not affect the accuracy of measurements at a given resolution.
With the help of a resistive divider, the measured voltage is reduced to the range of 0 - 4.5 V for the entire measured range. The value of 0.5 V serves as a certain reserve and prevents exceeding the reference voltage, which would result in an indication of an erroneous value. The divider is connected to the output of the linear regulator, downstream of the sensing resistor for current measurement. The conversion ratio of a resistive divider can be calculated as the ratio of the maximum voltage value measured by the A/D converter to the maximum output voltage of the source (30 V). Thus:

drawing13a

where p is the conversion ratio of the divider, Umer,max is the maximum considered voltage at the input of the A/D converter in V, and Uvyst,max is the maximum output voltage of the source in V.
The value with the required measuring range of 0 – 4.5 V and the output voltage of the source is 30 V and the value of p = 0.15.

The conversion ratio itself for a resistive divider can be calculated as:

drawing13b

where R25 and R26 are the individual resistance values of the resistors in the divider in Ω.
Now it is necessary to choose the values of resistors R25 and R26 so that they meet the given conversion ratio and at the same time that they are values from the available series (E24). The resistor values R25=680 kΩ and R26=120 kΩ correspond to this selection.
When the device is running and the temperature changes, the resistance values of the resistors used may change due to temperature dependence. This would result in a change in the conversion ratio of the divider and thus an erroneous measurement, as the value of the conversion ratio is stored as a constant in the program within the microcontroller. This problem can be solved by using resistors made of the same material, where both resistors will have the same temperature coefficient of resistances and when their resistance changes, the conversion ratio will still be maintained.
The voltage resolution of the A/D converter measurement can be calculated as

drawing13cwhere ΔU is the lowest distinguishable measurement step in V, UMAX is the maximum measured voltage in
V. For the 10-bit A/D converter used and the maximum measured voltage of 5 V, the theoretical lowest distinguishable step is 4.887 mV, i.e. approximately 5 mV.
The voltage measurement is not transferred directly to the A/D converter, but via an optocoupler with a linear conversion characteristic.

Current measurement

The LT6105 circuit is used for current measurement, described in more detail in chapter 2.3.3. The wiring of this circuit is shown in Figure 2.13. The R22 resistor is sensing and is used with a value of 20 mΩ. Resistors R21 and R23 were chosen with a value of 100 Ω, they are the input resistors of the differential amplifier. An output resistor R34 should be designed. It is expedient that the output voltage is proportional to the current flowing through it with a conversion constant of 1.5. Thus, for a maximum load current of 3 A, the measured voltage will be 4.5 V. And for a minimum resolution of 10 mA, the relevant voltage measurement range will have a range of 15 mV – 4.5 V. The A/D converter used is the same as for voltage measurement and the resolution is therefore 5 mV.

The resistance value of the output resistor can be calculated as:

drawing13d

After derivation and substitution, the output resistor value is 7.5 kΩ. The output voltage is again supplied to the A/D converter via a linear optocoupler. If the ratio of resistors R21, R23 (RIN) – R34 (ROUT) is inappropriately chosen, the output voltage will be non-linearly dependent on the measured current, which was found during the testing of the prototype.

drawing17

Figure 7 - Wiring a circuit for measuring current

drawing18

Figure 8 - Dependence of load current on current meter output voltage

Figure 8 – the green curve is a simulated dependence of the output voltage of the circuit for measuring current versus current through a sensing resistor. This dependence is covered by a theoretical dependence of 1.5· I, which is the desired progression. The dependencies mostly overlap and it can be concluded that the output voltage corresponds to the measured current in a given ratio and in the entire area of the measured current. At a current of I=0 A, the output voltage is given by an offset of approximately 296 μV.

 

Optical separation

Since the proposed power supply is designed as a two-channel power supply, it is required to be able to connect channels in order to obtain a symmetrical output of ±30 V against the ground, which must be separated between the individual channels. If the measured voltage was directly connected to the input of the A/D converter used, the ground would be connected. This problem is solved by using an isolation amplifier with optical separation. Optical isolation also protects the board with the auxiliary microcontroller in the case of high voltage at the output of the power supply and thus reduces damage, which is not the primary purpose in this application.
Optical separation is solved by the IL300 circuit . There is no problem with nonlinearity in the circuit itself (it is compensated by the operational amplifier). However, the problem in this case is the conversion constant, which is not the same for all manufactured circuits. The conversion constant referred to as K3 is in the range of approximately 0.5-1.5 for manufactured circuits. Circuits are available in several series, which reduces the variance of this constant, but when a circuit is delivered, there is no guarantee that circuits with the same constant will be delivered. The solution may lie in simply adapting the design to the supplied circuit, which is unnecessarily laborious when producing multiple samples. Another option is to use a trimmer, where each sample will be individually calibrated to achieve the targeted constant to which the design has been adapted. Probably the best option while maintaining this circuit seems to be automatic calibration, where a known voltage will be applied to the input of the circuit and this constant will be determined by measurement using A/D converters and subsequent calculation, and the microcontroller will then continue to work with it. In our case, the output resistance will be adjusted for the supplied circuit. Another method of galvanic isolation can be the use of an external A/D converter or a "power monitor" circuit and simple optical isolation (two-state).

The wiring with the IL300 circuit for isolation is shown in Figure 9, below. Resistor resistors R1, R8 can be proposed for from

drawing13e

where the constant K3 is defined by equation 2.1.
For the transmission of an optocoupler with K3 = 1, the resistors are identical. A value of 30 kΩ is satisfactory. With the overall design, the values will be adapted to the supplied circuit, which in this case can be afforded. Resistor R1 will be constant with a value of 30 kΩ, resistor R8 has a value of 37.4 kΩ for the IL300D circuit and 30 kΩ for the IL300G circuit. The value of the resistor R4 is selected according to the required maximum current by the diode. It is optimal to set the maximum current to 10 – 20 mA, which is ensured by the resistor R4 = 1 kΩ. The wiring for separating the current measuring circuit is identical.

drawing19

Figure 9 - Wiring the IL300 circuit to isolate the measured voltage

 

Microcontroller

The microcontroller used is ATmega644, which will be used to measure voltage, current, display these values on the LCD, control the relay for connecting the output terminals and switch on the fan when the measured temperature is exceeded by an analog temperature sensor. The microcontroller can be programmed via the SPI bus in an already finished device, which is used here by the Atmel Ice programmer.

Microcontroller Wiring

The basic connection with the microcontroller is shown in Figure 10. The circuit is powered by a 5V 7805 stabilizer (not drawn). The CON14 connector is used to connect to the ISP programmer. The crystal is selected with a frequency of 16 MHz together with the recommended capacitor value according to. Pins 31-32 are used to connect an external reference voltage, since this option is not used, it is recommended to ground the AREF input through a capacitor. The L2 and C37 components form a simple low-pass filter. Power through this filter is required to power the analog part of the microcontroller. The components were selected according to [24]. Pins 1-7 are connected by buttons and transistors for switching relays (not drawn for simplicity). Pins 40-36 are used to measure voltage, current and temperature. Pins 25-29 are used to connect an LCD display that uses 4-bit communication. Capacitors C42, C44, C46, C48 help to reduce interference at the input of the A/D converter.

drawing20

Figure 10 - Connecting the microcontroller to the circuit

 

LCD Imaging

The display is connected to the used MCU and is used to display the output voltage and current. A separate display will be used for each channel. It is a 16x2 display, i.e. a two-line display of sixteen characters per line. The display is equipped with a HD44780 controller (or equivalent), which simplifies communication with it. The basic connection with this display is shown in Figure 2.15, together with the microcontroller connection.
The R46-R47 divider is used to adjust the contrast, the R42 resistor is used to adjust the brightness of the display. The display uses four-bit communication (D4-D7), so D1-D3 are unused. The R/W control pin can definitely be written or read from the display. Only writing is used in the application and the control input is therefore at a potential of 0 V. The RS signal is used to distinguish data or instructions, the E signal is an enable signal that allows communication. The data wires and R/S signal of both displays are connected to the same port pins. The E signal is routed separately. At the beginning of the application, it is necessary to initialize both displays with the appropriate commands.
Figure 2.16 shows an example of an LCD display. The first line shows the voltage value with a resolution of one decimal place and information about the connection of the terminals (on/off). The second line then contains the current value with a resolution of two decimal places, the possible connection of the sources to achieve a symmetrical source is indicated by the text "1+2" on both LCDs.

Temperature sensing

Temperature sensing is handled by a simple analog temperature sensor LM35. Its output voltage is directly proportional to the sensed temperature. The maximum temperature must not exceed 150 °C. The recommended wiring of this circuit [25] for sensing temperatures greater than 2 °C is shown in Figure 11

drawing21

Figure 11 - Basic connection of the LM35 temperature sensor circuit

The circuit in the basic connection does not require any external components. At the same time, great accuracy is not required from the circuit, so it is not necessary to use special wiring with this circuit to increase accuracy. Accuracy is not critical in this application – it will only be switching the fan when a certain temperature inside the device is reached, or disconnecting the output terminals of the power supply. The resulting voltage will be applied to the A/D converter of the used MCU and further evaluated.

Relay and fan switching

The relays are used for disconnecting inputs, switching the power supply and switching on the fan. The appropriate relays are switched by an NPN transistor, which is switched by an MCU. To guarantee correct switching, a Darlington connection of two NPN transistors is used, which achieves a higher amplification factor and a lower base current. A diagram of one such switch is shown in Figure 12 on the right. The base resistor limits the current of the base. The value is chosen so that not a large current is drawn from the MCU pin, and at the same time the necessary current is achieved relative to the current through the collector. The D14 diode is a protective diode that prevents the transistor from breaking down when the coil is opened. LED1 together with its resistor is used to indicate the status of the appropriate output of the source, in the end the option to display the status on the LCD was chosen and these LEDs are not fitted. The transistor must be selected with respect to the resistance of the coil and the supply voltage (current through the coil at the time of switching).
The fan is switched by a HEXFET transistor, which is the so-called "logic level", i.e. the transistor can be switched at the logic level without another auxiliary transistor. The wiring is shown in Figure 2.18 on the left. The resistor R36 is used to limit the current when switching (parasitic capacitance) or in case of a transistor breakthrough, the resistor R35 defines the basic state of the transistor, especially when the microcontroller is switched on.

drawing22

Figure 12 - Switching fan (left) and relay (right) from the MCU

I must say that this is an excellent power supply, it has been built 18 times in our company. By making some changes it is possible to also increase its power and its automatic mechanisms. For more details do not hesitate to contact us

favicon bacd

+(39) 347 051 5328

Italy - Kazakhstan

09.00am to 18.00pm

About

We offer the best and economical solutions, backed by 27+ years of experience and international standards knowledge, echnological changes, and industrial systems.

Marketing Materials

Spring Renovation
Industry
US Gas Company
Construct
Plus Project
Vam Drilling Service
X Project
X Project
Cabrrus Training

Marketing Materials1

Spring Renovation
Industry
US Gas Company
Construct
Plus Project
Vam Drilling Service
ultrasonic sensor
ultrasonic sensor
Cabrrus Training