water flow meter..


Closed Thread
Results 1 to 10 of 10

Hybrid View

  1. #1
    Join Date
    Oct 2004
    Location
    Hangover, Germany
    Posts
    289


    Did you find this post helpful? Yes | No

    Default

    Don't write to often to the EEPROM on the same position !
    Think about a ring-buffer !

    Maybe:
    Get the olf value.
    Count...
    Write the new value to the next position and a checksum out of the new and the old value (asume a fixed value for non-existing old values!). If you reach the end of EEPROM, begin on the first position.

    After Power-On
    0: store 0 as backup-value.
    1: read a value, check checksum.
    2: if checksum is ok, store the value as Backup, goto 1
    3: if checksum is bad, use the backup-value and exit

    Just read to manual !
    Maybe you can build hardware to buffer the pic fpr around 10ms to write the eeprom and then turn off. Use the Brown-Out-Reset !!!!
    PBP 2.50C, MCS+ 3.0.0.5, MPLAB 8, MPASM 5.14, ASIX Presto, PoScope, mE mikroBasic V7.2, PICKIT2

  2. #2
    Join Date
    Sep 2004
    Location
    Mentor, Ohio
    Posts
    352


    Did you find this post helpful? Yes | No

    Default

    Hi Ecca,

    Can you provide us with some information on the flow meter, such as the manufacturer and part number, perhaps a web site to look at this sensor closer?

    Thanks,


    BobK

  3. #3
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    For saving to the EEPROM, choose a PIC with a LVD (Low Voltage Detect) interrupt.

    When the power is turned off, the interrupt gets triggered, quickly save to EEPROM while the chip is still running on the capacitor charge.

    The rest of the time, the value is available in RAM. No need to save it on every loop.
    <br>
    DT

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


    Did you find this post helpful? Yes | No

    Default

    Or a comparator interrupt OR modify the power supply. You place a diode between the bridge and the capacitor, then send the bridge side on a interruptable pin.

    Just another idea

    How many different ways exist to skin a cat?
    Steve

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

  5. #5
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    The 18F8722 datasheet claims the EEPROM is typically good for a million write cycles. I would probably trust it for 500K cycles.
    Charles Linquist

  6. #6
    ecca's Avatar
    ecca Guest


    Did you find this post helpful? Yes | No

    Default

    Right then, having returned from holidays..... I continue.
    I only require a 3 digit LCD with about 12mm digits.
    What's around at the moment ?
    Thanks for help all,
    Ecca

Similar Threads

  1. Hall Effect flow meter with 16F876
    By revelator in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 10th March 2010, 20:42
  2. Can't ID interrupt source with this IntHandler??
    By jellis00 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 3rd June 2009, 02:35
  3. NMEA 2000 Flow Meter
    By Joe Rocci in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 6th August 2008, 00:35
  4. Electric water valve
    By Christopher4187 in forum Off Topic
    Replies: 2
    Last Post: - 6th April 2008, 21:41
  5. hot water flow sensor
    By jessey in forum Off Topic
    Replies: 16
    Last Post: - 24th January 2007, 04:05

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