Electrochemical battery powered datalogger

Electrochemical battery powered datalogger



tag
[edited by: lallison at 5:15 PM (GMT 0) on 24 Jun 2020]
  • +1
    •  Analog Employees 
    on Jun 24, 2020 1:01 PM 5 months ago

    This example is based on the PalmSens Emstat Pico Development Board. It demonstrates the use case of an electrochemical battery powered datalogger. For manipulating the GPIOs an ADALM2000 was used. The real use case has not been tested yet. The script covers the following functions:

    • Monitoring the battery through analog input 1 (AN1) down to 1.9V to ensure safe exiting the txt file.
    • Checking GPIO5 if user wants to stop datalogging.
    • Taking every 3 seconds a measurement, hibernating the rest of the time
    • Reading the RTC for a timestamp
    • Writing the data to the SD card
    • Output of basic text information like “Battery low” or “Loop stopped by user”
    • By pressing wake pin you can skip one hibernate loop.

    Future Improvements:

    • There is no data limit of the SD card respected.
    • To identify issues, it would be useful to be able to read the text information on-site without the need of any computer. Therefore a simple segment display would be handy. This could be interfaced without the need of any extra MCU. Challenge here are the needed pins for each segment.
    • No real measurement is at the moment performed. The code for a measurement can be exported separately from PSTrace and integrated in this script.
    • You need a resistor divider to read the real battery voltage, because the analog inputs are limited to 2.1V.
    • There is a bug when the device is powered up with AIN < 1900. The device reports an error. This will be improved with next EmStat Pico firmware revision.

    Simulated bench setup by using ADALM2000

    Serial COM Port output

    Output stored on the SD card using command:

    fs_get datalogger.txt

    The script to download.

    standalone_datalogger.zip

  • 0
    •  Analog Employees 
    on Jun 25, 2020 9:29 AM 5 months ago in reply to joern3

    To run the script at every startup direct from the EmStat Pico you need to do the following settings after your srcipt is final and ready to use:

    1. Load the script, by exchanging the "e" in the beginning of the script with an "l" like L.

    2. Store the loaded script into non volatile memory of the ADUCM355 by using command "Fmscr\n"

    3. Enable Autorun, that the script is executed automatically at every startup. Type "S0801\n" to activate autorun.