Writing code for battery operated projects


Closed Thread
Results 1 to 16 of 16

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    Hi Jessey

    1. Turn OFF all unused Hardware in your PIC befor going to SLEEP... ie... switch-OFF the ADC, PWM etc. That includes switching-OFF your weak pull-up's too.

    2. Is this a NIGHT/DAY Sensor type application or a Room Occupancy Sensor kind of application? If it's NIGHT/DAY, then it doesn't get light instantaneously... so why not go to SLEEP for longer periods of time - like ten Seconds or so.

    3. If you use Comparators (eg 877A) rather than an ADC, you can have your PIC woken from SLEEP when the light level exceeds a pre-set value.

    4. There are better PICs than the 877 for Low-Power use... Microchip has a whole bunch of micropower devices that only consume a few uA when running - let alone when asleep. Also, that's a BIG PIC (in more ways than one!)... so I'm questioning whether you need all those pins for a simple Battery powered application. The 12F683 for example has Comparators, ADC and PWM and will consume far less power than that old 877 (quite apart from the fact that the 877 is probably bigger than your average car Battery!!!). Actually, I've got 877's gathering dust in a drawer here for over two years because it's just not worth designing products with that device.

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    in addition to Melanie, turn off all power that goes to your external device..pot and blah blah. Also, use voltage regulator with the lowest quiescent current need. Regular 7805 are not appropriate. 78L05 are better but there's a bunch of more efficient.

    12F683 is a good choice if you need PWM and ADC. The POT command is not appropriate to read from a POT when your PIC have internal ADC. Should use ADCIN instead. 12f675 will also do the job if your skip the PWM to a home-made sound procedure.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. Writing good/proper code
    By Bill Legge in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 22nd July 2009, 00:55
  2. Reading in Manchester code
    By brid0030 in forum Code Examples
    Replies: 0
    Last Post: - 10th March 2009, 21:55
  3. How much code space do PBP statements use.
    By Darrel Taylor in forum Code Examples
    Replies: 5
    Last Post: - 13th February 2009, 21:31
  4. Loop with two motor and 2 sensors
    By MrRoboto in forum mel PIC BASIC
    Replies: 4
    Last Post: - 8th December 2008, 23:40
  5. Making Program Code Space your playground...
    By Melanie in forum Code Examples
    Replies: 15
    Last Post: - 19th July 2008, 08:26

Members who have read this thread : 0

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