Thread: Resistor Standard value

  1. #1
    Registered User
    Join Date
    Oct 2016

    Resistor Standard value

    I made application on C# that converts resistor value to colors.I want to show closest standard value and to show color of closest standard value when checkbox is checked?

    How to do this:
    First I should select the resistance-row (E6 , E12 , E24 , ...).
    According to this selection I get the base-values for the row - for example E12 means 1.0 , 1.2 , 1.5 , 1.8 , 2.2 , and so on.
    Now I should calculate the row-multiplier. For example if I Input 1344 Ohm multiplier for the base-values is 1000.
    Than I should take this multiplier, iterate through the row-values and multiply those value with the multiplier and compare if one value is smaller (or equal) than your entered resistor-value.
    Now I should check, which difference is smaller : to the last value of the row or to the next value of the row. The one with the smallest difference should be my reference-resistor.

    With this resistor-value I should build color-table and not each resistance-row has the same count of color-rings.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    I suppose it helps to know that resistance values within a decade are logarithmic.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    Oct 2016
    Can it be made like this for E12:

    int i = 0;
    for (i = 0; i < E12.Length; i++)
    p = E12[i] * mul;
    if (p <= val)
    r = Math.Abs(p - val);
    Last edited by Pavle; 10-27-2016 at 03:45 PM.

  4. #4
    Registered User
    Join Date
    May 2009
    Link for people who did not know about E6, E12, E24, E48, E96, E192 and resistors values.

    Resistor Values E6 E12 E24 E48 E96 E192

    Turns out I learned the E12 10% resistor values years, ago.
    I forgot if I ever knew it was called E12 resistor series.

    A better link Standard Resistor Values >> Resistor Guide from a math view point.

    Tim S.
    Last edited by stahta01; 10-28-2016 at 12:13 AM.
    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. resistor color code....
    By masterspy in forum C Programming
    Replies: 1
    Last Post: 12-21-2015, 12:01 AM
  2. Resistor value to color code and vice versa
    By Eddie Ramos in forum C++ Programming
    Replies: 15
    Last Post: 09-30-2012, 09:49 AM
  3. Replies: 7
    Last Post: 01-17-2012, 05:08 AM
  4. Help with a resistor decoder
    By usernameisvalid in forum C Programming
    Replies: 5
    Last Post: 06-25-2011, 05:21 PM
  5. Resistor Color Decoder for a 6 band resistor
    By nivoca in forum C Programming
    Replies: 2
    Last Post: 06-25-2011, 12:44 PM

Tags for this Thread