As part of the module "Sustainable Digital Innovation Lab", students were asked to develop a digital artifact that should tackle one or more of the UN's 17 Sustainable Development Goals (SDGs). With the help of our solution, we want to help the hedgehog threatened with extinction. For this purpose, we have developed a "Smart Hedgehog Shelter" (SHS), which serves two different applications. On the one hand, it provides private individuals the opportunity to better help hedgehogs in distress. On the other hand, it offers scientists the possibility to gain further knowledge about the hedgehog, as there is currently a lack of valid data.
Project Perspective
The Smart Hedgehog Shelter is a sophisticated exploration of wildlife technology and animal-to-cloud interaction. By focusing on essential building blocks like sensors and IoT connectivity, you'll learn how to monitor and support your garden's hedgehog population using specialized software logic and a robust data pipeline.
Technical Implementation: Sensors and Wildlife Care
The project reveals the technical layers of environmental monitoring and animal interaction:
- Climate Monitoring Layer: A DHT22 sensor measures the shelter's internal temperature and humidity to ensure a safe microclimate, avoiding conditions that are too cold or damp for the animal.
- Identification & Motion Layer: PIR Motion Sensors act as high-resolution detectors, identifying the infrared signature of a hedgehog as it enters the shelter tunnel and moves inside.
- Weight Monitoring Layer: A custom-built scale using a load cell provides crucial data on the hedgehog's weight, a key health indicator.
- Processing Logic Layer: The Arduino code follows a sequential strategy, checking sensor inputs to determine occupancy and environmental status, which is then indicated via an LED.
- Data Logging & Communication Layer: Sensor data is rhythmically recorded to an SD card module with a Real-Time Clock (RTC) for timestamping. This data can later be transferred to a cloud backend for analysis.
Hardware Infrastructure
- Arduino Uno: The core microcontroller that manages sensor data collection, LED status indication, and SD card logging.
- DHT22 & PIR Sensors: Provide reliable temperature, humidity, and occupancy monitoring.
- Load Cell & HX711 Amplifier: Forms the scale to measure the hedgehog's weight.
- SD Card Module & Real-Time Clock (RTC): Enables local, timestamped data storage for later retrieval.
- LED Indicator: Provides immediate visual feedback on the shelter's status (empty, occupied, alert).
- Waterproof Enclosure: A plastic box to protect the Arduino and sensitive electronics from the elements.
- Wooden Hedgehog House: The natural, insulated mechanical housing for the animal and the internal sensors.
Hedgehog House Building Instructions
The following Instruction is based on those of NABU and has been expanded by us.
Construction Material
- 1x board 49 x 36 cm for the roof
- 2x boards 26 x 26 cm for the floor + false ceiling
- 2x boards 30 x 28 and 30 cm for the side walls (beveled)
- 1x board 40 x 28 cm for the front wall
- 1x board 40 x 30 cm for the back wall
- 1x board 17 x 28 or 30 as the partition wall
- 1x piece of roofing felt approx. 50 x 50 cm
Simple Hedgehog House A wooden house for the hedgehog can be built from leftover pieces of tongue and groove boards that can be put together, but also from wooden boards or chipboard.
- Draw in dimensions
- Sew out the components with a jigsaw, then smooth the edges with a wood file
- Mark and pre-drill holes for wood screws
- Screw the components together
- For the roof: measure the depth of the interior and shorten the roof battens accordingly. Screw them onto the previously sawn-out roof. Cover the roof with roofing felt
- Impregnate the hedgehog house with environmentally friendly glaze and air it out for a week

Technical Instruction
The following extensions are necessary to equip the hedgehog house with the sensors.
- Drill a hole (1.5 cm Ø) in the back wall and the plastic box.
- Drill two holes in the partition (1.5 cm Ø)
- Fix the plastic box to the back wall
- Fix the double bottom on the scale
- Protect the back of the sensors from water with transparent clear varnish
- Fix the sensors in the hedgehog house with the hot glue gun as follows:
- Top: Temperature & Humidity Sensor
- Left: Input and indoor motion sensor
- Middle: Scale

- Do the wiring as shown in the figure below (the exact pinout can be looked up code additionally. The circuit can be found here).

- Place the Arduino, SD card module, and Realtime Clock in the waterproof plastic box.
- Drill a hole for the LED and place it on the plastic box using the hot glue gun.

Initialize the Arduino
- Install Arduino IDE
- Connect the Arduino Uno to the PC via USB-cable
- Open Arduino IDE
- Open the code file from GIT-Hub
- Click the upload button in the Arduino IDE to upload the code to the Arduino Uno.
- Everything is ready. The hedgehog house can be put outside.
Monitoring and Interaction Step-by-Step
The smart shelter process is designed to be efficient and autonomous:
- Initialize Hardware: Correctly seat the sensors, scale, and LED in the wooden house and connect to the Arduino as per the wiring diagram.
- Setup Data Logging: In the
setup()function, the code initializes the DHT, PIR, load cell, SD card, and RTC modules. - Internal Monitoring Loop: The station constantly performs environmental checks, monitors for motion, logs weight data, and updates the LED status indicator in real-time.
- Visual Feedback Integration: The LED provides immediate, on-site visual signaling of the shelter's current state.
Different Stages
The LED light indicates the following states.
| LED Color | Status |
|---|---|
| blue | House is empty. |
| green | Hedgehog is in the house. |
| red | Hedgehog is underweight – please check after the hedgehog and consult with the hedgehog care provider if action is needed. |
Memory transfer to the back-end
- Install Python
- Simple Google search and install software from the website
- Install Pip library a. The following libraries need to be installed from the terminal b. Type in “pip install …” i. boto3 ii. pandas iii. psycopg2
- Create a folder a. Python script and SD card files in .txt format should be placed there
- Download the Python script from the project hub and put it into the folder a. Start script via terminal with the command (navigate into according folder via cd command first): i. Python "script name” and the according file ending (.py)
- Remove the SD card from Arduino and insert it into the laptop a. Drag the text file into the created folder
- Execute Python script a. Type in personal username as required by console input in terminal (automatically once script is started) b. Credentials for database connection (such as port, etc) might need to be changed according to own specifications (port availability, password, etc)
- Put the SD card back into the Arduino
Dashboard
- Open the aws console in order to gain access to the cloud environment
- Enter username and password for login
- Search for quicksight service in the list of cloud provided services (aws integrated BI-tool)
- There are several different dashboard views in order to analyze your hedgehog data once the data upload to RDS instance is successfully done: a. Temperature and humidity:

b. Hedgehog weight development:

c. Movements in and around the shelter:

Future Expansion
- On-Site Display Integration: Add a small OLED display inside the shelter's electronics box to show real-time data like "Room Temp (°C)" or "Last Visit."
- Multi-sensor Synchronization: Connect an Infrared Camera (Night Vision) to build a truly autonomous "Hedgehog Cam" with recording capabilities.
- Cloud Interface Enhancement: Develop a specialized web dashboard accessible via smartphone to precisely track and log the animal's visitation history over time.
- Advanced Animal Care Features: Integrate a specialized "Food Dispenser" (using a servo motor) into the code to provide a snack whenever a hedgehog is detected and weighed.
Smart Hedgehog Shelter is a perfect project for any science enthusiast looking for a more interactive and engaging wildlife-tracking tool!