Surviving 1 second without battery power


Closed Thread
Results 1 to 28 of 28

Hybrid View

  1. #1
    Join Date
    Feb 2005
    Posts
    130

    Default Surviving 1 second without battery power

    Im trying to understand how this LED flashlight driver works, so I can implement the same technique on my own design.

    The driver is powered by a single 3.6v Li-ion battery and by powering it off-on in less than a second it changes modes: Hi 100% > Mid 35% > Lo 20% > Strobe > SOS

    Here is the link to it:
    http://www.dealextreme.com/details.dx/sku.6190
    AMC7135 Datasheet

    And here is the Schematic I drawn from inspecting the PCB:


    It obviously detects when power goes off, but I don't have the slightest clue on how its done, if I have to think of some PIC function that does that it would be BOD, but to be honest, Im lost.

    The capacitor in the schematic may work as a battery backup, but its rather small, so upon battery power lost the PIC must be configured to keep consumption to a minimum.

    Any help will be appreciated!
    Last edited by peu; - 12th March 2008 at 14:50.

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    It might not have to survive without power.
    If you power up, read a byte from eeprom, you can know what mode you were in last time around, increment that value, then power down.
    Next time you power up, you read the same byte, the mode has incremented, save the value, power down...wash lather rinse repeat.
    And there's probably some slick single-button power on/off trickery going on.
    Do a search and you'll find a slick single-button power on/off trickery circuit here too...

  3. #3
    Join Date
    Feb 2005
    Posts
    130


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by skimask View Post
    It might not have to survive without power.
    If you power up, read a byte from eeprom, you can know what mode you were in last time around, increment that value, then power down.
    Next time you power up, you read the same byte, the mode has incremented, save the value, power down...wash lather rinse repeat.
    And there's probably some slick single-button power on/off trickery going on.
    Do a search and you'll find a slick single-button power on/off trickery circuit here too...
    Thanks for your prompt reply Skimask (as always I must add )


    If you power up say after 10 seconds it remembers the last mode, but if you do an ON-OFF-ON cycle in less than a second it changes modes as described. Thats the only way to change modes, fast ON-OFFs

    No button trickeries, just fast ON-OFFs I have the driver at hand, and this technique is rather common in new multimode LED flashlights.

    I know how to do it by using an extra diode and a PIC pin to detect power lost, but this circuit uses a more efficient way for doing that.

  4. #4
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by peu View Post
    If you power up say after 10 seconds it remembers the last mode, but if you do an ON-OFF-ON cycle in less than a second it changes modes as described. Thats the only way to change modes, fast ON-OFFs
    So you've got a counter...that counts...and it sits there...counting...
    when the power button is pushed...
    If the count < x then it saves the next mode and powers down
    If the count > x then it doesn't switch modes in eeprom and just powers down

  5. #5
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648


    Did you find this post helpful? Yes | No

    Talking The good question ...

    Is it a Power on Reset

    or

    Is it a Brown Out Reset ...

    Just test the PCON bits ... to know it. and do what's to do.

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  6. #6
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    But if it's one of those single button power on/off type circuits, it'll always be a power on reset.

  7. #7
    Join Date
    Feb 2005
    Posts
    130


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by skimask View Post
    So you've got a counter...that counts...and it sits there...counting...
    when the power button is pushed...
    If the count < x then it saves the next mode and powers down
    If the count > x then it doesn't switch modes in eeprom and just powers down
    But you must count while the power is out... there is no backup power. The mode is changed if you do an ON-OFF-ON cycle in less than a second.

    I Just updated the schematic to clearly show the entire circuit is battery powered with no backup power, reload the image so the new one is shown.


    Maybe Im missing something from your answer <scratching head>

  8. #8
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648


    Did you find this post helpful? Yes | No

    Wink

    Quote Originally Posted by peu View Post

    Maybe Im missing something from your answer <scratching head>
    YES !!!

    The capacitor holds enough power to the PIC not to reset all registers While you do the "quick on-off-on"

    remember V b.o.r. is more than the min running voltage of the Pic ... and driving your current sinks do not drain much current from the PIC ...

    so that gives enough time for the Pic to reset AND test the BOR Bit, change the mode, ... ... after that you re-apply the power ...

    Héhé ...
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  9. #9
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by peu View Post
    Maybe Im missing something from your answer <scratching head>
    Ok, I smell what your cooking...
    Put a meter on the cap and see what it reads and how fast it decays.
    Maybe it's a version of a super-cap in a really small package.
    PIC's (nano-watt PIC in particular) can draw some seriously LOW current in a sleep mode.

Similar Threads

  1. Thermo 7 segments - little problem
    By fratello in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 27th July 2013, 07:31
  2. RS485 bus - starting probem
    By wurm in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 27th January 2010, 13:35
  3. 32 bit square root
    By Charles Linquis in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 6th May 2009, 03:37
  4. one line led light make image
    By bioul in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 13th February 2008, 12:19
  5. HSERIN doesn´t work
    By wurm in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 29th July 2007, 14:23

Members who have read this thread : 1

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