+ Reply to Thread
Results 1 to 19 of 19
  1. #1
    Join Date
    Jun 2005
    Location
    Perth, West Australia
    Posts
    85

    Default Low power accurate 6 month timer - suggestions?

    Hi folks,

    I'm looking for suggestions on achieving the lowest power, but accurate, timer to last around 6 months.

    It will be at the bottom of the ocean and I have minimal real estate to fit the timer inside an acoustic device so a RTC is out of the question. This device will initially operate for an hour as confirmation on deployment and then sleep (off, powered by the PIC/mosfet) for a period of 180 days. After this the device will be powered up and remain so until its battery supply is exhausted (approx. 2 weeks).

    I've looked at DT's Elapsed Timer but sleep command results in havoc with the interrupts it seems, so I'm thinking an SMD 12LF1840 running from a coin cell counting wake-ups from 10 second sleep events could be an avenue. Some quick and dirty code sees about 10uA average consumption using a 4Mhz crystal but speed isn't an issue, but power, size and accuracy is.

    Does anyone have any suggestions other than above to offer?

    Thanks and regards to all,
    Bill

  • #2
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,236

    Default Re: Low power accurate 6 month timer - suggestions?

    My first question:

    How accurate is "accuracy" ?

    For example, for 180 days of target, is +/- 20 days acceptable?
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  • #3
    Join Date
    Jun 2005
    Location
    Perth, West Australia
    Posts
    85

    Default Re: Low power accurate 6 month timer - suggestions?

    Hi Sayzer, thanks for the quick response.

    No, +/- 20 days is way off the target - I'd like to think +/- minutes or, worse case. hours would be a goal. What do you have in your bag of tricks?

    Regards,
    Bill

  • #4
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,236

    Default Re: Low power accurate 6 month timer - suggestions?

    I have Option 1 and Option 2.



    If the accuracy was not critical, Option 1 could work;
    Still, it may provide some accuracy but requires confirmation & tests.

    Option 1:

    Attachment 8922


    As the accuracy is critical, then the following idea should provide good results depending on the ppm of your crystal; Very cheap and very easy way.

    Option 2:

    Attachment 8921

    Sorry for the big screen shots; it comes from 4K monitor.
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  • #5

    Default Re: Low power accurate 6 month timer - suggestions?

    If you have room for coin cell and that pic then you probably have room for

    https://datasheets.maximintegrated.com/en/ds/DS3231.pdf

    it has 2 alarms on it which I think will do what you want, it is also quite accurate.

    I use this on a Pi

    eBay item number:
    273773628089

    Many ebay suppliers have this or similar.

    Just under 15mm square, and 8mm high - just remove the unwanted connector.
    you could remove the battery and use a slightly larger one if necessary or whatever powers you main PIC.

  • #6
    Join Date
    Sep 2009
    Posts
    776

    Default Re: Low power accurate 6 month timer - suggestions?

    If you need low power, accurate, and small part I'll go with microcrystal RTC.
    3.2x1.5x0.8mm, 40 nA @ 3 V, ±1 ppm @ 25°C, Fout 32768...to...1Hz, alarm with int pin.
    Need more?

  • #7
    Join Date
    Jun 2005
    Location
    Perth, West Australia
    Posts
    85

    Default Re: Low power accurate 6 month timer - suggestions?

    Thanks for the suggestions, for best flexibility I think sayzer's second method is the way to go although the first method is one to remember for other projects. That 4k monitor sounds good...

    @ aerostar that part looks a bit hungry if I'm reading the spec sheet correctly.

    @ pedja089 that's a really cool chip, thanks - samples on order!

    Best regards to all,
    Bill

  • #8
    Join Date
    Oct 2009
    Location
    Utah, USA
    Posts
    442

    Default Re: Low power accurate 6 month timer - suggestions?

    If it is critical I would stay away from ebay suppliers. May get counterfeit or seconds (rejects)

    What about temperature / pressure / humidity inside the vessel at the bottom of the ocean?

    Also might consider a redundant system, again if it is critical and costly to get in place and what cost if it fails??
    Dwight
    These PIC's are like intricate puzzles just waiting for one to discover their secrets and MASTER their capabilities.

  • #9
    Join Date
    Jun 2005
    Location
    Perth, West Australia
    Posts
    85

    Default Re: Low power accurate 6 month timer - suggestions?

    Hi Heckler,

    One would like to think the pressure and humidity inside the vessel would remain as they were when it was sealed at ambient levels - anything other than this means there's a leak and the contents kaput... It's a shallow deployment and temperature will vary but previous WT readings in this area have indicated nothing extreme or wild swings from one season to the next.

    It is not a critical item and if it fails, or the timing goes to mud for whatever reason, then it isn't a catastrophe. This is actually a trial that will lead to larger expansion of same.

    Thanks for your input, appreciated.

    Regards,
    Bill

  • #10
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,199

    Default Re: Low power accurate 6 month timer - suggestions?

    If you use an 16F18326 like I'm using for my remote temperature sensor, and setting the WatchDog timer for the maximum of 18388608 or 256 seconds you can count to 60750 which is still a word size variable and that would be 180 days. I put the Micro into deep sleep mode and only draw about 4uA. total. I have used a 3 volt regulator and a 9 volt battery for the power source. That will allow the battery to be reduced to a level of about 3.3 volts before replacement. I have used an MCP1703A regulator. It is still working after 3 months and the battery voltage is only to about 8.9 volts. Too bad you don't have room for a 9 volt battery.
    Dave Purola,
    N8NTA
    EN82fn

  • #11
    Join Date
    Jun 2005
    Location
    Perth, West Australia
    Posts
    85

    Default Re: Low power accurate 6 month timer - suggestions?

    Hi Dave,

    Thanks for sharing. Yes I don't have the luxury of a large battery... I'll look into other PICs but I'm not sure the WDT timing is accurate or reliable enough for any real confidence in long term timing.

    As I mentioned, this is a trial and I'll continue to investigate other methods during the time the instrument is deployed. The other alternative is to use an external battery canister but this means subsea connectors and the problems that they come with (apart from initial high cost).

    Cheers,
    Bill

  • #12
    Join Date
    Sep 2009
    Posts
    776

    Default Re: Low power accurate 6 month timer - suggestions?

    How you will get data from bottom of sea?

  • #13
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,199

    Default Re: Low power accurate 6 month timer - suggestions?

    Bill, Here is the connector I used on my TUBSUB project for COHO fishing. I have used it to depths of 250Ft. with NO leaks. I hope this might help for your future builds.
    Dave Purola,
    N8NTA
    EN82fn

  • #14
    Join Date
    Jun 2005
    Location
    Perth, West Australia
    Posts
    85

    Default Re: Low power accurate 6 month timer - suggestions?

    Hi Dave,

    Thanks for the info, that's a nice looking bit of kit you've produced there. I'll look up the manufacturer of those connectors and see if some $$ can be saved on the usual subsea connectors we have been using to date.

    @ pedja089 data will be downloaded when the instrument is recovered at the end of its deployment, this is not a real-time system.

    Regards,
    Bill

  • #15
    Join Date
    Sep 2009
    Posts
    776

    Default Re: Low power accurate 6 month timer - suggestions?

    Thanks for info. I'm wondering how much devices will be recovered...
    Also please report your experience with microcrystal RTC. I have one dev board on shelf, but newer tried...

  • #16
    Join Date
    Jun 2005
    Location
    Perth, West Australia
    Posts
    85

    Default Re: Low power accurate 6 month timer - suggestions?

    No worries, I'll surely report back on the RTC - samples are on the way but unknown delivery date at this time. It won't be used on this deployment test but may be on future improvements to the timer device.

    Not sure what your question is on devices recovery. It is a seabed frame holding the acoustics and other instrumentation deployed by divers for level surface (minimal tilt) and recovered by same after 6 months. The timer is to turn on an acoustic pinger so the frame can be located if it is dragged or moved during deployment - the authorities have decreed the pinger cannot run continuously due potential harm to marine species... this is BS but we have to comply. I hope this clears any confusion.

    BTW I'm running the 12LF1840 with IntOsc at 4Mhz on 3v0 coincell with Sleep and 1hz Int's with 1min updates serially for time confirmation and seeing an average current of 8.4uA (with serial line removed) - this on a breadboard so pcb may be better still. Damn impressive I think.

    Regards,
    Bill

  • #17
    Join Date
    Jun 2005
    Location
    Perth, West Australia
    Posts
    85

    Default Re: Low power accurate 6 month timer - suggestions?

    Hi All,

    @ pedja089 as promised here is some minimal code for the Microcrystal 3029 sample I received.

    Code:
    '****************************************************************************************************
    '*  Name    : Microcrystal 3029 demo.pbp                                   *** Working code ***     *
    '*  Author  : W J Sherwood                                                                          *
    '*  Date    : 24-07-19                                                                              *
    '*  Device  : 16F88 (4k code space)                                                                 *
    '*  Version : 1.0  - test code for RV-3029-C2 dev pcb from Micro Crystal, data shows on LCD.        *
    '*  Notes   : 843 words with (PBP 3.0.10.4)                                                         *    
    '*          :                                                                                       *
    '*          : 											                                            *
    '****************************************************************************************************
    '
    ' Notes:
    ' This uses the development pcb from Micro Crystal with onboard pullups for SDA and SCK lines - provide same when using
    ' RTC chip by itself on custom pcb with PIC.
    '
    '
    ' LCD     	PIC(F88)             OTHER		
    '
    ' DB0-3   	No connection
    ' DB4     	PortA.0 (pin 17)
    ' DB5     	PortA.1 (pin 18)
    ' DB6     	PortA.2 (pin 1)
    ' DB7     	PortA.3 (pin 2)
    ' RS      	PortA.4 (pin 3)     10K pullup to 5v due Open Drain.
    '   MCLR    PortA.5 (pin 4)     10k pullup to 5v.
    ' RW      	Ground  (pin 5)
    ' Vdd     	5 volts (pin 14)			
    ' Vss     	Ground  (pin 5)				
    ' Vo      	                    20K potentiometer wiper (or ground).
    ' 		    PortB.0 (pin6)      		
    ' 		    PortB.1 (pin7)	    
    '		    PortB.2 (pin 8)     
    '        	PortB.3 (pin 9)     
    '		    PortB.4 (pin 10)    I2C data via 1k (10k pullup to 5v). 		
    '		    PortB.5 (pin 11)	
    '		    PortB.6 (pin 12)     
    '  		    PortB.7 (pin 13)    
    '   xtal    PortA.6 (pin 15)    I2C clk via 1k (10k pullup to 5v).       
    ' E xtal    PortA.7 (pin 16)        
    
    '=========================================================================================================
    '        CONFIGURE DEVICE 
    '=========================================================================================================
    #CONFIG ; F88 only
        __config _CONFIG1, _FOSC_INTOSCIO & _WDT_ON & _PWRTE_ON & _MCLRE_ON & _LVP_OFF & _CP_OFF
    #ENDCONFIG
    
    ' -----[ Initialization F88]------------------------------------------------------------------------------------------------ 
    	Define 	OSC    4        ' Set Xtal Frequency
        OSCCON = %01100010      ' 4Mhz.
        OPTION_REG.7 = 1        ' Disable weak pullups.
    '    OPTION_REG.7 = 0        ' Enable weak pullups.
    
    ' Setup for normal (no Comparator interrupts).
        CMCON = 7         	    ' Comparators off.
        TRISA = %00000000       ' Set I/O PortA.
        TRISB = %10000111       ' Set I/O PortB.
        ANSEL = %00000000       ' Controls port pins functions. All digital (An0-6 only, 7 always 0).
    
    '=========================================================================================================
    '        PIN ASSIGNMENTS, SYSTEM CONSTANTS, TEMPORARY VARIABLES
    '=========================================================================================================
    ' Alias pins
    'S_out       var     PortB.3     ' Serial output via 1k.
    
    ' RTC Connections
    SDA         var     PortB.4     ' RTC I2C data pulled up 10k (on dev. pcb).
    SCLk        var     PortA.6     ' RTC I2C clock pulled up 10k (on dev. pcb).
    
    ' Allocate variables
    strAddr	    VAR 	BYTE   ' Address of data.
    char        var     byte   ' Character sent to LCD or Serout.
    Cntr        var     word   ' Counter for triac on time in milliseconds.
    Dummy       var     byte   ' Used to clear Int on Change for PortB.
    
    ' RTC stuff
    secs        var 	byte   ' Seconds.
    mins        var 	byte   ' Minutes.
    hrs         var 	byte   ' Hours.
    WkDay       var 	byte   ' Weekday.
    month       var 	byte   ' Month.
    day         var 	byte   ' Day.
    year        var 	byte   ' Year.
    temp        Var	    byte   ' Scratch.
    RTC_Temp    var     byte   ' Chip temperature.
    
            clear    ' ****** If used the Clear statement must be before any INC files.******
    
    ' Define LCD connections       Change these to match your LCD 
        DEFINE  LCD_DREG        PORTA	' LCD Data Port
        DEFINE  LCD_DBIT        0		' Starting Data Bit
        DEFINE  LCD_RSREG       PORTA	' Register Select Port
        DEFINE  LCD_RSBIT       4		' Register Select Bit
        DEFINE  LCD_EREG        PORTA	' Enable Port
        DEFINE  LCD_EBIT        7		' Enable Bit
        DEFINE  LCD_BITS		4		' Data Bus Size
        DEFINE  LCD_LINES		2		' Number of Lines on LCD
    
        Include "MODEDEFS.BAS"          ' Include Shiftin/out modes.                                
        pause 100                       ' Let everything settle...
        
        GOTO Running                    ' Jump over the subroutines area.
    
    '=========================================================================================================
    ' Subroutines here in the first page...         
    '=========================================================================================================
    Write_Clock:    ' 
       I2cwrite Sda,Sclk,$AC,$08,[secs,mins,hrs,day,WkDay,month,year]
       Return
    
    Read_clock:
       I2cread Sda,Sclk,$AD,$08,[secs,mins,hrs,day,WkDay,month,year]
       Return
       
    Get_Temp:   ' Read RTC chip temp.
       I2cread Sda,Sclk,$AD,$20,[RTC_Temp]
       Return
    
    Convert: ' Decimal time is converted to hex before saving to rtc. 
    ' The rtc requires hex coded digits e.g. If dec mins=59, then rtc needs to have $59 stored.
        temp = secs  : GoSub d2h : secs =  temp
        temp = mins  : GoSub d2h : mins = temp  
        temp = hrs   : GoSub d2h : hrs = temp                   
        temp = day   : GoSub d2h : day = temp
        temp = month : GoSub d2h : month = temp
        temp = year  : GoSub d2h : year = temp
        return
    
    Convert2dec:
        temp = secs  : GoSub h2d : secs = temp
        temp = mins  : GoSub h2d : mins = temp  
        temp = hrs   : GoSub h2d : hrs = temp
        temp = day   : GoSub h2d : day = temp
        temp = month : GoSub h2d : month = temp
        temp = year  : GoSub h2d : year = temp
        return
    
    h2d:  ' Convert Hex coded time data -> decimal data
        temp = (temp & $F )+((temp>>4)*10)
        return
            
    d2h:  ' Convert Decimal -> Hex coded time data
        temp = (temp DIG 1) * $10 + (temp DIG 0)
        return
        
    '=========================================================================================================
    ' Program area...
    '=========================================================================================================
    Running: ' 
    
    Preset: ' Load values for initial time/date setting then comment [edit accordingly].
    hrs=13: mins=59: secs=30: day=24: month=07: year=19: WkDay=4 
    
    Normal: ' Decimal time is converted to hex before saving to rtc. 
        gosub Convert
        gosub Write_Clock
    
    loopy:   ' The display.
    	gosub Read_Clock
    	gosub Convert2dec
        LCDOUT $FE,2,#day dig 1,#day dig 0,"/",#month dig 1,#month dig 0,"/",#year dig 1,#year dig 0," ",_    
        #hrs dig 1,#hrs dig 0,#mins dig 1,#mins dig 0,":",#secs dig 1,#secs dig 0  ' Line 1.
        gosub Get_Temp              ' Read from RTC.
        RTC_Temp = RTC_Temp-60      ' Remove 60°C offset.
        LCDOUT $FE,$C0," RTC Temp: ",#RTC_Temp,223,"C"  ' Line 2.
    '    debug dec2 hrs,dec2 mins,":",dec2 secs," ",dec2 day,"/",dec2 month,"/",dec2 year,13     ' Put on PC.
        pause 200               ' No need for speed.
        Goto loopy              ' Do it forever.
    
    end
    I then went on to establish some alarms but had some very mixed results so not presented here. Instead I chose to compare RTC values to preset alarms (9 actually) for maximum flexibility whereas limited to one alarm event with the RTC unless some creative coding employed. I'm very impressed with the accuracy of this chip and encourage others to try it via samples followed by purchases. Being SMD it was tricky to mount but patience paid off.

    Kind regards,
    Bill

  • #18
    Join Date
    Sep 2009
    Posts
    776

    Default Re: Low power accurate 6 month timer - suggestions?

    Thanks for sharing. You saved me a lot of time.
    Any of theirs RTC have impressive spec. I'm wondering how they achieve ±1 ppm @40nA with new RTC...

  • #19
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    2,915

    Default Re: Low power accurate 6 month timer - suggestions?

    Quote Originally Posted by pedja089 View Post
    I'm wondering how they achieve ±1 ppm @40nA with new RTC...
    Well, they are in Switzerland...!

    Ioannis

  • Similar Threads

    1. Low Power Regulators
      By andybarrett1 in forum General
      Replies: 21
      Last Post: - 27th March 2015, 12:26
    2. Low frequency multiplier... Suggestions/info needed.
      By Gearbreaker in forum mel PIC BASIC
      Replies: 12
      Last Post: - 25th June 2011, 03:51
    3. Low power applicationn
      By Andre_Pretorius in forum General
      Replies: 2
      Last Post: - 17th September 2010, 18:13
    4. Using Pic as a digital clock/timer. How accurate?
      By rocky79 in forum mel PIC BASIC Pro
      Replies: 18
      Last Post: - 15th February 2007, 03:02
    5. Replies: 0
      Last Post: - 25th May 2005, 10:35

    Members who have read this thread : 26

    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