Hello all,
I am in the process of planning a project where I will be measuring the voltage of batteries to determine state of charge. The batteries are common lead acid type, this is un-important save for the fact that I will be working with voltage range from 0 to ~18 volts. The system in mind would be agile enough to hopefully handle both 6v and 12v batteries, and be able to measure the voltage at the highest foreseeable situation, a 12V battery under "equalizing" charge, which is constant current in application and can reach over 16 volts easily.
Now what I would like to do is of course use the ADC's resolution to its maximum effectiveness. I.E. a 0-18V swing would use the entire 0-5V swing of the adc. Now this is strictly a DC application, and a very basic use of the input. I have come up with two possiblities that (I think) will work.
One is to use a simple voltage divider with the adc center tapped into it, setting the resistance ranges appropriate for both the impedance needed for the PICAXE and the voltage swing desired. I have been using a calculator program to speed picking the resistances, but it still seems a bit far from optimal.
I had another thought, but I am not familiar enough with opamp's to know how to implement a solution. I could set up a non-inverting buffer with a gain of approx. 0.25. This seems like it would work ok but I have never used an opamp before. I understand that most single supply voltage opamp's use an offset of the input voltage so that both a positive and "negative" swing is available, in reference to 1/2V. Since I am only worried about DC input, could I not just ground the negative supply rail on the opamp, and set up the input and feedback resistors for the appropriate gain ratio? Do I need to power the opamp from the full battery voltage (rather than the +5v supply for the picaxe) to ensure a full 0-5V swing on the output without clipping?
Apologies if the questions seem a bit rudimentary, but I am just starting out!
Cliff notes:
ADC Application: measure 0-18V DC
Use a voltage divider or opamp for best resolution?
Specifics on using an opamp in this DC configuration? (no negative components/non-inverting)
Prototyping on: 28X1
I am in the process of planning a project where I will be measuring the voltage of batteries to determine state of charge. The batteries are common lead acid type, this is un-important save for the fact that I will be working with voltage range from 0 to ~18 volts. The system in mind would be agile enough to hopefully handle both 6v and 12v batteries, and be able to measure the voltage at the highest foreseeable situation, a 12V battery under "equalizing" charge, which is constant current in application and can reach over 16 volts easily.
Now what I would like to do is of course use the ADC's resolution to its maximum effectiveness. I.E. a 0-18V swing would use the entire 0-5V swing of the adc. Now this is strictly a DC application, and a very basic use of the input. I have come up with two possiblities that (I think) will work.
One is to use a simple voltage divider with the adc center tapped into it, setting the resistance ranges appropriate for both the impedance needed for the PICAXE and the voltage swing desired. I have been using a calculator program to speed picking the resistances, but it still seems a bit far from optimal.
I had another thought, but I am not familiar enough with opamp's to know how to implement a solution. I could set up a non-inverting buffer with a gain of approx. 0.25. This seems like it would work ok but I have never used an opamp before. I understand that most single supply voltage opamp's use an offset of the input voltage so that both a positive and "negative" swing is available, in reference to 1/2V. Since I am only worried about DC input, could I not just ground the negative supply rail on the opamp, and set up the input and feedback resistors for the appropriate gain ratio? Do I need to power the opamp from the full battery voltage (rather than the +5v supply for the picaxe) to ensure a full 0-5V swing on the output without clipping?
Apologies if the questions seem a bit rudimentary, but I am just starting out!
Cliff notes:
ADC Application: measure 0-18V DC
Use a voltage divider or opamp for best resolution?
Specifics on using an opamp in this DC configuration? (no negative components/non-inverting)
Prototyping on: 28X1