Bipolar current measurement using INA169

Hi guys.

I am trying to measure the current flowing to/from a battery by using two INA169. I have already made a one way current measurement with one INA169, and 0.02 ohm shunt resistor and a 50k external resistor, which works perfectly with a output of 1V per A.

I would like to have an output between 0 and 5V. 0V output when the battery is charging with 2.5A, 2.5V output when no current is flowing to/from the battery, and 5V output when 2.5A is flowing from the battery.

I am trying to use two op-amps, but i have no prior experience with electronics, so i found a webpage with an example of what i am trying to do with the op-amps:

I have attached a image of a schematic what i have tried to do, but the op-amp part doesn’t work. Can anyone tell me if this setup would work?

What are you using for power supplies to your op-amps? I don't see any connection in your schematic. Remember you will typically need about 1.5V each higher power supply than your desired voltage swing unless you pick an op-amp that has a rail-rail output, and I don't believe the LM358 is. You're using single supplies so at a minimum you would need Vcc to be 15V. --Rob

Will it work? No. The inputs are too close to the rails and there is no zero referance point.