Pages: [1]   Go Down
Author Topic: IR Emitter on 3.3V Pro Mini  (Read 1436 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 84
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Everyone,
I have a quick question.  I'm hoping to create a small IR emitter (and detector) board using the Arduino Pro Mini 3.3V 8MHz board driven by a 3V CR2032 coin cell battery.  I'm trying to make this as small as possible, which is why I went with the Pro Mini and coin cell battery.  However, my concern is the current draw from a typical IR LED.  As far as I can tell, this will draw around 50mA from the Arduino... which is more than each pin can handle.  It's a better idea to use a transistor circuit (maybe something like this: https://www.sparkfun.com/products/10732) but that product says it's rated for 5V input.  Is there any problem running that breakout board off of 3V input?  Also, will there be any problems with the 8MHz clock in sending out a standard 38KHz frequency and also decoding the message on the other end?  Thanks in advance for your help.
Cheers,
Andy
Logged

UK
Offline Offline
Faraday Member
**
Karma: 100
Posts: 4153
Where is your SSCCE?!?!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

That may be more than the battery can cope with smiley-wink

You have around 200mAh, so it can provide 200mA for one hour, or 50mA for 4 hours.  Then it'll be dead.

Typical standard discharge current of 0.2mA.

I'd think of something else if I were you smiley-wink
Logged

Get 10% off all 4D Systems TFT screens this month: use discount code MAJENKO10

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 84
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That's true... a coin cell may not be appropriate... but the form factor will be important here, plus this is just for an initial prototype.  I can always jump up to a Lipo or some other battery source if power consumption becomes an issue.  But, are there any issues running the transistor breakout board off of 3V?  And do you think there will be any clock issues with 8MHz resonator to control a 38KHz blinking IR LED?
Thanks,
Andy
Logged

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 150
Posts: 5744
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Everyone,
I have a quick question.  I'm hoping to create a small IR emitter (and detector) board using the Arduino Pro Mini 3.3V 8MHz board driven by a 3V CR2032 coin cell battery.  I'm trying to make this as small as possible, which is why I went with the Pro Mini and coin cell battery.  However, my concern is the current draw from a typical IR LED.  As far as I can tell, this will draw around 50mA from the Arduino... which is more than each pin can handle. 

No need to worry, the pins of your Arduino Pro Mini 3.3V are perfectly safe... a CR2032 will never be able to provide that much current. smiley

Logged

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 84
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok.  So, do I even need a transistor circuit?  Will the CR2032 not be able to provide enough current (ever) to power a single IR emitter?  I only need this first prototype to run for 1 hr max... so I was hoping a small battery could work.  Plus, the LED wont be on the whole time (small pulses is all I'll be sending... and not incredibly frequently).  I can jump up to a larger power supply if necessary...
Logged

UK
Offline Offline
Faraday Member
**
Karma: 100
Posts: 4153
Where is your SSCCE?!?!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

If you need to provide more than 40mA from a pin then you need a transistor.

There's no grey area there.

Logged

Get 10% off all 4D Systems TFT screens this month: use discount code MAJENKO10

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 150
Posts: 5744
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok.  So, do I even need a transistor circuit?  Will the CR2032 not be able to provide enough current (ever) to power a single IR emitter?  I only need this first prototype to run for 1 hr max... so I was hoping a small battery could work.  Plus, the LED wont be on the whole time (small pulses is all I'll be sending... and not incredibly frequently).  I can jump up to a larger power supply if necessary...

The way I interpret the datasheet is that the LED will work fine at 20mA. A CR2032 should be able to light your LED but maybe not at full brightness. Whether it will work or not depends on distance to receiver, ambient light, etc. The only way to find out is to try it and see.

Do you need a transistor? Not really. If you're worried about your Arduino you can always connect the LED to three pins and turn them on simultaneously (=120mA). Whatever you do, be sure to use a suitable resistor.
« Last Edit: February 25, 2013, 10:06:38 am by fungus » Logged

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 84
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you for the clarification.  It is very much appreciated.
Best,
Andy
Logged

India
Offline Offline
Newbie
*
Karma: 0
Posts: 6
Student
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

"you can always connect the LED to three pins and turn them on simultaneously (=120mA). Whatever you do, be sure to use a suitable resistor."

I am confused to read this ,

Is it right to connect three pins to one output  smiley-confuse(will it not burnt arduino pro mini 3.3v?) and if yes then is that current limiting resistance will run through each pin to output.Please clarify it?

Is it better alternative for transistor to amplify current to IR LED output from arduino?
Logged

Arduino is Awesome.....

UK
Offline Offline
Faraday Member
**
Karma: 100
Posts: 4153
Where is your SSCCE?!?!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

As long as all three pins are set to the same level *at the same time* then there is no danger.  The danger comes when you have one or more pins HIGH, and the other(s) LOW - then you get a dead short across the pins and you can burn them out.

You should only ever do this with pins that are all on the same PORT, and then only when doing direct port manipulation so all the pins are changed with the same instruction.

Also, please note that 40mA per pin is the *absolute maximum* for a pin.  It is OK to use 40mA for very very short bursts.  The data sheet recommends you should not exceed 20mA per pin under normal operation.  Also there is a total limit for a whole I/O port of 150mA.

Quote
Although each I/O port can source more than the test conditions (20mA at VCC = 5V, 10mA at VCC = 3V) under steady state conditions (non-transient), the following must be observed:
ATmega48A/PA/88A/PA/168A/PA/328/P:
1] The sum of all IOH, for ports C0 - C5, D0- D4, ADC7, RESET should not exceed 150mA.
2] The sum of all IOH, for ports B0 - B5, D5 - D7, ADC6, XTAL1, XTAL2 should not exceed 150mA.
If IOH exceeds the test condition, VOH may exceed the related specification. Pins are not guaranteed to source current greater than the listed test condition.
Logged

Get 10% off all 4D Systems TFT screens this month: use discount code MAJENKO10

United Kingdom
Offline Offline
Tesla Member
***
Karma: 227
Posts: 6639
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Is it right to connect three pins to one output  smiley-confuse(will it not burnt arduino pro mini 3.3v?) and if yes then is that current limiting resistance will run through each pin to output.Please clarify it?

This is possible as long as you are careful to get the software right. You need to choose 3 pins on the same physical port (B, C or D) of the mcu (see http://arduino.cc/en/Hacking/PinMapping168) and you need to use direct port manipulation so that you can simultaneously change the state of all 3 pins in the same instruction. However, if you do get it wrong and accidentally set one pin high and another low for a short while, then if you are running from 3V you are unlikely to damage the pins because the current will probably barely exceed 40mA.

Is it better alternative for transistor to amplify current to IR LED output from arduino?

Using a transistor will save on Arduino pins and probably provide more current than you can get from 3 output pins, because of the output resistance of the pins. Also, it is best to generate the 38kHz IR signal from a PWM pin, in which case you can't drive the LED from multiple pins. Choose a transistor with a low saturation voltage at the highest LED current that you might want to use, such as BC337.

btw you can get IR emitters with various beam angles. A narrower beam angle will allow a greater range at lower LED current - provided you aim the LED sufficiently accurately at the detector.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

0
Offline Offline
Shannon Member
****
Karma: 220
Posts: 12702
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That's true... a coin cell may not be appropriate... but the form factor will be important here, plus this is just for an initial prototype.  I can always jump up to a Lipo or some other battery source if power consumption becomes an issue.  But, are there any issues running the transistor breakout board off of 3V?  And do you think there will be any clock issues with 8MHz resonator to control a 38KHz blinking IR LED?
Thanks,
Andy

Two alkaline LR44's in series might be a better battery?  If you want more current to the IR diode drive it from several
pins on the same port in parallel, and use direct port manipulation to ensure they switch together?
Logged

[ I won't respond to messages, use the forum please ]

United Kingdom
Offline Offline
Tesla Member
***
Karma: 227
Posts: 6639
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

If you must use a coin cell, connect a 1000uF or greater capacitor in parallel with it. The capacitor will be able to supply the LED current if you only transmit in short bursts.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Idaho, US
Offline Offline
Edison Member
*
Karma: 21
Posts: 1050
Special User
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

A single small resistor between the LED and ground should limit current to reasonable levels... is a resistor really going to make your project too big and bulky?
« Last Edit: August 21, 2013, 12:03:32 pm by tylernt » Logged

Pages: [1]   Go Up
Jump to: