Poll

Would you routinely place a resistor in series with a jelly bean LED on an RPi 3.3V GPIO?

Yes
No
What's a resistor?
What's a datasheet?

Author Topic: Software guys, please, no.  (Read 17982 times)

0 Members and 1 Guest are viewing this topic.

Offline HowardlongTopic starter

  • Super Contributor
  • ***
  • Posts: 5424
  • Country: gb
Re: Software guys, please, no.
« Reply #75 on: September 20, 2022, 03:48:02 pm »
It's really hard to be an expert in all corners of such a broad playing field.

Indeed. Nowadays it's a mental impossibility to "know everything", and it's been like that for about three decades. Before then one could be equally at home designing & building computers, as writing the software that ran on them.

I'm a bare metal RF mixed signal guy, I design and manufacture those designs commercially, but I also have an active career in Fintech, in particular enterprise trading systems focussing on RDBMSs and the associated infrastructure. I've done both for decades. I'm also always learning.

I am, however, although I do partake in woodworking & metalwork, I'm a relative novice with no training, formal or otherwise, so I wouldn't consider pumping out a How-To video on it.

The way I put it was that hardware guys should be careful about recommending going against the grain such as, for example,  the use of hard coded literals throughout their code "because it works for them", in the same way software guys should refrain from assuming that they know better when it comes to recommending no resistors.

Look at it this another way, when you're a noob at anything, a key to making progress is to remove as many uncertainties as possible. Let's say that the blinky doesn't work. It could be for many reasons, including, but not limited to, either the GPIO or the LED going bust. However, as a noob you don't know what the risk is. It might be low, but you don't know. So why introduce that uncertainty unnecessarily to begin with?
 

Online xrunner

  • Super Contributor
  • ***
  • Posts: 7836
  • Country: us
  • hp>Agilent>Keysight>???
Re: Software guys, please, no.
« Reply #76 on: September 20, 2022, 03:48:37 pm »
A fact that seems to have escaped people here, due to being hyper-obsessed over his electronics theory... he's not claiming that this is an electronics tutorial - the LED is merely a means to and end, where that end is observing pin state.

LOL - no it hasn't "escaped people here", at least not me  :-// -

https://www.eevblog.com/forum/chat/software-guys-please-no/msg4422553/#msg4422553
I told my friends I could teach them to be funny, but they all just laughed at me.
 
The following users thanked this post: tooki

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 4670
  • Country: nl
Re: Software guys, please, no.
« Reply #77 on: September 20, 2022, 03:53:11 pm »
That LED looks suspiciously like some I got via Amazon, an assortment of various colors, all with a series resistor buried under the heat-shrink.

Regardless, I can't believe (well, actually I can) that this conversation has gone on for so long.  It's just about a software guy not using a series resistor!!!  Or is it?

For me it is :)

But he uses two LED's. One that is placed in the breadboard. No extended wires, and it looks like just a standard green LED.

And the statement "No resistor for 3.3V" is challenging. Take a 3.3V power supply and hook the same LED on to it. My money is on bye bye LED. With a forward voltage of around 2V the current will go up and up.
« Last Edit: September 20, 2022, 03:58:19 pm by pcprogrammer »
 

Offline eti

  • Super Contributor
  • ***
  • !
  • Posts: 1801
  • Country: gb
  • MOD: a.k.a Unlokia, glossywhite, iamwhoiam etc
Re: Software guys, please, no.
« Reply #78 on: September 20, 2022, 03:53:55 pm »

That LED looks suspiciously like some I got via Amazon, an assortment of various colors, all with a series resistor buried under the heat-shrink.

Regardless, I can't believe (well, actually I can) that this conversation has gone on for so long.  It's just about a software guy not using a series resistor!!!  Or is it?

Insecure engineers just like to be outraged at something ALL the time; that's what I pick up on A LOT on EEVblog forums. Perish the thought that someone be as clever as them, or even, <GASP> maybe MORE knowledgeable and experienced than them in their own field (and since no one here can prove to the contrary re Dave Plummer, it's best to show humility and end this idiotic thread)
 
The following users thanked this post: tooki, sokoloff

Offline tooki

  • Super Contributor
  • ***
  • Posts: 13157
  • Country: ch
Re: Software guys, please, no.
« Reply #79 on: September 20, 2022, 04:04:08 pm »
That LED looks suspiciously like some I got via Amazon, an assortment of various colors, all with a series resistor buried under the heat-shrink.

Regardless, I can't believe (well, actually I can) that this conversation has gone on for so long.  It's just about a software guy not using a series resistor!!!  Or is it?

For me it is :)

But he uses two LED's. One that is placed in the breadboard. No wires, and it looks like just a standard green LED.

And the statement "No resistor for 3.3V" is challenging. Take a 3.3V power supply and hook the same LED on to it. My money is on bye bye LED. With a forward voltage of around 2V the current will go up and up.
That's clearly a modern emerald green (~520nm) LED, and those have significantly higher forward voltages (3-3.5V) than traditional lime green LEDs. So when connected to a 3.3V power source, many of them are right in their happy place, even without a current limiting resistor.

If we were talking about old-fashioned 1.7-2.2V LEDs, then it'd clearly be problematic. But with modern 3V+ green/blue/white LEDs, it's actually not preposterous.
 

Offline fourfathom

  • Super Contributor
  • ***
  • Posts: 2004
  • Country: us
Re: Software guys, please, no.
« Reply #80 on: September 20, 2022, 04:11:58 pm »
But he uses two LED's. One that is placed in the breadboard. No extended wires, and it looks like just a standard green LED.

And the statement "No resistor for 3.3V" is challenging. Take a 3.3V power supply and hook the same LED on to it. My money is on bye bye LED. With a forward voltage of around 2V the current will go up and up.

I didn't see the bare LED in the protoboard.  OK, so no resistor.  Definitely not right, but also definitely not the same thing as connecting the LED across a 3.3V power supply.  Most IO pins can handle the occasional short to ground without smoking, and a bare LED is less of a load than that.  The available current will probably be well under 10mA so the LED will also survive.  "No resistor" is bad advice, but it's probably still going to work.  I just don't see the outrage -- the guy was wrong, but so what?
We'll search out every place a sick, twisted, solitary misfit might run to! -- I'll start with Radio Shack.
 

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 4670
  • Country: nl
Re: Software guys, please, no.
« Reply #81 on: September 20, 2022, 04:22:42 pm »
FWIW, I took a measurement of 27mA for a red LED without a resistor on a GPIO.

The SoC GPIO current limits are for power limiting during transients, not for driving LEDs.

Yes, it works, most of the time. So does driving home drunk. Just because you can doesn't mean you should.

Well it can be more then 10mA according to a test Howardlong did.

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 4670
  • Country: nl
Re: Software guys, please, no.
« Reply #82 on: September 20, 2022, 04:27:29 pm »
That's clearly a modern emerald green (~520nm) LED, and those have significantly higher forward voltages (3-3.5V) than traditional lime green LEDs. So when connected to a 3.3V power source, many of them are right in their happy place, even without a current limiting resistor.

If we were talking about old-fashioned 1.7-2.2V LEDs, then it'd clearly be problematic. But with modern 3V+ green/blue/white LEDs, it's actually not preposterous.

Well that shows that I have been out of the real hardware game to long. I knew blue LEDs had higher forward voltages, but not that there are new types of green that have higher forward voltages.

Thanks for the bringing my knowledge up to par a bit :-+

Offline borjam

  • Supporter
  • ****
  • Posts: 908
  • Country: es
  • EA2EKH
Re: Software guys, please, no.
« Reply #83 on: September 20, 2022, 04:37:06 pm »
Timestamp 3:10, hooking up a jelly bean LED directly to a Raspberry Pi GPIO deliberately without a resistor: deliberately because, well, it works for him, and he asks viewers to convince him otherwise.
I remember a guy in the early 90's who asked for help because his server used to crash on heavy I/O. I went there and I pointed out that there was no SCSI terminator. He said "it works without it".

I answered "OK! And I left".
 
The following users thanked this post: tooki, newbrain, sokoloff

Offline rdl

  • Super Contributor
  • ***
  • Posts: 3667
  • Country: us
Re: Software guys, please, no.
« Reply #84 on: September 20, 2022, 04:39:50 pm »
I didn't watch the video. Did the LED actually get get mentioned or described? Because you can get LEDs with internal resistor to run from a specific voltage. I have some and have to mark them with a Sharpie to tell them from regular LEDs. They're really useful for breadboarding.
 
The following users thanked this post: tooki

Offline fourfathom

  • Super Contributor
  • ***
  • Posts: 2004
  • Country: us
Re: Software guys, please, no.
« Reply #85 on: September 20, 2022, 04:41:14 pm »
Seems appropriate:
We'll search out every place a sick, twisted, solitary misfit might run to! -- I'll start with Radio Shack.
 
The following users thanked this post: tooki, newbrain, eti

Offline tooki

  • Super Contributor
  • ***
  • Posts: 13157
  • Country: ch
Re: Software guys, please, no.
« Reply #86 on: September 20, 2022, 04:53:34 pm »
That's clearly a modern emerald green (~520nm) LED, and those have significantly higher forward voltages (3-3.5V) than traditional lime green LEDs. So when connected to a 3.3V power source, many of them are right in their happy place, even without a current limiting resistor.

If we were talking about old-fashioned 1.7-2.2V LEDs, then it'd clearly be problematic. But with modern 3V+ green/blue/white LEDs, it's actually not preposterous.

Well that shows that I have been out of the real hardware game to long. I knew blue LEDs had higher forward voltages, but not that there are new types of green that have higher forward voltages.

Thanks for the bringing my knowledge up to par a bit :-+
My pleasure!

The other thing about such LEDs is that they're insanely bright. The "standard" 20mA for indicator LEDs is blindingly bright with those things. As a pure indicator for indoor use (i.e. similar brightness to a 1980s LED at 20mA), I often run them at 1mA or less! (For example, running one on 5V using a 10K resistor, providing roughly 200uA.)
 

Offline deadlylover

  • Frequent Contributor
  • **
  • Posts: 344
  • Country: au
Re: Software guys, please, no.
« Reply #87 on: September 20, 2022, 04:57:00 pm »
Come on guys it's a freaking YouTube tutorial video for beginners, not an ISO17025 procedure or whatever.  :-DD

Sheesh I'm surprised the anti-static gang hasn't shown up yet.
 
The following users thanked this post: langwadt, tooki, sokoloff, pcprogrammer

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 4670
  • Country: nl
Re: Software guys, please, no.
« Reply #88 on: September 20, 2022, 05:21:52 pm »
The other thing about such LEDs is that they're insanely bright. The "standard" 20mA for indicator LEDs is blindingly bright with those things. As a pure indicator for indoor use (i.e. similar brightness to a 1980s LED at 20mA), I often run them at 1mA or less! (For example, running one on 5V using a 10K resistor, providing roughly 200uA.)

Yeah, I have found that out with smd leds. These things do not need a lot of current to be bright.

Offline fourfathom

  • Super Contributor
  • ***
  • Posts: 2004
  • Country: us
Re: Software guys, please, no.
« Reply #89 on: September 20, 2022, 06:02:53 pm »
The other thing about such LEDs is that they're insanely bright. The "standard" 20mA for indicator LEDs is blindingly bright with those things. As a pure indicator for indoor use (i.e. similar brightness to a 1980s LED at 20mA), I often run them at 1mA or less! (For example, running one on 5V using a 10K resistor, providing roughly 200uA.)

Yeah, I have found that out with smd leds. These things do not need a lot of current to be bright.

I run my on-board indicators (red, 0603 SMD, 1.8V) at 3.3V, 10K resistor (590 uA) and they're still too bright.
We'll search out every place a sick, twisted, solitary misfit might run to! -- I'll start with Radio Shack.
 
The following users thanked this post: tooki

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 4670
  • Country: nl
Re: Software guys, please, no.
« Reply #90 on: September 21, 2022, 09:49:40 am »
This thread has devolved into an aspie ego-fest. Invest some days in watching Dave’s videos - ALL of them if you wish - and learning about this lovely man. He’s a kind, witty and utterly brilliant man. He’s also a millionaire, and you don’t become a millionaire from being stupid (unless you perform a heist).

Grow up, buffoons.

A fact that seems to have escaped people here, due to being hyper-obsessed over his electronics theory... he's not claiming that this is an electronics tutorial - the LED is merely a means to and end, where that end is observing pin state.

Also, SINCE it's not an electronics tutorial, maybe he's wise enough to have a pre-leaded LED with inbuilt dropper resistor... but then, I suppose looking at it from a logical perspective like this, doesn't give people the fury they so desire to deride him.

He's no idiot. Only true idiots automatically assume all others are idiots.

Why is it ok for you to call us buffoons and idiots, and not ok for us to criticize Dave Plummer.

Reverting to name calling makes you no better then the rest.

Offline HowardlongTopic starter

  • Super Contributor
  • ***
  • Posts: 5424
  • Country: gb
Re: Software guys, please, no.
« Reply #91 on: September 21, 2022, 09:51:35 am »
Come on guys it's a freaking YouTube tutorial video for beginners

Exactly, it's a tutorial for beginners.

As I mentioned earlier, when you're a noob following a step by step guide, you want uncertainties to be minimised because you don't have the experience to prioritise possible reasons why the blinky failed to work.

As a noob, when it fails, you'l be questioning everything, including whether or not you blew up the LED or the GPIO because there wasn't a resistor.

Why unnecessarily add that additional uncertainty?

Quote
not an ISO17025 procedure

That's quite some hyperbolic projection! I don't think anyone else is suggesting it is.

As I already stated in my OP, I find Dave Plummer's videos interesting and I often learn things: he is, after all, an astute and experienced programmer, and we're of similar vintages. He can certainly run rings around me in his C# programming, although as systems programmers writing C and assembler we're probably on roughly level pegging. But he is a software guy. I do both software and hardware, I would never do a blinky tutorial without current limiting, usually a resistor: it's something I learned in 1976 when I was 11 when the vast majority of indicators were either neon or incandescent.
 

Offline deadlylover

  • Frequent Contributor
  • **
  • Posts: 344
  • Country: au
Re: Software guys, please, no.
« Reply #92 on: September 21, 2022, 11:54:10 am »
Why unnecessarily add that additional uncertainty?

Put yourself in a beginners shoes, now you have to worry about a resistor. How many do I need, what size, type, does it even matter? Oh god on eBay they only sell hundreds in a kit, I don't need that many jeez maybe I'll pass on this.

There is value in making a piece of content as accessible and digestible as possible. Heaven forbid they blow something up and will have to engage with the community or dig deeper into why it didn't work. They might actually learn some troubleshooting too.

It's fine, really. We don't need to be gatekeeping a hobby.
 
The following users thanked this post: tooki, sokoloff

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 4670
  • Country: nl
Re: Software guys, please, no.
« Reply #93 on: September 21, 2022, 12:15:50 pm »
If I was a beginner with not a lot of money to spend on my hobby, I would be very pissed if my 35 dollar board went poof because someone showed in a youtube video that it is ok to stick a LED directly on to the pins without explaining why it works for him.

And here it seems to work, but what if it is for something more expensive and with bigger risk of going wrong, but hey it works for him, so it should work for me.

It is about the principle. But that is youtube for you, it is so open there is no check on validity of what is shown, and that leads to chaos on some occasions.

And that might be far fetched, but it is what is happening in this world with social media as is. People posting something on facebook about a party and others think it is an invite for them even they don't know the person in question. Happened in the Netherlands. Riots start due to things similar like this.

Or people get killed because someone on youtube thought it was a good idea to post a video about doing some dangerous stunt, and people start mimicking it, not knowing what can go wrong.

Offline HowardlongTopic starter

  • Super Contributor
  • ***
  • Posts: 5424
  • Country: gb
Re: Software guys, please, no.
« Reply #94 on: September 21, 2022, 12:51:46 pm »
Why unnecessarily add that additional uncertainty?

Put yourself in a beginners shoes, now you have to worry about a resistor.

I regularly do when viewing his videos on setting up software dev environments just like this one.

I'd far rather know I should be putting a resistor in than worry about whether I have a busted GPIO or LED.

Quote
How many do I need, what size, type, does it even matter?

Give a value, or a range of possible values, it's really not that hard.

Quote
Oh god on eBay they only sell hundreds in a kit, I don't need that many jeez maybe I'll pass on this.

There is value in making a piece of content as accessible and digestible as possible.

If I could do this when I was eleven over 45 years ago, and I could only afford to buy resistors one at a time with pocket money when they were, in today's terms, $2 each, then I'd say that's hardly a chore.

If you look at the other stuff Dave was using, like the breadboard, the Pi GPIO breakout board, and the LED itself, it's quite the stretch to suggest that a resistor is going to be a problem. Furthermore, IME the kits that include these GPIO breakout boards & breadboard also include a selection of LEDs and resistors, including 220 ohm resistors specifically designed to be used for LED current limiting.

Quote
Heaven forbid they blow something up and will have to engage with the community or dig deeper into why it didn't work. They might actually learn some troubleshooting too.

You seem to be contradicting yourself. You want it to be "accessible" so they're not put off, but at the same time you want them to "dig deeper".

And when they do engage with the "community" I guarantee that the #1 answer is going to be "Where's your resistor?".

Quote
It's fine, really. We don't need to be gatekeeping a hobby.
 

That's quite a stretch, in anybody's book. If I could figure out that a resistor's needed when I was eleven, and purchase one, then I hardly think it's "gatekeeping".
« Last Edit: September 21, 2022, 01:16:53 pm by Howardlong »
 

Offline sokoloff

  • Super Contributor
  • ***
  • Posts: 1799
  • Country: us
Re: Software guys, please, no.
« Reply #95 on: September 21, 2022, 01:39:28 pm »
I'm trying to guesstimate in my head the answer to: "Among beginners wiring up their first breadboard Arduino or Raspberry Pi blink an external LED project, what percentage of them use a dropping resistor?"

I'd be pretty surprised if it was over 80% and shocked if it was over 95%.

Then, trying to guesstimate the answer to "Among people wiring an external LED across a Raspberry Pi GPIO pin and ground and blinking it, what percentage of those will result in damage to the Pi?", I'd be shocked if the answer was over one in a thousand.
 

Online ledtester

  • Super Contributor
  • ***
  • Posts: 3282
  • Country: us
Re: Software guys, please, no.
« Reply #96 on: September 21, 2022, 02:02:23 pm »
If I was a beginner with not a lot of money to spend on my hobby, I would be very pissed if my 35 dollar board went poof because someone showed in a youtube video that it is ok to stick a LED directly on to the pins without explaining why it works for him.

A user comment from the video:



« Last Edit: September 21, 2022, 02:06:01 pm by ledtester »
 
The following users thanked this post: Ed.Kloonk, tooki, pcprogrammer

Offline HowardlongTopic starter

  • Super Contributor
  • ***
  • Posts: 5424
  • Country: gb
Re: Software guys, please, no.
« Reply #97 on: September 21, 2022, 07:05:22 pm »
If I was a beginner with not a lot of money to spend on my hobby, I would be very pissed if my 35 dollar board went poof because someone showed in a youtube video that it is ok to stick a LED directly on to the pins without explaining why it works for him.

A user comment from the video:



That's ~40mW dissipated on each port's mosfet trying to be a resistor. Bear in mind that a typical 0603 resistor is rated at 63mW and the mosfet driver transistor is several orders of magnitude smaller...

Each port is rated for 16mA max, 51mA total aggregated across all ports. The ports are configurable down to 2mA, but this is designed for limiting switching noise by limiting slew rates, not for driving LEDs.

I measured 27mA with a red LED with default settings. Others have measured over 200mA shorted (I'm not going to try), so so much for being "current limited" to 16mA.

 
The following users thanked this post: pcprogrammer

Online langwadt

  • Super Contributor
  • ***
  • Posts: 4857
  • Country: dk
Re: Software guys, please, no.
« Reply #98 on: September 21, 2022, 07:15:31 pm »
If I was a beginner with not a lot of money to spend on my hobby, I would be very pissed if my 35 dollar board went poof because someone showed in a youtube video that it is ok to stick a LED directly on to the pins without explaining why it works for him.

A user comment from the video:



That's ~40mW dissipated on each port's mosfet trying to be a resistor. Bear in mind that a typical 0603 resistor is rated at 63mW and the mosfet driver transistor is several orders of magnitude smaller...

Each port is rated for 16mA max, 51mA total aggregated across all ports. The ports are configurable down to 2mA, but this is designed for limiting switching noise by limiting slew rates, not for driving LEDs.

and I believe the variable drive strength is implemented by each pin being made up of several parallel mosfets and only turning on some of them

 

Online coppice

  • Super Contributor
  • ***
  • Posts: 10034
  • Country: gb
Re: Software guys, please, no.
« Reply #99 on: September 21, 2022, 07:34:27 pm »
If I was a beginner with not a lot of money to spend on my hobby, I would be very pissed if my 35 dollar board went poof because someone showed in a youtube video that it is ok to stick a LED directly on to the pins without explaining why it works for him.

A user comment from the video:


Where do people get the idea there is current limiting. Are they confusing this with variable drive strenth?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf