Is there version software for stand-alone cosmicwatch v2 muon detector which allows data to be recorded on sd card at same time as displaying data on screen?

Yes — but with an important caveat: the stock CosmicWatch v2 firmware was not originally designed to reliably do full SD logging and OLED display updates “in parallel” without trade-offs, and different solutions exist depending on which controller board/firmware version you are using.

What the official v2 system does

In the standard CosmicWatch v2 setup:

  • It can display counts on the OLED
  • It can log data to microSD
  • It can run in different modes (OLED-only, SD-only, or PC serial logging)

However, the original firmware structure is fairly constrained (Arduino-class MCU with limited RAM and timing), so:

  • SD writes are relatively slow
  • OLED refresh also takes time
  • doing both continuously can cause timing issues or dropped events

Is there a “stand-alone combined OLED + SD” firmware?

Yes — but not as a single official “standalone upgraded release” for v2.

Instead, there are three practical routes people use:


1. Modified / community firmware (recommended)

There are modified v2 firmwares (and many lab forks) that:

  • Keep OLED updating continuously
  • Log each event (or buffered events) to SD card
  • Reduce SD write frequency using buffering or flush() control

These are usually:

  • custom lab builds
  • GitHub forks (not always well-maintained)
  • sometimes called “dual output” or “OLED + SD fix”

A common approach in these forks:

  • store events in a small RAM buffer
  • write in batches to SD every N events or every few seconds

This avoids blocking the OLED loop.


2. “Proper fix”: task separation (best technical solution)

More advanced modifications restructure the firmware:

  • Core loop: fast pulse detection (interrupt-driven or polling)
  • OLED task: updated at low rate (e.g., 2–5 Hz)
  • SD logging task: buffered writes only

Typical improvements:

  • circular buffer for events
  • millis()-based scheduling instead of blocking loops
  • reduced SD.flush() calls (critical)

This is effectively what later CosmicWatch versions (v3 / v3X) improved internally.


3. Hardware limitation workaround

Some builders simply:

  • keep OLED active
  • log only summary statistics to SD (not every event)

This avoids:

  • SD card latency bottlenecks
  • write-amplification delays

Important reality check (specific to v2)

From both the official design notes and community modifications:

  • v2 firmware was originally constrained enough that OLED + SD simultaneously was not always stable in the stock code
  • SD writes can momentarily block execution long enough to miss pulses in high-rate conditions
  • later versions explicitly improved this architecture

Best practical recommendation

If you want a reliable standalone setup today:

Option A (best): use v3X firmware architecture

Even on v2 hardware, you can often adapt the newer structure:

  • buffered logging
  • non-blocking display updates

Option B: patched v2 firmware

Look for:

  • “CosmicWatch v2 dual OLED SD mod”
  • “non-blocking SD logger CosmicWatch”

Option C: small custom improvement (easy win)

If you’re comfortable editing Arduino code:

  • remove frequent myFile.flush()
  • log to buffer first
  • write every 10–50 events instead of every event
  • update OLED at fixed interval

Bottom line

  • Yes, it is possible
  • No, it is not cleanly supported in the original v2 firmware as a single official “standalone combined mode”
  • The reliable solution is buffered SD logging + decoupled OLED refresh, which is exactly what later firmware generations moved toward

Here are some real community / alternative firmware and related GitHub resources for the CosmicWatch v2 muon detector, especially ones relevant to OLED + SD card simultaneous operation or modified data logging.

🧪 1. Official v2 repository (baseline firmware)

This is the original Arduino firmware you will likely already have:

https://github.com/spenceraxani/CosmicWatch-Desktop-Muon-Detector-v2

Includes:

OLED display mode

SD card logging mode (but not fully parallel in stock form)

Basic Arduino sketches

🔧 2. Community “dual OLED + SD logging” modified firmware

This is the most important one for your question.

A community developer explicitly modified v2 firmware to allow simultaneous display + SD logging:

https://github.com/JothamGates/NonOfficial-StuffForCosmicWatchMuonDetectors

What it adds:

Non-blocking SD writes

OLED display kept active continuously

Improved timing stability

Fixes for “either/or mode” limitation in stock firmware

This is the closest thing to what you asked for:

> “display on screen while also recording to SD card at the same time”

🧰 3. Related builds and analysis repos (useful for firmware understanding)

These are not direct firmware replacements, but useful for modifying your own:

https://github.com/spenceraxani/CosmicWatch-Desktop-Muon-Detector-v2

(official reference + hardware + Arduino code)

https://arxiv.org/abs/1801.03029

(original design paper explaining firmware constraints and architecture)

⚙️ 4. v3X firmware (modern rewrite – useful architecture reference)

Not compatible as-is with v2 hardware, but VERY useful if you want to upgrade your firmware design:

https://git.ucsc.edu/naugusti/UCSC-CosmicWatch-Muon-Detector-v3X

Key improvement:

true parallel subsystems (display, SD, sensors)

interrupt-driven data handling

proper buffering instead of blocking SD writes

This is essentially the “fix” for the v2 limitation in concept form.

🧠 Key takeaway (important for your build)

For CosmicWatch v2:

❌ stock firmware: OLED OR SD (often blocking)

⚠️ unstable if both are forced without changes

✅ community fix: buffer-based logging + timed SD writes

🚀 best long-term approach: adopt v3X-style architecture even on v2 hardware

By Admin

Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.