Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 6 of 6

Thread: modular datalogger system

  1. #1
    Member
    Join Date
    Feb 2019
    Location
    Vancouver, BC
    Posts
    31

    modular datalogger system

    Several other forum members have described dataloggers for high-bandwidth datastreams, often status data from moving vehicles. I have completed a project that flexibly collects data from two or three dozen low-bandwidth sensors placed around my house, taking VC0706 pictures; measuring temperatures, pressures, water depth, power usage, and so on; and controlling relays.
    The sensors are connected to peripheral stations, each built around a Teensy 3.5 and a real-time clock. The stations have identical hardware & software, but they can be configured through text files on the Teensies' uSD cards to work with different sensors and then either to use their XBee tranceivers to send the data to a central base station, or to timestamp & store received data locally.
    The base station is built around another Teensy 3.5 and clock. It timestamps received data and then can store it locally for later transmission or transmit it immediately (through a USB connection) to a Windows program.
    The Windows program is built around a relational database. Received data are stored in the database, and the database can be mined for graphs and statistics. Here's a sample graph:
    Click image for larger version. 

Name:	raw graph outside.jpg 
Views:	47 
Size:	292.5 KB 
ID:	24966
    The system is described on my Web site at https://www.fenichel.net/pages/Indoo...datalogger.pdf.

  2. #2
    very impressive.

    1. how often do you store readings? (every second for example)
    2. how many readings do you use for averaging (assuming you do averaging)?

  3. #3
    Member
    Join Date
    Feb 2019
    Location
    Vancouver, BC
    Posts
    31
    Quote Originally Posted by KrisKasprzak View Post
    very impressive.

    1. how often do you store readings? (every second for example)
    This varies from sensor to sensor, but rarely as often as once a second. Remember, these are measurements of what is happening in & around an ordinary house. Why measure the temperature of a room every second? Why measure the temperature of a pond more often than every hour?

    The reading/reporting distinction (Section 2.2.4.1 of my big document) is important here. For example, I look at my anemometer every minute, but I report an exponentially-damped running average only every 10 minutes. Also, as noted in Section 4.1 of the document, some data are recorded only when they change. For example, I have a photocell outside. It records a light level of zero for a few hours every day. The zeroes are duly passed in to the Base Station and then to the Windows program, but the Windows program is not silly enough to save all of them. In fact, it will save exactly four zeroes: first total darkness, daily signoff at 23:59:59, daily startup at 00:00:00, and just before first light.

    2. how many readings do you use for averaging (assuming you do averaging)?
    The averaging is specified in the X_Config.txt files in terms of time, not number. If a reading interval is 1 minute and the reporting interval is 10 minutes, then the sensor driver will have 10 readings to think about (averaging, damping, determining the recent range, whatever it wants to do) between reports. Instead of specifying reporting intervals as times, I could have specified them as multiples of the reading interval, with the same result.

  4. #4
    Member
    Join Date
    Feb 2019
    Location
    Vancouver, BC
    Posts
    31
    This expands on my previous answer about sampling rates. The key to tuning the system has been that all of the configuration information is on the uSD cards. The only numbers hardcoded into the sensor drivers are minimum read intervals and the like, taken from the sensors' datasheets. Every now and then, I decide that a graph looks too ragged, so I
    • pull the pertinent uSD card,
    • edit X_config.txt to increase the damping or the reporting interval/reading interval ratio,
    • reinstall the uSD card, and
    • reboot the peripheral station.


    As of this morning, my current reading and reporting intervals are listed in the attached spreadsheet.
    Attached Files Attached Files

  5. #5
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    15,081
    Quote Originally Posted by KrisKasprzak View Post
    very impressive.
    ...
    Agreed. Interesting data collection and logging process.

  6. #6
    Very interesting. Nice work, @Fenichel.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •