diyAudio

diyAudio (http://www.diyaudio.com/forums/)
-   Power Supplies (http://www.diyaudio.com/forums/power-supplies/)
-   -   Volt-Ammeter (http://www.diyaudio.com/forums/power-supplies/236381-volt-ammeter.html)

MarianB 22nd May 2013 08:24 AM

Volt-Ammeter
 
Greetings.

First of all please excuse the apparent ignorance of mine...:(

I am planning on building a lab power supply, it will have adjustable symmetric outputs, around +/-1,5 to +/-30Vdc @~5A max, i want to set up a digital Volt-Ammeter using PIC uC and an 2x24 LCD display, my problem is with the Current measuring part of the device, the shunt that is, witch is on the ground side of the load, something like this:
http://img823.imageshack.us/img823/4404/shuntao.png

I cannot have symmetric outputs in this config cus of the ground side shunt, and i want to moove the shunt on the "+" side but for the life of me i cannot find a good working solution, i need te correctly read the voltage drop on the shunt and have a linear amplification on it from 0 to 5V max, cus that is what the PIC controller needs on the analog imput, can u please guide me in the right direction? i would prefere OA config but i cannot seam to find the right way to use it so any help would be greatly appreciated.

Thanks for your time and best of all.
Marian.

palstanturhin 22nd May 2013 08:54 AM

1stly, you have the opamp there. Amplify the signal from the shunt with it - A LOT!
Put the shunt(s) to pos. and to the neg. rails. Use 0.001ohm shunts or possibly the rail itself (the wire) as the shunt... The shunt resistance has no importance, the smaller the better... Do the measurement correction with the opamp (adjustable gain).
Voltage error from an almost 0 ohm shunt will also be "almost zero"...
What is the pic ADC? 8bit?

MarianB 22nd May 2013 09:23 AM

Quote:

Originally Posted by palstanturhin (Post 3500127)
...Do the measurement correction with the opamp (adjustable gain)...

That's just it, this is my problem, i cannot seam to come up with a correct way/configuration of reading the voltage on the shunt with the OA and amplify it, i end up with grounding issues witch i cannot seam to solve. Again i appologise for the ignorance but i am in need and i'm not ashamed to admit it...

palstanturhin 22nd May 2013 09:49 AM

Definite drawback is that if the shunts are on the pos/neg rails, you must have the opamp power floating - separate powersupply for them...
You have the full schematic for the negative part already there, now just turn it upside down to get the positive rail...

But i think i see your point...
How to then read these two potentials with just one PIC?
What is easier - use 2 pics or 2 ADCs and get the data from them to the pic via optoisolators?

Or did you already consider keeping the two power supply rails completely separate untill the very end gnd terminal at the PSU output?
Then you could have the shunts at the two GND-rails?

MarianB 22nd May 2013 10:14 AM

1 Attachment(s)
This is the device in question ( exept the display witch in my case is 2x24 ), i dont care about the negative rail, only the pos rail will be monitored since that is what will be mostly used. I need the output to have common ground so the shunt must be moved on the + side of the pos rail, and as i have sayd i do not know of a way to read the voltage drop with the OA, with the shunt on the + side, i have grounding issues, so i need a schematic with what can be done, the one i have posted cannot just be turned upside down and that would be it. So any help would have to contain a schematic.

FoMoCo 22nd May 2013 10:21 AM

A standard differential amp (which can be made from an op-amp) will work to measure the voltage in the positive rail without needing a separate supply. You can also buy op-amps that are designed specifically for this. Barring that, a magnetic sensor, such as a LEM module, can be used.

MarianB 22nd May 2013 10:29 AM

I have no problem with the eventual need of a separate supply for the OA, be it single or symetric one, i can assure it eyther way easy enough, so barring that in mind please show me a working config cus as i sayd i cannot come up with one, this is my problem, and i apologise if i am poor to expressing myself...

cliffforrest 22nd May 2013 11:42 AM

I understand your problem!

The difficulty is measuring a small differential voltage (across the small series R) in the presence of a large (and changing) common-mode voltage.

The classic solution is an "instrumentation amplifier". Google it, there are loads of examples. Most have input buffer amps which cannot operate outside the op-amp supply rails, so not usable here.

A simpler solution is the classic op-amp differential amplifier. 4 resistors around a classic op-amp. Look it up and have a study! It requires close matching of resistors, but that is not difficult to "fiddle" with a one-off DIY solution.

Have a read and ask again if you need to. It is possible to solve this in an interesting and DIY way!

Your English is very good, BTW!

MarianB 22nd May 2013 12:35 PM

1 Attachment(s)
Yes, only now i get it, and @FoMoCo please accept my humble apologyes... you gave me the solution but i was to dumb to see it :(

I\'ve simulated it and it seams to work well:
Attachment 350077

The resistor vallues are just for testing it, i need to read further about this config before i decide what is best, but the thing is i now have a viable solution and that's great. Thanks allot for the ideeas and for your patience.

FoMoCo 22nd May 2013 12:54 PM

Quote:

Originally Posted by MarianB (Post 3500336)
Yes, only now i get it, and @FoMoCo please accept my humble apologyes... you gave me the solution but i was to dumb to see it :(

I\'ve simulated it and it seams to work well:
Attachment 350077

The resistor vallues are just for testing it, i need to read further about this config before i decide what is best, but the thing is i now have a viable solution and that's great. Thanks allot for the ideeas and for your patience.

You can switch connections for the sense resistor and get rid of the second op-amp and a negative supply. Also, be sure to size your resistor values so that the common mode input range of the op-amp isn't exceeded.


All times are GMT. The time now is 02:52 AM.


vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd.
Copyright 1999-2014 diyAudio


Content Relevant URLs by vBSEO 3.3.2