Reprints     Printer-Friendly    Email this Article    RSS        Font Size     What's This?

[Ideas For Design]

Excel Formula Calculates Standard 1%-Resistor Values



Christine Schneider, Bruce Trump  |   ED Online ID #1480  |   January 21, 2002

Article Rating: Not Rated

The Excel cell formula below calculates the nearest standard 1%-resistor value without using a lookup table or macro. Type or electronically paste the text below into any cell (other than A1). The formula will calculate the nearest 1%-resistor for the value in cell A1. This formula can be copied and replicated to other cells just like any standard Excel cell formula.

A properly constructed spreadsheet used to calculate standard circuit values can produce more accurate designs. When calculating interdependent component values, standard resistor values can be used to calculate subsequent component values. This approach avoids a buildup of tolerance errors. Also, it will sometimes yield a more accurate design than if "perfect" calculated values are converted to nearest standard 1% values following the completion of all other calculations.

Mantissas of the 96-value-per-decade sequence are derived by

r = 10 i/96 where i = 0, 1, 2 to 96

Each mantissa is then rounded to three significant digits, which creates small deviations from perfectly spaced values. The Excel formula calculates the two nearest standard values and tests them with the desired resistor value to select the closer.

  =IF(A1>(INT(0.5+100*POWER(10,I  F(96*(LOG(A1)-INT(LOG(A1)))-  ROUND(96*(LOG(A1)-  INT(LOG(A1))),0)<0,  ROUND(96*(LOG(A1)-  INT(LOG(A1))),0)-1,  ROUND(96*(LOG(A1)-  INT(LOG(A1))),0))/96)) *  POWER(10,INT(LOG(A1))-2) +  INT(0.5+100*POWER(10,(IF(96*(LO  G(A1)-INT(LOG(A1)))-  ROUND(96*(LOG(A1)-  INT(LOG(A1))),0)<0,  ROUND(96*(LOG(A1)-  INT(LOG(A1))),0)-1,  ROUND(96*(LOG(A1)-  INT(LOG(A1))),0))+1)/96)) *  POWER(10,INT(LOG(A1))-2))/2,  INT(0.5+100*POWER(10,(IF(96*(LO  G(A1)-INT(LOG(A1)))-  ROUND(96*(LOG(A1)-  INT(LOG(A1))),0)<0,  ROUND(96*(LOG(A1)-  INT(LOG(A1))),0)-1,  ROUND(96*(LOG(A1)-  INT(LOG(A1))),0))+1)/96)) *  POWER(10,INT(LOG(A1))-  2),INT(0.5+100*POWER(10,IF(96*(L  OG(A1)-INT(LOG(A1))) -  ROUND(96*(LOG(A1)-  INT(LOG(A1))),0)<0,  ROUND(96*(LOG(A1)-  INT(LOG(A1))),0)-1,  ROUND(96*(LOG(A1)-  INT(LOG(A1))),0))/96)) *  POWER(10,INT(LOG(A1))-2))

Note: Type this formula into the spreadsheet cell as a continuous entry without carriage returns.




Reprints     Printer-Friendly    Email this Article    RSS        Font Size     What's This?


  • Network-On-Chip Tools Arrive for The Masses
  • Tackling System Design Challenges Through Early Verification
  • ESL Tools Take Center Stage As Designers Move Up
  • Parasitic Extraction Tool Targets Next-Generation Custom ICs
  • Synopsys Jumps Into ESL-Synthesis Pool
  • Verify Control Systems Before Committing To Hardware
  • You're Using How Many FPGAs?
  • Tool Up For The FPGA Blitz
    1) Build A Smart Battery Charger Using A Single-Transistor Circuit
    (182 views today)
    2) Hot Hands For Some Cool Rock: Motion Sensing Meets Audio Engineering
    (168 views today)
    3) What's All This Transimpedance Amplifier Stuff, Anyhow? (Part 1)
    (78 views today)
    4) GPS-Derived Grandmaster Clock Delivers Ultra-Precise Time And Frequency Sync
    (74 views today)
    5) Bidirectional H-Bridge DC-Motor Motion Controller
    (64 views today)
    ALL TOP 20







    Reader Comments

    One correction. I think the equation needs to truncate with 3 digits instead of rounding to two decimal places.

    =INT(10^(ROUND((LOG10(A2)-INT(LOG10(A2))+2)*96,0)/96))*10^(INT(LOG10(A2))-2)

    Also, to find the nearest number below A1 change ROUND to ROUNDDOWN.

    =INT(10^(ROUNDDOWN((LOG10(A2)-INT(LOG10(A2))+2)*96,0)/96))*10^(INT(LOG10(A2))-2)

    To find the nearest number above A1, change ROUND to ROUNDUP.

    =INT(10^(ROUNDUP((LOG10(A2)-INT(LOG10(A2))+2)*96,0)/96))*10^(INT(LOG10(A2))-2)

    Kevin G. -November 06, 2009

    I think it would be faster if you work the equation r = 10^(i/96) backwards and solve for i. You can then round i and solve for r.

    i = Log10(r)*96

    The excel equation below removes the magnitude from the value in A1, before solving for i. After rounding i it solves for for r and rounds that result to the nearest two deicmal places. Finally, the equation reapplies the magnitude.

    =ROUND(10^(ROUND((LOG10(A1)-INT(LOG10(A1)))*96,0)/96),2)*10^INT(LOG10(A1))

    Kevin G. -November 06, 2009

    POST YOUR COMMENTS HERE

    Name:

    Email:
    Rate this article:

     less useful more useful 
    1
    2
    3
    4
    5
    Your Comments:

    Enter the text from the image below




    Please refresh the page if you have trouble reading this text.
    (Acceptable Use Policy)
     
     

    PartFinder

    Find real-time pricing, stock status, same-day/next-day shipping options and more. Brought to you by Digi-Key. Go to PartFinder.    
    GlobalSpec

    PART SEARCH :
    Powered by: GlobalSpec - The Engineering Search Engine
    Sponsored Links

    Electronic Design Europe Electronic Design China EEPN Power Electronics Auto Electronics Microwaves & RF
    Mobile Dev & Design Schematics Find Power Products Military Electronics EE Events Related Resources