The Great Resistor

10K10626

Intro: The Great Resistor

Magnify you resistor color code with this resistor measuring color code lamp.

To this day i still have trouble to decode the color code of resistors. I hope this device will help me to learn them properly.


NOTE: The multiplier band is of by one digit / color!

Errors are there to make and gain knowledge (: -I'll correct the code soon.

UPDATE [16.11.2022]: Code should work now as intended



(I hope i could describe the building process somehow properly. Please give me any feedback on what to write in more detail.)



Watch the demonstration video here: youtube.com/watch?v=2C_KpQk_63M

More Technical details can be found here: https://hackaday.io/project/188104-the-great-resistor

STEP 1: The Enclosure of the Resistor Lamp

The first thing is to find a straight bottle in which you'll pack your light installation. Cut the bottle at the end were the cap is placed. The length of the bottle will be your resistor length. Cut the second bottle at the 1-2 cm above bottom, so you can form a cylindrical form. It helps to cut 4 slices in to the short bottom part, so you can push it over the lengthy bottle, so i closes up with ease.

STEP 2: The Light Installation

The light installation is based out of 15 WS2812 (neopixels). You'll need the high density WS2812 strip with 144 Led per meter. Cut out a segment with 15 Neopixels and stick it centered to the unbroken pair of chopsticks. Look for the Datasheet of WS2812 ans solder a wire to the Vin, Grd and DIN.

Light blocking element:

Trace or measure the radius of the inner diameter of the bottle onto the black foam rubber and cut it out. It should fit loosely into the open end of the bottle. Repeat this step 10 times. Every resistor band need two light blocking elements.

Stack those 10 circles as good as possible on top of each other and stick 4 skewing sticks orthogonal to the plain through the rubber foam(see green dots on the picture). Cut at the red marked position at all 10 circles, at best at once, just like the skewing sticks. Separate all 10 of the elements roughly centered on the 4 skewing sticks. Push the WS2812 strip sticks of the unbroken pair of chopsticks through the red marked cutten lines. Now move the light blocking elements in this order: 1 || 2 || 3, 4 || 5 || 6, 7 || 8 || 9, 10 || 11 || 12, 13 || 14 || 15. The numbers represent the numbers of WS2812 and "||" represents one light blocking element.


STEP 3: Adjust and Finish the Lamp

You should end up with the light installation as shown in the picture. To move the light blocking elements to the proper position takes some time. I used a screwdriver to adjust every position of each element at all 4 contact points of the the four skewing sticks.

Take a sheet of paper and cut it in the dimensions of the circumference of the bottle in height and the width of the length of the used bottle. Wrap this paper around the light installation and push it into the bottle. Test the strip of WS2812 now to see if its connected properly and id any element has to be readjusted.

When everything is in place at your discretion, cut or drill a hole through the short end-cap (short piece of the bottom bottle) pull all 3 cables through and close the 'Great Resistor'.

STEP 4: Resistor Arms and Base

To form the arms of the resistor cut a V-shaped segment out of the hot glue stick, make it hot and shape it. When the shape satisfy you stick aluminium tape around everything, to give it a metallic look. Stick the arme to the middle of the ends of the resistor, to give it his resistor look

Since the arms of the resistor go under the breadboard on the back side i also used one hot glue stick for the front site. Tha also included the described 90° bending method. This is being sticked with VHB Tabe on the bottom side of the breadboard.

Keep the ende of the resistor arms uncovered from aluminium tape so the VHB tape can grip more.

STEP 5: The Base

The base contains all the electronics and modules. On the bottom of the breadboard I stuck the Arduino Nano in the center and the ADS1115 next to it. The OLED display (SSD1306) was placed on the top. Before you place everything drill two holes for the alligator clips. The distance of the holes should be less than the total width of a resistor including its contact wires (arms) you want to measure in future. Look for a drill diameter, so the alligator clips fit tightly into the holes.

Use a VHB Tape to stick the resistor arms under the breadboard.

STEP 6: Theory

We are measuring the voltage across R1 and the voltage across both resistors. The ratio from U1 and U2 is equivalent to the ratio from both resistors. Since R1 is known (the 33k Ohm resistor) It is easy to figure out the second Value of the tested resistor. You have to measure the resistor R1 with an digital multi meter, so you get the exact value of it. You have to enter the exact value into my code. (exchange "33250" in line 111 in the code with your measured value of R1).

STEP 7: Wireing

After you placed all modules they have to get connected. Take your time and copy my wireing.

LED 0 & 1 goes to the lef and right side end of the hot glue stick functioning as spacer. See the green glowing regions from the picture of the bottom side of the breadboard.

STEP 8: Load Up the Code

Open Arduino IDE and make sure you have installed following libraries:

  • Adafruit_NeoPixel
  • Adafruit_ADS1015
  • Adafruit_SSD1306

Connect the Arduino Nano to your computer and upload the code.

Now you should be done. Keep the USB cable plugged in, so 'The Great Resistor' is getting power to work.

Happy testing!!


NOTE: There is still a bug when the Great Resistor is displaying values beneath100 Ohm. I am working on it asap.


UPDATE [16.11.2022]: Code should work now as intended

22 Comments

My LED strip has 5 wires coming from it, not 3. There is a red and white like your picture, but the other cable is 3 wires (Red, Blue, Green). How would I connect it with your wiring diagram?
Could you please give me the arduino programming code, so that I can assemble this project please, I really liked your work and I wanted to assemble it too.
Thanks for that great project.
I have bukt everthing as shown in the description.

I have a problem though. I never get the message "insert resistor".
And, if I change resisitors it does not update the value. I alsways have to reset the arduino nano to get the new values.

Have you got any solution, please.
Claus

Hey Claus,
great to hear that you built it!
Try to get rid of everything in the main loop, except the input-vlaue of ADC0 & ADC1. Will they change when you change the resistor? A potientiometer could help here.

It seems the main loop is not "looping" how it should.

A serial-output for debugging will help.
For example "I meassured ADC0 & 1" and "now initialising NeoPixels"

Could you send me (DM) a closeup picture of your wireing?

Best wishes, I'll help until its working on your side!
-J


Hi again,
I have the following info:
I used a new arduino nano, a new display and a new ADS1 module to be sure that the parts are ok.
Everything is double checked. When I start the programme the display is dark and it takes 10 seconds to display the value of the resistor.
The value is 100% correct as well as the value showed using the serial port,
The LEDs show the correct balue as well.

So far so good.

When I take out the resistor the display goes dark and it takes about 23 to 25 seconds for the display to light up again and show "insert resistor".
After the resistor is in, I can wait as long as I want - nothing happens.
I have to press the reset button on the arduino and the procedure starts all over again.
It seems as if the programme does not loop. But why?
Thanks for a hint.
Claus



Hey C,
have you changed the code a bit? Maybe the brightness is too high, so that the supply voltage drops to much and the nano restarts?
Try "BRIGHTNESS 50" instead of 150, so the current draw is not to high. My supply voltage already drops to 4,2V.
Otherways you could try out, if every module works as intended by using their example codes.
So look if the neopixel, ADS1115, and the OLED runs fine by itself. Maybe we can pin down the troublemaker.
Also a library might differs from mine. I would provide you with all of those i used.
Cheers, J
I did not change the code but I have tried the unit without the LED stripes.
No difference.
The power usage is 0,21A with the LED stripes running.
I also tried to drive them with a seperate 5 Volt power supply.

I will strip the code to each module and test again tomorrow.
I would be great if you tell me the sorce of the libraries you use.

Just one more hint - after power up it says "insert resistor"
if I connect the resistor the display is off imediately. It does not come on again - until I press the reset button on the arduno.
Pease see the first video. The display goes off after the resistor has been connected.
STRANGE!!
The second videos shows the "resets". This goes on forever.
Thanks again for your support!!!!
Claus


Hey Claus,
any progress?
Did you test the modules sepratly ?
Yes I did. But I gave up. The units work seperately, but I still have the problem with reset.
Maybe I will continued later this year.
I really want to see a video of this working!
Brilliant.
I think it would be a great teaching aid.
If you have room on the display, perhaps have the values of the colours also.

btw, shouldnt the 4th band be red?
Thank you !!
I am a teaching aid (: - hopefully a good one.
I still have troubles with color band. With that project i was hoping for more confidence in that. I have to verify the measurement with the resistors / color band i used.
... and while checking that - it should be red !! Indeed.
I'll put that on my todo list!
Hope this helps at line 172
Remember we are still using bands up to 999 before adding zeros :)
Simple mistake when writing it as code.
Thank you very much! I had a knot in my thoughts there, also i was starting with the multiplicator, then moved on codeing.
I'll add those edits soon. .. but i still have to move color-values under 100-10 one and 9-1 two to the right.
Best wishes, J
Ups yes, I wasn't thinking straight, there also.
Do you think this looks better?
In theory: yes.
But while powering over USB the noise wont let me get proper measurement above 15MOhm. I though about powering it with batteries, but one LiPo with stepup would not be the optimal solution.
Great project!
You might consider an upgrade to the project by adding a 4-band/5-band resistor switch on the base and some additional (more likely considerable) coding to be able to display both 4 and 5 band resistors.
Very nice! Congrats! Paulo, Brazil
Very clever, this is such a great project. Nice work!
More Comments