Resistors and wattage - Page 1
Forum section: electronics / beginners

author: Red Squirrel
author_rank: Super Contributor
timestamp: May 08, 2015, 03:31:25 am
content: I want to experiment with using low ohm resistors for measuring current in circuits, and sending that info to a micro controller.I just want to make sure I'm on the right path here as math is not really my thing. I know this is an ohms law thing but not sure if I'm applying it right. I want to make sure I don't exceed the wattage of whatever resistor I buy.To determine what voltage drop I get for a given resistor do I just times the total current being drawn by the circuit by it's resistance? So say I want to draw 10a from a circuit and use a 0.003 ohm resistor, at 10a the voltage drop would be 10*0.003=0.03? Is the watt dissipated by the resistor then 0.03*10. so 0.03watt? Let me know if I'm on the right track, thanks.

author: Fsck
author_rank: Super Contributor
timestamp: May 08, 2015, 03:41:44 am
content: I think you mean 0.3W

author: miguelvp
author_rank: Super Contributor
timestamp: May 08, 2015, 03:50:06 am
content: Quote from: Fsck on May 08, 2015, 03:41:44 amHe stated 3 mili ohms but then wrote 30, so the 0.03W should be fine just a typo on the resistor value in the final calculationEdit: oops, nevermind

author: Rick Law
author_rank: Super Contributor
timestamp: May 08, 2015, 03:54:46 am
content: Quote from: Red Squirrel on May 08, 2015, 03:31:25 amYou have the formula right, but your math is wrong.V = IRPower = IVYou have I=10A, R=0.003So V=10A*0.003ohm=0.03VoltThis part you got correctPower=IV=0.03Volt*10A=0.3WattYou did this multiply wrong

author: mariush
author_rank: Super Contributor
timestamp: May 08, 2015, 04:00:14 am
content: P = IxVV = IxR=> P = IxIxR = 10x10x0.003 = 0.003 x 100 = 0.3wNote that with such low value resistor, at 10A you'll only have about 30mV drop across the resistor, which would be kind of hard to measure with a microcontroller directly. With a 10bit adc and vref set to 2.048v, you're smallest step would be 2mV, so basically when the voltage drop across the resistor goes below about 4mV (which happens below around 1A), you wouldn't be able to measure and show anything meaningful.I guess a good solution would be to use a precision opamp to raise those 0...30mV to 0... 3v or something like that, which would allow you to measure the voltage more precisely.If you'll deal with such high currents only rarely (or for short periods of time) it may make more sense to use a resistor value like 0.01 ohm, as it would make calculations inside the microcontroller much easierIf you deal with high currents a lot, it may also make more sense to use a hall current sensor IC to measure the current, for example something like ACS712, which outputs 100 mV per A and has a typical resistance of around 1.2 mOhm, 3 times less than your resistor which would be more affected by heat and other things. See datasheet, linked from this page:http://uk.farnell.com/allegro-microsystems/acs712elctr-20a-t/sensor-current-20a-soic8/dp/1329624

author: Red Squirrel
author_rank: Super Contributor
timestamp: May 08, 2015, 05:05:43 pm
content: Good to know I'm on the right track and yeah I actually meant 0.003ohm in the example, I did a typo there.As for the micro what I'd probably do is use an op amp to bring the max value I want to measure to around 4 volts. I never played with them before but I'll be making an order soon, along with the resistors.

author: PSR B1257
author_rank: Frequent Contributor
timestamp: May 08, 2015, 05:59:29 pm
content: QuoteThe best and easiest way to achieve this, is to use an instrumentation amplifier either with programmable* or fixed gain.A ordinary noninverting amplifier is not suited for that task.*INA128, LT1167 for example

author: Red Squirrel
author_rank: Super Contributor
timestamp: May 08, 2015, 06:22:30 pm
content: Quote from: PSR B1257 on May 08, 2015, 05:59:29 pmI'm very new to op amps, I'm just curious, why would a regular one not work for this? I was thinking of using an op amp with negative feedback, I need to read up again on them but from what I did it seems it would be perfect for this, but I may be missing something. The shunt resistor would also go on the negative side, so the negative pin would be negative for the op amp and then other side of resistor would be the positive input, and the supply rail would be 5v or so. Negative rail would be ground too.

author: Rick Law
author_rank: Super Contributor
timestamp: May 08, 2015, 06:31:35 pm
content: Quote from: Red Squirrel on May 08, 2015, 06:22:30 pmI am a relative newbie too. But let me give it a try and see if someone will correct me if I am wrong.(1)A regular run of the mill OpAmp is not as linear as a precision OpAmp. When you multiply, the multiplication factor will vary according to current input.(2)The killer is offset voltage. The OpAmp needs input to reach the offset voltage before it acts! A typical run of the mill opAmp wil have 1-3mV offset voltage.With a 0.003ohm, you need 1Amp to get 3mV, so anything under 1Amp, you get nothing.That is why you want to use at least a precision opAmp (linear) and add circuits to deal with the offset. Easier would be those made for the job.

author: PSR B1257
author_rank: Frequent Contributor
timestamp: May 08, 2015, 06:35:43 pm
content: QuoteTrue, but you have wiring towards the negative supply pin, where you got a voltagedrop too, which adds up to the voltagedrop across the shunt resistor. This is the reason, why you HAVE TO measure the voltage direct across the resistor (google 4-wire measurement, or Kelvin measurement) and not single endet to GND.QuoteEven a presison opamp would not work if it is set up as a single ended amplifier. Otherwise your right. The input offset voltage of the opamp is a key factor here.

author: Red Squirrel
author_rank: Super Contributor
timestamp: May 08, 2015, 08:44:06 pm
content: Ahh ok I understand, so regular op amp needs a certain voltage before it starts to act, and are not very linear? So if I use something like the INA128 or LT1167 as suggested they are more linear and react at a lower voltage, correct? And yeah I would measure voltage physically as close to the end of the resistor as I can, and not direct from ground. Either way, I'd test with a multimeter to calibrate the value within the microcontroler.

author: PSR B1257
author_rank: Frequent Contributor
timestamp: May 08, 2015, 09:19:55 pm
content: QuoteNot quite. There is no thing such aregularopamps.You can buy precision rail-to-rail opamps but it will still not work, until you configure them as a differential ampifier.QuoteSee above. You can not say so in general. If you supply aregularopamp with a bipolar voltage, it can certainlyreactto voltages near and below GND.PS: You will have to supply the instrumentation amplifier also with a bipolar voltage.

author: Red Squirrel
author_rank: Super Contributor
timestamp: May 08, 2015, 10:42:29 pm
content: Bipolar meaning a negative rail too? I guess this may be more involved than I thought, I think I'll just use a discrete IC, would this one work:http://www.digikey.ca/product-detail/en/ACS715ELCTR-20A-T/620-1261-1-ND/1955903If I understand correctly, for each amp I get 0.185V out, so at 20 amps I'd get 3.7V. That would give me a half decent accurate reading if I plug it straight into the micro so it reduces the part count and complexity, if it really works the way I think. They have higher amp rating ones too. They even have 100a ones, but I'm not sure if you actually just connect them directly, those leads don't seem big enough to carry 100a!http://www.digikey.ca/product-detail/en/ACS756SCA-100B-PFF-T/620-1238-ND/1829841That's another project though... I might go the instrumentation op amp route for that one as I already have a proper 100a shunt in place.

author: PSR B1257
author_rank: Frequent Contributor
timestamp: May 09, 2015, 07:01:25 am
content: QuoteYes.QuoteDepends on the accuracy you looking for.QuoteYes. You might wont to adjust the reference voltage of the ADC to 4V or even 3.7V touse the whole range.QuoteThey will carry the current they are specified forBut you should only choose one of these, if you really need to measure such high currents. The higher the current rating, the lower the sensitivity. If you measure 20A with the 100A sensor (with a sensitivity of 20mV/A) you only get 400mV.

author: Red Squirrel
author_rank: Super Contributor
timestamp: May 09, 2015, 07:52:44 pm
content: Cool makes sense, and good to know about lowering the ref voltage on the micro to get a better range. And yeah I'll stick with sensors that fall within the range I want to measure for better accuracy. Good to know the 100a ones would work for those currents though, I was just skeptical about actually having that much current going through those leads or how it would be connected, as I'd expect something rated for 100 amps to have big lug screw holes or something. But that's another project, I'll figure that one out later.

author: Rick Law
author_rank: Super Contributor
timestamp: May 09, 2015, 08:41:07 pm
content: Quote from: PSR B1257 on May 08, 2015, 09:19:55 pmBad wording on my part. By "regular op amp", I mean the ones without fancy options. Just the +in, -in, and out. No compensation, no laser trimming, just run of the mill cheap stuff. LM358, LM2902 types are the one I think of as "regular".