Arduino Current Sensor question !

hello everyone,
i would like please to ask some questions about this arduino current sensor ACS712 that i have:

1 - Can we make a battery capacity detector with it ? which means a detector that can give the percentage of amps left in the battery before recharging it

2 - i was reading the datasheet from the link above, it says "Pin 5V power supply" does this mean the input can be up to 5V and nothing more ? example i can't connect a 12V battery unless i make a voltage divider or i use a voltage regulator for input ?

3 - from the datasheet, what does this mean : "The module can measure the positive and negative 5 amps, corresponding to the analog output
185mV / A "

4 - does this module have a voltage regulator on board ?

firashelou:
hello everyone,
i would like please to ask some questions about this arduino current sensor ACS712 that i have:

1 - Can we make a battery capacity detector with it ? which means a detector that can give the percentage of amps left in the battery before recharging it

2 - i was reading the datasheet from the link above, it says "Pin 5V power supply" does this mean the input can be up to 5V and nothing more ? example i can't connect a 12V battery unless i make a voltage divider or i use a voltage regulator for input ?

3 - from the datasheet, what does this mean : "The module can measure the positive and negative 5 amps, corresponding to the analog output 185mV / A "

4 - does this module have a voltage regulator on board ?

Q1) Can we make a battery capacity detector with it ?
A1) This chip could be used to make a Battery Capacity Detector.

Q2) it says "Pin 5V power supply"
A2) Correct, you supply Regulated 5 Volts. Yes, you must regulate the external 12 volts down to 5 volts. No, I do not recommend using a simple voltage divider.

Q3) what does this mean ?
A3) It means, exactly what is states: Output changes 185 millivolts for each Amp measured. Look at the Datasheet for "Output Voltage vs Sensed Current" Graph. Zero (0) amps measured equals Vcc/2 output.

Q4) voltage regulator on board ?
A4) It does not appear to have an on-board voltage regulator. Do you have the schematic?

mrsummitville:
Q1 - Can we make a battery capacity detector with it ?
A1) This chip could be used to make a Battery Capacity Detector.

Q2 - it says "Pin 5V power supply"
A2) Correct, you supply Regulated 5 Volts. Yes, you must regulate the external 12 volts down to 5 volts. No, I do not recommend using a simple voltage divider.

Q3 - what does this mean ?
A3) It means, exactly what is states: 185 millivolts output for each amp measured.

Q4 - voltage regulator on board ?
A4) It does not appear to have an on-board voltage regulator. Do you have the schematic?

thank you for reply mrsummitville

so the 185 millivolts per amp, it means if i measure 5 AH it's gonna be 0.185 * 5 = 0.925 V ?
then i do this in reverse or whatever to be able to calculate the real value from 5 A ?

about the schematic, no i do not have the schematic but by looking at the sensor board i can tell it has 1 chip, 3 small components between resistors and caps not sure which is which, i think 2 caps and 1 resistor labelled 102 or the opposite and 1 small LED

firashelou:
thank you for reply mrsummitville

so the 185 millivolts per amp, it means if i measure 5 AH it's gonna be 0.185 * 5 = 0.925 V ?
then i do this in reverse or whatever to be able to calculate the real value from 5 A ?

about the schematic, no i do not have the schematic but by looking at the sensor board i can tell it has 1 chip, 3 small components between resistors and caps not sure which is which, i think 2 caps and 1 resistor labelled 102 or the opposite and 1 small LED

RE: so the 185 millivolts per amp, it means if i measure 5 AH it's gonna be 0.185 * 5 = 0.925 V ?
No, it does not.
Zero (0) Amps is equal to Vcc/2.
Each amp measured is then either +/- 185 mv from the Vcc/2 zero point.
See the Datasheet and find the graph for: Output Voltage vs Sensed Current
Once you see the graph you will understand.

mrsummitville:
RE: so the 185 millivolts per amp, it means if i measure 5 AH it’s gonna be 0.185 * 5 = 0.925 V ?
No, it does not.
Zero (0) Amps is equal to Vcc/2.
Each amp measured is then either +/- 185 mv from the Vcc/2 zero point.

ah ok so it’s gonna be 2.5V + 0.925V = 3.425 V let’s say between 3.3 and 3.5 V

mrsummitville:
See the Datasheet and find the graph for: Output Voltage vs Sensed Current
Once you see the graph you will understand.

there is no direct datasheet for it, i found the allegro datasheet which has many sensed current versus voltage graphs and each one gives a different value :confused:

Correct,
Output Voltage = Vcc/2 +/- ( 185 mv/amp x Measure Amps )

Plus or Minus !

Correct, there are three SETS of Tables and Graphs on the datasheet.
One set for each chip ...
ACS712-05 = 5 Amp IC
ACS712-20 = 20 Amp IC
ACS712-30 = 30 Amp IC

Make sure you look at the Tables and Graphs for the 5 Amp chip, only.

mrsummitville:
Correct,
Output Voltage = Vcc/2 +/- ( 185 mv/amp x Measure Amps )

Plus or Minus !

Correct, there are three SETS of Tables and Graphs on the datasheet.
One set for each chip ...
ACS712-05 = 5 Amp IC
ACS712-20 = 20 Amp IC
ACS712-30 = 30 Amp IC

Make sure you look at the Tables and Graphs for the 5 Amp chip, only.

you are totally right, i did not notice the amperage it was up top of the page lol !
ok so i now gonna write some notes about this sensor and how it should be connected with 5 volts voltage regulator on the Input and of course on the VCC of the chip

to make a capacity ampere detector for a 12V lets say 2200 mAh battery, i should connect the battery to a circuit regulating the 5V then from this circuit to the Sensor which is in series with the rest of the circuit or the sensor circuit must be in parallel with the rest ?
(By the rest i mean, the main circuit which contains 1 atmega328, 7-segments displays, LEDs, ....)

firashelou:
you are totally right, i did not notice the amperage it was up top of the page lol !
ok so i now gonna write some notes about this sensor and how it should be connected with 5 volts voltage regulator on the Input and of course on the VCC of the chip

to make a capacity ampere detector for a 12V lets say 2200 mAh battery, i should connect the battery to a circuit regulating the 5V then from this circuit to the Sensor which is in series with the rest of the circuit or the sensor circuit must be in parallel with the rest ?
(By the rest i mean, the main circuit which contains 1 atmega328, 7-segments displays, LEDs, ....)

I think,

Connection #1 ...
From (+) Terminal of the battery to Input Terminal A of the ACS712 Sensor.
(+) Battery => ACS712 Sensor Input Terminal A

Connection #2 ...
From the other Input Terminal B of the ACS712 Sensor to everything else.
ACS712 Sensor Input Terminal B => everything else

The ACS712 must sense & measure all current flowing into or out of the battery.

mrsummitville:
I think,

Connection #1 ...
From (+) Terminal of the battery to Input Terminal A of the ACS712 Sensor.
(+) Battery => ACS712 Sensor Input Terminal A

Connection #2 ...
From the other Input Terminal B of the ACS712 Sensor to everything else.
ACS712 Sensor Input Terminal B => everything else

The ACS712 must sense & measure all current flowing into or out of the battery.

about the terminal the sensor doesn't say which is which ! but i assume the + should be the one aligned with the label VCC and the - with GND

so it doesn't matter if the sensor is before the rest of the circuit or after ?

firashelou:
about the terminal the sensor doesn't say which is which ! but i assume the + should be the one aligned with the label VCC and the - with GND

so it doesn't matter if the sensor is before the rest of the circuit or after ?

Connect the Sensors input wires one way and you get this ...
Output Voltage = Vcc/2 + ( 185 mv/amp x Measured Amps )

Reverse the Sensors nput wires and then you get this
Output Voltage = Vcc/2 - ( 185 mv/amp x Measured Amps )

Direction changes "Charging" amps vs "Discharging" amps.
Doesn't really matter, your choice.

mrsummitville:
Connect the Sensors input wires one way and you get this ...
Output Voltage = Vcc/2 + ( 185 mv/amp x Measured Amps )

Reverse the Sensors nput wires and then you get this
Output Voltage = Vcc/2 - ( 185 mv/amp x Measured Amps )

Direction changes "Charging" amps vs "Discharging" amps.
Doesn't really matter, your choice.

thanks for your help again
but what do you mean charging and discharging ? is this about the battery you mean ? or the circuit ? what i am looking to do is to measure what is the rest of capacitance percentage of the battery

firashelou:
thanks for your help again
but what do you mean charging and discharging ? is this about the battery you mean ? or the circuit ? what i am looking to do is to measure what is the rest of capacitance percentage of the battery

This Current Sensor can measure amperage flowing in either direction!
Both the Discharging current and the Charging current can be tracked.
It is OK if you are just using the DISCHARGING logic.

That is why the formula is: "Output = Vcc/2 +/- ( 185mv x Measured Amps )
The (+) in the formula is for Discharging amps.
The (-) in the formula is for Charging amps.

Swapping the Input Wires reverses the above logic.

mrsummitville:
This Current Sensor can measure amperage flowing in either direction!
Both the Discharging current and the Charging current can be tracked.
It is OK if you are just using the DISCHARGING logic.

That is why the formula is: "Output = Vcc/2 +/- ( 185mv x Measured Amps )
The (+) in the formula is for Discharging amps.
The (-) in the formula is for Charging amps.

Swapping the Input Wires reverses the above logic.

but by looking at my circuit, it's like if i swap the Inputs the circuit is not gonna work ! i mean i take the GND of the LED and connect it to the + of the sensor and the - of the sensor goes to GND, if i take the GND of the LED and connect it to the - and the and the + of the sensor goes to +5, it like putting a battery in reverse with the rest of the circuit isn't it ?!

firashelou:
but by looking at my circuit, it's like if i swap the Inputs the circuit is not gonna work ! i mean i take the GND of the LED and connect it to the + of the sensor and the - of the sensor goes to GND, if i take the GND of the LED and connect it to the - and the and the + of the sensor goes to +5, it like putting a battery in reverse with the rest of the circuit isn't it ?!

The ACS712 can measure the current flowing through the SCREW TERMINALS in either direction, equally well. It is a bi-directional current sensor. The Signal Out will either increase from Vcc/2 or decrease from Vcc/2 depending upon the direction of current flow on the screw terminals.

mrsummitville:
The ACS712 can measure the current flowing through the SCREW TERMINALS in either direction, equally well. It is a bi-directional current sensor. The Signal Out will either increase from Vcc/2 or decrease from Vcc/2 depending upon the direction of current flow on the screw terminals.

yes i read the datasheet, but it's hard to think of it, because i will be connecting the wires in reverse with the LED as i said before + to GND of LED ! it's not thinking in :confused:

no matter how much i read about the current and voltage, something doesn't sink in, and the analogy of the water flow doesn't really apply to electricity :confused: or there is something missing

hello,
i would like to know please how much voltage can this Inputs take ? or that depends on the connector used ?

The datasheet says that it has 2.1kV isolation between the sensing pins and the rest of the circuit.

I would not like to test two thousand volts that but it's obviously safe for 12V. If I was using it for a project plugged into the wall outlet then I would look closely at the PCB layout to see if its isolation is good.

MorganS:
The datasheet says that it has 2.1kV isolation between the sensing pins and the rest of the circuit.

I would not like to test two thousand volts that but it's obviously safe for 12V. If I was using it for a project plugged into the wall outlet then I would look closely at the PCB layout to see if its isolation is good.

lol oops 2.1kV isolation ! now i saw it at the top

thanks for your reply :slight_smile: