Pages: [1]   Go Down
Author Topic: IR remote controller project with low power?  (Read 405 times)
0 Members and 1 Guest are viewing this topic.
South UK
Offline Offline
God Member
*****
Karma: 5
Posts: 583
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi all. I would like to make a IR remote controller and run it off batteries - maybe 2 AA cells? The IR part should be fine, but I'm not sure about how to achieve the lowest power consumption possible. I will be using a 328P - because I have a few around the place and also I will probably use most of the digital inputs to read buttons. This means that 99% of the time the 328 would be idle, but always checking pin state changes.

Any advice would be gratefully received smiley
Logged

Poole, Dorset, UK
Offline Offline
Edison Member
*
Karma: 50
Posts: 2203
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Put the micro to sleep and then have it wake every 1/10th (or so of a second) to check the pins. This will save you 99% of your power and still give you a good response to a key press.

Mark
Logged

Oregon, USA
Offline Offline
Edison Member
*
Karma: 65
Posts: 2125
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I would use pin change interrupts, so the MCU would be sleeping virtually all the time.
Logged

"It seems to run on some form of electricity"

Offline Offline
Edison Member
*
Karma: 64
Posts: 2488
The last thing you did is where you should start looking.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Great information here:
http://www.gammon.com.au/forum/?id=11497
Logged

South UK
Offline Offline
God Member
*****
Karma: 5
Posts: 583
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks guys, I will have a read of the link later.

If I was to use interrupts, how could I read multiple inputs?
Logged

South UK
Offline Offline
God Member
*****
Karma: 5
Posts: 583
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

any ideas?
Logged

ਪੰਜਾਬ
Online Online
Edison Member
*
Karma: 12
Posts: 1582
Another year! Alone! :(
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You have to configure and read pins in order of their interrupt generation .there are 2 hardware interrupts on a uno or technically a atmega328 but in addition to that each pin I mean the gpio can have a interrupt but I think they can't wake your uC so use the hardware interrupt to wake up the uC from sleep and after waking it up immediately check for inputs etc.
Logged

"Real Men can Accomplish  Anything"
-  Website  
- skype : nishants5  

ਫ਼ਤੇਹ ਕਰੂਂ !

South UK
Offline Offline
God Member
*****
Karma: 5
Posts: 583
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

the only trouble with that though is I would need to press two buttons, one hardware interupt then another button connected to a standard digital IO pin?

Thanks
Logged

ਪੰਜਾਬ
Online Online
Edison Member
*
Karma: 12
Posts: 1582
Another year! Alone! :(
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes in my understanding yes you have to press one pin to generate the external interrupt and thus waking it up and then follow up with a routine to read the other presses.
Logged

"Real Men can Accomplish  Anything"
-  Website  
- skype : nishants5  

ਫ਼ਤੇਹ ਕਰੂਂ !

South UK
Offline Offline
God Member
*****
Karma: 5
Posts: 583
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I need to think a bit more about it I guess, it would be nice to only have to press one button but maybe could use come dual pole switches - one pole to wake up via interrupt and the other pole to be read as a digital input?

Thanks
Logged

NSW Australia
Offline Offline
Faraday Member
**
Karma: 80
Posts: 3232
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

maybe could use come dual pole switches - one pole to wake up via interrupt and the other pole to be read as a digital input?

Diodes!
Logged

Pages: [1]   Go Up
Jump to: