I know some computer but almost zero electronics.
I want to measure the voltage of a small 12 volt battery bank. This is hobby related, not commercial. The batteries are charged by a micro hydro generator. Half the year the site is unattended.
I am using a 1wire voltage sensor, an iButtonLink MS-TV attached to a Raspberry Pi computer. The sensor has a limit of 10 volts so I made a divider to halve the voltage. Two weeks ago, with a test 12v power supply I played with various resistor values, from 1K to 1M. The 1K resistors appeared to give the best reading, about 6 volts. The higher the value the lower the output. Now, here in the wilds of British Columbia, working with a real 12v battery system, I am getting values ranging all over: 0.1, 0.82, 0.07, 10+, rarely anything reasonable such as 6.6. Within several minutes I just got 0.7 followed by 9.75. The inverter connected to the battery bank displays 12.1 volts and the output from my program now shows .71 volts. With the same divider connected to a 9 volt battery I get a consistent 4.77 or 4.78 volts.
I am mystified and would greatly appreciate suggestions.
Thanks,
Peter
I want to measure the voltage of a small 12 volt battery bank. This is hobby related, not commercial. The batteries are charged by a micro hydro generator. Half the year the site is unattended.
I am using a 1wire voltage sensor, an iButtonLink MS-TV attached to a Raspberry Pi computer. The sensor has a limit of 10 volts so I made a divider to halve the voltage. Two weeks ago, with a test 12v power supply I played with various resistor values, from 1K to 1M. The 1K resistors appeared to give the best reading, about 6 volts. The higher the value the lower the output. Now, here in the wilds of British Columbia, working with a real 12v battery system, I am getting values ranging all over: 0.1, 0.82, 0.07, 10+, rarely anything reasonable such as 6.6. Within several minutes I just got 0.7 followed by 9.75. The inverter connected to the battery bank displays 12.1 volts and the output from my program now shows .71 volts. With the same divider connected to a 9 volt battery I get a consistent 4.77 or 4.78 volts.
I am mystified and would greatly appreciate suggestions.
Thanks,
Peter