Difference between revisions of "Maintenance"

From bcmeter.org
Jump to navigation Jump to search
(Sync with updated manual: updated calibration description, updated data management (3 months storage, oldest log deletion), updated filter change procedure (check for residue), updated firmware upload formats)
(Update bcMeter ESP32 interface documentation and terminology (May 2026))
Line 10: Line 10:
* The '''marked side must face UP''' (towards the LEDs/light source in the upper optical chamber).
* The '''marked side must face UP''' (towards the LEDs/light source in the upper optical chamber).


'''Warning:''' Incorrect orientation (marked side down) results in ~30% measurement error. Do not bend or fold the filter. Creases damage the filter surface and cause unreliable measurements.
'''Warning:''' Incorrect orientation (marked side down) results in ~30% measurement error.


'''Procedure:'''
'''Procedure:'''


# Stop running session.
# Stop any running session.
# Unscrew the top cap of the optical chamber.
# Unscrew the top cap of the optical chamber.
# Remove the saturated filter.
# Remove the saturated filter.
# Check the air inlet for filter paper residue and '''remove if present'''.
# Insert a new filter with '''markings facing up'''.
# Insert a new filter with '''markings facing up'''.
# Screw the cap back on (hand-tight).
# Screw the cap back on (hand-tight).
Line 25: Line 24:
=== Calibration ===
=== Calibration ===


Calibration balances the sensor signal against the reference signal for the specific filter currently installed and should ideally be processed on every filter change — although the calibration factor will change extremely slowly once determined.
Filters vary slightly in optical density. Calibration balances the sensor signal against the reference signal for the specific filter currently installed.


# Go to '''Maintenance''' > '''Calibrate Device'''.
# Go to '''Maintenance''' > '''Calibrate Device'''.
# Ensure a '''new and clean filter''' is installed.
# Ensure a '''new and clean filter''' is installed.
# Click "Yes."
# Click "Yes."
# A progress bar appears. The device adjusts LED intensity per channel using binary search to find optimal duty cycles.
# A progress bar appears. The device adjusts LED intensity per channel to find stable reference and sensor readings.
# Wait for "Calibration Successful" before starting a new log.
# Wait for "Calibration Successful" before starting a new log.


'''Technical detail:''' Calibration determines the per-channel correction factor K = Ref_avg / Sen_avg and stores it along with optimal LED duty cycles. The ADS1220 ADC samples at 200 samples/sec and targets the 0.5–3.8V sensor range. Calibration typically takes 30–60 seconds.
'''Technical detail:''' Calibration determines the per-channel correction factor K = Ref_avg / Sen_avg and stores it with the LED duty cycle values. Current ESP32 builds use ADS1220 block averaging for the optical readings. Calibration typically takes 30–60 seconds.


=== Data Management ===
=== Data Management ===


Data is able to be stored on the device's internal storage for about 3 months of continuous sampling every 5 minutes before deleting the oldest log. To manage your session files:
Data is stored on the device's internal flash storage (LittleFS) and persists across reboots.


# Click '''Log Files'''.
Click '''Log Files''' to open the data manager. The modal displays a table listing all stored sessions:
# '''Logs (>2 KB):''' Valid measurement sessions. Download these for analysis.
# '''Logs (<2 KB):''' Failed starts or very short tests — can typically be deleted.


Downloads available as CSV (for analysis), PNG, or SVG (for printing). CSV files use semicolon separation with dot as decimal divider.
{| class="wikitable"
! Column !! Description
|-
| '''Log''' || Session name or filename (e.g., <code>bcmeter_20260312_2126.csv</code>). "Current Session" shows the active log.
|-
| '''Size''' || File size in KB, or number of data points for the current session.
|-
| '''Download''' || Download button for each individual log file.
|}
 
Below the table:
* '''Clear All Data''' — Deletes all stored log files. Requires confirmation.
* '''Remove Empty Logs''' — Cleans up zero-byte or near-empty files from aborted sessions.
 
Stored log files are downloaded as CSV for analysis. The dashboard's '''Download View''' button can additionally export the currently visible chart view as CSV, PNG, or SVG. CSV files use semicolon separation with dot as decimal divider.


'''Backup:''' Internal storage is not archival. Download data to a secure location regularly.
'''Backup:''' Internal storage is not archival. Download data to a secure location regularly.
'''Storage management:''' The device has ~2 MB internal flash for logs. Warning at 512 KB free, critical at 32 KB. Old logs are auto-deleted when critical threshold is reached. Empty files are cleaned on startup.


=== Device Management ===
=== Device Management ===
Line 52: Line 65:


* '''Calibrate Device:''' Adjusts LED duty cycles. Required after each filter change.
* '''Calibrate Device:''' Adjusts LED duty cycles. Required after each filter change.
* '''View System Logs:''' Opens the application log for diagnosing issues. Logs are grouped by category: hardware, measurement, system, network.
* '''View System Status:''' Opens a structured status report for diagnosing issues. Entries are grouped by category: hardware, measurement, system, network.
* '''Download Logs:''' Downloads system log for troubleshooting or support.
* '''Download Logs:''' Downloads the structured system status report as a text file for troubleshooting or support.
* '''Identify Device:''' Blinks the device LED for about two minutes. Use this to find the correct physical device when multiple bcMeters are nearby.


==== System Operations ====
==== System Operations ====
Line 59: Line 73:
* '''Reboot Device:''' Restarts the device.
* '''Reboot Device:''' Restarts the device.
* '''Shutdown Device:''' Safely powers off to prevent data corruption. Always use this before unplugging. If the device loses power during a session without proper shutdown, it will automatically resume measurement on next boot.
* '''Shutdown Device:''' Safely powers off to prevent data corruption. Always use this before unplugging. If the device loses power during a session without proper shutdown, it will automatically resume measurement on next boot.
* '''Update Firmware:''' Opens a dialog to manually upload a firmware file (.tar.gz or .zip). The device also checks for updates automatically several times a day and notifies you when one is available.
* '''Manual Firmware Update:''' Opens a dialog to manually upload a firmware file (.bin). The device also checks for updates automatically a few times a day.
* '''Factory Reset:''' Permanently erases all measurement logs, WiFi credentials, calibration data, and device settings. A slide-to-confirm gesture is required. The device reboots into factory state.
* '''Factory Reset:''' Permanently erases all measurement logs, WiFi credentials, calibration data, and device settings. A slide-to-confirm gesture is required. The device reboots into factory state.
==== Firmware Update Notifications ====
When the device detects a newer firmware version, an '''Update Available''' modal appears showing:
* The new version number and current version
* Release notes (if available)
* '''Update Now''' button to apply the update immediately (with progress bar)
* '''Skip for now''' to dismiss and update later
Updates download over WiFi and are applied automatically. The device reboots after a successful update.


=== System Status ===
=== System Status ===
Line 66: Line 90:
Displays device information:
Displays device information:


* '''Device ID:''' Unique hardware identifier.
* '''Device ID:''' Unique hardware identifier (MAC address).
* '''Device Name:''' Current network hostname.
* '''Software Version:''' Installed firmware version.
* '''Software Version:''' Installed firmware version.
* '''Free Memory:''' Available system memory.
* '''Free Memory:''' Available system memory.
Line 79: Line 102:
* '''Sync:''' If mismatch exceeds 10 seconds, a sync button appears to synchronize the device clock with your browser.
* '''Sync:''' If mismatch exceeds 10 seconds, a sync button appears to synchronize the device clock with your browser.


Devices connected to the internet sync automatically via NTP. Modem-based time sync (CLTS) is also supported when a 4G modem is connected ''(optional — requires 4G module)''.
Devices connected to the internet sync automatically via NTP. Modem-based time sync (CLTS) is also supported when a 4G modem is connected.


=== Geolocation ===
=== Geolocation ===


When location services are active (Settings > Measurement > Location), a Geolocation card displays position and altitude data. ''The available fields depend on which optional hardware modules are installed.''
When location services are active (Settings > Measurement > Location), a Geolocation card displays:


* '''Location:''' Latitude/longitude with source and accuracy indicator. Sources vary by hardware: GPS module ''(optional)'', cellular modem cell tower lookup ''(optional, requires 4G module)'', or IP-based geolocation (available on all WiFi-connected devices).
* '''Location:''' Latitude/longitude with source (GPS, cell tower, or IP-based) and accuracy indicator.
* '''Altitude (barometric):''' Derived from the pressure sensor. ''Optional — requires a BME280 pressure sensor.''
* '''Altitude (barometric):''' Derived from the pressure sensor.
* '''Altitude (GPS) & Speed:''' GPS-derived altitude and current speed. ''Optional — only shown when a GPS module is installed and has a satellite fix.''
* '''Altitude (GPS) & Speed:''' Shown when a GPS module is connected and has a fix.


The location input supports multiple formats: <code>48.2082, 16.3738</code> — <code>48.2082 16.3738</code> — <code>(48.2082; 16.3738)</code> etc.
The location input supports multiple formats: <code>48.2082, 16.3738</code> — <code>48.2082 16.3738</code> — <code>(48.2082; 16.3738)</code> etc.

Revision as of 21:58, 2 May 2026

Maintenance Procedures

Access maintenance functions via the Maintenance button in the navigation bar. The modal is organized into cards for device management, system status, time synchronization, and geolocation.

Filter Change Procedure

The filter is not identical on both sides.

  • Identify the side with markings (black line, dot, or circles).
  • The marked side must face UP (towards the LEDs/light source in the upper optical chamber).

Warning: Incorrect orientation (marked side down) results in ~30% measurement error.

Procedure:

  1. Stop any running session.
  2. Unscrew the top cap of the optical chamber.
  3. Remove the saturated filter.
  4. Insert a new filter with markings facing up.
  5. Screw the cap back on (hand-tight).
  6. Check hose (if used): ensure the air hose remains connected to the inlet port.
  7. Run Calibration (required).

Calibration

Filters vary slightly in optical density. Calibration balances the sensor signal against the reference signal for the specific filter currently installed.

  1. Go to Maintenance > Calibrate Device.
  2. Ensure a new and clean filter is installed.
  3. Click "Yes."
  4. A progress bar appears. The device adjusts LED intensity per channel to find stable reference and sensor readings.
  5. Wait for "Calibration Successful" before starting a new log.

Technical detail: Calibration determines the per-channel correction factor K = Ref_avg / Sen_avg and stores it with the LED duty cycle values. Current ESP32 builds use ADS1220 block averaging for the optical readings. Calibration typically takes 30–60 seconds.

Data Management

Data is stored on the device's internal flash storage (LittleFS) and persists across reboots.

Click Log Files to open the data manager. The modal displays a table listing all stored sessions:

Column Description
Log Session name or filename (e.g., bcmeter_20260312_2126.csv). "Current Session" shows the active log.
Size File size in KB, or number of data points for the current session.
Download Download button for each individual log file.

Below the table:

  • Clear All Data — Deletes all stored log files. Requires confirmation.
  • Remove Empty Logs — Cleans up zero-byte or near-empty files from aborted sessions.

Stored log files are downloaded as CSV for analysis. The dashboard's Download View button can additionally export the currently visible chart view as CSV, PNG, or SVG. CSV files use semicolon separation with dot as decimal divider.

Backup: Internal storage is not archival. Download data to a secure location regularly.

Storage management: The device has ~2 MB internal flash for logs. Warning at 512 KB free, critical at 32 KB. Old logs are auto-deleted when critical threshold is reached. Empty files are cleaned on startup.

Device Management

Routine Maintenance

  • Calibrate Device: Adjusts LED duty cycles. Required after each filter change.
  • View System Status: Opens a structured status report for diagnosing issues. Entries are grouped by category: hardware, measurement, system, network.
  • Download Logs: Downloads the structured system status report as a text file for troubleshooting or support.
  • Identify Device: Blinks the device LED for about two minutes. Use this to find the correct physical device when multiple bcMeters are nearby.

System Operations

  • Reboot Device: Restarts the device.
  • Shutdown Device: Safely powers off to prevent data corruption. Always use this before unplugging. If the device loses power during a session without proper shutdown, it will automatically resume measurement on next boot.
  • Manual Firmware Update: Opens a dialog to manually upload a firmware file (.bin). The device also checks for updates automatically a few times a day.
  • Factory Reset: Permanently erases all measurement logs, WiFi credentials, calibration data, and device settings. A slide-to-confirm gesture is required. The device reboots into factory state.

Firmware Update Notifications

When the device detects a newer firmware version, an Update Available modal appears showing:

  • The new version number and current version
  • Release notes (if available)
  • Update Now button to apply the update immediately (with progress bar)
  • Skip for now to dismiss and update later

Updates download over WiFi and are applied automatically. The device reboots after a successful update.

System Status

Displays device information:

  • Device ID: Unique hardware identifier (MAC address).
  • Software Version: Installed firmware version.
  • Free Memory: Available system memory.
  • Last Calibration: Timestamp of the most recent calibration.

Time Synchronization

Critical for accurate data timestamps, especially for devices without internet.

  • Browser Time / Device Time: Displayed for comparison.
  • Sync: If mismatch exceeds 10 seconds, a sync button appears to synchronize the device clock with your browser.

Devices connected to the internet sync automatically via NTP. Modem-based time sync (CLTS) is also supported when a 4G modem is connected.

Geolocation

When location services are active (Settings > Measurement > Location), a Geolocation card displays:

  • Location: Latitude/longitude with source (GPS, cell tower, or IP-based) and accuracy indicator.
  • Altitude (barometric): Derived from the pressure sensor.
  • Altitude (GPS) & Speed: Shown when a GPS module is connected and has a fix.

The location input supports multiple formats: 48.2082, 16.373848.2082 16.3738(48.2082; 16.3738) etc.