GithubHelp home page GithubHelp logo

adanet-co2-monitor's People

Contributors

amakhlin avatar danwahl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

amakhlin

adanet-co2-monitor's Issues

Use SD card slot for data logging

The FeatherWing has an SD card slot, nominally for storing graphics, but this could probably instead be used for logging. Since we only log once every three minutes, even a small card could could effectively be used indefinitely. Some considerations:

  • Assuming a ~3 minute cycle (how exact is this?), and knowing the system time when the device was programmed, we could sort of get "accurate" timestamps without having a real time clock
    • This would work less well if the device was reset frequently, and would probably drift over time
  • Not sure how the SdFat library work, but each reset could potentially create a new CSV file, either with a datetime stamp or a sequential numbering scheme?
  • The existing USB-C slot would need to be slightly enlarged to accommodate the width of the card, and it seems to be slightly off-centered on the FeatherWing as well
  • The card would probably stick out of the case slightly, which seems fine

What are the pros and cons of changing the frequency to 2 minutes?

Scenario: I want to test it in the elevator and I mentally counted the seconds since the last update, but the trip inside the elevator is quite short.

Scenario: I like to get two readings in a place before I move on.

Pros:

  • User doesn't have to wait as long to get a first or second reading

Cons:

  • Battery life is reduced

What would cause an erroneous reading?

Today I saw an error message for the first time.

“Invalid sample detected”.
I checked the code: it looks like the error is thrown if the reading is zero.

check out the photo
13EE3B6E-6F35-4D68-A82E-157153383544

Manual calibration software/instructions

Automatic Self Calibration is currently disabled, as per the Low Power Operations document:

ASC is not supported for power cycled single shot operation.

It's not clear how often/badly the SCD4x goes out of calibration, but it might be necessary to create software/instructions for manual calibration.

Sparklines

Saw a comment about sparlines in another issue and thought it was a super neat idea! This is quite a high resolution display so it fits well with Tufte's original sparkline ideas.

To make room for a co2 reading sparkline I relocated the temperature field from upper left to lower right and got rid of relative humidity and pressure (never looked at them once but it could just be me...)

The 250 pixels across is just about perfect for a full day (24 hours) worth of data if we downsample by a factor of two. However, I ended up adding a label to clarify the timespan of the sparkline which took up 12 pixels leaving 238 pixel wide field. This is 2 pixels shy of the 240 we need but I figured it was close enough -- the full display ends up being 6 minutes short of 24 hours.

The vertical scale is determined by the maximum co2 reading over the last 24 hours which we already have on the display. Hopefully this relationship is clear because of similar labeling "24hr" and "max/24hr" and proximity of the labels.

I first tried a lightweight sparkline where each data point is represented by a single pixel:

light_sparkline

But it turned out to be not super legible especially under less than perfect lighting conditions.

The second idea is a bar graph sparkline which looks a lot more legible:

heavy_sparkline

@danwahl thoughts?

Low battery mode to avoid draining battery

Right now, the system will continue running until the battery is totally drained, which is presumably not good for the longevity of the battery.

Instead, the device could read the battery level on startup, and if it is below a given threshold (5%?), activate a low battery mode. The mode would set a persistent flag, and then display an error message before going back into deep sleep. Each subsequent start would check both the battery level and the flag, and only begin normal operation if the charge was above the threshold, otherwise going immediately back to sleep without updating the display.

This should prolong the healthy battery life considerably, though power draw in deep sleep is not zero, so a switch would be a better solution in the long term.

Address initial misc. software TODOs

  • Make neoPixel static, move initialization to setup() for consistency
  • Remove deprecated altitude correction once pressure sensor is verified
  • Improve (or in most cases, implement non-existent) error handling

Investigate different processor speeds

Seems like the processor speed could at least be turned down to 80 MHz to save power (if not all the way down to 10 MHz, though I remember reading somewhere that this might cause USB serial issues?)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.