What is the cheapest and best method to convert 12v(14)<->5V(3.3)? Need to connect Arduino to a car.

I need logical shifter not buck converter to connect Arduino to car 12v circuit. I would like to control electrical equipment of car by Arduino. For example, I want to connect input pin to heater, when heater is on from 12v circuit I get HIGH 12v signal which processes by Arduino, but like everyone knows, Arduino can handle only 5/3.3V. Then Arduino going to change state of equipment by connecting optocoupler/relay/transistor to button(of elect. equip.) and will act like physical press. P.P.S I know that more clever to hack and control by CAN bus. But not all eq. are connected to CAN bus and it`s a little bit risky but I'm working on it as well. I'm looking for best low cost solution. I have found it on ebay . Will it work like I want? Offer DIY solutions as well.

  • 1
    You're asking for an oxymoron there - "cheapest and best"? You can have the cheapest or you can have the best - which do you want? You can't have both. I think you mean "which is the best low-cost method"
    – Majenko
    Commented Jan 23, 2016 at 11:49
  • 3
    And what in the car are you trying to connect to? To do what?
    – Majenko
    Commented Jan 23, 2016 at 11:50
  • @Majenko, or something cost effective. Though, in this case it either works, or not. So any working low-cost method will do? But, this is more of a shopping question in this state. I believe anyone could/should make the call for himself when buying something. Your second point is spot on.
    – aaa
    Commented Jan 23, 2016 at 11:53
  • 3
    Use a car phone-charger. Especially if you plan to use it in a car, as the voltage in a car can fluctuate, and have huge spikes.
    – Gerben
    Commented Jan 23, 2016 at 15:59
  • It would help us to know if your goal is to power the Arduino or to condition signals from the car so that they can be read by the Arduino. Since you're asking about a "logic level converter" I'm assuming it is the later. This could be a good question, please come back and clarify / add more information.
    – dlu
    Commented Jan 24, 2016 at 19:49

5 Answers 5


Ok, so... I can see your question is a bit obscure, so I'll try to cover a generic approach.

  1. Power If you need to power the arduino, you can get a cheap car USB adapter. If you want a "solderable" solution, I'd avoid linear regulators (such as a 7805)and go with a cheap switching module. For low power applications I usually buy some modules called mini360 (for instance here is a link from aliexpress) which are cheap and ok for even some hundreds of milliamps. You FIRST turn the potentiometer to set the output voltage (checking with a multimeter) and THEN connect the arduino to it.

  2. Get status If you need to get the status of something (e.g. whether the lamp is on or off) you have to analyse the circuit. If you have to detect if either 12V or GND are applied, you can solve the problem with a voltage divider. But if the lamp is always connected to 12V and then the GND side is he controlled one then you will always force a (small) current inside it. If this is the case, maybe an optocoupler is the best solution. If the signal is a PWM maybe you need some filtering, if it is a digital wire maybe it is already at the correct voltage, .... You have to figure out what is the best solution for you

  3. Set status If you need to control something (e.g. turn on a light) your best bet is to use a 5V relay. There are plenty of them, even modules with the transistor and diode necessary to control them with an arduino.

Here are some ideas and rough schematics for the three points


simulate this circuit – Schematic created using CircuitLab

Just one very big WARNING: you have to carefully double check that the modification does not blow something up (for instance, you can make a short circuit if the body computer tryes to force a wire to 12V and you close the relay to ground). So... Be very careful, since what you do can break a lot of things, and if you are very lucky the bill can be only some couple of thousand dollars (I'll let you figure out what happens if you are not lucky enough)

  • And... only after spending a lot of time I noticed that this question was from 2 years ago, and the reason why the question popped up is just because the OP did not accept an answer...
    – frarugi87
    Commented Mar 15, 2018 at 10:43

Use LM7805 linear voltage regulator to regulate to 5 v , it's all about 2-4$, you need LM chip and 2 capacitors, that's all :) and if you need 3.3 just search for linear voltage regulator

  • 2
    Don't forget a big-ass heat sink. Running from a car (up to 15V) you'll be dissipating a lot of heat. The 7805 is not a good choice for car use. Also he asked for "logic level converter" - though I don't think he knows what he wants ;)
    – Majenko
    Commented Jan 23, 2016 at 12:02
  • I think too :) but let's explain to man :) and it doesn't need a big heatsink if he is powering only arduino from 12 volts, but i don't even know why he asks for that, cuz it's integrated into arduino board, and if he looked how to build standalone atmega328 he would know what he has to use Commented Jan 23, 2016 at 12:11
  • Direct connection is not the best idea. During certain moments there may be huge voltage spikes.
    – Avamander
    Commented Mar 28, 2016 at 17:41
  • Well not really if he's connecting it to car's battery because a lot of addon devices operate on 7805 and i've never seen one that had problems with 7805 burning out or something :) it might be, but it's pretty rear :) Commented Mar 28, 2016 at 18:22

Your safest option is to use an opto-isolator. Connect the LED side in parallel with the load with a suitable resistor, then the transistor side becomes, effectively, a button connected to the Arduino.

As far as the car is concerned you have just connected an LED. As far as the Arduino is concerned you have a button connecting to ground.

It provides complete isolation of the car's electrics from your Arduino.

  • This is a good answer for a "logical shifter" as asked in the question.
    – Nick Gammon
    Commented Sep 24, 2016 at 2:08

This might be what you need — a multi-channel level shifter with input and output voltage ranging from 3.3V to 18V: https://www.ezsbc.com/index.php/featured-products-list-home-page/ls2.html#.WqmSZ2aZNGU

It's no bi-directional: you'll need a couple of boards if you want inputs and outputs from an Arduino to 12V.


What are you trying to achieve?

It's simply unclear if you want to run the Arduino on 12v of the car battery. Or if you want to control the car-windows by hooking into them? Or if you want to read out your car using the arduino.

I'll go with the later since otherwise the question would be stated a little different.

Also, you're looking for something good/cheap. You don't tell what type of car you want to connect to.

But I think this might help you out: https://www.sparkfun.com/products/13262

25€ isn't that pricey, compared to the car you're fiddling with... So you should go with a little quality (also, you don't need them in batch?).

While a bit subjective, sparkfun could be considered a better vendor than most e-bay suppliers. Both in documentation and support. And in this case, their price isn't that bad. (I'm not affiliated with sparkfun, I actually never bought stuff of them, since e-bay works well for me. There may be hundreds of other good/better suppliers, but this one popped up first on google)

Also, "hacking" your car can have serious safety risks.

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.