To get 5 V or 3.3 V from a 12 V supply you have two options: a linear regulator such as the 7805 or the AMS1117, which turns the extra voltage into heat, or a step-down (buck) converter, which switches at high frequency and wastes little.
Enter the input voltage, the output voltage and the current your circuit draws. The calculator shows the heat of each option, the efficiency, the input current and whether the linear regulator needs a heatsink.
How to use
- Enter the input voltage: 12 V from a car or a power adapter, 9 V from a battery, 24 V from a truck or a machine.
- Pick the output: 5 V for Arduino, USB and most modules; 3.3 V for ESP32, ESP8266 and Raspberry Pi Pico.
- Enter the current the circuit draws. If you don't know it: 100 mA is a small board, 500 mA a board with a few modules, 1 A or more a phone charger or an LED strip.
- Read the recommendation and compare the heat of the two options.
Why not use a voltage divider?
A voltage divider only gives the right voltage when almost no current flows. As soon as the circuit draws current, the output drops and changes with the load. To power anything, use a regulator: it holds the output steady whether the circuit draws 10 mA or 1 A.
Linear regulator or step-down?
A linear regulator wastes (Vin − Vout) × I. From 12 V to 5 V at 0.5 A that's 3.5 W, enough to burn a 7805 without a heatsink. A buck module (LM2596, MP1584) delivers the same 2.5 W losing about 0.3 W and stays cool.
Linear wins when the current is small or the voltage difference is low: it is cheaper, smaller and has no switching noise, which matters for audio and analog sensors. It needs some headroom: about 2 V for the 7805 and 1.3 V for the AMS1117.