DC power measurment with Arduino

I am working on a project that requires me to monitor the power consumption of wheelchairs across a spectrum of different activities. (electric wheelchairs batteries are 2x12V) To do that I am going to measure current flow using a split core hall effect sensor (link: http://www.amazon.com/Loulensy-Current-Transmitter-Transformer-Output/dp/B00LMPP01Q/ref=sr_1_72?s=industrial&ie=UTF8&qid=1432039609&sr=1-72) luckily I have spoke with the company and they will be able to provide me with a sensor suitable for a 12V power supply, and the output voltage is o-5V so I can interface it with an adrduino. To measure the voltage I was thinking to simply use a voltage divider to drop the voltage from 12V to 5V so I can measure it directly with the arduino. To power my sensor and my arduino I was thinking to use a Li-ion battery pack i found on ebay (http://www.ebay.co.uk/itm/Super-Rechargeable-Protable-Li-ion-Battery-DC-12V-6800mAh-Lithium-ion-EU-Plug-/351353498255). As data logger I was thinking to ust the Arduino ethernet board with the slot for the SD card. The question is can I connect my battery directly to the arduino power jack and then use the Vin pin to wire the arduino to the breadbord so I can get the right voltage for my sensor? Considering that I am not an expert in electronics I am not sure my components are the right one and if someone could point out if I am making a mistake it would be really appreciated. Thanks!

Your Li-ion is 12v, your sensor requires 24v.

Rethink your project.

Weedpharma

No sorry as I said in in the original post I spoke with the company and they will provide me with a sensor that works with a 12V power supply so the battery should be fine

If you apply 12v to the socket, there is a diode to the Vin so there will be a 0.6v drop. If the current draw is low then no problem.

Weedpharma

Giulia86: To measure the voltage I was thinking to simply use a voltage divider to drop the voltage from 12V to 5V so I can measure it directly with the arduino.

That sounds OK to me but you will need to consider two things: 1) protecting the Arduino input from transient spikes from the motors; 2) protecting the Arduino if the Li-ion battery pack is disconnected while voltage is still being applied to the Arduino's input via the voltage divider.

Giulia86: To power my sensor and my arduino I was thinking to use a Li-ion battery pack i found on ebay (http://www.ebay.co.uk/itm/Super-Rechargeable-Protable-Li-ion-Battery-DC-12V-6800mAh-Lithium-ion-EU-Plug-/351353498255).

Why are you not thinking of powering your Arduino and sensor from one of the wheelchair batteries? (You would need plenty of protection against transient spikes from the motors)

"2) protecting the Arduino if the Li-ion battery pack is disconnected while voltage is still being applied to the Arduino's input via the voltage divider."

Why would this be so?

The voltage is limited by the divider (making sure to allow for fully charged battery at over 14v). Also the analogue input is high impedance so minimal current will flow.

Weedpharma

weedpharma: "2) protecting the Arduino if the Li-ion battery pack is disconnected while voltage is still being applied to the Arduino's input via the voltage divider."

Why would this be so?

The voltage is limited by the divider (making sure to allow for fully charged battery at over 14v). Also the analogue input is high impedance so minimal current will flow.

Weedpharma

Let's say a voltage divider is used with 200Ω and 100Ω resistors to reduce the voltage to one-third. So the voltage applied to the Arduino's input will be nearly 5V when the battery is fully charged. That's OK when the Arduino is powered up by the Li-ion battery pack and minimal current will flow into the input. If the Li-ion battery is disconnected, the microcontroller chip's Vcc will go to zero but nearly 5V will remain on one of its input pins. Is that OK?

I know each input/output is protected in principle by diodes within the chip, although the actual implementation on the silicon is probably not as simple as just ordinary diodes. Inputs may be high impedance but they are not when a protection diode comes into play. So would such a diode cope with 14V via a 200Ω resistor? For what must be a rather tiny part of the silicon chip, it would certainly get rather hot! Or would the whole chip tend to power itself up from the voltage being applied to one input?

While you could consider adding additional protection components, it's probably sufficient simply to use fairly high value resistors for the voltage divider.

All I was saying was that it needs to be considered.

As we are just measuring a voltage, why would you use a low R divider?

In this situation, you would not use less than 20k:10k resistors.

Weedpharma

weedpharma: As we are just measuring a voltage, why would you use a low R divider?

In this situation, you would not use less than 20k:10k resistors.

Yes, but I still think it is worth appreciating that they are protecting the chip.

If you decided to place a 100μF capacitor to the centre of the voltage divider to smooth the voltage being measured, would you consider whether that could damage the chip?

Although I have only been an electronics tech for 45 years, I can think of no reason to put a large capacitor on the input when measuring the voltage on a battery. Especially when using large divider resistors.

Weedpharma

weedpharma: Although I have only been an electronics tech for 45 years, I can think of no reason to put a large capacitor on the input when measuring the voltage on a battery. Especially when using large divider resistors.

As this thread concerns measuring the battery voltage of a wheelchair, you could decide to put a capacitor there to reduce voltage fluctuations caused by the varying currents drawn by the motors' speed controller, especially if the voltage is to be displayed as a digital voltmeter.

I am not saying that extra precautions need to be taken in this instance. There are people with far less electronics experience than you who may be unaware that it is generally dodgy having input voltages applied to any chip when the chip is not powered up.

I agree that 20kΩ:10kΩ divider would almost certainly prevent damage to the Arduino's chip. Nevertheless applying over 4V to an input is exceeding the chip's published absolute maximum ratings when the chip's Vcc is zero. One hopes the chip's input protection continues to function when the chip has no power or that the current is so small that no damage occurs.