LM317 variable power supply
Turn a 12 V adapter into an adjustable 1.25–10 V supply for your experiments.
Shop by category
Shop all componentsThe XL4015 module is a 5 A buck converter with two trim pots: one sets output voltage, the other sets a current limit (constant-current mode), and its built-in voltmeter shows the output. An INA219 in the output line adds a proper current and power reading on an OLED, so you can see how much a circuit draws. The INA219's 0.1 Ω shunt reads up to 3.2 A; for heavier loads trust the XL4015's limit and treat the meter as approximate.
The SMPS has mains terminals: keep it in a closed, earthed box and fit a fuse.
Buck modules get hot at high current: give them airflow.
Tick anything you already have and the total updates.
Follow the colours: red is power, dark grey is ground, blue is a signal.
24 V SMPS. Keep 2-3 V of headroom: maximum output is about 21 V.
bench_meter.inoVerify & upload in Electrolark#include <Wire.h>
#include <Adafruit_INA219.h>
#include <Adafruit_SSD1306.h>
Adafruit_INA219 ina;
Adafruit_SSD1306 oled(128, 64, &Wire, -1);
void setup() {
ina.begin(); // 32 V, 2 A range by default; good up to 3.2 A
oled.begin(SSD1306_SWITCHCAPVCC, 0x3C);
}
void loop() {
float v = ina.getBusVoltage_V() + ina.getShuntVoltage_mV() / 1000.0;
float a = ina.getCurrent_mA() / 1000.0;
oled.clearDisplay(); oled.setTextColor(WHITE); oled.setTextSize(2);
oled.setCursor(0, 0); oled.print(v, 2); oled.print(" V");
oled.setCursor(0, 22); oled.print(a, 3); oled.print(" A");
oled.setCursor(0, 44); oled.print(v * a, 2); oled.print(" W");
oled.display();
delay(250);
}
The buck needs about 2-3 V more input than output.
The INA219 must be in series with the load, not across it.
The CC limit is active; raise it with the CC pot if the load needs more.
Yes, once the current limit is set low; that protects both you and your circuits.
Yes, set CV to the full-charge voltage and CC to the charge current; use a proper charger for Li-ion packs.
Swap the INA219's shunt for a smaller one and set the calibration in code.
8 parts: XL4015 5A Buck Converter with Voltmeter, INA219 Current and Power Monitor Module, Generic Nano CH340 Development Board (Soldered), 0.96" OLED Display 128x64, Step-Down Converter to 5V USB / 5V 3A, Enclosed SMPS Power Supply, Solderless Breadboard and Dupont Jumper Wires (40 pcs). On this page you can tick the parts you already have and add only the rest to your cart.
No. This page has the complete, tested code (bench_meter.ino).
About ₹1,254 for the parts at the prices on this page. Quantity price breaks lower the cost when you build several.
How a buck converter's CV and CC pots work; High-side current measurement with an INA219; Building a safe bench supply.
Turn a 12 V adapter into an adjustable 1.25–10 V supply for your experiments.
Build your own USB power bank and learn how lithium charging works.
Free power for outdoor sensors: sunlight in, 5 V USB out.
Beeps when the mains goes off at night, so the fridge and the alarm clock do not quietly die.
Lessons are free to read. Maker (₹499/month) and Pro add quizzes, worked problems and certificates, paid with your Geekobot account. See plans
Learning project. Check every circuit and the datasheet of each part before you power it up.