Regulator efficiency study
Serial at 115200 baudTap a part to see what it does.
Tap the parts to see what each one does. A teaching simulation, not a circuit simulator.
Build it step by step
0 of 4 doneSet the buck output
With no load, turn the trimmer until the meter reads 5.0 V.
Add the load
About 50 mA, and keep tests short so resistors stay cool.
Measure input
INA219 in the 12 V line, read on the Uno.
Enter the output
Type the meter's volts and mA into the serial monitor.
How do you build a regulator efficiency study?
Power the same 5 V load from 12 V through a linear regulator path and through an LM2596 buck module, measure input and output with an INA219, and compare the wasted heat. You need Arduino Uno R3, INA219 Current Monitor, LM2596 Buck Module, AMS1117 Voltage Regulator, Resistor 220 Ω × 2, Digital multimeter and Breadboard 830 Tie Points. It takes 4 steps and about 50 minutes.
- Level
- Intermediate
- Time
- About 50 min
- Parts
- 7
Parts list
- Development BoardsBuyArduino Uno R3 × 1
- SensorsBuy
- PowerBuy
- PowerBuy3.3 V version, used for the 5 V to 3.3 V comparison
- PassivesBuyResistor 220 Ω × 2Load: two in parallel, 0.25 W each is too small at 5 V, so use for short tests only
- Tools & InstrumentsBuy
- PrototypingBuy
Tick what you already own. It saves to My Garage, so “Build with what I have” knows.
Wiring
| From | To | Why |
|---|---|---|
| 12 V adapter | INA219 VIN+ → VIN− → LM2596 IN+ | Measure input power |
| LM2596 OUT | Set to 5.0 V with the trimmer, then to the load | Output |
| Multimeter | Across the load | Output voltage |
| INA219 SDA / SCL | Uno A4 / A5 | Measuring |
Code
Library: Adafruit INA219. Linear efficiency ≈ Vout ÷ Vin, so 12 V to 5 V can never beat about 42 %. A buck converter usually reaches 75 to 90 %.
Runs on a virtual Arduino Uno in your browser, with sliders for the sensors. Happy with it? Verify and upload to your real board from the same page (Chrome or Edge on a computer).
#include <Adafruit_INA219.h>
Adafruit_INA219 ina;
void setup() { Serial.begin(115200); ina.begin(); Serial.println("Type the output volts and mA from the meter, e.g. 5.02 48"); }
void loop() {
float vin = ina.getBusVoltage_V(), iin = ina.getCurrent_mA();
float pin = vin * iin;
if (Serial.available()) {
float vout = Serial.parseFloat(), iout = Serial.parseFloat();
float pout = vout * iout;
Serial.print("in "); Serial.print(pin, 0); Serial.print(" mW, out "); Serial.print(pout, 0);
Serial.print(" mW, efficiency "); Serial.print(100 * pout / pin, 0); Serial.print(" %, heat "); Serial.print(pin - pout, 0); Serial.println(" mW");
}
delay(200);
}What the serial monitor should show
Open the serial monitor at the baud rate in the code. This is what our simulator prints for a virtual Arduino Uno with its sensors at their default values. Your numbers will follow your real readings, but the format should match.
Type the output volts and mA from the meter, e.g. 5.02 48
Test checklist
What you should see at each check. If a reading is far off, stop and use the troubleshooting list.
| Check | Expected |
|---|---|
| Buck 12 V to 5 V at 50 mA | Efficiency about 70 to 85 % |
| Linear 5 V to 3.3 V (AMS1117) | Efficiency close to 3.3 ÷ 5 = 66 % |
| Feel both after a minute | Linear regulator noticeably warmer at the same output power |
If it does not work
Buck output stuck at input voltage
Input too low for the set output, or the module is faulty.
INA219 reads 0
It must be in series, not across the supply.
Load resistors hot
Use a proper load or shorter tests: 5 V across 110 Ω is 0.23 W.
Still stuck? Find the fault step by step with your multimeter →
Common questions
What parts do I need for the regulator efficiency study?
Arduino Uno R3, INA219 Current Monitor, LM2596 Buck Module, AMS1117 Voltage Regulator, Resistor 220 Ω × 2, Digital multimeter and Breadboard 830 Tie Points. AMS1117 Voltage Regulator: 3.3 V version, used for the 5 V to 3.3 V comparison. Resistor 220 Ω × 2: Load: two in parallel, 0.25 W each is too small at 5 V, so use for short tests only.
How long does the regulator efficiency study take to build?
About 50 minutes for a intermediate maker, in 4 steps.
How do I know the regulator efficiency study works?
Buck 12 V to 5 V at 50 mA: Efficiency about 70 to 85 %. Linear 5 V to 3.3 V (AMS1117): Efficiency close to 3.3 ÷ 5 = 66 %. Feel both after a minute: Linear regulator noticeably warmer at the same output power.
Buck output stuck at input voltage: what should I check?
Input too low for the set output, or the module is faulty.
INA219 reads 0: what should I check?
It must be in series, not across the supply.
Load resistors hot: what should I check?
Use a proper load or shorter tests: 5 V across 110 Ω is 0.23 W.
