Arduino Forum

Using Arduino => General Electronics => Topic started by: daveyjones on Mar 27, 2016, 09:46 pm

Title: IR LED - Which would use less power?
Post by: daveyjones on Mar 27, 2016, 09:46 pm
I don't own a uCurrent (and can't afford one); I have no good way of measuring low amperages. (I am contemplating building one over time)

That said; I want to run something on batteries, but (of course) want it to run forever.  I have done a lot to get it down...

But, I am running an IR LED to send a single IR code periodically.
Currently, I have it (see attached, lower schematic) run it directly off the arduino pin.  This is working.
But, the (see attached, upper schematic) "proper way" has been suggested may be better in power usage.

The difference that I can tell is: the LED would be taking power directly from the batteries (3 AA) instead of thru the arduino regulator.

"KISS" tells me to leave it as is; but if the proper way would yield longer battery life, I'd happily go with that.

Any ideas which will perform better, battery wise?

Thank you.

(Bonus Question: If you use KiCad, how can I get resistors to show up with more conventional zig-zag line?)
Title: Re: IR LED - Which would use less power?
Post by: daveyjones on Mar 27, 2016, 09:50 pm
Forgot to add the image...
Title: Re: IR LED - Which would use less power?
Post by: olf2012 on Mar 27, 2016, 10:19 pm
The diode is the wrong way around in the upper circuit.
It does not really matter whether you drive the LED with an additional transistor. Power consumption will be proportional to the LED current. And you will need a certain current to have the LED send over a given distance. First try to determine which minimal current is necessary for your hardware setup. Then adjust the current with a reasonable margin (maybe 150%) for reliable transmission.
BTW when using three AAs you do not need a regulator. Get rid of the Arduino board and build a stand alone circuit. This will save MUCH energy
Title: Re: IR LED - Which would use less power?
Post by: Boardburner2 on Mar 27, 2016, 10:31 pm
Agree.
Even when not transmitting the arduino will be drawing significant power.

Dedicated chips draw zero power until the button is pressed and can run off a coin cell.

If this has to be automatic investigate how to put the arduino into sleep mode.

If a regular pulse , you may consider a low power 555 timer circuit, it will draw much less than an arduino.
Title: Re: IR LED - Which would use less power?
Post by: daveyjones on Mar 27, 2016, 11:04 pm
Thanks!
@olf2012 - re:diode: Sorry about that -- I was trying to get the schematic done quickly to post so I wasn't hit with "a schematic please"... I am still working out think with kicad; some things are just not intuitive.

So far I can put a 480ohm resistor and it works.  Going to 1K it started to get flakey if the sun was really bright.
I have supplied power to "raw" pin, I thought this bypassed the regulator; but I can remote the regulator as well. (I already removed the 'power is on' led)

@Boardburner2 - I am using rocketscreams "low power" library; here's my setup; then my delay does go to sleep...
Code: [Select]
power_adc_disable(); // ADC converter
  power_spi_disable(); // SPI
  power_usart0_disable();// Serial (USART)
  //power_timer0_disable();// Timer 0
  //power_timer1_disable();// Timer 1
  //power_timer2_disable();// Timer 2
  power_twi_disable(); // TWI (I2C) 
  I haven't disabled a timer, because I hadn't yet looked to see which timer irRemote uses.

and where I would use a delay() I am using my own function that takes seconds (not milliseconds) to sleep for most of the time:
Code: [Select]
void mySleepyDelay( int delayTimeSeconds ){
  unsigned int secondsPassed=0;
  while( secondsPassed < delayTimeSeconds ) {
    LowPower.powerDown(SLEEP_8S, ADC_OFF, BOD_OFF);
    secondsPassed += 8;
  }
}
(yes, I know it can go up to 8 seconds beyond, but I'm sleeping for 1.5 hours, not seconds, so it's not a critical timing.

I had considered using a 555 timer; but I couldn't easily figure out how to get it power on the arduino long enough for it to run a sketch.  I got it to use be an external interrupt to wake it out deep sleep instead of the 8second timer.  Since I can't measure low ma's I couldn't tell if that saved me anything as I was now powering 2 things instead of just 1.

More and more that uCurrent is looking like a must-have.  I should play with my cheap oscilloscope (dpscope ii (http://www.pdamusician.com/dpscope/overview_ii.html)) to see if I can use it to measure sub-ma's.
Title: Re: IR LED - Which would use less power?
Post by: Boardburner2 on Mar 27, 2016, 11:16 pm
I had considered using a 555 timer; but I couldn't easily figure out how to get it power on the arduino long enough for it to run a sketch.  I got it to use be an external interrupt to wake it out deep sleep instead of the

I will leave the software for the more capable.

You could use a simple latch which the 555 fires up, then use an arduino output to switch it off when it has done its job.

I was thinking that a dedicated remote chip with a 555 would work.
Arduino would be more flexible though.
Title: Re: IR LED - Which would use less power?
Post by: Boardburner2 on Mar 27, 2016, 11:34 pm
More and more that uCurrent is looking like a must-have.  I should play with my cheap oscilloscope (dpscope ii (http://www.pdamusician.com/dpscope/overview_ii.html)) to see if I can use it to measure sub-ma's.
I have a microamp lab meter that has not left the cupboard in 20 years.

Google on VU meter.
Analog ones with 200 uA fsd can be had.

Never needed anything else .
You need to understand kirchoffs laws though to use them properly.
Title: Re: IR LED - Which would use less power?
Post by: daveyjones on Mar 28, 2016, 01:52 am
Thanks.  I'll have a look at 555 latching circuits.
Thanks for the idea!

Title: Re: IR LED - Which would use less power?
Post by: MarkT on Mar 28, 2016, 05:45 pm
Microamps are measured using a resistor and a voltmeter!  That's how any multimeter does it, and
you can do this with another Arduino's analog inputs if you want!  1uA through 10k gived 10mV...

Even cheap multimeters can do this with a resolution of 0.1uA.  You can even get mechanical
microammeters with 0..50uA full scale (though they will not tolerate over current and are easy to damage).
Title: Re: IR LED - Which would use less power?
Post by: daveyjones on Mar 28, 2016, 06:28 pm
cool! I'll try to find an example of how to set this up after classes.
thanks
Title: Re: IR LED - Which would use less power?
Post by: daveyjones on Mar 28, 2016, 06:49 pm
You could use a simple latch which the 555 fires up, then use an arduino output to switch it off when it has done its job.
Well; I searched for 555 latch circuit and came up with a dizzying array of various solutions...
I'm sure the time would be well spent to learn the ins and outs of the 555; but for now I am going to shelve it -- I couldn't find something that would turn on the arduino until the arduino says "turn off".

I can see a possible mid--way solution, but again, w/o being able to measure the low current; I'm not sure it'd be worth the effort.

Use the 555 to send an external interrupt to wake up the arduino every X minutes (ideally 90 or more), and the arduino just treat it as an interrupt; do it's job; then go back to deep sleep "forever".

but I think getting the 555 to turn it on & wait for the 555 to get a signal "I'm done" and turn it off would be better, based on what I have seen on 555 specs on power usage...

if you have  circuit/schematic in mind or a good place to hunt one down; I would really appreciate it.

Off to class.
Title: Re: IR LED - Which would use less power?
Post by: Boardburner2 on Mar 28, 2016, 10:14 pm
Here is a start

http://www.mosaic-industries.com/embedded-systems/microcontroller-projects/electronic-circuits/push-button-switch-turn-on/microcontroller-latching-on-off (http://www.mosaic-industries.com/embedded-systems/microcontroller-projects/electronic-circuits/push-button-switch-turn-on/microcontroller-latching-on-off)

http://forum.arduino.cc/index.php?topic=328109.0 (http://forum.arduino.cc/index.php?topic=328109.0)

Possibly investigating using an external (programmable) interrupt timer as well.

EDIT

This circuit may be better as it only requires momentary contact to tyrn it on.
http://forum.arduino.cc/index.php?topic=373255.15 (http://forum.arduino.cc/index.php?topic=373255.15)
Title: Re: IR LED - Which would use less power?
Post by: Boardburner2 on Mar 29, 2016, 12:31 am
Atmel chips can run at 1uA in sleep mode.
Its the perhipherals that you cannot turn off in software which take the current.
Discussed in the thread i linked.

Crossroads has some bare bones boards which get around this problem.
Title: Re: IR LED - Which would use less power?
Post by: daveyjones on Mar 29, 2016, 06:23 pm
Thanks!  I will read over the links; Thank you so much those.
On 1st glance it seems two things I need to learn -- the latching circuit which will turn on the microprocessor; and a 555 circuit that will 'turn on' the latching circuit (which then turns on the mcp). 
When I was reading the 555 (on my own) I was trying to find something relevant that had a single 555 circuit that did everything.. Now it makes much more sense.

So the 555 circuit will need to be tuned to signal every 90 (or so) minutes for a brief period.  The latching circuit and arduino takes care of turning off.
The 2nd part seems very straight forward; the tuning ('programming') of the 555 will be the hard part (for me -- but I get the idea now; and there's lots of pages out there, so I'm sure I'll get the formula to figure it out)
Thank you!
Title: Re: IR LED - Which would use less power?
Post by: Wawa on Mar 29, 2016, 09:57 pm
Not sure why you want to use a 555.
Don't forget that a common 555 uses ~5mA idle, and won't work below 4.5volt.
It can sink some current at that low voltage, but not source.
A Cmos 555 can work at a  lower voltage, uses 60-200uA idle, but can't drive/switch much at low voltages.

What are you planning to do with this intermittend 'IR code'.
Leo..
Title: Re: IR LED - Which would use less power?
Post by: Boardburner2 on Mar 29, 2016, 11:21 pm
a CSS555 would be much better for consumption.

More work for the op to understand though.
Title: Re: IR LED - Which would use less power?
Post by: Wawa on Mar 29, 2016, 11:46 pm
a CSS555 would be much better for consumption.
As said, little output current (pin3) available at low (battery) voltages.

Only the 'discharge' pin of a cmos 555 can sink enough current to drive/modulate an IR LED at low supply voltages. Example attached is a continious mode 5meter curling game 'beambreak' ~38kHz IR transmitter I designed some time ago. Works on 2x AA for a looong time. LED/resistor to the left is a battery indicator, and is not needed to function.
Leo..
Title: Re: IR LED - Which would use less power?
Post by: daveyjones on Mar 30, 2016, 04:52 am
That's what was suggested.  (FWIW the only 555 I have here is a cmos version)

Although, after reading today; I ordered up a few 4541's they seemed more like something that was usable for the long duration.

----

It's a project for my uncle..
Dish recently forced us to upgrade satelite receivers.  This new receiver shuts off after 4 hours of no use. (there is a setting, which is currently 'disabled', but it still goes to sleep).  He tried dealing with them but he got nowhere dealing with dish.  It was trivial enough to build a small thing to send the "power on" code every x hours. (it's working fine) --I just want to reduce the power more so it can last longer on batteries.  (we want it to stay on, so the dvr can record things; we don't want enough tv that 'normal use' would keep the  receiver watchdog from going to sleep...)
Title: Re: IR LED - Which would use less power?
Post by: Wawa on Mar 30, 2016, 08:43 am
This new receiver shuts off after 4 hours of no use.
Understood. Bloody nuisance compulsary power savings "feature".
My Samsung TV also does that e.g. when I'm watching a long movie.
"Press a button within 1 minute, otherwise I will enter standby" Grrrr.
Or when I turn my PC/media player off: "You have unplugged the HDMI cable".
I wonder if the people why design those things ever watch TV.


Can't you use e.g. a Nano and a 5volt phone charger with micro-USB lead.
A phone charger runs on fumes. Batteries are expensive
Sleep the Nano if you want to, or use it also for something else e.g. temp display or fancy TV background lighting.
Leo..
 
Title: Re: IR LED - Which would use less power?
Post by: Boardburner2 on Mar 30, 2016, 09:56 am
As said, little output current (pin3) available at low (battery) voltages.

Only the 'discharge' pin of a cmos 555 can sink enough current to drive/modulate an IR LED at low supply voltages. Example attached is a continious mode 5meter curling game 'beambreak' ~38kHz IR transmitter I designed some time ago. Works on 2x AA for a looong time. LED/resistor to the left is a battery indicator, and is not needed to function.
Leo..
It was not for driving a led, the output drives a latch to switch on an arduino supply which then drove the led before switching off the latch.

Although, after reading today; I ordered up a few 4541's they seemed more like something that was usable for the long duration.

The CSS555 is better for battery app, same quiescent current but works down to a couple of volts.
Title: Re: IR LED - Which would use less power?
Post by: Wawa on Mar 30, 2016, 11:15 am
Also known as the ICM7555 (Maxim).
Leo..
Title: Re: IR LED - Which would use less power?
Post by: daveyjones on Mar 30, 2016, 04:21 pm
Understood. Bloody nuisance compulsary power savings "feature"
What frustrates me the most is there is an option in setup to disable the feature; but it doesn't work... and dish sees no reason to a) believe me, or b) fix it.   That is even more frustrating. Reminds me the days of cable tv...

My Samsung TV also does that e.g. when I'm watching a long movie.
"Press a button within 1 minute, otherwise I will enter standby" Grrrr.
That is annoying as heck... I got really frustrated to watch some show I wanted , only to see the screen saver message "Your receive has turned off to save power, press 'ok' to turn back on" -- Why it can't turn back on when it sees a channel change is beyond me.  Luckily periodically sending the "on" Ir sequence doesn't alter what is on tv (no messages) and is not a toggle...

Can't you use e.g. a Nano and a 5volt phone charger with micro-USB lead.
Yes, I can; in fact I even picked up a 5v charger from the thrift store (I love that place for finding reusable electronics) but I decided to use this opportunity as a learning exercise (stretching the power).  That and my uncle doesn't want another cord.. (neat freak of sorts; but he has always pushed me to try harder, so this may be one of his pushes to get me to learn more...)

A phone charger runs on fumes. Batteries are expensive
Initial version is a promin running off 3 AA batteries, this should last a good long time.  Next version will be a rechargeable battery  (like an 18650)

Sleep the Nano if you want to, or use it also for something else e.g. temp display or fancy TV background lighting.
It is awake for such a short period of time; most of the processing time is taken up staying asleep.
Every few cycles, it checks the battery voltage, if it dips down too much; it will start flashing the onboard led occasionally.
Otherwise it's a waiting game for 90 minutes to pass, send signal, wait for 90 minutes to pass... If I can cut down on the power it's using in sleep mode by flipping the power off; that would save more power...

re the 555 -- I only have 1 cmos555 here; and all I could find, schematic wise, involved using two 555's or two 556's with a 3rd chip to achieve 90-120 minute delays.  The 4541 seems to be low power & more capable of long delays.  (I did order up a couple of 555's as well to try to  put together both circuits & try to see which is A) easier, B) smaller, C) better in power usage...

If you would suggest a good way to use a 555 for 90+ minute delays; please point me to it -- but so far, all I've read either says the 555 is not capable of those delays or I have to combine two...

Thanks for the ideas!

(I also squeezed in a ucurrent PCB & will build a couple over the next few months as time/money permits; also as a learning experience; but I may end up with an extra....)
Title: Re: IR LED - Which would use less power?
Post by: Wawa on Mar 31, 2016, 12:21 am
In the eighties, before everything was done with a micro, I would have used a CD4060 (74HC4060) for this job. RC clock time set to the IR send time, and a diode 'OR' port to block the remaining time of the ripple counter for the delay time.
Leo..
Title: Re: IR LED - Which would use less power?
Post by: Boardburner2 on Mar 31, 2016, 02:52 am
What frustrates me the most is there is an option in setup to disable the feature; but it doesn't work... and


I have a very similar problem with a sky tivo box.

The magic eye gets its power off phantom on the distribution coax, output 2.

Power has to be enabled in software but will not work.
(Its not the distribution amp BTW. Thouroughly tested).
Title: Re: IR LED - Which would use less power?
Post by: Boardburner2 on Mar 31, 2016, 03:19 am
OP

You seem tech savvy, might like to consider one of these.
Use sleep mode then de solder the usb and led once it's working

http://www.ebay.co.uk/itm/like/191734784839?limghlpsr=true&hlpv=2&ops=true&viphx=1&hlpht=true&lpid=122&chn=ps&googleloc=1006551&poi=&campaignid=207297426&device=c&adgroupid=13585920426&rlsatarget=pla-142405615746&adtype=pla&crdt=0&ff3=1&ff11=ICEP3.0.0-L&ff12=67&ff13=80&ff14=122 (http://www.ebay.co.uk/itm/like/191734784839?limghlpsr=true&hlpv=2&ops=true&viphx=1&hlpht=true&lpid=122&chn=ps&googleloc=1006551&poi=&campaignid=207297426&device=c&adgroupid=13585920426&rlsatarget=pla-142405615746&adtype=pla&crdt=0&ff3=1&ff11=ICEP3.0.0-L&ff12=67&ff13=80&ff14=122)
Title: Re: IR LED - Which would use less power?
Post by: daveyjones on Mar 31, 2016, 04:54 am
You seem tech savvy, might like to consider one of these.
Use sleep mode then de solder the usb and led once it's working
Funny you should suggest that -- I tried an attiny85 but had some timing issues that I couldn't get past.  I ordered up a digispark board as well as a resonator to see if that'd get the timing right.

thanks for the idea, I was just a little bit ahead of you ;-) (I ordered them this morning)  Worst case is I have a small board to do something with later, best case, it works & I save some battery...

The pro-mini (or mini-pro) doesn't have a usb, and I desoldered the 'power' led... but I think atmega pulls more than the tiny... I thought about desoldering more, but then I figured I should start the other way "bare bones" and work up. (I also ordered a dip atmega328p, just in case)

Thanks again! 
Title: Re: IR LED - Which would use less power?
Post by: Boardburner2 on Mar 31, 2016, 03:12 pm
Typo i meant the led, attiny85 does not have usb either.

What current does it draw ?
Title: Re: IR LED - Which would use less power?
Post by: daveyjones on Mar 31, 2016, 06:30 pm
An attiny85?  Not sure, haven't gotten it yet.
According to data sheets.. about .7ma @ 1mhz, .2ua in sleep mode.
I do not have a good way to measure it tho.  I know it will be slightly more with the IR being activated...