Close
0%
0%

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:

Version3.0.2.zip

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

Zip Archive - 20.77 MB - 07/11/2024 at 03:42

Download

Version2.1.zip

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

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

Download

Version1.0.zip

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

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

Download

  • 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

  • Coin Cell

    Jan Schlieper10/31/2024 at 07:44 0 comments

    A couple of days ago the birdhouse stopped sending data. At first I thought they where doing maintenance on the LoRaWAN gateways because it started on a Friday evening. After a while I noticed that whenever the sun came out the birdhouse tried doing a LoRaWAN join. That told me that there was probably an issue with the battery because the solar panel was still working. Yesterday I took down the birdhouse. The LIR2032 coin cell was still fully charged at 4.0 volts. It looks like the coin cell holder is the problem (mechanical issue?). Maybe it is not designed for the temperature changes out in the field. Just in case I replaced the coin cell and put the birdhouse back up again. It has been working again without incident for the past twelve hours. I will replace the coin cell with the old LiPo pack (JST connector) should this happen again.

  • Nightly

    Jan Schlieper10/16/2024 at 10:44 0 comments

    The birds started coming back to the new birdhouse on October 12th. There seems to have been a competition for who gets to stay over night (at one point the scale detected two birds inside the birdhouse :-) ). You can also see the battery lose a few milli volts during the night. This is due to the new LIR2032 coin cell that powers the electronics. It only has a capacity of about 40 mAh compared to the 100 mAh LiPo pack used previously. I'm curious to see if the LIR2032 is enough to get the birdhouse through the winter (I can always put in the old battery if needed).

    Update: I just passed the birdhouse on my way home. There was a flock of about half a dozen young birds hopping around the birdhouse flying in and out. I'm no bird expert but maybe there was a realtor there trying to auction off the place (these little guys always make me smile :-) ). 

  • Version 3

    Jan Schlieper07/11/2024 at 15:59 0 comments

    Version 3 of the birdhouse is almost finished. I will do some software testing over the next few weeks until I will replace the current birdhouse in September. There are some nice features in v3 like a scale with the NAU7802 ADC and two load cells (better mechanical stability). The sides, back and top panel are now glued together to provide better moisture protection. And I have replaced the veneer on top of the scale with cork. Cork is very flexible, naturally water proof and provides good temperature insulation for the birds sitting on top of the scale in winter. The only drawback is it smells a little bit of old wine cellar (I hope the birds will not mind ;-) ). I would also like to keep this birdhouse running for more than a year (the previous versions where only out there for about a year each). I will still clean out the birdhouse/do maintenance whenever needed but I'm curious to see how the birdhouse will hold up over a longer period of time. If you are interested in any further details then please check out the Version3 zip file.

  • Empty Nest

    Jan Schlieper05/23/2024 at 09:46 0 comments

    Today I took down the birdhouse to clean out the old nest. The great tits and their offspring left on May 14th and have not returned since (please see the image below). From what I can tell the scale and birdhouse held up nicely. I am also starting to understand the drifting weight values once the birds leave the nest. The nest starts acting more like an obstruction in a clogged pipe (it sticks to the walls) once the birds stop hopping around on top. And this year seems to be a less bountiful season for the birds. The nest is smaller compared to last year and  the drop in weight when the offspring left is also less (I'm guessing fewer hatchlings). I'm kind of curious to see if another bird will start building a nest once I put the birdhouse back up again.

  • Nesting

    Jan Schlieper04/19/2024 at 08:49 0 comments

    I just wanted to let everyone know that the birds have started nesting again. They started bringing in material around the the 19th of March. And 80 grams later the female now seems to be almost permanently inside the birdhouse (please see the image below). For comparison: Last year they also started bringing in material around the 19th of March and the female started nesting on April the 13th. The nest last year also weighed about 80 grams. It amazes me to see how precise the birds are timing all of this (without wearing a watch ;-) ).

  • Temperature Sensor

    Jan Schlieper03/28/2024 at 17:51 0 comments

    I have been testing the NAU7802 non calibrated internal temperature sensor to see if it is usable as a replacement for e.g. the TSic306. A MCP9808 calibrated I2C temperature sensor helped me get some reference temperature readings. For testing I put the NAU7802 and the MCP9808 into the freezer of my fridge and after a couple of hours took them out and watched them warm up. From what I can tell the NAU7802 build-in temperature sensor is very linear (please see the image below). The only problem I encountered can be seen in the histogram below. There seems to be a systematic error in the NAU7802 ADC reading the temperature sensor of about +-0.3 degree Celsius. I'm guessing this has something to do with me recalibrating the analog frontend of the NAU7802 whenever input channels are changed (but I haven't investigated further). Despite these errors I think the build-in temperature sensor is still adequate for the birdhouse. It measures the temperature exactly in the right spot and helps save power compared to any extra hardware.

  • Prototype Scale

    Jan Schlieper02/16/2024 at 10:51 0 comments

    I have been working on a new scale over the past few weeks. The scale has some major changes compared to the previous one:

    • NAU7802 ADC instead of the HX711
    • Two load cells instead of one
    • Better mechanical stability/durability

    The NAU7802 is a much improved Analog Digital Converter (ADC) compared to the HX711. Some of it's features include an I2C bus for configuration and reading values, two input channels and a build in (non calibrated) temperature sensor. The two load cells provide better mechanical stability for the scale but also make getting a weight value from the scale more complicated. At first I tried hooking up the load cells in parallel to a single channel of the NAU7802. That did not work out too well. The scale produced all sorts of values depending on where the weight was placed on the scale. The configuration I am using now hooks up each load cell to a dedicated channel of the NAU7802. I'm calibrating each load cell as an individual scale and then add up the two weight values to get the total weight on the scale. This is just like two people carrying an object and sharing the load. One person might be carrying more of the weight because the load is not equally balanced but if you add up the weight each person is carrying you end up with the total weight of the object. And last but not least I have added a rim to the scale weight plate. This should make it harder for nesting material to clog up the scale.

  • 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 :-) .

View all 33 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. In version 3 the scale is now mounted on rubber standoffs.

View all 4 instructions

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

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