Hi,
I'm using a 12F683 to make a remote to control my TV, stereo system and media center PC.
I have finished writing all the code to send the correct IR signals and I'm now working on reducing the power consumption, so I don't have to change the batteries every weekAnyway, here's a little description of what I have so far:
For the keypad, I bought this:
http://www.targus.com/us/drivers_man...asp?SKU=PA745U
When sleeping it uses around 50uA and when a button is held down it uses about 600uA. When a key is pressed a 9600 serial signal is sent. This is read by the PIC and the correct IR signal sent. This is done using a hardware PWM on GPIO.2 and then making IO.1 high/low to form a signal. The two are then combined using a two transistor AND gate which powers the LED.
Hopefully that gives you a fair idea of what is going on - if more info is needed I'll draw up a circuit diagram and post the code.
My question is, what is the best way of reducing power usage?
Both my current ideas revolve around some sort of wake on interrupt routine. Once the SERIN timeout has been reached (i.e. no input for 15 minutes), the PIC is put to sleep using @ SLEEP, and then woken up by a pin going high... here are the two ways I was thinking of doing it:
1. Have two small metal contacts where your hand holds the device and use a transistor to pick up small conductivity of skin. This is fed into an IO pin.
2. Wake up the PIC when the pin receiving the serial data from the keypad goes high. This means you'll miss the first keypress to wake the PIC up.
The beauty of #1 is that when the PIC is sleeping, you can turn the keypad off (i.e. have V+ of the keypad on GPIO.5 and set this low before sleep and high upon waking). It's slightly more complicated though. 2 is simpler, but will use slightly more power in the long run.
Is there a better way?
Also, what is the best way to wake a PIC from sleep? I've read about using interrupts, but it all seems a little dauting! I was hoping someone could point me in the right direction, so I don't research the wrong thing!
Bookmarks