Use two shunts one in the charge leg an one in the discharge leg count Ah in and Ah out. You only need to monitor current one way in each shunt and compute the charge / discharge current. Alternatively add two op amps to the shunt one for charge and one for discharge.. Works in conventional chargers no reason it shouldn't work on solar chargers Rgds Steve -----Original Message----- From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu] On Behalf Of Matt Pobursky Sent: 13 June 2007 14:08 To: Microcontroller discussion list - Public. Subject: Re: [EE] Battery voltage and charge/discharge current monitoring On Wed, 13 Jun 2007 06:46:50 -0600, Forrest Christian wrote: > I've been working on trying to design a circuit which will allow me to > monitor state-of-charge and charge/discharge current for solar sites. I'd > love to use the onboard ADC on a typical PIC to keep the cost down, but > this isn't necessarily 100% a requirement. > > Array voltage is easy.. Just attach to ADC through some precision > resistors and away you go. Current not so much, since I will be using a > shunt to get the current information (unless there's an easier way to > measure up to tens of amps DC). The basic configuration would be simply > to measure the drop across one shunt, although it would be nice to be > able to do more than one (I.E. one for the charge path and one for the > discharge path, or perhaps one for solar in and one for wind in and one > for load out). > > If I require the shunt on the neutral side, I can then measure anything > positive - but the negative swing is an issue. If the shunt is on the > high side, then I have an issue with the high side rail. > > How do people typically measure + and - voltages which come off of the > DCA shunt? Although I'm normally not one to recommend Maxim parts, you might look at the MAX4069-4072 parts for a project that's a one-off (or a few-off) and get samples from them. They are bidirectional high side current sense amplifiers and designed for exactly your kind of application. Most of the other "analog guys" also have high side current sense amps. I can't recall if any of the others have bidirectional parts or not though. Matt Pobursky Maximum Performance Systems -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist