Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Arduino ir led current

Status
Not open for further replies.

RMIM

Member
HI All,

I have installed an ir example sketch, bellow are the rem of the sketch, Im hoping someone is familiar with it. My circuit works as it should but the current out to the IR LED is 5mA with no resistor. Is there something in the software limiting the current? I think the pin can deliver 40mA so why is mine only giving 5mA? Thanks

/*
* IRrecord: record and play back IR signals as a minimal
* An IR detector/demodulator must be connected to the input RECV_PIN.
* An IR LED must be connected to the output PWM pin 3.
* A button must be connected to the input BUTTON_PIN; this is the
* send button.
* A visible LED can be connected to STATUS_PIN to provide status.
*
* The logic is:
* If the button is pressed, send the IR code.
* If an IR code is received, record it.
*
* Version 0.11 September, 2009
* Copyright 2009 Ken Shirriff
 
hi RMIM,
How are you measuring the LED current.?

The LED current for an IR project is usually modulated.

E
 
The LED is on the serial port. If you're reading the current with a multimeter then you're probably reading the average of data sent out
 
hi RMIM,
How are you measuring the LED current.?

The LED current for an IR project is usually modulated.

E

Thanks for the reply eric

Ah yes - it is modulated as it sending out a tv remote code that changes the tv vol etc.

Perhaps I'm not suppose to see 40mA then? I was assuming to see 40mA on my DVM but im only seeing 5mA.

So what does that mean? Some IR LED can be run at 100mA - It's desirable for me to run it at highest value to increase the remotes range. (when i look at a real remote through my camera, the IR led is very bright compared to my circuit)

How does a modulated signal differ from a solid signal it terms of current.

When I saw the 5mA it felt like I could be pushing another 35mA extra without damage.

Is the arduino max current different when it's modulated than when it's solid? Should I be running it through a transistor arrangement to get more mA?
 
The LED is on the serial port. If you're reading the current with a multimeter then you're probably reading the average of data sent out
Thanks for the reply Daniel.

Yes this might be right - but does it mean I can increase the current or not? And how would I do that. I don't think the IR LED is any where near it's max from the brightness. I know the arduino has a limit of 40mA, and if I want more than that I would have to use a transistor - but i thought I was not near this limit.

It terms of being within the IR led's limits (100mA) should I use average current or max current?
 
Last edited:
Thanks for the reply eric

Ah yes - it is modulated as it sending out a tv remote code that changes the tv vol etc.

Perhaps I'm not suppose to see 40mA then? I was assuming to see 40mA on my DVM but im only seeing 5mA.

So what does that mean? Some IR LED can be run at 100mA - It's desirable for me to run it at highest value to increase the remotes range. (when i look at a real remote through my camera, the IR led is very bright compared to my circuit)

How does a modulated signal differ from a solid signal it terms of current.

When I saw the 5mA it felt like I could be pushing another 35mA extra without damage.

Is the arduino max current different when it's modulated than when it's solid? Should I be running it through a transistor arrangement to get more mA?

hi RM,
Some remote IR emitters will run, pulsed, at 100mA or higher.

A DVM will not give a true current or voltage reading when measuring a pulsed signal.
The average values of the signal will depend upon the On/Off times and pulse rate.
I use a scope to measure the values of this type of signal.

Is the IR remote transmitted signal being detected OK by the IR receiver.? If yes I would not drive the emitter any harder.

Eric
 
hi RM,
Some remote IR emitters will run, pulsed, at 100mA or higher.

A DVM will not give a true current or voltage reading when measuring a pulsed signal.
The average values of the signal will depend upon the On/Off times and pulse rate.
I use a scope to measure the values of this type of signal.

Is the IR remote transmitted signal being detected OK by the IR receiver.? If yes I would not drive the emitter any harder.

Eric

yes it's being detected fine, but that's about 3m away (and no resistor) - I would like to increase that if possible.
 
yes it's being detected fine, but that's about 3m away (and no resistor) - I would like to increase that if possible.
hi RM,
One option would be to choose a higher efficiency IR emitter diode or a with a narrower beam beam spread width.

Which type of IR emitter are you using.?
 
hi RM,
One option would be to choose a higher efficiency IR emitter diode or a with a narrower beam beam spread width.

Which type of IR emitter are you using.?

right, so increasing the current to the IR led is not an option?

when the specs for an LED say 100mA max, and if my signal is modulated, how to I measure if I'm at the maximum safe current. (I do have an oscilloscope).
 
Last edited:
right, so increasing the current to the IR led is not an option?

when the specs for an LED say 100mA max, and if my signal is modulated, how to I measure if I'm at the maximum safe current. (I do have an oscilloscope).
hi,
If the LED is being driven directly from a MCU pin, ie: no series resistor then thats a max already.
You could use an external drive transistor for the IR emitter, drive the base from the mcu, do not forget to allow for the signal inversion.
E
 
hi,
If the LED is being driven directly from a MCU pin, ie: no series resistor then thats a max already.
You could use an external drive transistor for the IR emitter, drive the base from the mcu, do not forget to allow for the signal inversion.
E

thanks for mentioning signal inversion - I would have been stuck for a long time.

could that be flipped in software?
 
thanks for mentioning signal inversion - I would have been stuck for a long time.

could that be flipped in software?

hi,
This circuit will drive the LED ON, when the MCU pin High.

You not did say say if the MCU pin was sinking or sourcing the original LED current.? This circuit assumes that the MCU was sourcing the original LED current

E
 

Attachments

  • AAesp02.gif
    AAesp02.gif
    33.6 KB · Views: 375
Last edited:
hi,
This circuit will drive the LED ON, when the MCU pin High.

You not did say say if the MCU pin was sinking or sourcing the original LED current.? This circuit assumes that the MCU was sourcing the original LED current

E

Hi eric,

Thanks for the reply - the MCU is sourcing (I believe as the other side of the IR LED is connect to ground).

How does inversion occur when you use a transistor?


Now that my circuit seems to be work well - I want to increase the range.

I find the angle of the IR very narrow. Are there any with wider angles? Like 90? Or is the only way using more than one IR?
 
How does inversion occur when you use a transistor?
hi RMIM,
It dosn't when you use a NPN transistor,, I was getting ahead of myself.:(
You can get an inversion if you used a PNP transistor, emitter to Vss , collector via LED and resistor to 0V.
When the Base is high the LED is OFF.
Eric
 
hi RMIM,
It dosn't when you use a NPN transistor,, I was getting ahead of myself.:(
You can get an inversion if you used a PNP transistor, emitter to Vss , collector via LED and resistor to 0V.
When the Base is high the LED is OFF.
Eric

Hi ericgibbs,

Thanks for the clarification on that.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top