Panel Cookies
Arduino based digital supply

Help me by sharing this post


←PREVIOUS TUTORIAL       NEXT PART→

See my last poroject on this link about another attempt that I had on digital power suplly. In that case, the TFT display made everything very slow so I had to use another type of display. In this case we use a simple LCD to print the values. The circuit is simple. We lower the voltage from 230V to around 26V AC, then we rectify it with a full bridge, then we use a buck converter to vary the output digitally.




PART 1 - Schematic

You have the schematic for this project below. You need the Arduino, the ADS1115 ADC module, the OLED display, the ACS712 current module, the TP4056 based charger and a few more components. You have all the values below. After you make the connections, you can downlaod the code and upload it to the Arduino and give it a test.

We need:
1 x Arduino NANO/UNO: LINK eBay
1 x MAX471 sensor: LINK eBay
1 x Buck/boost converter: LINK eBay
1 x i2c 20x4 LCD screen: LINK eBay
2 x 10 turn potentiometer: LINK eBay
2 x toggle switch: LINK eBay
1 x 220V - 26V transformer: LINK eBay
1 x full bridge rectifier: LINK eBay
1 x BD139 NPN: LINK eBay
1 x IRFZ44N n-Mosfet: LINK eBay
1 x 1N4001 diode: LINK eBay
1 x 100uH coil: LINK eBay
1 x 220uF capacitor: LINK eBay
1 x 220uF capacitor: LINK eBay
1 x banana terminal pair: LINK eBay
2 x 22mm bearing: LINK eBay
2 x 3D printed knob suport: LINK eBay
RESISTORS: 1x1K, 3x10K, 1x20K: LINK eBay
wire, solder, soldering-iron, 3D case, etc

Arduino digital supply schematic circuit homemade




PART 2 - The PCB

We start with the transformer connected to the full rectifier. Once we haev 28V DC, we connect that to the 5V buck converter but also to the input of the buck converter circuit. The 5V converter will supply the digital part, Arduino and LCD. Before you add the Arduino, make sure you set the buck converter module to exactly 5V and glue the potentiometer so it will always stay at that voltge. To control the current amount, we use the MAX 471 sensor at the output. To control the voltage, we use the voltage divider and read that with one of the Arduino analog inputs. The buck converter circuit will change the output value corresponding with the set value on the screen. We connect the LCD and potentiometer using wires later.


homemade power supply PCB





PART 3 - Lower voltage and rectify

We swtart by reducing the voltage. Here in Spain the main voltage is of 230V. We use a transformer to lower that voltage to 26V. But this is still AC voltage and we nee DC. For that, we need a FULL BRIDGE RECTIFER and we get only the positive side of the AC signal. But, if we place a big capacitor at the output we can smooth those peaks and get steady DC volage.


voltage rectify gif tutorial

Above you can see how the signal is rectified. But the signal is still AC but only with the positive side. That's why we add a capacitor at the output and get steady DC. Below you can see my Transformer, the rectifier and a big capacitor. Make sure the voltage of the capacitor is big enough. In my case it is a 50V capacitor and the trasnsformer output is 26V- 28V.


homemade voltage rectifier





PART 4 - Buck converter circuit

Ok, now we have our main 28V DC supply and the small buck converter module give us 5V for the Arduino and the LCD screen. Now we need to vary the output voltage. We do that with another buck converter circuit, but this one is controlled by the Arduino with a PWM signal. See my tutorial on buck converters here on this video.
As you can see on the schematic, on the output of the buck converter circuit, there is a voltage divider. That will lwoer thge value fromk a maximum of 15V in this case, to under 5V so the Arduino analog input could read that. That is our feedback for voltage.


Arduino power supply tutorial

At the same tiem we have the current sensor at the outpiut and that is our feedback for current values. With this two feedbacks we can create out PID code and control a PWM signal applied to the MOSFET of the buck converter circuit and by that, control the output voltage. We set a value on the screen for voltage and current. If the output is higher, we change the PWM signal till the voltage is the same and we do the same for current.


Arduino pwm buck converter supply



←PREVIOUS TUTORIAL       NEXT PART→

Help me by sharing this post












yt_link
insta_link
fb_link
twitter_link

Digital supply
page 1/2



ADVERTISERS



PCBWAY PCB service





Curso Arduino Online nivel bajo