I need to know which terminal of a shunt is higher, ie whether I'm charging or discharging my 12v battery bank. The voltage difference is very small (max 74mv) since the current flowing may be tiny, so I'd assume no diode drops, and high impedance to not throw the current readings off. What comparator circuit would work here? Output could be a simple LED, lit when discharging, say.
If you just need the direction you need to measure the polarity of the voltage at the shunt. Because you want the get positive and negative readings you'll need a negative supply voltage for your measurment device.
So you need to construct a comparator that switches it's output around 0V (add some hysteresis to prevent it from oscillating due to noise).
If you absolutely can't have a negative supply we need to find more creative solutions (where I can imagine several). But with most of those solutions there will be a window just around zero current where you can't be sure what the direction of the current is.
This is just a quick and dirty Idea. I'm not even sure if it would work...
At this point I am assuming the Shunt is in the Plus side. I have done things like that, I prefer to use a hall effect sensor. Reason to use an Op Amp or Comparator you need to construct additional circuitry such as voltage dividers which will degrade the sensitivity or power the device with a higher voltage then what you are measuring. If not the input to the comparating device will be above the rail which they do not like. Take a look at the AS712, it was designed to do this. If it is not sensitive enough other similar devices should be available. There is a lot of information on this device, it is quite popular with the Arduino crowd.