I am looking at making a power supply out of an old ATX computer power supply. I would like to use three voltages, 12v 5v and 3.3v from the power supply. I would also like to use a character LCD to display voltages and currents.
I'm having a bit of an issue working out how best to measure the currents, the power supply is capable of producing quite high currents, 6A at 12V, 16A at 5V and 12A at 3.3V. I want to be able to use the power supply at its full potential if I ever need to.
Do you think the best way to measure these currents is to use a current shunt in series with the load and measure the voltages at the supply side and the load side of the shunt and working out the current depending on the differences. I will obviously need to use two voltage divider circuits in parallel on either side of the shunt in the 12V circuit to reduce the voltage down to an acceptable level for the arduino pins. I was thinking 50k and 4k7 resistors with high accuracy for these circuits.
The only thing I am concerned about is the sensitivity of the ammeter when currents are low, what are you thoughts?
Scratch those resistor values, I think 10k for R1 and 6k for R2 would be a better arrangement. Carries the Vout right up to 4.5V when Vin is at 12V. It also allows Vin to get upto 13.3V before Vout gets to 5V. We also get the full range of the analogue pin values.
I think this sensor will be perfect for you http://www.devicecraft.com/haefcuse1.html
it worked great for me, and has plenty of leeway to work with, even tho this ones 80a you can loop the wire around the center to multiply the reading in case you want more sensitive lower amp readings
and it decently cheap XD
The easy way is using a shunt resistor of a small value, or even putting several resistors in parallel to get less resistance. Then just read the voltage drop caused by the resistor, apply ohms law to calculate amps, and thats it.
You can also use an instrumentation amplifier setting or voltage differentiator to get a direct input of the voltage drop in the shunt resistor. Probably more accurate than using voltage dividers.
The devicecraft sensor is not for your project. The sensitivity will be horrible for your project. You don't produce more than a few amps on your power supply so with the 23mV/A sensitivity and some offset + drift, your about buried in the noise most of the time, not able to tell if you have 1A or 1.5A, which is probably important given your amp range. I would use a shunt and make sure it's rated with high enough wattage. I don't know what your voltage divider is doing. Sounds wrong to me to have these things around but a diagram will help someone understand what you are talking about.
Actually if you loop it 5 times ( 80 max amps /16max amps) you can get a perfect measure window from 0 to 16, @ 115mv(23mv x 5) per amp and with the resolution of the adc you should be able to get meausrement in 35ma steps, so you can tell difference between 5.15 amps vs 5.18 amps which isn't so bad
5 loops is easy. I once had to calibrate a -100 to +100 hall unit and managed to wire 100 turns of fine wire through the core to permit me to undertake the calibration by using a 1 amp variable supply
winner10920:
Actually if you loop it 5 times ( 80 max amps /16max amps) you can get a perfect measure window from 0 to 16, @ 115mv(23mv x 5) per amp and with the resolution of the adc you should be able to get meausrement in 35ma steps, so you can tell difference between 5.15 amps vs 5.18 amps which isn't so bad
Sounds like a fun process. I didn't think about that. If you can loop a few times that would work!
Wow!! What a fantastic response!! Thanks everyone!!
There is always more than on way to skin a cat!!
The original idea I was going with was just to use two voltage dividers, one on either side of the shunt, I have worked out its not going to be accurate enough, I will draw up a quick diagram of what I meant when I'm in front of my computer again
I must say I am a fan of the differential op amp. Just because I have used them a little before. I would like to set it for about 67 gain. That will amplify the 75 mv from the shunt upto just over 4.5v. That will give me enough accuracy I think. Has anyone found some good media on deciding the bet resistor values the achieve the correct gain on a differential op amp?
I really like the idea of the hall sensor and the diode, I will do a bit more reading on them and some breadboard stuff to see what will work best.
Here a schematic I did in 1993. It was for a 12 V battery monitor system for a robotic project ( un-complete ) The output of the op-amp are going to 0 to 5 V. I use a dual-voltage rail to power the op-amp. It do what pgmartin was saying but I use op-amp to do the calculation. In the coding, use simply use map() function.