I want to save up in buying a sense resistor and just use the PCB tracks. I need to sense up to 2.5A and I wanted to design the trace so it has a 0.1 ohm resistance. Is this a good approach? Also, can anybody share the calculations about how to determine the track length and width assuming a 1 Oz copper thickness?
The two main drawbacks are accuracy related: initial tolerance, and temperature coefficient.
PCBs are made to loose tolerances. The copper thickness is nominal, not accurately controlled. Even the etch width is subject to large variations. You might achieve 20% cross-sectional area accuracy to start with if you're lucky, much worse if you're not.
Temperature coefficient (tempco)
Pure metals have a steep tempco, copper is 0.4%/C. That's a 10% change in resistance for a 25C change in temperature. Resistors are made from alloys which have been designed to have near zero tempco.
For detecting whether a current is flowing or not, or perhaps even for the current sense element in a current-controlled converter where it's within a feedback loop, it might be OK. For measuring anything with any semblance of accuracy, use a discrete current shunt resistor.
A discrete resistor will have much higher power handling than a track. And if you should overload it catastrophically, it can be replaced, whereas losing a track would trash the board.
First, let me say that I agree with all the answers already provided. However, with a simple change of requirements this solution might not be as outrageous as it sounds.
The design parameters provided by author resolve into 0.25V drop and 0.6W of power loss. This is way too much, considering that normal current sensors operate from as little as 1~10mV over resistors in 0.6~5mOhms.
If voltage differential of 1-10mV is compatible with whatever circuit is planned then required copper length reduces to centimeters, if not millimeters. Now, if the PCB already has power trace from input to output, why not tap into it for current sense? The voltage differential is already there! The argument that burning that trace will destroy PCB becomes void immediately.
Second most voiced argument is thermal coefficient. Very valid point. However i suspect that power trace on PCB will have much higher thermal dissipation capacity than a resistor. In fact, if done right it will be ambient. Still not precise enough, of course, but we haven't seen the requirements. As @neil-uk pointed out, there are applications where detecting current flow is enough. Or sudden spikes at currents several times above normal (e.g. motor stall).
Another argument is initial trim. Yes, in mass production it won't be plausible. But for one-off project it can be easily done with some careful application of fine sandpaper.
In short, just as others I would not recommend this. But I believe it is doable and acceptable in some specific circumstances.
Was reading app notes and stumbled upon AN894 from Microchip. On page 3 you can find "Figure 3: PCB Shunt Resistor" as a valid option for designs where high precision is not required.
Copper resistors increase in resistance with temperature. It is about 0.4% per degree C. That makes them poor resistors. But perhaps you are OK with it. Just keep in mind that a 25 degree increase in temperature will give you a 10% increase of resistance.
In principal, if you had a way to measure the actual resistance, or a way to know the temperature of the trace, you could compensate for the temperature change. Usually that is not practical.
The way to calculate the resistance of a metal resistor with uniform cross-section is as follows:
R = ρ * l / A.
R is the resistance, ρ is the bulk resistivity of the material, l is the length of the resistor, and A is the cross-sectional area of the resistor. For a trace, the cross-sectional area is trace thickness * trace width.
For copper, ρ is 1.72 * 10^-8 Ohm-meters. So use meters for all your widths and heights and lengths to avoid mistakes with units.
Hope that helps you evaluate whether to use a copper sense resistor and also how to calculate dimensions that might work.
Ok, let's see. There are two things.
First, for 2.5 A ampacity the trace width must be at least 42 mils, according to BITTELE calculator. Now, to get to 0.1 Ohm, the trace length must be about 8.3 inches. I am not sure if the cost of PCB space can offset the cost of a $1 resistor.
Second, there are manufacturing tolerances. The plating thickness may vary, and there is over-etch making the trace narrower. So the value of this shunt will vary from board to board. To get to typical 0.5% - 0.1% chip resistor tolerance, you would need to employ individual calibration of your resistor, which will cost a lot.
Now you decide if this is a good idea to use PCB trace instead of guaranteed $1 SMT resistor.
You can probably do this on a ceramic subtrate pcb. On normal FR4 you can do it, but the tolerance will be bad and the temperature coefficient will be horrible.
For 2.5A, and 0.1 Ohm you'd need 275mm of 1mm trace.
However, I recommend a current sense resistor, or a hall effect sensor from Allegro MicroSystems or similar.
The other answers have covered pretty well the how of this. Basically just use a calculator to figure out the trace width and length. But I think these comments are overly cautious. If you're just trying to detect a motor stall, over-current, or something like that I'd say it's fine. I've done this successfully before.
You should figure out what kind of accuracy you need. If it's very low (it should be, given this method), then figure out how much you can reduce the shunt voltage and still get that accuracy. If you start with a low vRef, and then settle for only 10-20 points of resolution you should be able to get the shunt resistance way down.