Arduino Mega powered by auto battery question

Can I power my Arduino Mega directly from the battery in my vehicle via a cigarette lighter socket with a 2.1mm plug on the end which plugs into the Arduino power socket. I have read posts which suggest using a AC-DC adapter for home use which can deliver 12V @ 500Ma~1A but I am a bit concerned that the amperage from a 12 volt car battery may fry my Arduino. Help appreciated.

Well, in theory you could in theory power it from a car battery, but while the vehicle is running that 12V isn't really 12V (closer to 14V when charging) and it's also pretty noisy. There could be nasty voltage spikes there that could destroy your board.

I don't understand the AC-DC adapter part -- the power coming from your car battery is already DC.

Voltage comes from your battery; it's the Arduino that determines how many amps it draws. The car battery is capable of supplying lots of amps, but it only supplies what the Arduino demands (which isn't very much).

--
Check out our new shield: http://www.ruggedcircuits.com/html/gadget_shield.html

Thanks for the reply. I mentioned the 'home use' AC-DC adapter to refer to the low amps available from an adapter at home. I mentioned the car battery because I want to run my Arduino (on my boat actually) to collect water temps and air temps to plot on a graph on my laptop on board. I realize I can power the Arduino via a USB cable from my laptop but was wondering if it was possible to power the Arduino from the boat battery (12V). I also wanted to use a blink sketch to flash an LED as a burglar deterrent which would mean I would leave the Arduino on board. I shall look at your link re my previous post. Thanks again.

you can get voltage regulators designed for mobile applications, these offer greater noise immunity, reverse polarity etc for use with "harsh" environments such as a car, and they are easy to hook up

if you want some easy breezy look for a car adapter for a old celphone or something, (needs to be 7 - 12 volts) and use that, you can wire it into the car's electrical system or just plug it in to the lighter socket, and can be had at the thrift store for peanuts

this will get you what you need in a nice package and minimal effort

blink sketch to flash an LED as a burglar deterrent

You can do this with a flashing LED, I haven't seen them for ages but they used to be available, just wire them across your power.

as far as that goes, if you cant find a flashing led you can use a couple transistors (and it wont be picky about environment)

Thanks all for the advice and suggestions - I do have a few power options now. One last question though. Will the Arduino mega auto select the highest voltage power supply (say 5 volt USB versus 9~12 volt external power jack connected) if both power sources are connected at the same time. Fairly mundane questions but I am new to the Arduino world and I don't wanna blow up my device day one. Thanks again.

Check the voltage on your ardunao when powering from the 12v wall wart to make sure the regulator is maintaining ~5v (I've got a clone with a bad regulator). You can also check the data sheet for the regulator on your board to see what its max voltage rating is. If it is rated for 15v or higher, you should be ok. Load a blink program in the arduino and see if it works ok in the car with just the car ignition on. if it works ok, then crank the car and see if it still blinks ok. As to blinking LEDs, I think I saw some not long back. Do a google search.

Will the Arduino mega auto select the highest voltage power supply

I THINK (looking at the schematics) if VIN is > 6.6v the Mega will select power from VIN instead of the USB's 5v.

Freely available...

http://cgi.ebay.co.uk/CAR-ALARM-DUMMY-12v-BRIGHT-FLASHING-RED-LED-/110567674412?cmd=ViewItem&pt=UK_CarsParts_Vehicles_CarParts_SM&hash=item19be58d22c

Just one example

Thanks everyone for replies and advice - appreciated. :slight_smile: