> Hi all, > > follow-up from the diode question > > I'd like to add a PIC and 8 x 2 LCD to this PSU to display Vout > and Iout. Measuring Vout is easy enough, but what about I out ? > > The two simplest options appear to be a sense resistor in either > the (a) 0V or (b) Vout line > > (a) would be the easier, using a PIC analogue pin, with probably > a DC amp to improve the resolution. But the load will not see a > true ground, which could be a problem if it shares a common chassis/ > mains ground with the PSU. Mains earth will go to the PSU chassis > but I don't necessarily have to connect 0V to it as well > > (b) is said to be more accurate but needs more circuitry, being a > high-side differential. It does measure the real Iout however > > Questions - > > If this is a variable 0-35V 5A supply, what value would you make > the sense resistor ? For example to get 5mA resolution (1000th the > full Iout, or ~1 bit of ADC) > > If I were to put the sense resistor in the Vout line (my academic > preference) could I have a pointer to a differential circuit that's > compatible with a PIC ? I note that there are many high-side battery > monitor ICs, none of which I have. If there's something that could > be knocked up with a reasonable-quality op-amp that'd be peachy > > TIA > > Joe > There are lots of ways to do this and you've hit upon the two that are probably most common. A shunt resistor in the gnd line is easy because it's the same gnd as the rest of the sensing circuit - you don't have to level shift the signal (which can be a pain). The downside is... well there's several, but the one that always bugged me is now the negative output terminal, your load connection point, is now som= e value above ground - a variable value dependent on current at that. Lots of loads don't mind, some do. It's a recipe to create weird ground loop problems when you hook up a scope probe or serial port to a PC. If you want to go this way, calculating the resistor is easy. You have an analog input that can measure 0 to 5 volts, so you want a current signal that is 5 volts at full load. 5V/5A =3D 1 ohm. Granted that's a _functional= _ solution, it's not one I would recommend. First you need a huge resistor fo= r that (remember power is I^2*R) and second you loose as much as 5 volts from your power supply's capability. (it has some other unpleasant effects as well, but we'll skip them at the moment). The better solution is to use a smaller resistor and an amplifier. You could reduce the resistor to 0.1 ohm and add a 10x amp to achieve the same goal, but now your resistor is only dissipating 2.5 W instead of 25, much better. This can be extended to even better systems, but the complications start to rise significantly. High side monitoring is basically the same process, but now you need level shifting. There's probably a dozen ways to achieve this, but I've seen some nice parts from Maxim that can handle this quite easily. Poke around on their website, your looking for "high-side current monitors". But in your case, I would see about some parts from Allegro Micro. They hav= e some really nice current sensors that use Hall-Effect sensors to measure th= e magnetic field in a conductor. The real upside is effectively zero resistance for the sensor, several kV of galvanic isolation, and the output is internally amplified to a useful range for the A/D converter. Take a loo= k at the ACS714 for starters. -Denny --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .