12F683 battery powered remote - energy consumption question


Closed Thread
Results 1 to 8 of 8
  1. #1
    Join Date
    Mar 2007
    Posts
    9

    Default 12F683 battery powered remote - energy consumption question

    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 week Anyway, 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!
    Last edited by silentwol; - 12th April 2007 at 19:53.

  2. #2
    Join Date
    Mar 2007
    Posts
    9


    Did you find this post helpful? Yes | No

    Default

    Hmm... just digging around - another possible option seems to be setting the clock speed to 32khz (apparently uses 11uA?!).

    Once the SERIN reaches timeout, it branches to a tight loop:

    1. turn everything off
    2. set OSCCON = 0 for 32khz clock speed
    3. NAP 0 sleep for ~18 ms
    3. check if 'turn on' pin is high (e.g. from touch sensitive transisor circuit)
    4. if on, turn everything back on and goto main routine
    5. else loop back to #1

    Seem reasonable?
    Last edited by silentwol; - 12th April 2007 at 21:20.

  3. #3
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    One thing to keep in mind when using coin cells...
    They may be rated at 200mah (give or take), but that's at a very low current draw, say 50uA. If you pulse it at 600uA, that 200mah battery will most likely act more like it's only a 50mah battery.
    In other words, 10 seconds of 600uA is a lot more drain than 100 seconds of 60uA, and that's a lot more than 1000 seconds at 6uA.

    Don't ask me why, it just the way it is

  4. #4
    Join Date
    Mar 2007
    Posts
    9


    Did you find this post helpful? Yes | No

    Default

    Thanks for that, but I forgot to mention that I'm planning on using 2 AAA rechargables (1.2V each), so hopefully that wont be a problem

  5. #5
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by silentwol View Post
    Thanks for that, but I forgot to mention that I'm planning on using 2 AAA rechargables (1.2V each), so hopefully that wont be a problem
    Check the datasheets on the battery discharge characteristics. I'm sure the same thing applies, just not nearly as bad as with a coin cell.

  6. #6
    Join Date
    Oct 2004
    Posts
    448


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by silentwol View Post
    Hi,

    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.
    Not directly related to your question, but concerning transmitting of an IR signal; here's my experience. I had in the past tried pretty much what you are doing (hardware PWM on one pin, and the data on another). I then modified the code to control the PWM itself as per the data bits, and got a much better sinal (in terms of shape and amplitude). So much so that I could even get rid of the transistor, and drive the LED directly (in series with a resistor) from the pin. Additional bonus being saved an IO pin as well.


    Regards,

    Anand Dhuru

  7. #7
    Join Date
    Mar 2007
    Posts
    9


    Did you find this post helpful? Yes | No

    Default

    That's interesting... so you can switch PWM on and off that quickly?

    would the following be sufficient?
    PWM off:
    CCP1CON = 0
    T2CON = 0

    PWM on:
    CCP1CON = %00001100
    T2CON = %00000100

    Thanks for your help

  8. #8
    Join Date
    Oct 2004
    Posts
    448


    Did you find this post helpful? Yes | No

    Default

    I think so.

    Alternately, just configure the HPWM pin as an input when you want the LED off.

    Credit for this technique goes to Darrel Taylor, who helped me make it work.

    THANKS, DARREL.

    Regards,

    Anand

Similar Threads

  1. How can a battery powered PIC turn itself off?
    By tekart in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 9th August 2012, 10:44
  2. Newbie remote control question?
    By Clodoaldo in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 14th July 2009, 17:20
  3. Battery powered applications
    By NavMicroSystems in forum Off Topic
    Replies: 7
    Last Post: - 22nd June 2009, 07:12
  4. MAh - Battery question
    By kevj in forum Schematics
    Replies: 6
    Last Post: - 16th October 2007, 16:06
  5. Battery Powered Need Help!
    By scottl in forum Off Topic
    Replies: 1
    Last Post: - 29th March 2006, 09:52

Members who have read this thread : 2

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts