Page 1 of 1

Preventing Damage to the PI

Posted: Sat Jun 25, 2016 12:24 pm
by Alphabet
Hello,

I'm trying to teach myself basic electronics using my Raspberry PI 3. I purchased this kit https://www.amazon.co.uk/gp/product/B01 ... UTF8&psc=1, however, the tutorial I'm following for a basic LED circuit suggests using a 1K resistor to prevent damage to the pi, below is the diagram provided.

Image

Will any of the following sufficiently substitute the 1k resistor?

10k resistor
330 ohm resistor

I imagine neither will, but I figured it's worth asking...

Thanks!

Re: Preventing Damage to the PI

Posted: Sat Jun 25, 2016 12:31 pm
by SonOfAMotherlessGoat
Your image is quite large and cut off, so it may be displaying the LED but I can't see it. So what color is the LED? (And did the kit specify a FV for the LED?)

Re: Preventing Damage to the PI

Posted: Sat Jun 25, 2016 12:47 pm
by rpdom
The 330 Ohm resistor should be good. Even if your LED is a very low voltage one (1.0v), with a 330R resistor you would get under 7mA flowing through it when driven from a 3.3V GPIO which is well within the capabilities of the GPIO.

The spec for the LED would help, but the calculation is fairly easy.

Subtract the LED forward voltage from the GPIO supply voltage (3.3V) to get the resistor voltage.
(3.3 - 1.0 = 2.3)
Divide the result by the resistor value in Ohms (1K = 1000 Ohms).
(2.3 / 330 = 0.006969...)
Multiply that result by 1000 to convert from Amps to Milliamps.
(0.006969 * 1000 = 6.969 mA)

Re: Preventing Damage to the PI

Posted: Sat Jun 25, 2016 1:03 pm
by pksato
Hi,
Ask for led circuit, but show a switch circuity?
Need answer to led or switch circuity?

If is about led:
Some blue and white led not work with 3.3V.
Red and green are fine to use with 3.3V.
Current limiter series resistor is calculated using Ohms law. For that need to know led drop (forward) voltage, typical is from 1.8V (red) to 3.3V (blue).
Rs=(3.3V - 1.8V)/0.005A
Rs=300 (near common values are 270Ohms or 330Ohms).

If about switch:
Again Ohms law, but now need to calculate short circuit current, in case of set pin mode to output. The 1k resistor is used to limit current on this condition. Recommended draw current do each pin is 8mA (0.008A).
Rp=3.3V/0.008
Rp=412.5Ohms (390Ohms or 470Ohms)

But, maximum current per pin is 16mA.
Rp=3.3V/0.016A
Rp=206.25Ohms. (220Ohms)

So, any resistor from 220Ohms are fine to replace 1k resistor on switch circuit.
330Ohms is ok, 10k also works, but can be unstable.

Re: Preventing Damage to the PI

Posted: Sun Jun 26, 2016 9:33 am
by Burngate
Because the original picture is huge, here's a smaller version
gifTZX11.png
gifTZX11.png (29.61 KiB) Viewed 1634 times

Re: Preventing Damage to the PI

Posted: Sun Jun 26, 2016 11:11 am
by HawaiianPi
Still no LED in that picture, and the circuit would only really need a single resistor to drive an LED (and no 3.3V connection).

[GPIO]-----[LED]-----[Resistor]-----GND

The LED lights when the GPIO pin goes high.

The circuit in your picture looks more like some kind of button input.

Re: Preventing Damage to the PI

Posted: Sun Jun 26, 2016 11:17 am
by DougieLawson
HawaiianPi wrote:So I'm not sure what that is a picture of, but it's not an LED circuit.
It's a very sensible design for a switch with a 10K pull-down and a 1K current limiting resistor.

Re: Preventing Damage to the PI

Posted: Sun Jun 26, 2016 11:23 am
by HawaiianPi
DougieLawson wrote:It's a very sensible design for a switch with a 10K pull-down and a 1K current limiting resistor.
Yup. You posted that while I was editing my earlier post.

Re: Preventing Damage to the PI

Posted: Sun Jun 26, 2016 12:04 pm
by MrEngman
Alphabet wrote:Hello,

I'm trying to teach myself basic electronics using my Raspberry PI 3. I purchased this kit https://www.amazon.co.uk/gp/product/B01 ... UTF8&psc=1, however, the tutorial I'm following for a basic LED circuit suggests using a 1K resistor to prevent damage to the pi, below is the diagram provided.
Thanks!
Where can I find the tutorial you are using?



MrEngman

Re: Preventing Damage to the PI

Posted: Sun Jun 26, 2016 1:19 pm
by Alphabet
Hi apologies for the delayed response, I seemed to have jumped the gun a little bit when I posted this.
DougieLawson wrote:
HawaiianPi wrote:So I'm not sure what that is a picture of, but it's not an LED circuit.
It's a very sensible design for a switch with a 10K pull-down and a 1K current limiting resistor.
This is correct! Here's the video I was following!

https://www.youtube.com/watch?v=NAl-ULEattw