General > General Technical Chat
Software guys, please, no.
<< < (22/27) > >>
james_s:

--- Quote from: coppice on September 21, 2022, 07:34:27 pm ---Where do people get the idea there is current limiting. Are they confusing this with variable drive strenth?

--- End quote ---

Probably. Really though I don't think it's fair to rip on people for not knowing these things, especially people who are not professional engineers with backgrounds in hardware. You know about it, I know about it, a large percentage of the people on this forum probably know about it, but I would bet that most software developers are clueless. That doesn't make them idiots, that just isn't their area of expertise. There are lots of things that are not really proper or advisable but which will typically work, this is IMO one of those things.
tooki:
FYI, I grabbed a standard 5mm, 520nm emerald green LED out of my LED bin last night and hooked it up to my bench supply. It drops 3.1V at 20mA, right in the middle of the “3.0-3.2V” rated Vf. At 3.3V, it was at 30mA. So while that’s certainly over what the GPIO is rated for, at least it’s not grotesquely more. Of course, I wouldn’t recommend running it that way, between it stressing the MCU and LED and being retina-searingly bright. But running one LED that way is not going to instantly fry anything. But several at once is really asking for trouble.
wraper:

--- Quote from: tooki on September 22, 2022, 06:36:59 am ---FYI, I grabbed a standard 5mm, 520nm emerald green LED out of my LED bin last night and hooked it up to my bench supply. It drops 3.1V at 20mA, right in the middle of the “3.0-3.2V” rated Vf. At 3.3V, it was at 30mA. So while that’s certainly over what the GPIO is rated for, at least it’s not grotesquely more. Of course, I wouldn’t recommend running it that way, between it stressing the MCU and LED and being retina-searingly bright. But running one LED that way is not going to instantly fry anything. But several at once is really asking for trouble.

--- End quote ---
But GPIO is not some ideal voltage source. Generally should consider it as a few tens of ohms resistor in series with that LED. Also it seems Raspberry Pi output drive strength can be programmed, and by default it's not the maximum strength. http://www.mosaic-industries.com/embedded-systems/microcontroller-projects/raspberry-pi/gpio-pin-electrical-specifications

--- Quote ---The Raspberry Pi's GPIO pins are quite versatile, and you can modify many of their characteristics from software. You can turn on/off input pin hysteresis, limit output slew rate, and control source and sink current drive capability from 2 mA to 16 mA in 2 mA increments. These properties are set for the GPIO block as a whole, not on a pin-by-pin basis.

Source/sink current capability does not limit the current into or out of the pin, but only specifies the maximum current for which the output signal high/low voltage specifications will be met. If misused, output pins can be damaged by excessive current irrespective of the source/sink current programmed. After a reset, the RPi comes up with the GPIO outputs set to 8 mA drive capability.
--- End quote ---
Psi:
I don't care,  use a resistor or don't use a resistor.

But if your LED burns out or your GPIO fails don't come crying to me unless you used the correct resistor.
pcprogrammer:

--- Quote from: wraper on September 22, 2022, 11:01:39 am ---
--- Quote ---The Raspberry Pi's GPIO pins are quite versatile, and you can modify many of their characteristics from software. You can turn on/off input pin hysteresis, limit output slew rate, and control source and sink current drive capability from 2 mA to 16 mA in 2 mA increments. These properties are set for the GPIO block as a whole, not on a pin-by-pin basis.

Source/sink current capability does not limit the current into or out of the pin, but only specifies the maximum current for which the output signal high/low voltage specifications will be met. If misused, output pins can be damaged by excessive current irrespective of the source/sink current programmed. After a reset, the RPi comes up with the GPIO outputs set to 8 mA drive capability.
--- End quote ---

--- End quote ---

It is right there in the quote you gave. I read that article and near the end it states:

--- Quote ---
* To prevent excessive power dissipation in the chip, you should not source/sink more current from the pin than its programmed limit. So, if you have set the current capability to 2 mA, do not draw more than 2 mA from the pin.
* Never demand that any output pin source or sink more than 16 mA.
--- End quote ---
Navigation
Message Index
Next page
Previous page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod