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 LM7805 is the classic linear regulator: it turns 7-35 V into a steady 5 V by burning off the extra voltage as heat. Power lost = (input voltage - 5 V) x current. With 12 V in and a Nano drawing about 40 mA, that is (12 - 5) x 0.04 = 0.28 W, which the module's heatsink handles easily. This project powers a Nano and DHT22 from a 12 V adapter (or a 12 V battery) and prints readings every 10 seconds, and the troubleshooting shows when a buck converter is the better choice.
Fuse any lead taken from a car or lead-acid battery; they can deliver huge currents.
Tick anything you already have and the total updates.
Follow the colours: red is power, dark grey is ground, blue is a signal.
12 V adapter or battery into the LM7805.
logger.inoVerify & upload in Electrolark#include <DHT.h>
DHT dht(2, DHT22);
void setup() {
Serial.begin(9600);
dht.begin();
}
void loop() {
float t = dht.readTemperature(), h = dht.readHumidity();
if (!isnan(t)) {
Serial.print(millis() / 1000); Serial.print(" s, ");
Serial.print(t, 1); Serial.print(" C, "); Serial.print(h, 0); Serial.println(" %");
}
delay(10000);
}
The load is too big or the input too high; at 12 V and 500 mA it burns 3.5 W, so use a buck converter.
The input dips below about 7 V; the LM7805 needs at least 2 V more than its output.
Check the input polarity and that the module's input capacitor is fitted.
Bucks waste less power, but linear regulators are simple, cheap and have no switching noise.
Not well; servos draw too much current for comfortable heat. Use a buck module.
A car battery can swing to 14.4 V while charging; the LM7805 handles it, but fuse the battery lead.
6 parts: LM7805 5V Regulator Module with Heatsink, Generic Nano CH340 Development Board (Soldered), DHT22 AM2302 Digital Temperature & Humidity Sensor, DC Power Adapter (5.5x2.1mm), 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.
It is a beginner project and takes about 1 hour. The build on this page has 6 steps.
No. This page has the complete, tested code (logger.ino).
About ₹728 for the parts at the prices on this page. Quantity price breaks lower the cost when you build several.
How linear regulators work; Working out regulator heat; When to choose a buck converter instead.
Fuse any lead taken from a car or lead-acid battery; they can deliver huge currents.
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.