real time logger?


Closed Thread
Results 1 to 8 of 8
  1. #1
    Join Date
    Mar 2008
    Posts
    79

    Default real time logger?

    Anyone got any ideas how to implement "powered on/run time" in a 1 wire network? All I need is the amount of hours and minutes it's running, in fact it can be just one device that I time as it's going in a car and if powered off the car battery it wouldn't be active anyway when the circuit is off
    I did find a DS1904 which LOOKS like it might be able to do the job even if I just turn it's clock on when I want the time measurment to start, and off when finished, but it's a 1 button device and cant see it availabe in the uk as of yet
    Any other ideas or suggestions?

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


    Did you find this post helpful? Yes | No

    Wink

    Have a look at DS 2405, or 2406 at first ...

    it can tell you if there's power or not somewhere ... or act as a switch ( yessss ! both ! )

    then you just have to check for the changes and log time ... !

    I'd also suggest you to have a look to DS1616 ... you can Log 3 voltages ... plus temp !!!

    Alain
    Last edited by Acetronics2; - 19th June 2008 at 15:54.
    ************************************************** ***********************
    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 " !!!
    *****************************************

  3. #3
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Dave
    Always wear safety glasses while programming.

  4. #4
    Join Date
    Mar 2008
    Posts
    79


    Did you find this post helpful? Yes | No

    Default

    I'm actually going to be using 2 X ds2405's as switches to work relays along with 2 ds18b20's as temp sensors
    What I'd like to do is log the total amount of time the ds2405's are activated and display it on an lcd screen at the start of the program once power is supplied to the circuit (after a second or so warm up time)
    I've looked at Darrels include and it looks pretty interesting, however I dont know how i'd implement it to be honest.
    I'm guessing I'd have to have the pic powered all the time or it's going to lose the information once power is removed.
    I could attach an eeprom I guess but I'm trying to keep the board size as small as possible using normal sized components, so unless there's any way to attach a 1 wire eeprom start it counting once it's told to, then when the circuit starts each time it reads the stored value and displays it as a hours, minutes and seconds display on an LCD then goes back to counting where it left off
    hope that actually made sense to someone
    basically I dont want to have a battery backup it would only work once power is applied.

  5. #5
    Join Date
    Mar 2008
    Posts
    79


    Did you find this post helpful? Yes | No

    Default

    how about using the eeprom inside the pic?
    I'm going to be suing the 16F88 pic it has 256 bytes of eeprom and 20000 hours counted once a second only comes to 33 bytes if I'm starting to understand this right?

    What I'd need is some way of telling the pic to start counting once a second but when told it stops counting and puts the result into eeprom, THEN when it's told to start counting again it reads the value from eeprom, displays it on the lcd for a few minutes and then carries on couting FROM that count.

    Does this seem possible? I know to most experienced people here it's probably old stuff but to me it's new

  6. #6
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Yep, it is possible, The reason I pointed out the above links
    If I remember correctly all three of the examples have a way to start and stop. They are basically running off an interrupt. Enable/ Disable ?

    Write value to EEPROM at the same place the LCD is updated.

    One of the pitfalls, maybe, you only have a certain amount of time between clock updates to work on something else. (look at Paul's example) Could maybe split routines up...Odd seconds do this...Even seconds do that...?

    All kinds of possibilities.
    Dave
    Always wear safety glasses while programming.

  7. #7
    Join Date
    Mar 2008
    Posts
    79


    Did you find this post helpful? Yes | No

    Default

    I'm starting to like this idea
    SO for IF I wanted to use this (Clicky) example
    DO you reckon I could use that, but still have enough time to poll 4 1 wire devices and keep the clock running? All I need to do with the timer really is make it read from the eeprom on startup display the hours minutes and seconds on the lcd display, start counting then get on with the rest of the program with the timer counting in the background.
    All I'd need to do with the timer is write to the eeprom anywhere upto every 10 seconds or so, that way if the program loses power at any time, then the current timer data will be in the eeprom, when it is powered up next it reads from the eeprom and carries on counting from where it left off
    Hopefully that made sense as I'm pretty hopeless at expressing how I see things in my mind even though they make sense to me lol

  8. #8
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    As I mentioned before, I do not use one wire stuff so I do not know how long it takes. But I would think a 10 second resolution on the timer will buy you enough time.
    Dave
    Always wear safety glasses while programming.

Similar Threads

  1. Real Time Clock
    By in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 2nd June 2012, 04:52
  2. Real time clock ICs
    By Eng4444 in forum mel PIC BASIC Pro
    Replies: 66
    Last Post: - 20th October 2008, 16:05
  3. Real time clock... what a headache!
    By Eng4444 in forum mel PIC BASIC
    Replies: 2
    Last Post: - 8th June 2006, 21:56
  4. please read it ( real time)
    By moud_man in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 20th September 2005, 14:38
  5. Timer in real time
    By martarse in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 29th July 2005, 14:24

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