Skip navigation

Tag Archives: leds

Widerstand ist zwecklos” is german for “resistance is futile”, but also “resistor is useless”, which is absolutely the point in this project. i teamed up with my dear friend jan and we created a device that measures resistance and displays it as a resistor color code. an optional cheat mode also displays the resistance as a decimal number. needless to say it is shaped like a giant resistor.


‘just because’, we decided to integrate all electronics into the tube instead of putting it into the base. we also chose to use perfboard and not a dedicated PCB because we had all the parts leftover from different projects and this one is more of a recycling project.


the heart of our resistor is an ATmega168 microcontroller in an uncomfortably large DIL28 package. along with the microcontroller we use a 7805 for voltage regulation and a 4511N BCD to 7-segment decoder/driver for the extra display.


we multiplex the three RGB-LEDs and the 7-segment displays using BC846 transistors as drivers. in order to save some space, we decided to use SMT for transistors and other passive components.


the resistor is made of dark grey PVC pipe. RGB LEDs and 7-segment displays are integrated into acrylic discs that form the rings of the resistor. in order to embed the displays, we had to CNC a custom disc.


to perform the actual measurement, we experimented with measuring the resistance by the discharge time of a capacitor. the problem: the measurement takes some time, so the user does not receive an instant measurement when she connects the probes to a resistor. so we decided to rather use a voltage divider and the ADC of the ATmega. the problem this time: we wanted to cover a large range of resistances. so if you use – let’s say a 1K resistor as the constant resistor and measure a 1K resistor, you measure a nice 50% value at your ADC, let’s say 512. if you measure small resistances, like for example 10R and 12R, you cannot safely distinguish between those two because both lead to very very small ADC values. our solution was to use two voltage dividers, one with a 150R constant resistor and the other one with a 27K. we determined this values with some spreadsheeting.


the resistance is measured with both voltage dividers. threshold values decide if the measured value lies in the safe range of the first or the second voltage divider. as a result, we were able to cover the E12-series over more than 5 decades. in other words: from 10R to 1M


the firmware displays a fancy colorful animation if the line between the probes is open. if a resistance is measured, the ADC value is compated to a lookup table. the closest value from the E12 series is selected and the correspondent colors are displayed. cheatmode is activated if a resistance is measured during power-up. it is sufficient to bridge both terminals with your fingers to do so. if cheatmode is active, you get an additional decimal display of the resistance value.


feel free to take a look at the calculations, scripts, firmware and schematics:

))) project files (((

if you have any questions, please do comment.

UPDATE: the device is now used as a temperature sensor, connected to an NTC. although my brain is still struggling to figure out the mapping from temperature to colors 🙂

additional images:







While messing around with twi (that’s what atmel calls i2c) some time ago, i built this little device that does nothing more than listening to the bus and display all the bytes it receives on a two-digit 7-segment-display in hex-format. the motivation for this project was not only “i need this thing” but also “i’m tired of coding and want to solder something. and i have to get rid of these displays anyway”. the schematic and layout was done in eagle. an atmega8-controller (overkill) handles bus and display. the whole device is powered by the bus.

here’s two pics:

top side of i2c-slave

bottom side of i2c-slave

yes, i forgot one line 😦

%d bloggers like this: