After designing two power supplies - the first of which was not entirely successful and the second of which proved to be of little use - I decided to design a third. This is because, as it turned out, in my practice there is no need for current limitation, especially as in the previous variants it did not work fast enough to effectively protect the connected devices. Instead, it was much more important to constantly monitor the power consumed.
The new variant of the power supply has a more classic design and is based on the popular LM317 stabiliser, allowing voltage adjustment via a potentiometer from 1.5 to 15 V. The output voltage is measured by the Arduino microcontroller on the analogue A2 pin. As the upper voltage limit (15 V) significantly exceeds the maximum voltage allowed on the Arduino analogue inputs, a suitable voltage divider was used.
Current monitoring is implemented using an Arduino Pro Mini microcontroller and a 1602 LCD display. The monitoring scheme incorporates an operational amplifier type LM358, which magnifies the voltage across resistor R8 with a resistance of 0.22 ohms, resulting in current flowing through it when a load is connected.
The use of an operational amplifier is necessary because the voltage drop across the 0.22 ohm resistor at a current of about 1 A is only about 0.22 V, according to the relation U=I⋅R.
Such a value is too low to be accurately measured by the analogue input of the Arduino microcontroller.
The LM358 amplifier was configured as a non-inverting amplifier. Using resistors R10 = 21 kΩ and R9 = 1 kΩ, a voltage gain close to 20 was achieved. At a current of 1 A, the amplifier's output therefore shows a voltage of around 4.2 V, which can be safely measured via the Arduino's analogue input (pin A1 in my case). The measured values are then presented on the LCD display.
Based on the measured output voltage of the power supply and the rolling current, the power consumed can be easily calculated. The microcontroller software takes this function into account
I needed this power supply quite urgently, so I did not order a dedicated PCB, but made the schematic on a mock-up board with 30x50 mm measurements. On the board I placed rectifiers, rectifier capacitors, stabilisers, a high-power (5 W) resistor, an operational amplifier and a voltage divider. I placed the Arduino Pro Mini board on the display. For the power supply of the measurement system, I used a separate rectifier and a popular 7805-type voltage stabiliser. For the regulated stabiliser, I added a cooler (coming from an Akai VCR, previously used together with a transformer).
This time I did not use a makeshift housing made of sewer pipes. I made the enclosure out of sheet steel approximately 0.7 mm thick. Making the rectangular hole for the display and bending the sheet metal can be a potential problem, but these elements can be outsourced to factories specialising in sheet metal work. The dimensions of the housing are 90 × 100 × 150 mm. The front panel contains the display, the potentiometer knob and the connector for the receivers. The structure came out quite solid.
The Arduino sketch code is included below and can be freely modified to suit individual needs. It would be worth considering adding an audible indication when preset power or current thresholds are exceeded.
The new variant of the power supply has a more classic design and is based on the popular LM317 stabiliser, allowing voltage adjustment via a potentiometer from 1.5 to 15 V. The output voltage is measured by the Arduino microcontroller on the analogue A2 pin. As the upper voltage limit (15 V) significantly exceeds the maximum voltage allowed on the Arduino analogue inputs, a suitable voltage divider was used.
Current monitoring is implemented using an Arduino Pro Mini microcontroller and a 1602 LCD display. The monitoring scheme incorporates an operational amplifier type LM358, which magnifies the voltage across resistor R8 with a resistance of 0.22 ohms, resulting in current flowing through it when a load is connected.
The use of an operational amplifier is necessary because the voltage drop across the 0.22 ohm resistor at a current of about 1 A is only about 0.22 V, according to the relation U=I⋅R.
Such a value is too low to be accurately measured by the analogue input of the Arduino microcontroller.
The LM358 amplifier was configured as a non-inverting amplifier. Using resistors R10 = 21 kΩ and R9 = 1 kΩ, a voltage gain close to 20 was achieved. At a current of 1 A, the amplifier's output therefore shows a voltage of around 4.2 V, which can be safely measured via the Arduino's analogue input (pin A1 in my case). The measured values are then presented on the LCD display.
Based on the measured output voltage of the power supply and the rolling current, the power consumed can be easily calculated. The microcontroller software takes this function into account
I needed this power supply quite urgently, so I did not order a dedicated PCB, but made the schematic on a mock-up board with 30x50 mm measurements. On the board I placed rectifiers, rectifier capacitors, stabilisers, a high-power (5 W) resistor, an operational amplifier and a voltage divider. I placed the Arduino Pro Mini board on the display. For the power supply of the measurement system, I used a separate rectifier and a popular 7805-type voltage stabiliser. For the regulated stabiliser, I added a cooler (coming from an Akai VCR, previously used together with a transformer).
This time I did not use a makeshift housing made of sewer pipes. I made the enclosure out of sheet steel approximately 0.7 mm thick. Making the rectangular hole for the display and bending the sheet metal can be a potential problem, but these elements can be outsourced to factories specialising in sheet metal work. The dimensions of the housing are 90 × 100 × 150 mm. The front panel contains the display, the potentiometer knob and the connector for the receivers. The structure came out quite solid.
The Arduino sketch code is included below and can be freely modified to suit individual needs. It would be worth considering adding an audible indication when preset power or current thresholds are exceeded.
Cool? Ranking DIY