Skip to content

Sensirion SEN5X/6X #6

Description

@oscgonfer

This issue is to discuss the integration in meshtastic firmware of the SEN5X series. Sensirion has various versions for the hardware: SEN50, SEN54, SEN55 (SEN5X) in short.

The base sensor (most interesting one to start working with) is the SEN50, which I believe is the one that @MD2027 has already. The information is here https://sensirion.com/products/catalog/SEN50, along with the sensor datasheet. This is the sensor we use in the current SCK2.3.

Firmware integration

The main task to perform is the firmware integration of this unit in the telemetry module from meshtastic. This lives in here.

The current firmware in Smart Citizen side lives in the following file:

https://github.com/fablabbcn/smartcitizen-kit-2x/blob/master/sam/src/SckUrban.cpp#L1964-L2644

Note that:

  1. There is method to start and stop the sensor

  2. There is a state machine regulating the status of the sensor: idle, running, fan cleaning, etc.
    https://github.com/fablabbcn/smartcitizen-kit-2x/blob/master/sam/src/SckUrban.h#L445-L457

  3. There are methods to get the hardware and firmware version
    https://github.com/fablabbcn/smartcitizen-kit-2x/blob/master/sam/src/SckUrban.h#L402

  4. There are methods to start the cleaning, measurement, and so on

  5. There are plenty of metrics that this sensor unit reads
    https://github.com/fablabbcn/smartcitizen-kit-2x/blob/master/sam/src/SckUrban.h#L409-L428

There's also a series of commands that configure the available metrics we want to read: https://github.com/fablabbcn/smartcitizen-kit-2x/blob/c285c5a2554169f29f64d2a43ad44fb12597bdca/sam/src/Commands.cpp#L199

Proposal

For now, I'd suggest to only retrieve PM1, PM2.5, PM4.0 and PM10 data, and to primarily check the current implementation in SC firmware. Note that, in addition, there is two potential periods for taking these readings: https://github.com/fablabbcn/smartcitizen-kit-2x/blob/master/sam/src/SckUrban.cpp#L2146-L2151 This makes use of a hardcoded threshold that basically waits 15s more in case the readings are too low.

Metadata

Metadata

Fields

No fields configured for Feature.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions