Charter 12 · count · available project

Pollinator Perch

Small-Event Detection Experiment

Build a tiny-event detector, then learn how much evidence it takes before a twitch can honestly be called a visit.

Difficulty
★★★
Prefix
pp
Zone
greenhouse-2
Type
pollinator-node
Device
pp-01
Build time
10 hours

Mission

Build this

Build a small perch whose tilt or infrared clue records contact events, with an antenna that shows how active the recent interval has been.

One kit, one team repository.

Borrowed parts are labelled below and have a fallback. The registered device ID is fixed; sensing and behaviour decisions remain yours.

Bill of materials

Parts

SourcePartFallback
● kitTilt switch—
● kitIR emitter, receiver, 220 Ω and 10 kΩ resistors—
● kitSG90 servo—

Disconnect USB before rewiring. Motors, the relay, and the servo need appropriate power and a shared ground. Never drive an actuator from the ESP32 3V3 pin.

Your invitation

Begin with a claim small enough to test

A flower can be visited by a bee, brushed by a leaf, shaken by a closing door, or inspected by a curious student. Your sensor does not know which story occurred. It knows only that a perch tilted or an infrared reflection changed.

That is not a disappointing beginning. It is an honest one. First build a reliable detector of small contact events. Then take it into the greenhouse and ask which of those events might be consistent with visits, without quietly promoting every twitch into a pollinator.

The field notebook rule

Write “event” until a human observation gives you evidence for a more specific word.

The central idea

One count can hide two different claims

Claim 1

The sensor changed

A tilt edge or infrared change crossed your chosen rule. The electronics support this claim.

Claim 2

A contact event occurred

Your controlled trials show that the rule usually responds to a known touch.

Claim 3

A pollinator visited

This needs observation or stronger evidence. The sensor alone cannot identify the visitor.

Your published count represents accepted contact events. In the garden log, you may compare those events with watched visits, but keep the two columns separate. A disagreement is useful information about the detector.

Choose what the perch can notice

Let mechanics or light become your witness

The tilting perch

A flexible landing strip moves a switch when loaded. Geometry decides how much force is enough.

Watch for:

Wind, vibration, switch chatter, and a perch too stiff for gentle contact.

The infrared lookout

A nearby object changes a reflected signal or interrupts a short protected beam.

Watch for:

Sunlight, shiny surfaces, alignment, leaves, and changing background reflections.

Two sensors do not automatically make one better answer.

You may use one witness well, compare the witnesses, or require both. If you combine them, explain what each combination means and how close together the clues must arrive.

Wiring

Keep the expressive movement away from the evidence

Bench-test the tilt switch and infrared pair separately. Mount the servo antenna on the body, not on the measured perch; otherwise the creature may count its own performance.

The power rule: The infrared receiver pull-up uses 3V3 and the emitter needs its 220 Ω resistor. The tilt input uses the ESP32 pull-up. The servo uses a separate 5 V supply. Join all grounds.

Bench referenceOpen the exact wiring map
WiringTilt witness, infrared witness, and event-rate antenna
ESP32GPIO 32Tilt switchone legGNDTilt switchother legGPIO 25IR emitteranode via 220 ΩGNDIR emittercathodeGPIO 34IR receivercollector + 10 kΩ pull-upGNDIR receiveremitterGPIO 18SG90 servosignal (orange)external 5 VSG90 servopower (red)GNDSG90 servoground (brown)
ESP32 pinPartPart markingCarries
GPIO 32Tilt switchone legDigital in/out — configure INPUT_PULLUP
GNDTilt switchother legGround
GPIO 25IR emitteranode via 220 ΩDigital in/out — reflective or interrupted-beam route
GNDIR emittercathodeGround
GPIO 34IR receivercollector + 10 kΩ pull-upAnalog voltage — pull up to 3V3
GNDIR receiveremitterGround
GPIO 18SG90 servosignal (orange)PWM to actuator — moves the antenna, not the perch
external 5 VSG90 servopower (red)5V power — separate supply
GNDSG90 servoground (brown)Ground — join servo and ESP32 grounds

Disconnect USB before rewiring. Confirm the infrared receiver pin order from its datasheet or kit marking. Keep the emitter current-limited and never power the servo from ESP32 3V3.

  • Digital in/out
  • Ground
  • Analog voltage
  • PWM to actuator
  • 5V power

This map assumes a bare infrared LED and phototransistor. If your kit uses a three-pin sensor module, follow its VCC, GND, and OUT labels and verify that OUT is safe for 3.3 V logic.

Teach a twitch to become one event

The perch needs a memory longer than the bounce

resting

The signal sits inside its measured quiet range.

candidate

A change begins. Wait briefly to reject electrical chatter.

accepted

Count once and begin a short hold-off period.

rearmed

The signal has returned to rest long enough for another event.

Your team decides:

  • How far must the signal move beyond ordinary resting noise?
  • How long must a change persist before it counts?
  • When do several bounces belong to one contact?
  • How many recent events make the antenna sweep slowly, quickly, or not at all?

Your proxy experiment

Give the detector known truths before giving it mysteries

  1. Invent a repeatable touch.

    Use a marked dowel, bead, or small known weight. Keep the contact position and motion consistent.

  2. Stage at least thirty true events.

    Record how many your fixed rule accepts and how many it misses.

  3. Stage at least thirty disturbances.

    Try wind from a fan, table taps, nearby footsteps, moving leaves, bright light, and the servo gesture.

  4. Tune once, then freeze.

    Repeat both sets without changing the rule. This untouched round is the result you report.

Known touches accepted___ / 30

How often the detector notices your proxy event.

Disturbances accepted___ / 30

How often an impostor becomes a false event.

Double counts___

How often one touch becomes two or more events.

TrialKnown truthTilt clueIR clueAccepted?Why?
marked touchevent____________
fan onlydisturbance____________
servo sweepdisturbance____________

When the flower tells tall stories

Every false event has a physical cause worth finding

One touch becomes a burst of counts

The switch chatters or the perch oscillates. Require a stable return before rearming, and adjust the mechanics rather than hiding every bounce in code.

Bright sunlight moves the infrared signal

The receiver is seeing the environment as well as the emitter. Add a short dark tube, reduce the sensing distance, or make tilt the main witness.

The servo creates a visit

Its motion shakes the perch or changes the reflection. Separate the structures and test with the antenna active.

A gentle touch is invisible

The perch may be too stiff, the switch may be badly placed, or the optical geometry may miss the contact region. Change one physical feature and repeat the same trials.

The garden count rises with no watched visitor

Do not erase the event. Record wind, leaves, shadows, and unobserved intervals. The label remains “contact event,” not “bee.”

Choose your honest ambition

What kind of perch team will you become?

The tiny-force engineers

Make perch geometry the experiment. Compare stiffness, landing position, and the smallest repeatable proxy touch.

The witness comparers

Test tilt, infrared, AND, and OR rules on the same trials. Show what each gains and mistakes.

The careful field naturalists

Pair sensor events with timed human observations and preserve an “unknown” category when the view is incomplete.

A calm way through the build

Collect four small wins

  1. pp-01 says hello.

    Join the garden before counting anything.

  2. One witness shows a stable resting signal.

    Build the mechanics and raw display before the event rule.

  3. One known touch becomes one event.

    Add confirmation, rearming, and an event counter.

  4. The antenna reflects recent rate without creating events.

    Power and mount the servo separately, then rerun the disturbances.

The garden handshake

Share what you found

These names are the rigid part of the project. They let another team find your work without knowing what you called the variables in your code.

When count changes

Accepted contact events

garden/greenhouse-2/pollinator-node/pp-01/count

Unit: events

When tilt changes

Perch tilt state

garden/greenhouse-2/pollinator-node/pp-01/tilt

Unit: enum

Listen beyond your own device.

garden/greenhouse-1/light-node/sc-01/light-level

Compare event rate with shared light conditions over the same time windows. A relationship may suggest when events occur; it does not identify what caused them.

Finish line

Ready to introduce to the garden

  • pp-01 stays online and publishes accepted event count and tilt state.

  • The reject feed stays clear after the final code starts.

  • The device reads Sun Chaser light level without treating correlation as identification.

  • The antenna reflects recent event frequency without shaking or optically disturbing the detector.

  • The build log contains repeatable proxy touches, disturbances, an untouched test, missed-event rate, false-event rate, double counts, and classification limits.

  • The moving and sensing structures are separated, the servo is safely powered, greenhouse electronics are protected, and the device label can be scanned.

A strong Pollinator Perch does not impress by calling every twitch a bee. It earns trust by detecting a small event well and drawing a bright line around what remains unknown.

Backbone now

Live status

Updates from the same public event stream

Checking pp-01…