BirdyIO: bird nesting IoT

In 2020, while watching small birds nesting in my garden, I decided that I wanted to learn more – from a time series data mining point of view – about their apparent restless activity. After some initial brainstorming I realized I got into something really cool relating to digital electronics, sensors and signal processing & storage. Here’s some implementation detail:

+ Birdhouse fitted with dual-channel, pulsed-IR (38kHz) barriers
+ Atmega 328 µ-Controller acting as pulse source for the IR LEDs
+ Postgres database for long term event storage
+ NodeMCU ESP8266-12E µ-Controller as master:
  • fifo-type binary event buffer for 2 event channels (IR light barriers)
  • regular-expression style evaluation of event pattern + pattern duration (see table below):
  • detection of direction: (out > in) vs. (in > out) and depth of a connected action:
    • show: penetrate, retract from single barrier
    • peek: penetrate, retract through two barriers
    • look: penetrate, retract through two barriers, freeing initial one
    • walk: penetrate, retract through two barriers, passing both ones
  • anti-flicker filtering, suppressing repeated state alternations < 10ms
  • detection loop frequency achieved: ~ 800Hz
  • NTP time sync
  • periodic sensor self-checks on IR barrier function
  • birdhouse connected to wifi home network
  • local buffering of up to 200 qualified events in a transactional log
  • birdhouse webservice (json) endpoint to deliver event logs to a backend
  • Server backend (python) polling BirdyIO endpoint for new events

Event table

how this looks like in practice

full in/out transitions and other events in the 2020 nesting season

sample JSON message delivered by BirdyIO endpoint
directed in>out / out>in transitions (blue) and other activities (red) in the 2020 season

Pyongyang (DPRK) Intl. Marathon

Kim Il Sung square, Pyongyang DPRK

Science and technology are a propellant for building a thriving country, and the happiness of the people and the future of the country hinge on their development.

Kim JONG UN

It was in spring 2018 when Donald Trump and Kim Jong Un discovered their mutual friendship and engaged in a surprising – but, as we know, not so long lasting – friendship. It seemed as if the ice was melting on the Korean peninsula ! Just one year after having been invited to a medical/IT conference in Seoul, I was about to draw plans to set foot in the North, Pyongang, capital of the People Democratic Republic of Korea.

Setting foot in North Korea, how about doing this in a sportive way ? For instance, by repeating footsteps just about ten thousand times scaling the half-marathon distance (21.0975km) in the streets of the capital of one of the planets’s most isolated countries. I was able to get a seat on a tour organized by a Chinese agency offering ordinary westerners (with the exception of people holding a US passport) the opportunity to travel to North Korea and participate in the Pyongyang International (Half)Marathon.

Eventually, after a vaction stay with my son in Dubai, I was heading East alone to spend one night in Shanghai before boarding on 06 April 2018 flight JS158, one of Air-Koryo’s Antonow An-148 aircraft. What a change: Dubai – Shanghai – Pyongyang !

Alltogether, I spent 3 exciting days in the city. I traveled to the DMZ to catch a view across the border to see the South Korean flag waiving on the other side of the fence, delimited by the famous lineup of small blue wooden baracks hosting the UN troups. On the morning of the last day, the actual running was a very mixed experience: extremely hard since I had to drag myself along the track due to an upset stomach and shivers (I tried to spare myself any thoughts of requiring medical treatment inside the country), on the other side: The surreal aspect of smiling, cheerful North-Koreans supporting my lost capitalist soul on the race track, having ample room on the empty streets of the capital decorated by big, colorful posters proclaiming the potent destruction of their ennemies.

after a long journey, once I arrived back in Frankfurt, I found a note stuck under the windshield wipers of my car: “You made it !” (merci Sylviane !)