Question regarding ACS712
The ADC Pi is an Analogue to Digital converter for the Raspberry Pi
21/07/2015
Posted by:
Ryno Burger
I'm building a similar rig found on brain's website using a raspberry pi to log my solar's performance and usage data.
I managed to wire up the ACS712 current sensor and is able to get some amperage reading on the load I'm sensing.
One thing which I cannot seem to wrap my head around is whether one can use the ACS712 sensor to read voltage on for instance my 48V battery bank or are there other specific sensors out there dealing with voltage reading, in this case 48v to 5v to make it compatible with the ADCPi?
Any help or guidance will be highly appreciated!
Thanks
21/07/2015
Posted by:
andrew
As the ADCPi ADC chips can only read voltages up to 2.048 volts the ADCPi already uses a voltage divider consisting of a 10K and 6K8 resistor which drops the 5V input down to 2.02381V. To increase the voltage range you will just need to add another resistor in series with the input to increase the resistance of the 10K side of the voltage divider.
To work out the size of the resistor you will need to work out the maximum voltage that will be present on your battery bank and add a small margin for safety. I had a quick look at some typical charging voltages for 48V packs and it appears that they can be around 55V to 60V. A 200K resistor combined with the existing 10K resistor would give you a total resistance of 210K on the input. Using our voltage divider calculator I put in 210K for R1, 6K8 for R2 and 2.02381V for the output voltage and it gave an input voltage of 64.52382V which should be high enough for your needs.
If you add a 200K resistor in series with the input on the ADCPi you will just need to multiply the voltage reading by 12.904764 to give you the correct voltage.
21/07/2015
Posted by:
Ryno Burger
So, do I understand you correctly that a sensor like the ACS712 can be used for both amp and voltage readings?
21/07/2015
Posted by:
andrew
If you are powering the Raspberry Pi from a separate power supply it may be worth using a multimeter to measure the voltage between the ground on the battery pack and the ground on the ADCPi before connecting them together. With some switch mode power supplies, you can get ground loop problems where the ground on the raspberry pi is floating at a different voltage to the ground on the battery pack and connecting them together causes a short which can damage the Raspberry Pi. If the Raspberry Pi is being powered by the battery pack this shouldn't be a problem.
21/07/2015
Posted by:
Ryno Burger
Again, thanks a lot, it all makes sense to me now.
Note: documents in Portable Document Format (PDF) require Adobe Acrobat Reader 5.0 or higher to view.
Download Adobe Acrobat Reader or other PDF reading software for your computer or mobile device.