I have seen many tutorials and blogs of people setting up their PI 2 in their vehicles for media systems etc.

I would actually like to attempt the following however I am unsure how to power the pi. I am aware that I can power it using a usb cigarette charger however I am looking to mount a device in my dash and rather the idea of tapping into a line that is always powered by the battery. Since the PI 2 is 5v 1.8 Amps Im interested in knowing methods others have applied to power their pi from their vehicle's battery.

  • Your question is slightly unclear. Are you asking about how you should get power to the Pi, or how you should manage the power?
    – Jacobm001
    Commented May 2, 2016 at 23:33
  • @Jacobm001 How I should get the power it needs to it
    – Grace
    Commented May 3, 2016 at 0:12
  • 1
    Just disassemble a good standard 2.1amp USB cigarette charger and place all in a sturdy plastic box (sealed lunch boxes are great). On the 12v use a 1 amp fuse in a fuse holder.
    – fcm
    Commented May 3, 2016 at 2:56
  • Be aware that, say, even a 5W power drain can eventually discharge a Car Battery if it continues when the vehicle is not in use and the vehicle is standing unused for a few days. To avoid this you may wish to include a relay driven circuit that is switched ON by the "ignition" and then signals the RPi when the ignition is switched off, but remains operating until the RPi wants to switch the system OFF with a GPIO line that it changes when/as it shuts-down (with a short delay in the circuit, say 5-30 seconds...)
    – SlySven
    Commented May 3, 2016 at 23:59
  • An 'extend time-before-switch-off' will also be useful when you are sat in the car with the kids, waiting for your SO to come back to the car, and you want to keep them entertained...!
    – SlySven
    Commented May 4, 2016 at 0:00

2 Answers 2


You need to step-down the 12V (or, more realistically a bit over 14V) down to 5V. For this you have to use either a linear regulator (simplest and cheapest solution - just one IC - LM7805T, one resistor and one transistor, keep in mind you will be wasting loads of energy through heat, up to two thirds of the energy the whole setup draws from battery, to be more exact) or a switchmode regulator, there are many modules available, most of them are just one eBay search away (keywords: step-down regulator).

Also keep in mind that the Pi will continuously draw current, and that might lead to discharging the battery to the point where you might not be able to start your engine.

Of course, do not forget about adding a fuse between your battery and the regulator, you don't want to start a vehicle fire in case something fails and short-circuits.

  • 1
    The 5V linear regulator does not apply here — unless boosted with a power transistor to source the additional current. A switch mode step-down converter is highly preferred indeed. Note that cars generally provide two distinct 12V power sources: one permanent, one active after the engine has started (more exactly: as soon as the key turns the engine on). So a smart DC-DC converter that absorbs spikes (up to 40V normally) is the deal .
    – user29510
    Commented Aug 1, 2016 at 11:00
  • @Nasha, you are definitely right. I updated my answer. And as for spikes, a reasonably sized filter capacitor will do the job, also keep in mind that OP wants to power the Pi from the battery, which has quite low ESR and will 'eat up' most of the spikes.
    – Jakub
    Commented Aug 1, 2016 at 11:29
  • 2
    If the Pi is supposed to run while the engine is on (which the OP didn't mention) there will be spikes and they can be as big as 80 or 120V. Usually they're clipped around 40V but that's not guaranteed. The length of power cables is most of what induces those spikes and if the electronics is supposed to run in an automotive environment, capacitors will only store the energy and release it later on, which can have catastrophic consequences. Better clamp spikes using hi-current TVS diodes.
    – user29510
    Commented Aug 1, 2016 at 11:41

There are many modules which can be used. I recommend a switch mode power supply. UBEC are one such (designed for RC models) but there are cheaper alternatives.

One word of warning. Motor vehicles are a hostile operating environment. Unless the Pi is to be totally isolated you need to take precautions to prevent voltage spikes and interference.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.