My gift to the world for XMas: Ajax LED resistor calculator

UPDATE: This has been busted for 3 years, since I left Aus to live int he UK and my ISP-hosted pages all got deleted. But, the wayback machine has come to the rescue).

To run an LED on a given voltage supply, you need to work out the required current limiting resistor, and all LEDs are slightly different, so you have to work it out every time. It can get boring. Any there are many places on the interweb to help you do this. But…

All the ones I could find were either server-calculated, or at best still wanted you to click “go” to work out the values. When I actually looked for AJAX ones, there are some, but they weren’t quite right either …

So, I made one which is runs entirely on the client, calculates values as-you-type and even works out the resistor colours you’d need.

Current in beta, it totally does not work on MSIE, but is fine on Safari and Firefox (3 in both cases)

    • John
    • September 25th, 2009

    The calculator gave me a colour code of brown-1, green-5, orange-multiplier-3, this gives a value of 15,000 ohms, which it claimed was 1.5k
    which is incorrect the code for 1.5k is
    brown-1, green-5, red-multiplier,2
    1,500 ohms.

    The imput numbers are 40v, 3.5v, 30ma.

    This is a great little calculator you have created,

      • pdaddy
      • October 4th, 2009

      Thanks, John.

      I have fixed that bug, and also one where resistors in the .82-1 range (i.e. above 8.2Ω but below 10Ω, or 820-1K, or whatever) show up as “NaN”.

      There’s still a strange bug if you have a 1000Ω (try 40, 3.5, 40) – still figuring that one out

      I’ve also added an efficiency field, just to remind you that an LED’s not always the best idea. And improved the size of the resistor drawing.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: