LoRaWAN Birdhouse

A Birdhouse with Internet

Similar projects worth following
The birdhouse uses a weight scale on the inside to detect an inhabitant. The weight, temperature and battery voltage get transmitted via LoRaWAN to the Internet. It is power self-sufficient using a solar panel and battery.

Here are a few links to the main hardware components used:

And here are links to the software used:

Design files and images for the 2. version of the birdhouse.

Zip Archive - 30.55 MB - 10/24/2023 at 04:56


Design files and images for the 1. version of the birdhouse.

Zip Archive - 19.20 MB - 09/12/2023 at 07:55


  • 1 × Grasshopper LoRaWAN Development Board STM32L082 Development Board with SX1276 LoRa Radio programmable using Arduino IDE via USB Connector
  • 1 × SparkFun Load Cell Amplifier - HX711 small breakout board for the HX711 IC
  • 1 × Linear Technology LTC4070 Li-Ion/Polymer Shunt Battery Charger System
  • 1 × Seeed Studio 0.5W Solar Panel monocrystalline solar panel
  • 1 × TAL221 Mini Load Cell - 500g 500g Load Cell

View all 9 components

  • Temperature Correction

    Jan Schlieper10/24/2023 at 05:07 0 comments

    I finally got around to sorting the temperature calibration of the scale. The scale now has four values used for calculating the weight:

    • scaleOffset (ADC steps)
    • scaleFactor (ADC steps per gram)
    • temperatureOffset (grams at zero degree Celsius)
    • temperatureCoefficient (grams per degree Celsius)

    The first two are the ADC offset and factor. These are set when the scale gets calibrated for the first time. Both values are used in the HX711 library to calculate the weight. The scale also no longer does a tare (the results of a tare are sometimes very "dynamic"). The next two values are the offset and coefficient for the temperature correction. Weight and temperature correction get calculated using the following formulae:

    weight = (adc_steps_measured - scaleOffset) / scaleFactor
    correction = (temperatureCoefficient * current_temperature) + temperatureOffset

    To determine the values for the temperature correction I created a gnuplot script which does all the required math. As input the script needs a couple of days/weeks worth of zero weight values measured by the scale at different temperatures. During that time the little bird is allowed to sleep in the birdhouse but not build a nest (the script needs values without any weight on the scale). The script shows the zero weight values taken at different temperatures in the first plot (please see the image below). Gnuplot then fits a linear equation through those measurement points using the Marquardt-Levenberg algorithm. The second plot then shows the offset and coefficient just calculated applied to the input data. If the result is satisfactory the temperature offset and coefficient can then be sent via LoRaWAN downlinks to the birdhouse.

  • New Tenant

    Jan Schlieper09/29/2023 at 05:39 0 comments

    The birdhouse has a new nightly visitor (please see the image below). This is early in the season compared  to November 2. last year when the first nightly visits started.

  • Switch

    Jan Schlieper09/23/2023 at 09:30 0 comments

    I made a mistake with the last PCB design. I added a switch to disconnect the battery and solar panel from the rest of the electronics if needed. Turns out that was not a good idea. The switch S1 is connected in series to the LiPo battery (please see the image below). What I did not realize was the LTC4070 sees the internal resistance of the switch (it's supposed to be less than 70 Milliohms) and now only charges the battery to about 3.95 Volts instead of the usual 4 Volts. In hindsight adding a switch to the PCB was a bad idea anyway. It just adds another point of failure to a system that is never supposed to stop running. At the time I just thought it would be nice to have a power switch while developing :-) .

  • New Antenna

    Jan Schlieper09/19/2023 at 08:16 0 comments

    Instead of having an external panel mount puck-style antenna the new birdhouse uses a flexible embedded antenna inside the electronics enclosure (please see the image below). Both antennae are dipoles not requiring a ground plane. The new antenna has the disadvantage of having a solar panel above it which probably affects its radiation pattern.

    To compare the performance of the two antennae I gathered some RSSI values using TTN Mapper. In the chart below you can see the average RSSI values for the old (Nr1) and new (Nr2) birdhouse and the LoRaWAN gateways they use. Lower bars (higher RSSI values) in this chart are better. Except for a couple of outliers the new antenna outperformed my expectations. With most gateways the loss is only around 1-2 dB and there are a couple of gateways where the average performance is actually better.

  • Version 2.0

    Jan Schlieper09/12/2023 at 08:19 0 comments

    I have replaced the birdhouse today with a new (and hopefully improved) version. The new features include a wall to wall scale on the inside and the electronics, solar cell and antenna are now all in a single enclosure on top of the roof. There are a lot more smaller enhancements which you can check out in the file if you are interested (I have moved all of the older design files and images into the file).

  • New Tenant

    Jan Schlieper05/31/2023 at 14:13 0 comments

    I just wanted to let you know that shortly after I put the birdhouse back up again another great tit moved into the birdhouse and started building a new nest (please see the image below).

  • Moisture

    Jan Schlieper05/24/2023 at 16:41 0 comments

    Yesterday morning I took down the birdhouse to investigate the high/drifting weight values (the birds have not returned since last week). There was a lot of mud and moisture underneath the nest built out of moos and down feathers (please see the image below). The moisture caused the veneer on the scale plate to swell and push against the sides. This is what caused the high/drifting weight values (the actual nest by the way only weighs about 80 g). Up until now I have treated the wood only with linseed oil. The oil is environmentally friendly for the birds (it's basically vegetable oil) but apparently doesn't work too well protecting the veneer. I also noticed the gaps between the front panel and the sides of the birdhouse getting bigger. For the next version of the birdhouse I will probably add two more screws to the front/sides of the birdhouse to prevent those gaps from growing. I might even try waterproofing the birdhouse more by using some form of insulation (e.g. foam tape/silicone) between the wood panels. Less moisture on the inside will be good for the veneer (and the birds :-) ).

  • Max q

    Jan Schlieper05/17/2023 at 07:06 0 comments

    The weight in the birdhouse reached a maximum two days ago so I got my camera and went to check on the little birds. The dad was sitting in the tree chirping really loud. I think he was trying to get the young ones to leave the nest. And the mom was still bringing in food and carrying out waste. I'm kind of puzzled by the 300 gram maximum weight. An adult bird weighs between 15 and 20 g. If I subtract about 50 g for the nest there is about 250 g that need to be accounted for. Even if a fledgling weighs about 15 g that makes for a lot of birds (maybe there are feces left in the birdhouse adding to the weight).

  • Offspring

    Jan Schlieper04/30/2023 at 11:02 0 comments

    Around April 26th the weight in the birdhouse started going up again. To me this looks like the eggs have hatched and there are now chicks inside the birdhouse which are growing in size and weight. Next up, if I'm not mistaken, should be a drop in weight in about two weeks time when the fledglings leave the nest. It amazes me to see how fast all of this is happening :-) .

  • Nesting

    Jan Schlieper04/17/2023 at 05:04 0 comments

    After gathering more than 40 grams of nesting material there seems to be a change happening inside the birdhouse. Before April 13th you can see the little bird coming into the birdhouse at night to sleep. After April 13th it looks like there is now someone permanently inside the birdhouse. I'm guessing this is probably the female nesting.

View all 26 project logs

  • 1
    Saving Power

    Power consumption of the hardware is at about 2-4 µA in idle sleep mode. To get there you have to cut the PCB trace for the power LED of the Grasshopper (please see the zip files). And you also have to remove pull-up R5 on the HX711 SparkFun board. Another important component to save power is the Schottky diode D1. It needs to be a diode with a very low reverse current. Otherwise the battery will drain via the solar panel e.g. during the night. And last but not least there is the voltage divider R1, R2 used to measure the battery voltage. The Grasshopper can switch on/off the divider via transistor Q3 so it only uses power while measuring the battery voltage.

  • 2
    External Antenna

    To disable the chip antenna of the Grasshopper you have to remove the 0 Ohm resistor next to the IPEX connector (please see the zip files).

  • 3
    Mounting the Scale

    The scale is inserted into slits on both sides of the birdhouse (please see the zip files). There is a Millimeter of room on all sides for the scale to move around. The reason for this floating type of mount is the wood contracts and expands due to moisture/temperature and would otherwise exert pressure on the scale.

View all 4 instructions

Enjoy this project?



Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates