Onboarduino: how to power an Arduino in a car ?

I'd like to run a microcontroller in my car.

I know the subject has been treated but in the pages (from the search function) of topics I read, nothing clearly stated what good practice was. Or maybe it did, but not in terms I would understand.

I get I would need a transient voltage suppressor (I would like some advice about which one).
I don't get why I'd need a voltage regulator if I'm using a board which has one (the nano runs between 6 V and 20 V). The MCU would need power only when contact is ON.

Besides, I'm hesitating:

  • Arduino mini/micro/nano (whichever is more tolerant to the situation)?
  • Digispark (I like the tinyness, not the fact I'd need to use a modified IDE)?
  • Barebone ATtiny (done that with a barebone ATmega already, I hope the ATtiny wouldn't be harder)

The sketch will be quite short and I'll need something like two inputs and two outputs so the size does not matter there :grin:

Could you guys tell me what are the risks (transient voltage, noise, ...?) of the car setup before telling me how to control them (whether by dismantling a cigarette lighter power supply or soldering a bunch of components together)?

Promini, power it from a cigarette lighter adapter/cell phone charger:

Hack the end off a cable, connect +5/Gnd to VCC/Gnd on the Promini.
(or Raw/Gnd if using a 3.3V Promini)

Bianco:
Could you guys tell me what are the risks (transient voltage, noise, ...?) of the car setup before telling me how to control them (whether by dismantling a cigarette lighter power supply or soldering a bunch of components together)?

Anyone?

get a USB car adapter. you get 5 volts and 500mA from it. should be great for the logic side.

belkin is a brand name.
http://www.amazon.com/Belkin-Low-profile-USB-Auto-Charger/dp/B002RXCNG2/ref=sr_1_2?s=electronics&ie=UTF8&qid=1419356615&sr=1-2&keywords=car+charger

these have a high end voltage chip so they are a great source. if you do not have a cigarette ligher plug, you can hack the guts and use the board.

Bianco:
I'd like to run a microcontroller in my car.

I know the subject has been treated but in the pages (from the search function) of topics I read, nothing clearly stated what good practice was. Or maybe it did, but not in terms I would understand.

I get I would need a transient voltage suppressor (I would like some advice about which one).
I don't get why I'd need a voltage regulator if I'm using a board which has one (the nano runs between 6 V and 20 V). The MCU would need power only when contact is ON.

Besides, I'm hesitating:

  • Arduino mini/micro/nano (whichever is more tolerant to the situation)?
  • Digispark (I like the tinyness, not the fact I'd need to use a modified IDE)?
  • Barebone ATtiny (done that with a barebone ATmega already, I hope the ATtiny wouldn't be harder)

The sketch will be quite short and I'll need something like two inputs and two outputs so the size does not matter there :grin:

I've built a lot of 5 volt projects designed to run in a car (which is a VERY hostile environment for electronics). My power supply circuit even cleanly powers old 74xx TTL without glitches.

Things you need to worry about are:

  • Electrical noise and spikes
  • Large temperature changes
  • Large humidity changes (usually high humidity)
  • A lot of low to mid frequency vibration of several G's

The physical stresses on your project can be handled by enclosing the circuit in a sealed box containing dense padding foam, nice loops in the board-to-outside wires to absorb flexing and a big bag of silica gel to absorb humidity. If your project generates a lot of heat, you will need an external heat sink.
For the electrical stresses, I've found that a simple circuit works really great. You run the 12 volt power from the car first into a fuse (the fuse is MANDATORY to prevent fire). Then go through a 1N540x (3 amp) diode, then a 1 ohm, 10 watt resistor, a 1000 to 2200 uF, 25 volt electrolytic capacitor and finally an LM7805 5 volt regulator (heat sink it if necessary).
The diode prevents the car from PULLING power away from your circuit when you turn on various loads such as headlights, brake lights, start the engine, etc... The resistor absorbs any high voltage, short duration positive spikes, the capacitor absorbs spikes and provides power during "power suck-out" surges such as starting the engine.
Finally, the 7805 gives you nice, clean 5 volt regulated power.
I would be wary of any power supply that uses switching technology. Linear is less efficient, but it's the best in absorbing noise and giving you clean "battery-like" power.

As far as which Arduino to use, it's up to you. One is no better or worse at handling electrical noise. Choose the board that suits your DESIGN the best.

Hope this helps.

Krupski:
Hope this helps.

It does, thanks. That's precisely the sort of message I was hoping to get :slight_smile:

Krupski:
The resistor absorbs any high voltage, short duration positive spikes, the capacitor absorbs spikes

Could you develop a bit?

Also, why not trust the board's voltage regulator (plugged after the capacitor)?