This Resistor Lamp Mirrors the Color Codes of Tested Resistors

To make resistor color codes easier to see, J built this awesome resistor lamp that mirrors the color code of any tested resistor.

Cameron Coward
1 year agoLights / Displays

Resistors come in many values, from close to zero ohms all the way up to many millions of ohms. To find out the value of a through-hole axial resistor (the package most makers are familiar with), all you have to do is look at the handy bands of color printed on the casing. Those tell you the value of the resistor and the tolerance of that value and you can decipher the color codes using a relatively simple chart. But those color codes are hard to read — even for those of us with good eyes. To make them easier to see, J built this awesome resistor lamp that mirrors the color code of any tested resistor.

tResistors are small, which is great for building compact PCBs but makes the color codes hard to see. That’s especially true if you have poor eyesight or are colorblind. This lamp, called ‘The Great Resistor,’ easily solves the first problem and can be setup to solve the second problem by altering the color codes to hues that a colorblind person can perceive. To use he Great Resistor, all you have to do is attach a resistor to the two alligator clips. The Great Resistor will then calculate the resistance, work out the corresponding color codes, and illuminate the lamp with those color codes using NeoPixels. It also displays a numerical value on a small OLED screen (which is far more useful, but much less interesting).

The key to the Great Resistor’s operation is in detecting resistance. Fortunately, that is quite easy to do using a simple voltage divider circuit. A voltage divider takes an input voltage and converts it to another voltage using two resistors. In this case, the second resistor is the one to be tested. By measuring the input voltage and output voltage, and using the known resistor value, one can calculate the value of the unknown resistor. An Arduino Nano performs those calculations after measuring the voltages through an ADS1115 16-bit ADC (analog-to-digital converter). If you’re interested in the math, J illustrated the formulas in a way that is easy to understand.

After determining the resistor’s value, the Arduino displays it on the OLED screen. Reproducing the color code is a bit more difficult. The first three color bands refer to three numerical digits, which come straight from the calculation. The fourth color band is the multiplier, such as “1K” meaning that you multiply the original three digits by 1,000. The fifth and final band refers to tolerance, which isn’t really measurable. One can measure the deviation of a specific resistor from the nominal value, but not the manufacturer’s tolerances (the deviation should always be less than the stated tolerance). But tolerance isn’t critical for most maker projects anyway. If it is, the OLED screen will tell you the exact measured value and you can determine if it falls within an acceptable range.

Cameron Coward
Writer for Hackster News. Proud husband and dog dad. Maker and serial hobbyist. Check out my YouTube channel: Serial Hobbyism
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles