In message <2004620184054.789801@laptop> cdb wrote: > Rather than use a resistor I'm going for the magnetic approach either > by using a Hall sensor or a AMR sensor. The problem is, this is a battery powered device with a 900mAh nickel-metal-hydride battery pack. I need to get the power consumption down to a bare minimum and keep it there for as long as possible. OK, so the gist of it is, I want to do something like this: Battery |-X-** R **-----Ground | | ------ ---------> opamp\-----> PIC A/D In |______/ So, rather than getting -1V to +1V at the resistor/battery junction, I get 0V to 2V from the opamp's output, which gets fed to the PIC. The PIC has the ability to enable the opamp as and when necessary, leaving it off when the device is switched off. When the device wakes up (during charging or when the user presses the "power" button), it powers up the opamp and reads the current consumption figure. That figure is then used to make a rough estimation of how long the battery is going to last. Why am I doing it this way? Because 99% of the battery monitor ICs I've seen can't handle being run off a single 1.2V battery. The other 1% are impossible to get from any of my usual suppliers. Using a PIC12F675 to do the battery monitoring seems like the best option. Now, the clincher is, I know I can get the opamp to shift the voltage, but that requires a negative supply. Is there any way to do the shifting with just Vcc and ground? Thanks. -- Phil. | Acorn Risc PC600 Mk3, SA202, 64MB, 6GB, philpem@dsl.pipex.com | ViewFinder, 10BaseT Ethernet, 2-slice, http://www.philpem.dsl.pipex.com/ | 48xCD, ARCINv6c IDE, SCSI ... We all have failures. The question is, what do we do with them? -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads