3

I have a Raspberry Pi 1 Model A and am trying to control an LED from an app that I will be running on it. The wiring I'm planning on going with is:

enter image description here

Even though thats a RPI 3 in the diagram above, the concept is the same:

  1. Connect the RPi to a suitable power source (via Micro USB)
  2. Connect the 3.3V pin on the RPi to the power rail on the breadboard
  3. Connect the column where the LED (1.2V @ 100mA) will be placed to power through a resistor (47 ohm)
  4. Then just connect the column where the LED's 2nd leg is located back to a GPIO pin that is configured to be an output pin

So I wanted to verify (I'm afraid I'm going to fry my pi!):

  • That the wiring is correct; and
  • That I'm using the correct resistor to do the job (R = V/I = (3.3V - 1.2V)/.1A = 2.1V / .1A = 21 ohms...so I figured 47 ohms is OK); and
  • That I should be configuring my GPIO pin to be on output pin afterall

Thanks!

8
  • 1
    A LED that is 1.2V/100mA, is it a special one, high intensity? Typical values I have seen is more in the range 1,8V/20mA for red LED's.
    – MatsK
    Sep 15, 2017 at 19:23
  • Hi @MatsK (+1) it might be...its all they had at my local RadioShack though. Will my resistor be enough for it? Is it somehow incompatible with the RPi? Or am I fine?
    – smeeb
    Sep 15, 2017 at 19:25
  • 1
    Possible duplicate of Why won't the LED turn on?
    – Brick
    Sep 15, 2017 at 19:26
  • Phrasing of the question is not identical to the duplicate, but the answers are directly relevant.
    – Brick
    Sep 15, 2017 at 19:27
  • 1
    The Raspberry Pi's GPIO can drive 16mA and 100mA is far above that! And please use U for voltage, V is for Velocity ;-) And if you do recalculate you will get a R = 75-100 ohm.
    – MatsK
    Sep 15, 2017 at 19:32

1 Answer 1

2

There is some considerations:

  • A maximum of 16mA per GPIO with the total current from all GPIOs not exceeding 50mA.

  • Calculate the resistance, its the limiter for the current.

    Normal data for a red LED: ~1.8 volt, 16mAmpere (0,016A)

    U = 3.3V - 1.8V = 1.5V

    R = U / I

    1.5V/0.016A = 94 ohm

And regarding the schematic, this is working, your a bit turned around. enter image description here

9
  • 1
    You cant use that LED ! 100mA is more than the 16mA that the GPIO can be loaded with!!!!! And that I have stated several times!!!!! So buy a LED that is approx in the 16mA range.
    – MatsK
    Sep 15, 2017 at 19:53
  • 1
    Oh I can read what you've wrote perfectly fine! You've told me (like you said) several times that I can't use this LED. But you are confusing me because you're using an example that uses a 1.8V LED rated at .02A, and I'm not sure where that's coming from. Is that just an example you're providing here?
    – smeeb
    Sep 15, 2017 at 19:56
  • 1
    Sorry for being annoyed. Here is some quite common values for LED that will shed some light over the issue: upload.wikimedia.org/wikipedia/commons/d/d6/…
    – MatsK
    Sep 15, 2017 at 20:00
  • 1
    OK, I think what you're trying to say is that if I had a 1.8V LED rated at 20mA, then I would need 3.3V - 1.8V / .02A = 75 ohm. If that's the case, and you're just citing this as an example, then I follow you 100%.
    – smeeb
    Sep 15, 2017 at 20:05
  • 1
    It would not hurt to try the LED w/ 16-20 mA. LEDs simply get dimmer with less current, but it might well be bright enough. I'm dubious an "only one I could find at Radio Shack" LED is rated at 100 mA. Note that they will burn out if you overcurrent them.
    – goldilocks
    Sep 21, 2017 at 16:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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