Does anyone know how to measure a 12v car battery while runing off it.
This would be simple with a small battery. just put the power through a voltage regulator to power the board and have the battery attached to one of the analog-read pins.
would i need some kind of protection to use a large battery.
The large battery won't make any difference per se, what probably will make a difference is the noise from the car's electrical system when the engine is running.
What do you mean by measuring a 12 v battery ? Voltage ?, Current ?, Phsyical dimensions ?
The arduino will just pull what it needs from the cars electrical system (next to nothing in car terms). The noisy electrical system may upset the microcontoller and/or the stuff connected to it. Its a bit of suck it and see, and then a bit of extra low pass filtering if it is deemed to need it.
Does anyone know how to measure a 12v car battery while runing off it.
Yes
This would be simple with a small battery. just put the power through a voltage regulator to power the board and have the battery attached to one of the analog-read pins.
Not quite that simple, as the Arduino analog input pins have a maximum allowed input voltage of Vcc +.5vdc, so +5.5vdc is the normal voltage limit that can be measured.
What is required to measure voltages higher then this is a simple two resistor voltage divider. The two resistors are sized such that the junction voltage between the resistors and ground is no more then +5vdc when the battery is at it's maximum terminal voltage. The battery positive is connected to the top resistor connection and the battery ground connects to the lower resistor and also to a Arduino ground pin.
would i need some kind of protection to use a large battery.
Car batteries if installed in a running car is a very electrically noisy environment. Lots of filtering of the positive voltage is typically done for noise and high voltage spikes. A search can usually find methods to deal with this.
Usually the state of a car battery charge is determined by the specific gravity of the battery fluid. If the battery is not being charged, then the terminal voltage might be somewhat of an indicator.
well, if it's a lead acid battery, voltage will give you a pretty rough estimate. around 13 is fully charged and around 11 is dead. for something more precise, you'd need to construct an amp-hour meter
I appreciate this is the arduino site but sometimes there are simpler ways of doing things if you are in a hurry and not too confident about what you're doing.
Doesn't use an arduino (well not by name) but you could use a Turnigy unit which computes total power consumed as well as displaying both volts and amps. Google the name to find further details.
jack