I need to add a resistor into a data line on my project. The data line is a trace and carries low speed data. A through-hole resistor will be fine. The pins for both ends of the trace are exposed, but how do I add the resistor and remove the trace?
If your PCB has a solder mask you can fix this with an SMT resistor even when traces are close together. Cut the trace and scrape the solder mask away on both sides of the cut, over a few mm. Solder an 0603 or 0402 over the cut. If I patch like that I actually make two cuts a mm apart, and remove the trace(*) between both cuts to make sure there's a decent interruption of the trace.
Alternatively you can do the same and solder a PTH resistor, whose wires you first bent so that they lay flat on the trace. Won't probably work as well on narrow traces, like 0.5mm.
This type of knife allows for very accurate work (pingswept mentioned the brand X-Acto):
(*) davidcary uses a dental pick for this,
but the tip of the X-Acto is fine and sharp enough to do it with that.
I had to do exactly this recently. I did pretty much what Steven said, except that I use a small screw driver for breaking the trace and scraping the solder mask off the two ends. Here is part of a larger picture I sent to the customer to show them what rework was required:
The 330 Ω resistor at top is the one inserted into the trace. You can't see that the trace is broken underneath the resistor, but you can see the solder flowing where the soldermask was scraped off. In this case I had to add another connection to the left end of the resistor, but in your case both ends would look like the right end in the picture.
At the bottom you can see examples of connecting one end of a resistor to a existing trace. There I only needed to scrape the soldermask off and solder on the resistors.
Surface mount makes rework a lot easier than the old thru hole!