common LED resistor, LED's on arduino at 3.3V

Right, I am trying to get one of 3 LED's to light (via the software), they should not light together or someone will have to have reduced brightness so I figured I only need one limit resistor. I am using digital outputs 6, 7 & 8 and my application is active low so I have negative of the LED's connected to each output, the positives of the LED's all connected together and then a common 5 ohm limit resistor to 3.3V, the LED's are indicators only, what I nheed from the circuit is an active low output to signal another circuit.

Something is not working, my outputs will only pull down to 1.7V, is it because I used a common limit resistor ?

I read somewhere that the ATmega328 will drive an LED directly when run on 3.3V, how much current does it output ?

Something is not working, my outputs will only pull down to 1.7V, is it because I used a common limit resistor ?

No it is because:-

and then a common 5 ohm limit resistor to 3.3V,

That is way too low. You are asking the Arduino pin to sink 660mA (given no forward voltage drop on the LED, what forward voltage drop do you have?) where as the current when damage starts to occur is 40mA.

The chip is not getting hot at all, (3.3-1.8)/5 = 300mA - ouch, but no light and no heat, something is up. I was under the impression that at 3.3V the internal resistance of the port drivers started to have an effect or am I thinking wrong voltage ?

I was under the impression that at 3.3V the internal resistance of the port drivers started to have an effect

That is just rubbish. No if you want help you need to say what arduino you have, what voltage it is running at. Where is this 3V3 coming from and what is the forward voltage drop of the LEDs you are trying to use.

1.8V for the LED, for some reason it became a smiley above. I know i read it somewhere,

In any case if I was trying to overdrive the pin the chip (ATmega328 with Arduino UNO 8MHz bootloader) would be getting very hot and I'd breifly see light before it all went smokey.

What I do have is the expected functioning from the chip with no LED's attached, it all works fine (after having the LED's attached) so the chip is fine, but with the LED's i have the problem. I only wanted them for indication but looking like more trouble than it's worth.

It would be easier to help if you posted a schematic , to show us how all is wired.

Anyway, keep it simple : if you power the LED with 3,3V and you want 15mA through LED (which is OK), then, the series resistor is
(assuming Vled is 1,8V , which depends on the LED)
(3,3-1,8)/0,015 = 100 Ohm → you see that your 5 Ohm resistor is… far too low, the atmega won’t like it very long :wink:

oh yes I'm well aware that my resistor is too low now, but nothing happens anyway and the chip is fine so I'm thinking my resistor sharing solution might be a problem. I have resistor from 3.3V 3 anodes of LED's all connected to the other end and the cathodes connected to the relevant outputs. When an output goes low the LED on it should light up.

I will check out my mechanical assembly as the LED’s are secondary at the moment and then try one resistor per LED (100 ohm)

The actual circuit is a sensor interface, it takes analogue voltages in from the sensors that represent distance and then decides if it wants to turn the output off or not - 3 sensors, 3 outputs (active low)

In any case if I was trying to overdrive the pin the chip (ATmega328 with Arduino UNO 8MHz bootloader) would be getting very hot and I'd breifly see light before it all went smokey.

No that is not how it works. It is very rare that things go pop like that. What actually happens is it stops working with no fuss and no visible sign of damage. It may be damaged already so if it does not work when you wire it up correctly try some different pins. With a bit of luck you will have made a wiring error that will have prevented any over current.

As I said before the circuit works fine without the LED's even after trying them. As far as I know there is no current limiting on the pins and if you break them you break them. If I was demanding too much of the mcu it would have tried to drive the LED and got very hot and then failed.

The output transistors on an Arduino pin have an on-resistance of about 30 to 40 ohms I believe with supply voltage of 5V, probably rather more (60 ohms?) at 3.3V. Clearly a 5 ohm current limiting resistor is doing almost nothing, it is dwarfed by the output resistance of the pin itself.

Each pin has an abs max current rating of 40mA, which in practice means keep the current at 30mA or lower if you want a reliable circuit. If you draw 30mA at 5V supply then the pin transistor is going to drop about a volt anyway, so in practice you can't expect to draw more than 10 or 15mA without having to take account of the internal voltage lossses anyway. The easiest way to do that is calculate your series current limiting resistor value, then subtract 30 ohms (for 5V operation), and perhaps 50 ohms for 3.3V operation.

Lets try again should we:-

If I was demanding too much of the mcu it would have tried to drive the LED and got very hot and then failed.

NO or to make my point bigger NO That is not how it works all the time. The heat generated can burn out a localized part of the chip or bonding wire before the heat has time to spread to the rest of the chip.

in which case it would stop working altogether and it is working.

sparkylabs:
in which case it would stop working altogether and it is working.

Ok wrong again just a pin can blow and leave the rest of the chip working.

When you ask for advice then my advice to you would be to stop arguing with the advice you get or else you won’t be getting much more.

yes but THE pin, the one the LED was on still works, I wired my circuit up with the LED's and nothing happened and the outputs were not pulling low, so I CUT the LED legs and the outputs worked.

There is no point in getting worked up, it sounds like you are misunderstanding me and then deciding I'm saying you are wrong.

sparkylabs: As far as I know there is no current limiting on the pins and if you break them you break them.

Wrong.

so what happens ? does the pin cut out if you try to draw too much current ?

sparkylabs: yes but THE pin, the one the LED was on still works, I wired my circuit up with the LED's and nothing happened and the outputs were not pulling low, so I CUT the LED legs and the outputs worked.

There is no point in getting worked up, it sounds like you are misunderstanding me and then deciding I'm saying you are wrong.

Anecdotes tell us it's quite hard to kill an Arduino pin by overloading it. We'll add yours to the list...

OTOH the pesky facts are:

If you max out an Arduino pin you normally get about 76mA (nb. this is experimental evidence, not a written specification).

The datasheet says damage starts to happen at 40mA. If you want "reliable" you should be using much less than that.

sparkylabs: so what happens ? does the pin cut out if you try to draw too much current ?

The datasheet says this:

"Stresses beyond those listed under “Absolute Maximum Ratings” may cause permanent damage to the device. This is a stress rating only and functional operation of the device at these or other conditions beyond those indicated in the operational sections of this specification is not implied. Exposure to absolute maximum rating conditions for extended periods may affect device reliability."

So the chip may draw a bit more current now, hard to detect. It may become unreliable in the future. Heat is not kind to semiconductors, but it isn't always instantly fatal.