+ Reply to Thread
Page 2 of 2
First 1 2
Results 16 to 19 of 19

Thread: Clock that runs on batteries.

  1. #16
    DirtyLude Excellent DirtyLude Excellent DirtyLude Excellent DirtyLude Excellent DirtyLude Excellent DirtyLude Excellent DirtyLude Excellent DirtyLude Excellent
    Join Date
    Aug 2003
    Location
    Toronto, Canada
    Posts
    1,307

    Default

    Using the diode method for switching from the higher voltage mains DC source to the batteries, you can detect when the hard connection has been disconnected because there will be a drop in power on your power source to the battery voltage.

    I don't know what microcontroller you are using, but generally a uC can run on sleep mode just maintaining an xtal clock for a very long time. Some could do it for years on a couple AA's.

    DS1307 is a 5V part only. Keep that in mind if you are running a 3.3V uC.
    Last edited by DirtyLude; 2nd October 2009 at 01:37 AM.
    Mark Higgins


  2. #17
    alphacat Okay
    Join Date
    Apr 2009
    Location
    France
    Posts
    735

    Default

    Thank you very much johnnies!

    Quote Originally Posted by Mr RB View Post
    You just need 2 schottky diodes, you place one directly between the +5v rail and micro power pin and another diode between a 3-cell 4.5v battery and the micro power pin.

    It's an easy enough mod you can do it by cutting one PCB track and soldering the diodes on the bottom.
    About Mr RB's plan, I should have another part in the system that will let the MCU know when it is driven by batteries, so the MCU could get into sleep mode, with only its clock running, right?

    One more thing please.
    If the power supply wire that connects to the Power pins of the MCU, connects to other devices, then its not good right?
    I mean, i'll have to re-trace the wires, isnt it?
    Last edited by alphacat; 2nd October 2009 at 12:58 PM.

  3. #18
    Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent
    Join Date
    Mar 2005
    Location
    Brisbane Australia
    Posts
    6,795

    Default

    If you have the ability to modify the code then you have many more options. Post details of the processor used and how you are currently keeping time and people will be able to help more.

    Mike.

  4. #19
    alphacat Okay
    Join Date
    Apr 2009
    Location
    France
    Posts
    735

    Default

    Thanks.
    I'm using a CC2430 micro-controller.
    Currently the MCU is powered only when the product is connected to the mains.
    The time-ticking is being operated by a RTC timer.
    Last edited by alphacat; 2nd October 2009 at 02:34 PM.

+ Reply to Thread
Page 2 of 2
First 1 2

Similar Threads

  1. My Engine runs!
    By jrz126 in forum Chit-Chat
    Replies: 19
    Latest: 6th June 2008, 06:46 AM
  2. Code using TIMER0 runs at different speeds
    By David / W9GF in forum Micro Controllers
    Replies: 8
    Latest: 15th April 2008, 03:23 AM
  3. Which T32.cmm batchfile runs when Trace32 starts?
    By naseeam in forum Micro Controllers
    Replies: 3
    Latest: 14th November 2007, 03:42 PM
  4. MC only runs w/ ICD2 attached?
    By DanD in forum Micro Controllers
    Replies: 3
    Latest: 27th June 2006, 12:43 AM
  5. Who makes your small PCB runs ?
    By iso9001 in forum General Electronics Chat
    Replies: 1
    Latest: 20th September 2005, 08:41 AM

Tags for this Thread