Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: a little help with voltage/resistors in lighting an led light  (Read 1536 times)

0 Members and 1 Guest are viewing this topic.

aldub516

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 535
  • Last login:November 29, 2018, 03:32:46 pm
  • I want to build my own arcade controls!
a little help with voltage/resistors in lighting an led light
« on: December 05, 2015, 02:44:16 pm »
hey guys. Ive been learning a lot about electricity, and how to wire up my own power lines, and how to drop voltages and split lines and such.. Anyhoot, i bought these led buttons from adafruit last week, and being impatient and dumb, blew them both out. I got new ones in the mail today and need a little help with figuring out the proper resistor.

The forward voltage of the button is about 2.2v. I have both a 3.3v power line and a 5v power line. The instructions read as the following:
"here are two contacts for the button and two contacts for the LED, one marked + and one -. The forward voltage of the LED is about 2.2V so connect a 220 to 1000 ohm resistor in series just as you would with any other LED to your 3V or higher power supply. "

I just need help figuring out exactly which resistor i should use.. i guess they say "220-1000" pending what voltage is coming in.. So, can someone possibly suggest the proper resistor for the 2.2v led, using EITHER the 5v or the 3.3v as im not sure which one im going to use yet.

wxforecaster

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 105
  • Last login:February 28, 2019, 01:19:24 pm
Re: a little help with voltage/resistors in lighting an led light
« Reply #1 on: December 05, 2015, 03:08:01 pm »
V = IR

In this case R = (Vin - Vled) / I
I is typically 20-30mA for most small LEDs, but you REALLY need to know the datasheet for the LEDs you purchased. This number varies greatly from a small 3-5mm LED to the large, high powered CREEs.

The resistor you want depends on the input voltage. The purpose of the resistor is to dissipate the extra voltage so you don't fry the LED diode.

A single typical 20mA LED with a 2.2V forward voltage would need a 150 ohm resistor to drop from 5V to 2.2V, and a 56 ohm resistor to drop from 3.3 to 2.2V. Purchase the closest you can find.

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9664
  • Last login:Today at 12:33:21 am
  • Designated spam hunter
Re: a little help with voltage/resistors in lighting an led light
« Reply #2 on: December 05, 2015, 03:15:33 pm »
There are a number of good LED resistor calculators online like the ones here or here.

Sample calculation here

  * Power supply voltage (V): 5

  * LED voltage drop (V): 2.2

  * LED current rating (mA): 20 (typical value -- verify this is what your LEDs are rated for)

  * Number of LEDs: 1

Yields a result of 150 ohm 1/8 watt resistor.

- Changing the LED current rating to 13 mA yields a 220 ohm 1/8 watt resistor.

- Changing the LED current rating to 3 mA yields a 1 kiloohm  1/8 watt resistor.



Scott

aldub516

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 535
  • Last login:November 29, 2018, 03:32:46 pm
  • I want to build my own arcade controls!
Re: a little help with voltage/resistors in lighting an led light
« Reply #3 on: December 05, 2015, 03:19:29 pm »
my first read= wtf did you just say?

the second read= makes perfect sense. Thank you so much!

I made the mistake of forgetting to include details of the actual button, im sorry. Maybe thats why they suggest a higher resistor because its such a small led?
i forgot to link the actual button which wouldve probably helped https://www.adafruit.com/products/1439

Its a small 16mm button and im going to power it through a pi gpio power pin. As i said, there is 3.3v pins and 5v pins. I will use your suggestion and try a 150/56 ohm pending what input i use. But would you still suggest that now ,considering its a smaller button? Im just trying to learn why they suggest 200-1000 and you only say 150/56 ohm pending input. If that still applies, i will go and get those resistors. If the smaller button takes less power thus needs a stronger resistor, please let me know. Thanks for the help btw

aldub516

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 535
  • Last login:November 29, 2018, 03:32:46 pm
  • I want to build my own arcade controls!
Re: a little help with voltage/resistors in lighting an led light
« Reply #4 on: December 05, 2015, 03:22:00 pm »
hey i just wanted to also say i just checked out those calculators.. I was using multiple calculators trying to figure things out, but those are great! that 3rd one is perfect for my learning. thank you! and please still advise if u believe these smaller leds take less current than the suggested 20 ma

aldub516

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 535
  • Last login:November 29, 2018, 03:32:46 pm
  • I want to build my own arcade controls!
Re: a little help with voltage/resistors in lighting an led light
« Reply #5 on: December 05, 2015, 03:23:54 pm »
looking at the site now as im learning a few things suchs as the voltage vs current and such. the site doesnt seem to say anything about the current, so ill assume 20 ma is fair and just go with your suggestions. Worst case, i blow a 1.50 button...again

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9664
  • Last login:Today at 12:33:21 am
  • Designated spam hunter
Re: a little help with voltage/resistors in lighting an led light
« Reply #6 on: December 05, 2015, 03:46:19 pm »
The adafruit page doesn't list the LED current rating.   :angry:

Given the range of resistors that they mention, the LEDs are almost certainly not rated for 20 mA -- probably 5 - 10mA.

If you power them with 5v, I'd recommend trying a higher resistor value (~470 - 1000 ohm) first to leave plenty of wiggle room for the "magic smoke".   :lol

If the higher value resistor makes the button look dim, you can always try a lower value.   ;D


Scott

aldub516

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 535
  • Last login:November 29, 2018, 03:32:46 pm
  • I want to build my own arcade controls!
Re: a little help with voltage/resistors in lighting an led light
« Reply #7 on: December 05, 2015, 04:38:50 pm »
well damn.. i just got back from radio shack lol. I guess ill go back and follow your advice. I assumed after i showed u guys that it was a much smaller button the values would change. I plugged some values in to a calculator.. what do u think..

5v power input going to a 2.2 volt led that has a 5ma rating will take a 560 ohm resistor..
5v power input going to a 2.2 volt led that has a 10ma rating will take 30 ohm resistor..

should i just buy a damn 500 ohm resistor and see what happens? lol

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9664
  • Last login:Today at 12:33:21 am
  • Designated spam hunter
Re: a little help with voltage/resistors in lighting an led light
« Reply #8 on: December 05, 2015, 05:34:22 pm »
5v power input going to a 2.2 volt led that has a 10ma rating will take 300 ohm resistor..
FTFY.

should i just buy a damn 500 ohm resistor and see what happens? lol
That's a safer bet than using a 150 ohm one.   ;D

If you have a breadboard or terminal strip handy, you might want to put a few of the resistors you bought in series (resistor values add) to see how bright the LEDs light is for that resistance before you make another trip or three to the Shack.

    5v ---- 150 ohm ---- 150 ohm ---- 150 ohm ---- LED ---- ground

is the same as

    5v  ---- 450 ohm ---- LED ---- ground


Scott

wxforecaster

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 105
  • Last login:February 28, 2019, 01:19:24 pm
Re: a little help with voltage/resistors in lighting an led light
« Reply #9 on: December 05, 2015, 07:24:14 pm »
LEDs can operate and a relatively broad range of voltage. Since you don't know the current draw of the LED, you can start high and work your way down if it's too dim (or doesn't light at all). Resistors are CHEAP (if you don't get them from Radio Shack). I have 100 count packs over a broad range of vaues purchased on Ebay and they literally cost about 2-3 cents a piece. 1/8 watt are obviously more than sufficient for typical BYOAC LED usage.

aldub516

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 535
  • Last login:November 29, 2018, 03:32:46 pm
  • I want to build my own arcade controls!
Re: a little help with voltage/resistors in lighting an led light
« Reply #10 on: December 05, 2015, 09:51:52 pm »
hey guys, thank you for the help. I had success. i used a 150 ohm resistor on a 3.3v pin and it works great.. it actually seems to be a little brighter without the resistor and working ok, but at that point i dont know if im pushing it or not. I dont want it dying down the line. Now that im learning and getting good at this stuff i actually would like to invest in a bread board and all the little gimmicks to toy with it. It wouldve been cool to be able to just run a set of different resistors to test it all. Anyways, i succeeded for now and have used my first resistor lol. Thanks all. Maybe this will help someone else some day.

RandyT

  • Trade Count: (+14)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7013
  • Last login:Yesterday at 01:58:08 pm
  • Friends don't let friends hack keyboards.
    • GroovyGameGear.com
Re: a little help with voltage/resistors in lighting an led light
« Reply #11 on: December 07, 2015, 12:59:46 pm »
hey guys, thank you for the help. I had success. i used a 150 ohm resistor on a 3.3v pin and it works great.. it actually seems to be a little brighter without the resistor and working ok, but at that point i dont know if im pushing it or not.

The description does provide some info, but I get the feeling that, even they don't know the spec for the LED.

Based on the recommendations in the description, a 3v source with a 220ohm resistor, comes out to about 4ma.  Personally, I doubt that an LED used for this purpose is so low, as LEDs in this range are typical for direct view indicators, not for illumination.

I think you are ok with what you went with.  Just, under no circumstances, omit the resistor.  If it doesn't have one built in (and honestly, it very well may) it will destroy the LED in short order.