Next Article in Journal
CFD Calculations of Average Flow Parameters around the Rotor of a Savonius Wind Turbine
Previous Article in Journal
Global Temperature and Carbon Dioxide Nexus: Evidence from a Maximum Entropy Approach
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Low-Cost/High-Precision Smart Power Supply for Data Loggers

by
Marcio L. M. Amorim
1,
Gabriel Augusto Ginja
1,
João Paulo Carmo
1,
Melkzedekue Moraes Alcântara Moreira
2,
Adriano Almeida Goncalves Siqueira
2 and
Jose A. Afonso
3,4,*
1
Group of Metamaterials Microwaves and Optics (GMeta), Department of Electrical Engineering (SEL), University of São Paulo (USP), Avenida Trabalhador São-Carlense, Nr. 400, Parque Industrial Arnold Schimidt, São Carlos CEP 13566-590, SP, Brazil
2
Department of Mechancial Engineering (SEM), University of São Paulo (USP), Avenida Trabalhador São-Carlense, Nr. 400, Parque Industrial Arnold Schimidt, São Carlos CEP 13566-590, SP, Brazil
3
CMEMS-UMinho, University of Minho, 4800-058 Guimarães, Portugal
4
LABBELS—Associate Laboratory, Braga/Guimarães, Portugal
*
Author to whom correspondence should be addressed.
Energies 2023, 16(1), 278; https://doi.org/10.3390/en16010278
Submission received: 16 November 2022 / Revised: 16 December 2022 / Accepted: 23 December 2022 / Published: 27 December 2022

Abstract

:
This paper presents a low-cost/high-precision smart power supply for application on data loggers. The microprocessor unit is the brain of the system and manages the events and was optimized to provide electrical energy to the electronic devices under normal operation and under the presence of disruptive events. The measurements showed that when switching either from battery to AC or from AC to battery, neither caused the shutdown of the power supply nor affected the behavior of the power supply. The power supply was able to charge 80% of the battery on a fast recharge of 1 h and the remaining 20% on a slow recharge of 2 h. The current allocated to the battery did not affect the operation of the power supply. The tests also showed that the power supply was able to transmit relevant information about its operation to external computers through a serial connection. This information includes the voltages at the battery and at the output of the voltage regulators, the voltage level of the AC network, the level of the battery charge and if it was being recharged, the current being drained, the internal temperatures at two locations (one measured on the resistor that limits battery charge and another measured on the output diode of the regulators), and whether the cooling system is being used. The total cost of this smart power supply is less than $150, demonstrating good potential for its popularization.

1. Introduction

Power supplies are vital to any electronic device, and modern electronics require efficient power supplies [1]. They are present in almost every electro/electronic unit. They can be integrated into an electronic device, such as a microwave, which has all the components of the power supply inside the unit, or can be external, such as for notebooks and smartphones [2]. They can be part of external units for electric vehicles (EVs), or EV chargers [3,4], an they can be modulated, e.g., in a desktop computer power supply [5]. This type of power supply has a wide range of voltage outputs, can be remotely controlled, and its form factor allows it to be easily replaced [6,7]. A DC power supply’s primary function is to convert AC voltage into DC voltage, adjusting the DC voltage for a specific application [8]. The requirements of a power supply include providing stable voltage output, free of noise, providing sufficient current for the device demand, and working reliably under any condition [9,10].
An uninterrupted power supply (UPS) [11,12,13,14,15,16] is a device that can continuously provide energy in case of a power outage. They have their own power supplies inside and receive, adjust, and deliver AC output, but this energy is stored as DC through a battery module [6,17]. UPSs are divided into three groups: online, offline, and line-interactive [15,18]. The requirement for a UPS is to filter and store energy on a battery (or battery bank) and to provide quality AC output in case of a power outage, therefore keeping an uninterrupted power supply to its connected devices. Some UPSs dedicated to more sensitive applications, e.g., hospitals and data centers [16], use online UPSs, whereas less sensitive devices can use offline or line-interactive UPSs.
Data loggers are electronic devices based on digital processors that acquire and record data without human interaction. These devices are flexible and can work 24 h/day or during a simple experiment or an assay, whose data can be retrieved, processed, and further analyzed. These devices often require high-quality, reliable, and uninterruptible energy, because the acquired data and assays cannot be repeated. Thus, it is crucial to ensure their correct working.
In this context, this paper presents a solution to the following problem: we have a data logger that require a specialized power supply, and we could not find a commercial power supply that satisfied all the requirements necessary for its operation. The most promising commercial solutions available were a computer desktop power supply or a bench power supply. The computer power supply has all the output requirements in terms of the symmetrical outputs, 5 V and 3.3 V, a remote start and shutdown, and an internal cooling system. However, it does not have an internal UPS, the capability to stream data through a serial connection or a display to monitor its condition. The bench power supply is bulkier and very expensive because it requires four output channels, has a display to inform the status, and some units have external communication and active cooling, but it does not have a UPS as well, and we could not find an option for remote shutdown. Moreover, none of these power supplies use open hardware, and they are not easy to fix or have cheap replaceable parts, making them not ideal for the project, so we designed our own power supply.
The power supply presented in this paper is based on an open architecture made with low-cost off-the-shelf [5] hardware widely available in the market and with its body designed for printing in the large majority of 3D printers, e.g., on a do-it-yourself (DIY) base [19,20,21,22]. Moreover, this power supply may operate standalone with an easy swap format and with protection against power outages through its internal UPS. Its precision regulators provide DC outputs with support for a wide range of experiments, such as the acquisition of bio-signals that require bipolar symmetrical sources with voltages of ±12 V, support to digital systems and USB (Universal Serial Bus) with 5 V, and testbeds of devices working with 3.3 V. All the requirements to develop the power supply emphasize the need for a small profile that fits the designated area, a UPS system, and a battery management system (BMS) inside [23,24], as well as the need to switch between AC and DC lines without interruption [25].
This power supply was designed to be controlled by a microprocessor, which allows the power supply to inform disruptive events, such as the battery working with a low charge, the presence of the AC or DC voltage, excessive temperature, or emergency shutdown under extreme conditions, as well as the possibility of manual shutdown through a switch in the frontal panel or due to a logic request provided by an external microcontroller. The design also promotes the easy and fast replacement of components [26]. The power supply supports UART (Universal Asynchronous Receiver/Transmitter) serial communication to inform about disruptive events and to attend requests by demand to send the operational readings. This power supply is reprogrammable, allowing remote users to upload new firmware versions and make updates [27]. It also comprises a screen to indicate the informed status, such as the origin of the voltage, the battery level, the temperature, the amount of cooling, error messages, and alert and shutdown warnings. The BMS monitors the charge amount even when the source shutdowns, and the requirement to continue the charging after the shutdown persists. A sound alert is also provided to alert major events or errors. The power supply also features an on-demand active smart cooling to control the internal fans, keeping the lowest load consumption with the lowest temperature. Finally, the power supply contains protection and three quick-change fuses: The first fuse is placed in the general AC input for global disconnection from the energy network in the eventuality of a fault. The second fuse protects the secondary circuit between the AC and DC parts even if the main or the secondary board enters in short-circuit. The third fuse is placed directly on the battery output to avoid short-circuit and risks of explosion or fire.
This paper is structured into four more sections. Section 2 presents the methods and materials, showing how the power supply was designed, its functions and behavior. Section 3 describes how the power supply parts were printed, connected, and assembled. Section 4 presents the tests and results obtained from the power supply. Finally, Section 5 presents the conclusions regarding the developed system.

2. Methods and Materials

2.1. System Architecture Design

The block diagram in Figure 1 shows the entire process and the components of the power supply, from the input (left side) to the output (right side). The power supply is divided into three distinct circuits: input, processing, and output. Each circuit has its routines and sub-processes and will be explained next. The input circuit is divided into two, the AC input (line input) and the DC input (battery input).
Figure 2 shows the block diagram of the first circuit of the power supply, the AC input circuit. The AC input is provided by an ungrounded type 8 power cable and connector. The 1.8 m cable has a noise-suppressing ferret ring at the base of the connector. An input female connector has one wire connected directly to a terminal of the AC/DC converter; the other wire has in series a 250 V 3 A ON/ON switch and an externally threaded 5 × 20 mm 3 A glass fuse holder, also going to the AC/DC converter. The ON/OFF switch allows the AC/DC converter to be turned off completely. The fuse protects the circuit in case of short-circuiting or overloading.
Figure 3 shows the block diagram of the output of the AC/DC converter that is divided into two paths: the first is directed to the microcontroller unit (MCU) board and the second passes through two 50 W 6 Ω resistors in series. The resistor limits the current down to 2 A to the BMS. The BMS can charge 12 V lead-acid batteries up to 45 A. The battery embedded in the developed system is a 12 V/2.5 A lead-acid one. The BMS unit does not have a communication or logic level output to inform the battery voltage level or if the battery is being charged. However, it has a LED that lights up while the battery is charging and allows the BMS to be hacked through an analog pin connected to this LED, the microcontroller can check when the battery is being charged. If the battery is charging, the LED will light up. The BMS can supply the battery up to 9 A during the initial charge. This current must be limited to avoid overheating the DC 24 V during the charge of the battery, also providing current to the circuit, and therefore to the data logger.
The calculation for the threshold of the initial current in the battery is below the maximum provided by the AC/DC converter. It allows the circuit not to work under stress, prevents the entire set from overheating, and, at the same time, does not reduce the current of other connected devices while charging the battery. The current can be calculated based on Ohm’s law according to Equation (1):
I = V R t       I = V ( R 1 + R 2 )           I = 24   V 6 + 6           I = 2   A
where R t is the total resistance, the sum of R 1 and R 2 , with values in ohm, V is the power supply voltage, and I is the current.
The battery is connected in parallel between the BMS output and the MCU board. On the positive wire, there is a 2 A fuse to protect against a short circuit between the BMS or the MCU board and the battery. It protects the power supply and its components. This fuse is placed inside the power supply inside a fuse screw cap. The MCU board can control various operations through sensors installed along the circuit. Sensor A in Figure 3 is a voltage divider connected to the output of the DC converter and connected to an analog port of the microcontroller. When the power supply is connected to the AC network and the switch is placed in the ON position, the microcontroller detects the high logic level from 24 V and knows that the power supply is operating in AC mode. Sensor B in Figure 3 is another voltage divider connected to the battery output after the fuse. It measures the useful working voltage of the battery, which is from 12 V to 9 V (according to the lead-acid manual characteristics and discharge curve). This voltage is mapped by the microcontroller, which will report that the battery is between 100% (12 V or above that) and 0% (9 V) of charge. Sensor C in Figure 3 is a temperature sensor connected to one of the 50 W resistors and to an analog port of the microcontroller. It monitors the temperature of the resistor, allowing to cool down the power supply if needed. If the temperature reaches a value too high, the MCU can trigger an emergency shutdown. Sensor D in Figure 3 is a voltage divider connected to the positive side of the charger LED and the center of the voltage divider is connected to a logic pin on the microcontroller. It lets the MCU knows whether the battery has been charged when the LED is on.
The output circuit includes three DC-DC converters for the power supply output, power feedback for the MCU board, and the temperature sensor at the power supply output. The AC/DC converter and the battery are connected to the MCU board. This board selects one of the two DC inputs based on the presence or absence of the AC network, which is detected by sensor A in Figure 4. When the AC network is plugged in and the input switch is in the ON position, the AC/DC converter receives voltage and the MCU detects the AC mode.
The MCU board has two relays: one selects the appropriate input, and the other one works as an on-off switch to enable the output of voltage for DC-DC converters. If sensor A detects voltage, the relay switches the input to the AC/DC converter and disconnects the battery, which can be charged if needed. If sensor A does not detect voltage, it switches the relay to the battery; the relay can switch between the terminals in less than ten milliseconds. This speed with output capacitors allows the voltage flow to be imperceptible to the circuit, avoiding restarts or other problems caused by power failure. This switching is equivalent to an offline UPS. Once the input voltage is selected, the second relay drives the output to the regulators. The MCU board sends this voltage through a 3 A fuse installed on the back of the power supply to the bipolar symmetrical DC-DC converter (black block in Figure 4). This fuse protects the MCU board and the rest of the converters in case damage or short circuit. The bipolar symmetric DC-DC board has a buck-boost converter circuit that receives 24 V from AC/DC converter or 12 V from the battery and generates two outputs, +12 V and −12 V. The −12 V negative output returns to the MCU board, and the +12 V positive voltage branches into two segments: one also returns to the MCU board, whereas the other one powers two DC-DC bucks (the yellow ones in Figure 4, one that is 5 V with 3 A and the other that is 3.3 V with 3 A). The 5 V and 3.3 V outputs also are fed back into the MCU board. The bipolar symmetrical DC-DC circuit has a thermal sensor (E in Figure 4) externally coupled to a positive voltage output diode. The MCU monitors the module’s temperature, which, in addition to generating 12 V, also supplies voltage to the other two modules with 5 V and 3.3 V outputs. This sensor notifies the MCU to trigger the cooling system if necessary.
The processing circuit, shown in Figure 5, provides the discrete controls of the MCU board and auxiliary peripherals that are part of the power supply. The MCU board is controlled by an 8-bit microcontroller. It has 17 digital I/O pins and 6 analog inputs. In addition to controlling the main functions of the power supply, it also controls some discrete devices. It also has a logic-mechanical momentary ON/OFF switch. Unlike the input switch, it is responsible for turning on the power supply and putting it in operating mode. When the user presses the button, it triggers a small part of the circuit that turns on the microcontroller; once the microcontroller starts operating, it latches on via a digital pin that remains on; if that same button is pressed while the power supply is on, it starts the shutdown process, and puts the digital pin down, turning the power off completely. The digital pin uses a low-load relay, keeping the circuit active as long as necessary or until it is requested to turn off.
The MCU board can also display information through a 128 × 64 pixel OLED display, as shown in Figure 5. The screen displays the input source, battery percentage, internal temperature, cooling rate, overheat alerts, low battery, and shutdown request, among other warnings. The display is connected to the microprocessor board and uses the I2C (Inter-Integrated Circuit) communication protocol. The board also provides an audible warning through a buzzer, which matches the information on the screen. It can provide alerts about events, such as power ON and OFF, and critical alerts, such as high temperature and low battery.
The temperature sensors notify the microcontroller that, up to a predetermined temperature, called the Setpoint, it can keep the coolers in Figure 5 stationary or otherwise increase their speed from 25% up to 100% according to the temperature. The Setpoint temperature is predetermined in the code. The board is also equipped with an external UART communication port, with a 2 × 3-pin connector. It has two serial communication pins (RX and TX), a logic pin, a RST (reset) pin, GND, and 5 V, totaling six pins.

2.2. Firmware Design

The power supply operation starts when the ON/OFF switch or the logic button is pressed, as shown in Figure 6. Firstly, the MCU checks whether the power supply is ON or OFF. If the power supply is off, it displays a message for the user to hold down the power button for three seconds. If the user does not comply, the power supply shuts down again. Otherwise, the power supply starts the internal processing, triggers a beep, checks the temperature, and runs the cooler function according to the internal temperature. It also checks whether the power comes from the AC line or the battery. If it comes from the battery, it turns the relay 2, starts the power supply, checks the battery level, and displays the information on the screen. If the power is coming from the AC line, it enables relay 1 to switch to AC line, checks if the battery is charging, and displays the information on the screen. Once the power supply is running, other functions are started: the UART is initialized, the cooling and battery levels are constantly monitored, and the power supply can be shut down if the temperature becomes too high or the battery level becomes too low.
If the ON/OFF switch or logic button is pressed for three seconds when the power supply is ON, it enters the shutdown mode, displaying a warning and then entering in a pre-shutdown zone. In this zone, the firmware checks whether the battery is still changing. If the battery is not, it completes the shutdown, if it is charging, the MCU enables relay 3, disables relay 2, and enters a charging mode that checks if the battery is still charging and monitors the temperature, enabling the coolers if needed. If the battery charge is done charging or the ON/OFF input switch is disconnected, the power supply shuts down. Moreover, if the logical ON/OFF button is pressed while the power supply is in charging mode, it can turn back on.

3. Power Supply Fabrication

3.1. Electronic Assembly

The electronic assembly is separated the same way as described before for the system architecture in three parts: input, processing, and output. Figure 7 shows all parts assembled together. The wires used in the assembly were AWG (American Wire Gauge) 10 for AC line and power loads, AWG 13 for DC loads, and AWG 18 for discrete signals.
The Input circuit comprises a wall wart connector type 8 without ground (A), a switch model KDC11 250 V 3 A (B), two generic 5 × 20 chassis holders with a 3 A fuse for the input circuit and output circuit (C), a switching power converter model M5-60-24 24 V/3 A (D), two resistors model 50 W 6 J of 6 Ω and 50 W (E), a battery model EP12-2.2 12 V/2.3 Ah (K), and a BMS model DD30CRTA, 12 V/9 A (H).
The output circuit includes a bipolar symmetric switching converter model TPS54360 +12 V/3 Ah −12 V/3 Ah (G), a switching converter model LM2596 set to 5 V (I) and a switching converter model LM2596 set to 3.3 V (J).
The processing circuit comprises an MCU board that was developed for this project (F), whose content is described next, a momentary switch model E-switch R19A 250 V/3 A (L), an OLED display model GM009605 128 × 64 pixel I2C (M), a temperature sensor model TPM36 −40/+125 °C range and analog output (O), and a cooler model 075−5050 12 V, 2 wires (N).
Table 1 shows the hardware used in the power supply with the number of the parts, description, model, and costs sourced from Amazon [28], Digikey [29], Mouser [30], and Aliexpress [31]. The cheapest parts found are listed in this table.

3.2. MCU Board

The MCU PCB has dimensions of 50 × 70 mm with top and bottom layers, a standard thickness of 1.6 mm, and a 1 oz copper weight (28 g). Figure 8 shows the MCU board, which is the primary unit of the power supply. On the left side, the blue-borne model kf301 (A) is the input side; it receives the 24 V from the switching power supply, the 12 V from the battery, and fuse wires (L) from the back of the power supply. On the right side are the output power connectors model KF2EDGK (H). They connect power from the board to the data logger. A voltage divider (F) with 56 kΩ and 20 kΩ resistors is used to check whether the battery is charging. The components on the bottom of the figure are a diode model 1N5408 (B) connected to an external temperature sensor TMP36. There are two voltage dividers (J) for sensors. The top one is responsible for detecting whether the power supply is connected to AC or not, with 20 kΩ and 10 kΩ resistors. The bottom voltage divider detects the presence of the battery, with resistors of 16 kΩ and 10 kΩ. C is the MCU board main regulator, a model LDL50 5 V/1.5 A linear regulator responsible for powering the components on the MCU board. G is a buzzer model CYT1036, which is responsible for audible alerts related to emergency shutdowns. Two relays model JQC-3FF-S-Z (E) are responsible for selecting the origin of the main power, battery or regulator, and for enabling the output. N is the main header 0.100-inch standard that connects all external components. There are three types (10 × 1, 10 × 2 and 2 × 1). There are also two diodes to avoid recoil from the relays when they operate. On the center of the MCU board, K is the circuit for the relays, with a transistor model MMBT2222A-7-F, a diode BAT47, and a 1 kΩ resistor. D is the MCU, model ATMEGA328pb, an 8 bit microcontroller. M is the external oscillator for the MCU, composed of a 16 MHz crystal model FA-238 16.0000MB-C3 and two capacitors of 20 pF. The board also has decoupling capacitors (O) for the MCU board and a pull-up resistor for the MCU reset pin. The capacitor values are: 100 µF (1206), 10 µF (0402), and 0.1 µF (0402). A circuit to control the external fan (I), with a transistor BC317, and a 1 kΩ resistor was also implemented.
Table 2 lists the components used in the MCU board assorted by part numbers, device info, package, and costs. The prices were sourced from three different places: Digikey [29], Mouser [30], and Aliexpress [31]. The cheapest part found was added to this table.

3.3. Mechanical Project

The body of the power supply was made using CAD (Computer-Aided Design) software and printed using PLA (Polylactic Acid) on a 3D printer. The body was designed to be inserted into the data logger designated area. Figure 9 displays: (a) the front side of the data logger with the power supply inserted, (b) the power supply next to the data logger, (c) the back of the data logger with the power supply inserted, and (d) the representation of how the power supply can be removed from the data logger. The power supply had to fit the available area, which is 310 mm × 123 mm × 60 mm.
Figure 10 shows the power supply printed and assembled. A is the left side of the power supply that includes the external power and communication connectors (C). The power connector is the model KF2EDGK, whereas the communication connector is a 0.100-inch female connector placed between the power connectors, in a configuration of 3 × 2. D is a honeycomb pattern to allow air to flow in, and a secondary cooler model 075-5050 12 V, 2 wires. B shows the right side, which is the bigger body part of the power supply, where everything is attached from the inside, as shown in Figure 7. E is the backside of the power supply, which includes a primary cooler model 075-5050 12 V (F). G is another honeycomb pattern to allow the air to be ejected from the power supply, creating airflow. There are two fuses on this side (H): the bottom one is the input fuse to protect any damage between the AC line and the power supply, and the top one protects the MCU board and the DC inputs (battery or AC/DC converter). This side also has a type 8 AC input plug (J) and a mechanical switch model KDC11 250V 3 A (I). K is the front lid, a separate part that belongs to the front side of the power supply. L is the OLED display, M is the logical switch, and N is a screw terminal, so that the power supply can be attached to the data logger.
Table 3 shows the print time, the material used and the associated costs. Printing out the power supply body uses a total of 325 g of PLA filament and requires a total of 27 h and 15 min. Adding around 8 h to assemble the power supply results in a total of 35 h. The filament costs were $5.04, based on a $15 PLA spool, and the costs of power usage were not taken into account.

4. Experiment Results

4.1. Switching Time

This test analyzes the effect of the switching behavior between the AC line and the battery. The tests were grouped by load attached to the power supply, and three different loads were measured: no load, 1 A load, and 2 A load per output. Three tests of each were performed. The following factors were considered: the capability to switch from AC to DC and from DC to AC, the voltage drop along the current increment, the switching time, the voltage gap between switching, and the effects on the power supply working condition, e.g., freezing or switching off.
Figure 11 shows how the assay was made. A is the power supply that was tested, all the wires were connected to the end of the power supply. B is a Rigol electronic load, model DL3021A. This device has the data logger capability via USB (Universal Serial Bus), being connected to a computer that saves the data. C and D are generic electronic loads that can be set to a specific voltage or current and display the load behavior, but not log it. Therefore, to correctly measure all values, the electronic loads B, C, and D were rotated on every assay, so that the Rigol electronic load could measure and record one output at a time. The procedure was to connect the power supply to the AC line, start the recording for 30 s, then turn off the input switch, wait for 60 s, switch back online, and wait for another 30 s. For each test, this procedure was repeated three times per output.
Figure 12a shows the 12 V switching from the AC line to the battery with no load. There was no voltage difference between the voltage after switching, the switching time was around 10 ms, and the voltage drop during switching was <4%. Figure 12b shows the 12 V switching back to the AC line with no load, there was a voltage recovery of <1%, and the switching time was also ≤10 ms. Figure 12c shows the 5 V with no load switching from the AC to the battery. The graph shows no visible switching, and the voltage difference was <1%. Figure 12d shows the 5 V with no load switching back to AC, also with no visible switching and with voltage difference below 1%. Figure 12e shows the 3.3 V with no load switching from the AC to the battery. There was a voltage recovery after the switching < 1% and the switching time was ≤10 ms. The voltage drop during the switch was <1%. Figure 12f shows the 3.3 V switching back to AC, also with no visible switching and no visible voltage change.
Figure 13a shows the 12 V switching from the AC line to the battery with 1 A load; the voltage difference between sources went down ≤4% after switching, the switching time was around 10 ms, and the maximum voltage drop was ≤15% during switching. Figure 12b shows the 12 V switching back to the AC line with 1 A load. There was a voltage recovery < 15%, and the switching time was 10 ms. Figure 12c shows the 5 V switching from the AC line to the battery with 1 A load. The voltage difference between sources went down ≤1% after switching, the switching time was around 10 ms, and the maximum voltage drop was ≤1% during switching. Figure 12d shows the 5 V with 1 A switching back to AC, also with no visible switching and voltage difference below 1%. Figure 12e shows the 3.3 V with 1 A switching from AC to battery, the maximum voltage drop was ≤1% during switching, and the switching time was ≤10 ms. Figure 12f shows the 3.3 V with 1 A switching back to AC. There was a voltage recovery < 1% and the switching time was 10 ms.
Figure 14a shows the 12 V switching from the AC line to the battery with 2 A load- The voltage difference between sources went down ≤12% after switching, the switching time was around 10 ms and the maximum voltage drop was ≤30% during switching. Figure 14b shows the 12 V switching back to the AC line with a 2 A load. There was a voltage recovery < 20%, and the switching time was 10 ms. Figure 14c shows the 5 V switching from the AC line to the battery with 2 A load. The voltage difference between sources went down ≤1% after switching, the switching time was around 10 ms, and the maximum voltage drop was ≤1% during switching. Figure 14d shows the 5 V switching back to the AC line with a 2 A load. There was a voltage recovery < 1%, and the switching time was 10 ms. Figure 14e shows the 3.3 V with 2 A switching from AC to the battery. The maximum voltage drop was ≤1% during switching, the switching time was ≤10 ms, and the maximum voltage drop was ≤1% during switching. Figure 14f shows the 3.3 V with 2 A switching back to the AC. There was a voltage recovery < 1% and the switching time was 10 ms.
The tests demonstrate that regardless of the current consumption, up to 2 A, which is 66% of the maximum load of every circuit (all regulators are up to 3 A), there was no unexpected shutdown, energy cut-off, or voltage drop below 12%, thus keeping the functionally of the power supply within the requirement. The increase in the current more greatly affected the 12 V line running on battery, and this was expected since the battery also runs at 12 V or below.

4.2. Voltage Curve

A voltage curve test to evaluate the performance of the developed power supply was also performed. This test shows the voltage drop across three outputs as the current rises from 0 to 2 A, running on a battery or AC line. This test was performed with a current ladder with a 100 mA step increment.
Figure 15 shows how this assay was performed: A is the power supply to be tested, B is an electronic load running as a secondary tester, C is a Rigol electronic load model DL3021A programmed to create a ladder from 0 A to 2.5 A in increments of 0.1 A with 10 s steps, and D is a digital multimeter model DM3058E, with the capability of a data logger to connect to a computer via USB and save the data and records of the voltage drop across time. The procedure is to connect one output of the power supply at a time to an electronic load C, and in parallel to the multimeter D; the electronic load B force; the idle output to the same current as the one being measured. Once one measurement is made, the outputs rotate to record the other one.
Figure 16a shows the voltage drop on the 12 V line running on battery in purple and on the AC line in green, from zero to 2.5 A, with the target at 2 A, the voltage on the AC line between 0 and 2 A drops a total of 0.227 V, a <2% difference. When testing on the battery, between 0 to 2 A drops 2.4 V, or <20%. Figure 16b shows the voltage drop on the 5 V line running on the battery in purple and the AC line in green, from zero to 2.5 A with the target at 2 A. The voltage on the AC line or the battery has the same voltage drop across the test, dropping a total of 0.130 V, a <3% difference. Figure 16c shows the voltage drop on the 3.3 V line running on the battery in purple and the AC line in green, from zero to 2.5 A with the target at 2 A; the voltage on the AC line or the battery has the same voltage drop across the test, dropping a total of 0.150 V, a <6% difference.
The voltage drop across all tests shows that with the maximum current the output was down to 20% less, and the regulators can provide the desired current with minor voltage drop.

4.3. Current Profile

The current profile evaluation was also performed. This test checks the efficiency of the switching regulators compared to linear regulators operating on the battery or AC line. This test does a current ladder from 0 to 2 A with a 0.1-step increment and analyzes how much current is delivered compared to how much current the regulator is drawing. In this procedure, a Hall effect current meter was installed after the MCU board and before the regulators to measure the current value, at the output of the power supply, and to correlate these values.
Figure 17 shows the setup. The MCU board that outputs the AC line or battery (A) goes into a Hall effect current meter up to 5 A, model ACS712 (B). The MCU board can analyze and display the current used. It also can be seen on a display (D), which is the power supply OLED display with the current meter implemented and displayed in the first line on the right side of the figure. The regulator (C) that now receives the energy from (B, D, E) is the Rigol electronic load which conducts a manual ladder from 0 to 2 A with 0.1 steps. The procedure connects the output of the power supply to the electronic load, checks the current drawn from the electronic load, and compares it with the current dawned from the source. The current use for the power supply itself, required to run internal components, was taken into account. Moreover, the current meter does not measure the current applied to the battery if it is charging. The internal current used for the power supply was 130 mA in AC mode and 100 mA in battery mode. These values were subtracted from the measurements.
Figure 18a shows the efficiency curve between the DC/DC regulator output current related to a linear regulator, which is usually 1:1 or greater. The most efficient is 3.3 V output in purple running on AC mode 1.8:1 gain, delivering 2 A and pulling 1.1 A, and the worst is 12 V output on battery in red 1:1, delivering 2 A and pulling 2 A, and acting like a linear regulator. Figure 18b shows the same efficiency in percentage. The most efficient was the 3.3 V output on the battery, in purple, with 55% efficiency on average and the worst performance was 12 V on the battery in red, close to zero efficiency, behaving like a linear regulator and not like a switching due the same or lower voltage from the battery.
The regulators worked as expected. The DC/DC regulators performed much better than a linear regulator does. The 12 V running on the battery was within the expected range. The 1:1 ratio was predicted since the working condition of the battery is around 9.5 V most of the time. The percentage difference equation was:
P = ( V a l u e 1 V a l u e 2 V a l u e 1 ) · 100       P = ( I 1 I 2 I 1 ) · 100
where P is the gain percentage, I1 ( V a l u e 1 ) is the delivered current and I2 ( V a l u e 2 ) is the pulled current.

4.4. Battery Performance

The curve of battery discharge was also tested. This test evaluated how long the power supply can last operating in battery mode. The three outputs were recorded simultaneously using an Arduino Uno connected to a computer using USB and streaming via serial interface. The values of the three outputs were added to a constant load of 1 A.
Figure 19 shows the setup of the battery discharge test. A is the power supply to be tested, B is an electronic load connect to 5 V and set to 1 A, C is another electronic load connected to 3.3 V and set to 1 A, whereas D is the Arduino Uno for receiving the three voltages. The 12 V is connected to the Rigol electronic load (not in the figure) to record the data on the computer. The data were collected using a freeware application, CoolTerm.
Figure 20 shows the battery discharge curve over time. The regulator sources 12 V and stabilizes at 9.5 V after a couple of minutes and keeps constant until around 35 min. When the battery starts reaching its minimum threshold, the power supply shuts down. The 5 V and 3.3 V regulators remain constant the entire time, with a small drop around 0.4 V on both outputs until the battery reaches the threshold.
The amount of autonomous time was enough in case of a power outage, or the need for an outlet replacement. The internal UPS aims to keep the device running non-stop, and the estimate of 1 A was to determine an average time. Some low processing times with minor circuits attached to the data logger use less than 500 mA, giving much more battery time. The target voltage of the bipolar symmetric regulator for the data logger is 18 V ± 9 V or more, the regulator is 24 V providing ±12 V. We already expected a voltage drop on the output, due to battery voltage, or load on the outputs. In all the tests performed, the voltage was above the minimum required by 1V, being ideal for the data logger. If a specialized circuit requires zero voltage swing, it can use a voltage above from the power supply and use an internal precision regulator. For example, if a circuit in the data logger requires 3.8 V, it can use an internal regulator and power it with 5 V or 12 V from the power supply.

4.5. Charging Time

The battery charging was also measured. This test evaluated how much time the power supply needs to recharge the battery completely. Through this test, the user can know how long it going to last in case of an emergency. In this procedure, a multimeter with data logging capability was added to measure the current drawn from the AC line. All onboard components were disconnected, and the only thing pulling current was the BMS.
Figure 21 shows the assay setup for the battery charging time. A is the output for the regulator disconnected, B are the sensors and other peripheral systems disconnected, and C is the OLED and UART output disconnected.
Figure 22 shows the charging curve divided into two segments, with the fast-charging one pulling around 350 mA from the AC line, around 45 W, representing 80% of the charge during 60 min. The slow charging represents 20% of the charging, pulling around 140 mA from the AC line, close to 16 W, and lasting 120 min. The LED on the module turned completely off after the current reached below 100 mA, the whole charge took 3 h to complete.
The battery BMS performed most of the charging in one hour, around 80%. A full charging took 3 h, the maximum current was around 370 mA with 127 V, corresponding to around 47 W power that was limited with the two resistors in series, leaving enough current for the rest of the circuit operate.

4.6. Serial Communication

The UART communication in the context of the developed system was also tested. This setup checks whether the power supply runs its internal functions and streams the information to the data logger or any external device. The requirement is to stream data non-stop with the source of power (AC line or battery), battery level, current in use, the temperatures of Sensor 1 and Sensor 2, and the cooler system percentage. The procedure used was to connect the power supply to a UART-USB converter and record data using a computer and the CoolTerm application for at least 6 h.
Figure 23 shows the setup to record the data streaming. A is the UART output of the power supply, which has the pins TX, RX, RST, VCC, GND, and a logic pin that enables low for remote shutdown. B is a UART-USB converter that sends data to a computer; C is the CoolTerm user interface for recording data.
Figure 24 shows the data collected for 6h using CoolTerm. All requirements at the highlighted line show the moment at which the power supply was running on battery, where the current output was 102 mA, internal temperatures were 27 °C and 31 °C, and the cooler was off at that moment.
Results demonstrated that the data were collected and can be streamed via UART to an external device successfully. The format of streaming data may be changed to transmission via wireless or another method. At this moment, the power supply streams data non-stop, but this behavior can be changed for streaming on demand.

5. Conclusions

In this work, we developed a power supply that satisfies all the requirements defined at the start: fitting all parts and components inside and making a body able to fit inside the required area. We also manage to have all desired functions. The measurements showed that when switching either from battery to AC or from AC to battery, neither caused the shutdown of the power supply nor affected the behavior of the power supply.
The key findings of this study are:
  • The highest power drop after the maximum switching was 12% when operating at 12 V from AC to battery and providing 2 A to the load. The power drop during the switching was 30% and took 10 ms, not affecting the supply of energy. The remaining switching tests showed smaller drops and, in some cases, it was not possible to observe any voltage change during the switch.
  • In the measurements when selecting 12 V as the nominal output voltage and keeping the power supply connected to the AC grid, the drop in the output voltage was less than 1% for an output current increased up to 2 A. The drop was less than 20% for the same current variation provided only by the battery.
  • For the nominal voltages of 5 V and 3.3 V, the regulators presented an approximate drop of less than 3% both with the power provided only by the battery or by the AC network.
  • The behavioral test of the current profile shows the joint behavior between pulling and delivering current from the regulator. The most favorable case occurred for the nominal voltage of 3.3 V with the regulator pulling 1.1 mA and delivering 2 A. The most unfavorable case occurred for the nominal voltage of 12 V with the battery pulling 2 A and delivering 2 A.
  • The output voltage of the 12 V regulator dropped from 12 V to 9.5 V during a period of a few minutes and then it remained constant until the power supply was switched off.
  • The power supply was able to charge 80% of the battery on a fast recharge of 1 h, and the remaining 20% on a slow recharge of 2 h. The current allocated to the battery did not affect the operation of the power supply.
  • The power supply was able to serially transmit to external computers relevant information about its operation.
  • The relevant information includes the voltages at the battery and at the output of voltage regulators, the voltage level of the AC network, the level of the battery charge or if it was being recharged, the current being used, the internal temperatures at two locations (one measured on the resistor that limits battery charge and another measured on the output diode of the regulators), and whether the cooling system is being used.

Author Contributions

Conceptualization: M.L.M.A., J.P.C. and J.A.A.; methodology: M.L.M.A., G.A.G. and M.M.A.M.; validation: M.L.M.A., G.A.G. and M.M.A.M.; investigation and simulation: M.L.M.A., G.A.G. and M.M.A.M.; writing—original draft preparation: M.L.M.A. and J.P.C.; wrote and final editing: J.P.C., A.A.G.S. and J.A.A.; project administration: J.P.C., A.A.G.S. and J.A.A.; funding acquisition: J.P.C., A.A.G.S. and J.A.A. All authors have read and agreed to the published version of the manuscript.

Funding

This work was partially supported by FCT national funds, under the national support to R&D units grant, through the reference project UIDB/04436/2020 and UIDP/04436/2020. This research was also partially supported by the FAPESP agency (Fundação de Amparo à Pesquisa do Estado de São Paulo) through the project with the reference 2019/05248-7. Professor João Paulo Carmo was support by a PQ scholarship with the reference CNPq 304312/2020-7.

Data Availability Statement

Not applicable.

Acknowledgments

The authors would like to thank the Portuguese FCT (Fundação para a Ciência e Tecnologia) and the Brazilian Council for Scientific and Technological Development (CNPq) for financial support.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Daniel, K.; Kütt, L.; Iqbal, M.N.; Shabbir, N.; Rehman, A.U.; Shafiq, M.; Hamam, H. Current Harmonic Aggregation Cases for Contemporary Loads. Energies 2022, 15, 437. [Google Scholar] [CrossRef]
  2. Ross, D. Power struggle [power supplies for portable equipment]. IEE Rev. 2003, 49, 34–38. [Google Scholar] [CrossRef]
  3. Moghaddam, A.F.; Bossche, A.V.D. A Smart High-Voltage Cell Detecting and Equalizing Circuit for LiFePO4 Batteries in Electric Vehicles. Appl. Sci. 2019, 9, 5391. [Google Scholar] [CrossRef] [Green Version]
  4. Seyezhai, R.; Ammaiyappan, A.B.S.; Heera, N.; Keerthana, P.; Srinivasan, M. Simulation and hardware development of AC-DC power converter for Off- board charger of EV. Mater. Today Proc. 2022, 62, 1189–1196. [Google Scholar] [CrossRef]
  5. Perinov; Marzuki, A.; Wibisono, G.; Hudaya, C. Design of Single Input Multiple Output Full Bridges DC-DC Converters For Personal Computer Power Supply. In Proceedings of the IEEE International Conference on Innovative Research and Development (ICIRD), Jakarta, Indonesia, 28–30 June 2019. [Google Scholar]
  6. Aljafari, B.; Vasantharaj, S.; Indragandhi, V.; Vaibhav, R. Optimization of DC, AC, and Hybrid AC/DC Microgrid-Based IoT Systems: A Review. Energies 2022, 15, 6813. [Google Scholar] [CrossRef]
  7. Abuzed, S.; Foster, M.; Tsang, C.-W.; Stone, D. Repurposing ATX Power Supply for Battery Charging Applications. In Proceedings of the 8th IET International Conference on Power Electronics, Machines and Drives (PEMD 2016), Glasgow, UK, 19–21 April 2016. [Google Scholar] [CrossRef]
  8. Sedaghati, N.; Martinez-Garcia, H.; Cosp-Vilella, J. On modeling of linear-assisted DC-DC voltage regulators. In Proceedings of the 2016 Conference on Design of Circuits and Integrated Systems (DCIS), Granada, Spain, 23–25 November 2016; pp. 1–4. [Google Scholar] [CrossRef] [Green Version]
  9. Carniti, P.; Cassina, L.; Gotti, C.; Maino, M.; Pessina, G. A low noise and high precision linear power supply with thermal foldback protection. Rev. Sci. Instrum. 2016, 87, 054706. [Google Scholar] [CrossRef] [Green Version]
  10. Arvindan, A.; Sharma, V. Hysteresis-Band Current Control of a Four Quadrant AC-DC Converter giving IEEE 519 compliant performance at any Power Factor. In Proceedings of the 2006 International Conference on Power Electronic, Drives and Energy Systems, New Delhi, India, 12–15 December 2006; pp. 1–6. [Google Scholar] [CrossRef]
  11. Zhao, B.; Song, Q.; Liu, W.; Xiao, Y. Next-Generation Multi-Functional Modular Intelligent UPS System for Smart Grid. IEEE Trans. Ind. Electron. 2013, 60, 3602–3618. [Google Scholar] [CrossRef]
  12. He, G.; Zheng, S.; Dong, Y.; Li, G.; Zhang, W. Model Predictive Voltage Control of Uninterruptible Power Supply Based on Extended-State Observer. Energies 2022, 15, 5489. [Google Scholar] [CrossRef]
  13. He, G.; Zhao, L.; Dong, Y.; Li, G.; Zhang, W. A Novel VSG Control Strategy for UPS Voltage Source Inverter with Impulsive Load. Energies 2022, 15, 4702. [Google Scholar] [CrossRef]
  14. Gunawardane, K.; Subasinghage, K.; Kularatna, N. Efficiency enhanced linear DC-DC converter topology with integrated DC-UPS capability. In Proceedings of the 2018 IEEE International Conference on Industrial Technology (ICIT), Lyon, France, 20–22 February 2018; pp. 712–717. [Google Scholar] [CrossRef]
  15. Kumar, P.A.; Devi, V.S.K.; Kakani, S.K. Reliability Improvement of Uninterrupted Power Supplies. In Proceedings of the 2018 4th International Conference for Convergence in Technology (I2CT), Mangalore, India, 27–28 October 2018; pp. 1–7. [Google Scholar] [CrossRef]
  16. Karpati, A.; Zsigmond, G.; Vörös, M.; Lendvay, M. Uninterruptible Power Supplies (UPS) for data center. In Proceedings of the 2012 IEEE 10th Jubilee International Symposium on Intelligent Systems and Informatics, Subotica, Serbia, 20–22 September 2012; pp. 351–355. [Google Scholar] [CrossRef]
  17. Schmidt, S.; Clausen, J.; van der Auwera, R.; Klapp, O.; Schmerler, R.; Löffler, D.; Werner, M.J.; Block, L. Novel Battery Module Design for Increased Resource Efficiency. World Electr. Veh. J. 2022, 13, 177. [Google Scholar] [CrossRef]
  18. Karve, S. Three of a kind. IEE Rev. 2000, 46, 27–31. [Google Scholar] [CrossRef]
  19. Zima, A.; Duprat, S.; Frangi, J.-P. Framework of a New Low-Cost Multipurpose Building Operation Datalogger Measurement Network. In Proceedings of the 2016 IEEE Intl Conference on Computational Science and Engineering (CSE) and IEEE Intl Conference on Embedded and Ubiquitous Computing (EUC) and 15th Intl Symposium on Distributed Computing and Applications for Business Engineering (DCABES), Paris, France, 24–26 August 2016; pp. 677–680. [Google Scholar] [CrossRef]
  20. Yadav, A.; Sakle, N. Development of low-cost data logger system for capturing transmission parameters of two-wheeler using Arduino. Mater. Today Proc. 2022. [Google Scholar] [CrossRef]
  21. Silva, H.E.; Coelho, G.; Henriques, F. Climate monitoring in World Heritage List buildings with low-cost data loggers: The case of the Jerónimos Monastery in Lisbon (Portugal). J. Build. Eng. 2020, 28, 101029. [Google Scholar] [CrossRef]
  22. Pasquali, V.; D’Alessandro, G.; Gualtieri, R.; Leccese, F. A new data logger based on Raspberry-Pi for Arctic Notostraca locomotion investigations. Measurement 2017, 110, 249–256. [Google Scholar] [CrossRef]
  23. Pillai, P.; Sundaresan, S.; Kumar, P.; Pattipati, K.R.; Balasingam, B. Open-Circuit Voltage Models for Battery Management Systems: A Review. Energies 2022, 15, 6803. [Google Scholar] [CrossRef]
  24. Zhang, R.; Xia, B.; Li, B.; Cao, L.; Lai, Y.; Zheng, W.; Wang, H.; Wang, W.; Wang, M. A Study on the Open Circuit Voltage and State of Charge Characterization of High Capacity Lithium-Ion Battery Under Different Temperature. Energies 2018, 11, 2408. [Google Scholar] [CrossRef] [Green Version]
  25. Fotopoulou, M.; Rakopoulos, D.; Trigkas, D.; Stergiopoulos, F.; Blanas, O.; Voutetakis, S. State of the Art of Low and Medium Voltage Direct Current (DC) Microgrids. Energies 2021, 14, 5595. [Google Scholar] [CrossRef]
  26. Zhou, X.; Wang, Y.; Wang, L.; Liu, Y.-F.; Sen, P.C. A Soft-Switching Transformerless DC−DC Converter With Single-Input Bipolar Symmetric Outputs. IEEE Trans. Power Electron. 2021, 36, 8640–8646. [Google Scholar] [CrossRef]
  27. Blessington, T.P.; Murthy, B.B.; Ganesh, G.V.; Prasad, T.S.R. Optimal implementation of UART-SPI Interface in SoC. In Proceedings of the 2012 International Conference on Devices, Circuits and Systems (ICDCS), Coimbatore, India, 15–16 March 2012; pp. 673–677. [Google Scholar] [CrossRef]
  28. Amazon. Amazon.com: Online Shopping for Electronics, Apparel, Computers, Books, DVDs & More. [online] Amazon.com. 2021. Available online: https://www.amazon.com (accessed on 3 July 2022).
  29. www.digikey.com. (n.d.). DigiKey Electronics—Electronic Components Distributor. [online]. Available online: https://www.digikey.com (accessed on 3 July 2022).
  30. www.mouser.com. (n.d.). Electronic Components Distributor—Mouser Electronics. [online]. Available online: https://www.mouser.com/ (accessed on 3 July 2022).
  31. AliExpress—Online Shopping for Popular Electronics, Fashion, Home & Garden, Toys & Sports, Automobiles and More. Available online: best.aliexpress.com (accessed on 3 July 2022).
Figure 1. Block diagram of the internal circuits of the power supply.
Figure 1. Block diagram of the internal circuits of the power supply.
Energies 16 00278 g001
Figure 2. Block diagram of the AC input circuit.
Figure 2. Block diagram of the AC input circuit.
Energies 16 00278 g002
Figure 3. Block diagram of the DC input circuit.
Figure 3. Block diagram of the DC input circuit.
Energies 16 00278 g003
Figure 4. Block diagram of the output circuit.
Figure 4. Block diagram of the output circuit.
Energies 16 00278 g004
Figure 5. Block diagram of the processing circuit.
Figure 5. Block diagram of the processing circuit.
Energies 16 00278 g005
Figure 6. Block diagram of the firmware behavior.
Figure 6. Block diagram of the firmware behavior.
Energies 16 00278 g006
Figure 7. Electronics parts inside the power supply: A—Input connector type 8, B—ON/OFF switch, C—Fuse holder, D—AC/DC converter, E—50 W resistor, F—MCU board, G—Bipolar symmetric regulator, H—BMC, I—5 V regulator, K—9 V battery, J—3.3 V regulator, L—Logical switch, M—OLED display, N—Cooler, O—Temperature sensor.
Figure 7. Electronics parts inside the power supply: A—Input connector type 8, B—ON/OFF switch, C—Fuse holder, D—AC/DC converter, E—50 W resistor, F—MCU board, G—Bipolar symmetric regulator, H—BMC, I—5 V regulator, K—9 V battery, J—3.3 V regulator, L—Logical switch, M—OLED display, N—Cooler, O—Temperature sensor.
Energies 16 00278 g007
Figure 8. Top view of the MCU board: A—Input heads, B—Diode, C—Regulator, D—Microcontroller, E—Relay, F—Voltage divider, G—Buzzer, H—Output header, I—Transistor, J—Voltage dividers, K—Relay circuit, L—Fuse header, M—Oscillator Circuit, N—Diodes and header, O—Voltage divider and decoupling capacitors.
Figure 8. Top view of the MCU board: A—Input heads, B—Diode, C—Regulator, D—Microcontroller, E—Relay, F—Voltage divider, G—Buzzer, H—Output header, I—Transistor, J—Voltage dividers, K—Relay circuit, L—Fuse header, M—Oscillator Circuit, N—Diodes and header, O—Voltage divider and decoupling capacitors.
Energies 16 00278 g008
Figure 9. Mechanical project: (a) the power supply inserted in the data logger, (b) the power supply next to the data logger, (c) the backside of the data logger with the power supply inserted, and (d) the power supply removed from the data logger.
Figure 9. Mechanical project: (a) the power supply inserted in the data logger, (b) the power supply next to the data logger, (c) the backside of the data logger with the power supply inserted, and (d) the power supply removed from the data logger.
Energies 16 00278 g009
Figure 10. The assembled power supply: A—Left side of the power supply, B—Right side of the power supply, C—Power Connection area, D—Ventilation area, E—Back side of the power supply, F—Cooler, G—Ventilation area, H—Fuse holders, I—ON/OFF switch, J—AC input connector, K—Front side, L—OLED display, M—Logic switch, N—Attachment holes.
Figure 10. The assembled power supply: A—Left side of the power supply, B—Right side of the power supply, C—Power Connection area, D—Ventilation area, E—Back side of the power supply, F—Cooler, G—Ventilation area, H—Fuse holders, I—ON/OFF switch, J—AC input connector, K—Front side, L—OLED display, M—Logic switch, N—Attachment holes.
Energies 16 00278 g010
Figure 11. Power supply (A) and electronic loads (BD) used in the first test.
Figure 11. Power supply (A) and electronic loads (BD) used in the first test.
Energies 16 00278 g011
Figure 12. Graph showing all the switching between sources: (a) Switching between AC and battery on 12 V with 0 A, (b) Switching between battery and AC on 12 V with 0 A, (c) Switching between AC and battery on 5 V with 0 A, (d) Switching between battery and AC on 5 V with 0 A, (e) Switching between AC and battery on 3.3 V with 0 A, (f) Switching between battery and AC on 3.3 V with 0 A.
Figure 12. Graph showing all the switching between sources: (a) Switching between AC and battery on 12 V with 0 A, (b) Switching between battery and AC on 12 V with 0 A, (c) Switching between AC and battery on 5 V with 0 A, (d) Switching between battery and AC on 5 V with 0 A, (e) Switching between AC and battery on 3.3 V with 0 A, (f) Switching between battery and AC on 3.3 V with 0 A.
Energies 16 00278 g012
Figure 13. Graph of (a) Switching between AC and battery on 12 V with 1 A, (b) Switching between battery and AC on 12 V with 1 A, (c) Switching between AC and battery on 5 V with 1 A, (d) Switching between battery and AC on 5 V with 1 A, (e) Switching between AC and battery on 3.3 V with 1 A, (f) Switching between battery and AC on 3.3 V with 1 A.
Figure 13. Graph of (a) Switching between AC and battery on 12 V with 1 A, (b) Switching between battery and AC on 12 V with 1 A, (c) Switching between AC and battery on 5 V with 1 A, (d) Switching between battery and AC on 5 V with 1 A, (e) Switching between AC and battery on 3.3 V with 1 A, (f) Switching between battery and AC on 3.3 V with 1 A.
Energies 16 00278 g013aEnergies 16 00278 g013b
Figure 14. Graph of (a) Switching between AC and battery on 12 V with 2 A, (b) Switching between battery and AC on 12 V with 2 A, (c) Switching between AC and battery on 5 V with 2 A, (d) Switching between battery and AC on 5 V with 2 A, (e) Switching between AC and battery on 3.3 V with 2 A, (f) Switching between battery and AC on 3.3 V with 2 A.
Figure 14. Graph of (a) Switching between AC and battery on 12 V with 2 A, (b) Switching between battery and AC on 12 V with 2 A, (c) Switching between AC and battery on 5 V with 2 A, (d) Switching between battery and AC on 5 V with 2 A, (e) Switching between AC and battery on 3.3 V with 2 A, (f) Switching between battery and AC on 3.3 V with 2 A.
Energies 16 00278 g014aEnergies 16 00278 g014b
Figure 15. Voltage curve test setup used: A—Power supply, B and C—Electronic load, D—Multimeter.
Figure 15. Voltage curve test setup used: A—Power supply, B and C—Electronic load, D—Multimeter.
Energies 16 00278 g015
Figure 16. Voltage curve graphs: (a) Voltage vs. current—12 V, (b) Voltage vs. current—5 V, (c) Voltage vs. current—3.3 V.
Figure 16. Voltage curve graphs: (a) Voltage vs. current—12 V, (b) Voltage vs. current—5 V, (c) Voltage vs. current—3.3 V.
Energies 16 00278 g016
Figure 17. The setup to test the current profile: A—MCU board, B—Hall effect sensor, C—Bipolar symmetric regulator, D—Power supply, E—Electronic load.
Figure 17. The setup to test the current profile: A—MCU board, B—Hall effect sensor, C—Bipolar symmetric regulator, D—Power supply, E—Electronic load.
Energies 16 00278 g017
Figure 18. Graphs of (a) Current efficiency curve, (b) Current efficiency percentage.
Figure 18. Graphs of (a) Current efficiency curve, (b) Current efficiency percentage.
Energies 16 00278 g018
Figure 19. Voltage drop test: A—Power supply, B and C—Electronic load, D—Arduino Uno.
Figure 19. Voltage drop test: A—Power supply, B and C—Electronic load, D—Arduino Uno.
Energies 16 00278 g019
Figure 20. Graph of discharge curve running on battery mode.
Figure 20. Graph of discharge curve running on battery mode.
Energies 16 00278 g020
Figure 21. Battery charge test setup: A—Output of the regulator, B—sensor connectors and C—OLED and UART connectors.
Figure 21. Battery charge test setup: A—Output of the regulator, B—sensor connectors and C—OLED and UART connectors.
Energies 16 00278 g021
Figure 22. Graph of the battery charge time.
Figure 22. Graph of the battery charge time.
Energies 16 00278 g022
Figure 23. Serial Communication test setup: A—Power supply UART communication port, B—UART-USB converter, C—CoolTerm user interface.
Figure 23. Serial Communication test setup: A—Power supply UART communication port, B—UART-USB converter, C—CoolTerm user interface.
Energies 16 00278 g023
Figure 24. Recorded data from the power supply using CoolTerm.
Figure 24. Recorded data from the power supply using CoolTerm.
Energies 16 00278 g024
Table 1. Components of the power supply with item, model, characteristics, and costs.
Table 1. Components of the power supply with item, model, characteristics, and costs.
#ItemModelCharacteristicsCosts
1power cableType 81.8 m two poles$5.88
2input connectorType 8chassis mount$0.85
3ON/OFF switchKDC11250 V 3 A ON/ON$0.20
42 fuse holderGenericchassis mount$1.16
52 glass fuses5 × 20 mm3 A$0.20
6AC/DC converterM5-60-2424 V/3 A bivolt$10.99
72 resistors50W6J6 Ω 50 W metal dissipation$5.98
812 V batteryEP12-2.212 V 2.3 Ah lead-acid battery$19.00
9glass fuse5 × 20 mm2 A$0.10
10fuse holderGenericwire to wire$0.69
11temperature sensorTMP36−40 + 125 °C analog sensor$1.75
12DC-DC buck-boostTPS54360symmetric 3 A +12 V 3 A −12 V$14.36
132 DC-DC buckLM2596positive de 3 A 3.2 V at 40 V$3.60
14OLED displayGM009605OLED 128 × 64 pixel I2C$1.66
15BMSDD30CRTA12 Vup to 45 A/h charger$7.99
16load wires GenericAWG 10$6.00
17DC wires GenericAWG 13$5.00
18discrete wires GenericAWG 18$5.00
Total:$90.41
Table 2. Components for the MCU board, quantity, value, device name and price.
Table 2. Components for the MCU board, quantity, value, device name and price.
QtyValueDevicePackagePartsPrice
40.1 ufCAPACITOR-KIT-1VISHAY402C3, C9, C35, C40$0.20
1100 ufCAPACITOR-KIT-112061206C4$0.30
110 MRESISTORVISHAY402R14$0.05
610 kRESISTORVISHAY402R2, R7, R11, R12, R13, R15$0.30
116 kRESISTORVISHAY402R1$0.05
31 kRESISTORVISHAY402R3, R4, R5$0.15
21n5408DIODE-FRDIODE1.5AD3, D5$2.50
320 kRESISTORVISHAY402R6, R8, R10$0.15
220 pfCAPACITOR-KIT-1VISHAY402C41, C42$0.12
147 ufCAPACITOR-KIT-112061206C5$0.06
156 kRESISTORVISHAY402R9$0.05
1ATMEGA328PBATMEGA328PB-MUQFN50P500U2$1.76
5BAT46W-E3-08DIODE_1SOD-123SOD-123D1, D2, D4, D6, D8$2.00
1BuzzerCYT1036CYT1036SG2$0.69
1CrystalFA-238 16.0000MB-AG34-SMD@1CK1$0.86
2KF2EDGKAK500/3-HAK500/3-HX1, X3$1.10
1Kf301M02FBorne 2× FUSE$0.93
2Kf301M03Borne 3×JP9, JP14$1.06
1LDL50REGULATOR_
1117AMS117
SOT223REG1$0.68
1M10 × 1CONN_10”; 1 × 10”J20.1 inch spaced$0.88
1M2 × 1M02PTH1X02JP1$0.12
1M3 × 1M03LOCK1X03_LOCK7805$0.15
3NPN-BC337TRANSISTOR-NPN-BC337BC337Q3, Q4, Q5$1.00
2JQF-3FF-S-ZRELAY-PACKARELAY_
G5LE
K1, K2$1.16
1m10 × 2CONN_10X22X10J3$0.12
2mmbt2222a-7-fTRANSISTOR_
NPNMPSA42
SOT23-3Q1, Q2$0.28
1PCBMCU PCB50 × 70PCB$1.00
Total:$17.72
Table 3. Printable parts and respective printing times, material in grams and costs per part.
Table 3. Printable parts and respective printing times, material in grams and costs per part.
PartTimeMaterialCosts
Main (body)15:00 h200 g$3.00
Lid (main power supply lid)6:30 h80 g$1.20
Expand (area for external connection)2:00 h20 g$0.30
Expand holder (external connection area)0:30 h5 g$0.08
Front lid (frontal area with screen and button)0:35 h5 g$0.08
Bat holder (support to attach the battery)0:40 h10 g$0.15
Backside lid (hear part of the power supply)2:00 h15 g$0.23
Total:27:15 h325 g$5.04
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Amorim, M.L.M.; Ginja, G.A.; Carmo, J.P.; Moreira, M.M.A.; Siqueira, A.A.G.; Afonso, J.A. Low-Cost/High-Precision Smart Power Supply for Data Loggers. Energies 2023, 16, 278. https://doi.org/10.3390/en16010278

AMA Style

Amorim MLM, Ginja GA, Carmo JP, Moreira MMA, Siqueira AAG, Afonso JA. Low-Cost/High-Precision Smart Power Supply for Data Loggers. Energies. 2023; 16(1):278. https://doi.org/10.3390/en16010278

Chicago/Turabian Style

Amorim, Marcio L. M., Gabriel Augusto Ginja, João Paulo Carmo, Melkzedekue Moraes Alcântara Moreira, Adriano Almeida Goncalves Siqueira, and Jose A. Afonso. 2023. "Low-Cost/High-Precision Smart Power Supply for Data Loggers" Energies 16, no. 1: 278. https://doi.org/10.3390/en16010278

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop