I am working on building a small electronics / project cabinet with an integrated power supply and one of the things I would like it to do is display the voltage and current on each of the different voltages supplied (+3.3V, +5.0V, +12.0V).
The project will include a few 4-digit 7-segment LED displays for showing this information that are driven by a PIC16F88 microcontroller. The voltage measuring I have got figured out (although maybe not in the best way), I figure I can just use a resistor voltage divider to bring the voltage down far enough that I can measure it with an ADC (I currently have a MCP3208 but could swap to a different one if it helps me with my current measuring goal).
Also, I have some 0.010 ohm resistors that I scavenged from another power supply which seemed like they would be good for the current measuring part of this project, but this is where I start to get out of the realm of what I know (or think I know) and I need some help.
The idea I had was to use the shunt resistors on the positive supply for each voltage (as the ground is common) then measure the voltage difference across them, but there are a couple things that I see as problems with this:
1) The voltage difference across the shunt is small. At 20A, which is about the limit of what I can supply, it would only be 0.2V. I am worried using a very low reference voltage on my ADC is going to produce large errors in its readings.
2) The voltage relative to ground on each side of the shunt is different on each supply line, and in one case greatly exceeds the voltages I can apply to my ADC or any other part of the control circuitry so I can't directly connect either measurement point to my ADC or microcontroller.
What is the best technique for this?
I hope I am missing some obvious solution. I am sorry to say I really am not that experienced with this sort of thing, most of my experience is in digital electronics and common-voltage components. I thought perhaps I could use a dual supply rail-to-rail op-amp with feedback to amplify the voltage difference and bring it to something near the common ground (0-5V perhaps) then sample it with my ADC, but I don't know how well they deal with measuring the difference between say +12.4V and +12.39V when supplied with +/-5V. Is that even safe? It seems like there is something terribly wrong with that idea
Sorry to ramble, and I would appreciate any advice you can give
The project will include a few 4-digit 7-segment LED displays for showing this information that are driven by a PIC16F88 microcontroller. The voltage measuring I have got figured out (although maybe not in the best way), I figure I can just use a resistor voltage divider to bring the voltage down far enough that I can measure it with an ADC (I currently have a MCP3208 but could swap to a different one if it helps me with my current measuring goal).
Also, I have some 0.010 ohm resistors that I scavenged from another power supply which seemed like they would be good for the current measuring part of this project, but this is where I start to get out of the realm of what I know (or think I know) and I need some help.
The idea I had was to use the shunt resistors on the positive supply for each voltage (as the ground is common) then measure the voltage difference across them, but there are a couple things that I see as problems with this:
1) The voltage difference across the shunt is small. At 20A, which is about the limit of what I can supply, it would only be 0.2V. I am worried using a very low reference voltage on my ADC is going to produce large errors in its readings.
2) The voltage relative to ground on each side of the shunt is different on each supply line, and in one case greatly exceeds the voltages I can apply to my ADC or any other part of the control circuitry so I can't directly connect either measurement point to my ADC or microcontroller.
What is the best technique for this?
I hope I am missing some obvious solution. I am sorry to say I really am not that experienced with this sort of thing, most of my experience is in digital electronics and common-voltage components. I thought perhaps I could use a dual supply rail-to-rail op-amp with feedback to amplify the voltage difference and bring it to something near the common ground (0-5V perhaps) then sample it with my ADC, but I don't know how well they deal with measuring the difference between say +12.4V and +12.39V when supplied with +/-5V. Is that even safe? It seems like there is something terribly wrong with that idea
Sorry to ramble, and I would appreciate any advice you can give