Designing the Perfect Resistor Symbol
It may seem like a funny way to spend good hacking time, but by far the most frequently used, most frequently looked-at element of circuit diagrams is the humble resistor. I think that if your documentation looks good, people will spend more time looking at it — other engineers will spend more time vetting it (thanks guys!) and manufacturing folks will spend more time building what you described. Besides, it just feels right when the stuff you produce looks good, documentation included.
I’ll admit, I got a little too into this, but it started innocently enough. While working on my component library, bringing it up to date and integrating it with Altium, I realized that there would be a single resistor symbol for the nearly 2,200 resistors in the database. Something of this magnitude deserves a little extra consideration.
Just to be clear, I need an American resistor. Using European-style resistor symbols is the kind of thing that gets you beat up in this part of Texas. Also they’re kinda boring. A rectangle? Psh.
I need a symbol with good proportions, not so small that it just shows up as a little wiggle in a wire, and not so large that it takes up too much space. The first thing to do was to decide on how many ‘peaks’ my new resistor would have. I did some surveying on Google Image search, and both eight and six seem fairly common. There were a couple with four peaks, but these are definitely outside the norm and a little runt-ish looking. There were even a few with an odd number of peaks, but these are always top or bottom heavy, and just look weird. Altium’s built-in libraries use six peaks, but at 40 points long by 10 points wide, it is very small, dwarfed by the accompanying resistance and tolerance text. My current fellow engineers use eight peaks, and it would be nice to standardize on that size and shape to keep some continuity, but it was originally drawn to print on ANSI D (22″x34″) size paper, which is enormous. Since I have to keep my prints to B (11″x17″) or A (8.5″x11″), our traditional resistor symbol just isn’t cutting it anymore.
After all that research, six peaks seem to be the most common, a happy medium, and a pleasing shape overall. Hang on.. it only gets worse from here!
At first, I started with a polygon, to try to capture that typeset feel of the old electronics magazines. This is characterized by heavy lines compared to the wires of the schematic and sharp peaks instead of rounded, capped lines. Unfortunately, this was a disaster. As much fun as it would be for my schematics to evoke magazine projects from the 90s, the result was much too heavy, and way too fat. And insult to injury, when printing in black & white, Altium removes the fill from polygon objects. My new resistor is just a hollow shell. Ack!
One step forward, two steps back. So I quickly became comfortable with using line segments with their rounded end caps. Pointy peaks be damned! I still wanted to get that heavier appearance, so I tried out Altium’s medium line weight. Still way too much! Unfortunately, there isn’t anything between ‘small’ and ‘medium’ line weights in Altium, so I’m relegated to making the perfectly proportioned resistor out of simple lines. All is not lost, because there is still plenty of room for improvement!
Its funny how tricky it can be to draw something as simple as a squiggly line..
So there are 8 points, where the first starts at 0,0 and the last ends at x,0 — where x is the length of the squiggly section. That should be 7 equal spacings, so divide x by 7 and… oh no, that’s a funny looking resistor…
The first vertex and the last vertex are only half as far from the next vertex as the others… So those share a full space… Alright, divide x by 6. That’ll do it. And it’s somewhat convenient if you decide to make your resistor 30 counts long. Unfortunately, the math never comes out to whole numbers no matter how you do it. After a few attempts with my calculator, I had to break out Excel for the task. Late Friday afternoon is not the time for mental math, I can tell you.
After several trial prints, I decided on 25 counts for the length of my squiggly. This forced the component pins into an odd value (12.5 counts) but they don’t mind, as long as you place the pin connection points on a 10-count grid point.
The result is a well-proportioned resistor, that matches nicely with its parameter text.
a) Too big; b) Shorter but too wide; c) Just right!
Definitely a good use for an hour of a late Friday afternoon 🙂
Appendix A: Data
Here is some of the point data for the best looking attempts if you’re feeling like trying it out:
|Point number||X coordinate||Y coordinate|
I’m still a little disappointed that the polygon approach didn’t work out though.
|Point number||X coordinate||Y coordinate|