0
\$\begingroup\$

I will connect this button with a 3V LED to RP3. what resistor should I be using ? Do not know the amperage of the LED.

https://www.amazon.co.uk/sourcing-map-Momentary-Button-Mounting/dp/B07FYSR7Y7/ref=sr_1_6?keywords=Push%2BButton%2BSwitch%2B3v&qid=1565432578&s=diy&sr=1-6&th=1

\$\endgroup\$
  • \$\begingroup\$ You need to know the LED's forward voltage and current to properly select an LED. If the vendor or manufacturer does not provide that information buy somewhere else, because a reputable vendor always will. \$\endgroup\$ – Elliot Alderson Aug 10 '19 at 10:57
  • \$\begingroup\$ You could ask Ascot City, who supply the item to Amazon, for details of the LED. \$\endgroup\$ – Leon Heller Aug 10 '19 at 11:05
  • \$\begingroup\$ If you have to buy this one only then I would suggest to start with a 100 ohm resistor \$\endgroup\$ – User323693 Aug 10 '19 at 11:50
1
\$\begingroup\$

If you have to buy this one only then I would suggest to start with a 100 ohm resistor, it might not please the eyes but from there you can try tweaking. Anything higher than 100 ohms would work too but the LED might appear way dimmer. Depending on the forward voltage the LED(if greater than 3.3V) might never turn on also.

Assuming 3V as forward voltage of LED, the remaining voltage will be 0.3 V.. the sum is equal to 3.3 V (RP3).

So, The current will be 0.3 V/100 ohms And is about 3 mA. You can slightly reduce the resistor value for brighter LED. Do not exceed GPIO current limit of the RP3.

Second option for brighter LED:

You can also use a BJT and drive the base with the GPIO and drive the when te LED with a series resistor connected to 5V available on Pi.

\$\endgroup\$
  • \$\begingroup\$ Thanks for your reply, I will use the first option, as I was using a 12V LED inside a push button (it was the only local shops sold) but was using a relay to do it and it seamed a couple waste of components, so I ordered the 3V now. I will use the 100ohms , thanks again \$\endgroup\$ – F79 Aug 10 '19 at 12:07
  • \$\begingroup\$ GPIO current limit is 16mA, right? thanks \$\endgroup\$ – F79 Aug 10 '19 at 12:17
  • \$\begingroup\$ For the exact current limit you have to read the datasheet.. or share the part number of the processor present on the RP3 \$\endgroup\$ – User323693 Aug 10 '19 at 18:02
  • \$\begingroup\$ 'The voltage of the LED is 3V and the current is 15MA to 20MA', so what is the best resistor? Also RP3 processor is Broadcom BCM2837 \$\endgroup\$ – F79 Aug 12 '19 at 8:51
  • 1
    \$\begingroup\$ mosaic-industries.com/embedded-systems/microcontroller-projects/… current limit is upto 16 mA.. I wouldn't drive more than 5-8 mA using that as the excess current may lead to heating up of the chip. Choose a value and try ..my recommendation: 100 ohms upto 56 ohms. Please try and see \$\endgroup\$ – User323693 Aug 12 '19 at 21:40

Not the answer you're looking for? Browse other questions tagged or ask your own question.