There are times when you might want an odd-value resistor. Rather than run out to the store to buy a 3,140 Ω resistor, you can get there with a good ohmmeter and a willingness to solder things in series and parallel. But when you want a precise resistor value, and you want many of them, Frankensteining many resistors together over and over is a poor solution.
Something like an 8-bit R-2R resistor-ladder DAC, for instance, requires seventeen resistors of two values in better than 0.4% precision. That’s just not something I have on hand, and the series/parallel approach will get tiresome fast.
Ages ago, I had read about trimming resistors by hand, but had assumed that it was the domain of the madman. On the other hand, this is Hackaday; I had some time and a file. Could I trim and match resistors to within half a percent? Read on to find out.
You don’t need any fancy tools. A CNC machine is nice. A 3D printer can help. Laser cutters are just great. However, when it comes to actually making something, none of this is exactly necessary. With a basic set of hand tools and a few simple power tools, most of which can be picked up for a pittance, many things of surprising complexity, precision, and quality can be made.
A while back I was working on a ring light for my 3D printer. I already had a collection of LEDs, as all hackers are weak for a five-dollar assortment box. So I got on my CAD software of choice and modeled out a ring that I was going to laser cut out of plywood. It would have holes for each of the LEDs. To get a file ready for laser cutting ook around ten minutes. I started to get ready to leave the house and do the ten minute drive to the hackerspace, the ten minutes firing up and using the laser cutter (assuming it wasn’t occupied) and the drive back. It suddenly occurred to me that I was being very silly. I pulled out a sheet of plywood. Drew three circles on it with a compass and subdivided the circle. Under ten minutes of work with basic layout tools, a power drill, and a coping saw and I had the part. This was versus the 40 minutes it would have taken me to fire up the laser cutter.
Several times in the last few weeks, I’ve heard people say, ‘this will be the last PCB I design in Eagle.’ That’s bad news for CadSoft, but if there’s one thing Eagle has done right, its their switch to an XML file format. Now anyone can write their own design tools for Eagle without mucking about with binary files.
Not all EDA softwares are created equally, and a lot of vendors use binary file formats as a way to keep their market share. Altium is one of the worst offenders, but by diving into the binary files it’s possible to reverse engineer these proprietary file formats into something nearly human-readable.
[dstanko.au]’s first step towards using an Altium file with his own tools was opening it up with a hex editor. Yeah, this is as raw as it can possibly get, but simply by scrolling through the file, he was able to find some interesting bits hanging around the file. It turns out, Altium uses something called a Compound Document File, similar to what Office uses for Word and PowerPoint files, to store all the information. Looking through the lens of this file format, [dstanko.au] found all the content was held in a stream called ‘FileHeader’, everything was an array of strings (yeah, everything is in text), and lines of text are separated by ‘|’ in name=value pairs.
With a little bit of code, [dstanko] managed to dump all these text records into a pseudo plain text format, then convert everything into JSON. You can check out all the code here.
Here’s a tip to keep in your back pocket, you can use a metal file to adjust your resistors. [Gareth] shows off this technique in the video after the break. A metal file is literally all that you need to do some fine tuning. Just make sure you’re starting off with a carbon film resistor as this will not work with the metal film variety.
His example shows a 10k resistor which is reading just 9.92k on his multimeter. But he needs precisely 10k. After getting through the protective layer he makes just a couple of passes with a small file, each time adding about 20 Ohms of resistance. Now he does mention that excessive deep cuts can hurt the power rating of the resistor. But this certainly isn’t damaging it if done correctly. It turns out this is how they are tuned at the factory.
One possible use he mentions is trimming the balance on a hacked servo motor.