Skip to content

Measuring wheel activityLink to this section

TL;DRLink to this section

  • One accepted magnet passage records one work unit.
  • Readings are checked and saved before they're sent for verification.
  • Holding the magnet next to the sensor doesn't keep adding work. Speed and distance are estimates from accepted passages.

What gets counted?Link to this section

The sensor detects a magnet passing as the wheel moves. The device records one work unit only when that passage passes its timing and continuity checks. Repeated readings while the magnet stays beside the sensor don't add more work.

The Raspberry Pi applies those rules and saves the accepted passage before publishing it. RPM, speed, and distance are calculated from the saved measurements; they aren't extra work units or proof of how far an animal travelled.

How it worksLink to this section

The Pico sends sensor observations to the Pi with enough information to check their order and timing. When the observations form an uninterrupted sequence and the counting checks pass, the Pi saves the passage and its round. It then signs saved records and sends them to the Oracle for verification.

Counting needs reliable sensor readings, time, and storage. If any of those becomes uncertain, the Pi stops rather than guessing missing passages or keeping an unsaved fallback counter. A network or signing failure is different: it delays delivery without stopping otherwise healthy counting.

The record doesn't establish animal identity, direction, physical cause, calories, or health. Cameras don't change that limit, and a signing chip protects the key rather than verifying the data its host supplies.

Technical detail: acceptance rulesLink to this section

Pico readings include device and boot identities, sequence numbers, timestamps, heartbeats, and overflow warnings.

Acceptance property Counting rule
Initial state The Pi must observe an inactive sensor before accepting a passage
Inactive rearm At least 10 milliseconds of observed inactive state
Passage spacing At least 60 milliseconds between accepted passages
Repeated active samples Add no work while the sensor stays active
Source continuity A reboot, identity mismatch, sequence gap, malformed reading, timeout, or overflow stops acceptance
Persistence The Pi publishes an accepted passage only after saving it durably in SQLite

If database or clock problems make a measurement uncertain, the Pi stops counting. It does not keep an unsaved fallback counter or guess how to fill a gap.

Rules and boundariesLink to this section

  • Sensor faults stop counting; the Pi does not guess missing passages.
  • Each reporting history has its own counter epoch and start time. Compare it only with the matching Oracle installation history.
  • Network or signing failures delay delivery without stopping otherwise healthy counting.
  • Cameras do not affect passage acceptance or prove that an unrecorded passage occurred.
  • A signing chip protects the key, not the truth of the data its host supplies.
  • Accepted work does not prove animal identity, direction, physical cause, calories, or health.
  • Distance is estimated from the fixed wheel circumference, not measured animal travel.

ExampleLink to this section

Illustrative sequence: the sensor stays inactive for 12 ms, then becomes active. If readings are uninterrupted, the previous accepted passage was at least 60 ms ago, and storage succeeds, the Pi adds one work unit.

Ten further active readings add no work. Restarting while the magnet remains active does not count it again.