Is there any issues with driving a OPB710F LED directly from a I/O PIN of the Atmega168 without a limiting resistor? I want to drive it at it's MAX power (50ma)
Is there any issues with driving a OPB710F LED directly from a I/O PIN of the Atmega168 without a limiting resistor? I want to drive it at it's MAX power (50ma)
well im not sure what a Atmega168 is, but im pretty sure you will need a resistor there, the LED would probably have a voltage drop of 2.6 to 3.6V and the output is likely to produce more than that, minimum 5V i would assume, put a multimeter across the output and see what the output voltage is, if its in between 2.6 & 3.6 then you wont need the resistor, but the output will probably be whatever your input supply is?
There might be problems with direct-driving. The AVR in general is only rated to sink up to 25mA per I/O. With resistors, you may be able to use 2 or 3 pins to sink the full 50mA. But the safest bet is to have a transistor or some other buffer drive the LED.
The OPB710 is an infra-red LED and phototransistor housed inside one package. The IR LED has a max forward voltage drop of 1.5V so a resistor will be required for that reason, if not to limit current as well. 50mA is a lot to draw from a Microcontroller so a driver will be required anyway.
My feeling is that if you connected the IR LED directly to the output pin of a Microcontroller, it probably wouldn't light at all. It would try to draw too much current, which would drop the output voltage below the required forward voltage drop of the LED. It might even destroy the Micro.
The OPB710 is an infra-red LED and phototransistor housed inside one package. The IR LED has a max forward voltage drop of 1.5V so a resistor will be required for that reason, if not to limit current as well. 50mA is a lot to draw from a Microcontroller so a driver will be required anyway.
My feeling is that if you connected the IR LED directly to the output pin of a Microcontroller, it probably wouldn't light at all. It would try to draw too much current, which would drop the output voltage below the required forward voltage drop of the LED. It might even destroy the Micro.
It might be possible if the Vcc of the ATmega168 matched the forward voltage of the LED. It's still a reckless thing to do. What is the objection to using a resistor. A little bit of insurance goes a long way.
I was thinking about using a PIN to "sink" the current, put 5v on Anode and sink cathode via AVR PIN, as it can only sink XXma I thought I would not need a resistor or if I put a resistor on it would note drive it sufficiently?
Ahhhh, so now it is clear where your confusion is coming from. Your project board does indeed supply 800mA per output - via a darlington driver IC. The PIC itself is probably rated at 25mA per output.
Ahhhh, so now it is clear where your confusion is coming from. Your project board does indeed supply 800mA per output - via a darlington driver IC. The PIC itself is probably rated at 25mA per output.
yes i just confused the hell out of myself then, for a second there i was thinking that the PIC was outputing 500mA to my servo motor, but the power for the servo comes from a different supply, and i just use the output for the signal.
yes i just confused the hell out of myself then, for a second there i was thinking that the PIC was outputing 500mA to my servo motor, but the power for the servo comes from a different supply, and i just use the output for the signal.
Hi, just thought I'd re-post this as my post had a mind of it's own ) and I didn't get a reply to my last post.
I was thinking about using a PIN to "sink" the current, put 5v on Anode and sink cathode via AVR PIN, as it can only sink XXma I thought I would not need a resistor or if I put a resistor on it would note drive it sufficiently?
Hi, just thought I'd re-post this as my post had a mind of it's own ) and I didn't get a reply to my last post.
I was thinking about using a PIN to "sink" the current, put 5v on Anode and sink cathode via AVR PIN, as it can only sink XXma I thought I would not need a resistor or if I put a resistor on it would note drive it sufficiently?
But I don't understand if the PIN can only sink 40ma then is this not just like a limiting resistor, how can it possibly damage the LED unless it was a fauly PIN/MCU, if you still say "use a resistor" what size should it be? bearing in mind my I want to drive it at 50ma? 82R (43ma) or can I get away with 68R (52ma)
But I don't understand if the PIN can only sink 40ma then is this not just like a limiting resistor, how can it possibly damage the LED unless it was a fauly PIN/MCU, if you still say "use a resistor" what size should it be? bearing in mind my I want to drive it at 50ma? 82R (43ma) or can I get away with 68R (52ma)
The pins aren't 'current limited' at 40mA, it's specified as it's maximum safe capacity. It's not the LED it might damage, it's the chip.
If you want to run the LED at 50mA, which is more than the safe rating of the pin, either use a driver transistor, or parallel two pins to double the safe capacity - and still use a resistor.
OK, I prefare the resistor route as it's less hassle, I have placed a 82R and the current was low so I tried a 39R and it measured 54ma, it is only on for 50ms whilst I detect then off for a seconds.
The datasheet quotes 50mA as a maximum rating for the device, but it doesn't quote a typical value. 50mA doesn't sound unreasonable for an IR LED though.