Select Page

ABSTRACT

This project presents an interrupt-driven low-power thermal imaging system designed for wildlife animal detection. The system utilizes a Tiva C LaunchPad microcontroller interfaced with an MLX90640 thermal camera and an SD card module for image storage. A PIR sensor is used to detect motion and trigger image capture only when activity is detected, thereby reducing power consumption. The system operates in low-power sleep and deep sleep modes during inactivity and wakes up using interrupts. Captured thermal data is processed and converted into BMP images, which are stored on the SD card. This approach ensures
efficient power usage, real-time monitoring, and reliable data acquisition for wildlife observation applications.

I.INTRODUCTION 
Wildlife monitoring and animal detection in forest environments require reliable sensing systems that can operate efficiently under low-light conditions with minimal power consumption. Traditional camera-based systems continuously capture data, leading to high energy usage and reduced system efficiency. To overcome these limitations, this project presents an interrupt driven low-power thermal imaging system that captures images only when motion is detected.
1.1 MLX90640Thermal Camera
The MLX90640 is a compact infrared thermal imaging sensor consisting of a 32×24 pixel array. It operates based on the principle of infrared thermography, where all objects emit infrared radiation depending on their temperature. The sensor contains an array of thermopile elements that detect this radiation and convert it into analog signals.
These analog signals are processed internally using an analog front-end and a built-in Analog-to-Digital Converter (ADC), which converts them into digital temperature values. The sensor provides temperature data for each pixel, enabling the generation of a thermal image. It communicates with the microcontroller using the I2C protocol and supports configurable refresh rates. The MLX90640 is highly suitable for low-power embedded applications due to its compact size and efficient operation.
1.2 PIR Sensor for Motion Detection
A Passive Infrared (PIR) sensor is used to detect motion in the monitored environment. It works by sensing changes in infrared radiation caused by moving objects such as animals or humans. The PIR sensor contains a pyroelectric element that generates a small electrical signal when there is a variation in infrared energy.
This signal is amplified and processed using an internal comparator circuit to produce a digital output. When motion is detected, the PIR sensor generates a HIGH signal, which is used to trigger an interrupt in the microcontroller. This enables event-driven operation, ensuring that the system remains inactive until necessary, thereby conserving power.
1.3 SD Card Storage and FAT File System
The captured thermal data is stored using an SD card module interfaced with the microcontroller through the SPI communication protocol. To manage data efficiently, the FAT (File Allocation Table) file system is implemented using the FATFS library. FATF Sallows the microcontroller to create, read, and write files in standard formats. In this system, thermal data is converted into BMP image format by mapping temperature values to RGB color intensities. A BMP file header is generated, followed by pixel data written row-wise into the SD card. This structured storage ensures compatibility with standard image viewing tools
and simplifies data retrieval.
1.4 Low-Power Operation and Interrupt Mechanism
Power efficiency is a critical requirement for remote wildlife monitoring systems. The microcontroller operates in sleep and deep sleep modes during periods of inactivity to minimize energy consumption. A timer is used to track idle duration and transition the system into deep sleep mode when no motion is detected for a predefined time.
The PIR sensor is configured to generate interrupts, which wake up the microcontroller from low-power states. Upon waking, the system captures thermal data, processes it, and stores it on the SD card. This interrupt-driven approach significantly reduces unnecessary processing and enhances battery life.

1.5 Project Overview
The proposed system integrates thermal sensing, motion detection, low-power operation, and data storage into a compact embedded platform. By capturing images only when motion is detected, the system ensures efficient use of resources while maintaining reliable monitoring capabilities.
This design is particularly suitable for wildlife observation, forest surveillance, and security applications, where continuous monitoring with minimal power consumption is essential.

II.BACKGROUND STUDY 
The development of efficient wildlife monitoring systems has gained significant importance in recent years due to increasing human-animal interactions and the need for ecological conservation. Traditional monitoring methods rely on visible-light cameras and continuous recording systems, which suffer from high power consumption and poor performance in low-light or night time conditions. To overcome these challenges, thermal imaging and low-power embedded systems have emerged as effective solutions.
2.1 Thermal Imaging Technology
Thermal imaging is a technique that captures the infrared radiation emitted by objects and converts it into a visual representation based on temperature differences. Unlike conventional cameras, thermal cameras do not rely on visible light, making them highly effective in dark or foggy environments.
The MLX90640 thermal sensor used in this project is based on an array of thermopile detectors. Each pixel in the array senses infrared radiation and produces an analog signal proportional to the temperature of the observed object. These signals are processed using internal analog circuitry and converted into digital values through an Analog-to-Digital Converter (ADC). The resulting temperature data can be mapped into color gradients to generate thermal images. Thermal imaging has been widely used in applications such as surveillance, medical diagnostics, industrial inspection, and wildlife monitoring due to its ability to detect heat signatures accurately.
2.2 Passive Infrared (PIR) Sensing
Passive Infrared (PIR) sensors are commonly used for motion detection in security and automation systems. They operate based on the principle of detecting changes in infrared radiation within their field of view.
A PIR sensor consists of a pyroelectric material that generates an electrical charge when exposed to changes in infrared energy. When a moving object such as an animal enters the detection area, the variation in infrared radiation produces a voltage signal. This signal is amplified and processed using an internal comparator circuit to generate a digital output.
PIR sensors are highly energy-efficient as they do not emit radiation but only detect changes in the environment. This makes them ideal for low-power, event-driven systems.
2.3 Low-Power Embedded Systems
Low-power design is a critical aspect of embedded systems, especially for applications deployed in remote or battery-operated environments. Microcontrollers such as the Tiva C LaunchPad support multiple power-saving modes, including sleep and deep sleep modes.
In sleep mode, the CPUis halted while peripherals continue to operate, whereas in deep sleep mode, most system components are turned off to minimize power consumption. Interrupt-driven mechanisms allow the system to wake up only when required, reducing unnecessary processing and extending battery life.
The combination of low-power modes and interrupt-based operation is essential for designing energy-efficient monitoring systems.
2.4 Data Storage Using SD Card and FAT File System
Efficient data storage is necessary for capturing and analyzing thermal images. SD cards are widely used in embedded systems due to their large storage capacity, portability, and ease of interfacing through SPI communication.
The FAT (File Allocation Table) file system is commonly used to manage data on SD cards. It organizes data into files and directories, allowing easy access and compatibility with standard computing devices. The FATFS library provides an interface for embedded systems to perform file operations such as creating, reading, and writing files. In this project, thermal data is converted into BMP image format, which includes a file header and pixel data. This structured format ensures that the images can be viewed and analyzed using standard image processing tools.

2.5 Event-Driven System Design
Event-driven systems operate based on specific triggers rather than continuous execution. In this project, the PIR sensor acts as an event trigger that initiates thermal image capture only when motion is detected.
This approach reduces power consumption and improves system efficiency by eliminating unnecessary operations. Event driven architectures are widely used in modern embedded systems, particularly in IoT and real-time monitoring applications.
2.6 Relevance to Wildlife Monitoring
The integration of thermal imaging, motion detection, and low-power operation makes this system highly suitable for wildlife monitoring. Animals can be detected based on their heat signatures even in complete darkness, and the system conserves energy by operating only when required.
Such systems can be deployed in forests, protected areas, and remote locations to study animal behavior, prevent poaching, and reduce human-wildlife conflicts. The ability to store and analyze thermal data further enhances the effectiveness of the monitoring system.

III.SYSTEM ARCHITECTURE 
The system architecture of the Interrupt-Driven Low-Power Thermal Imaging System consists of four main components: PIR sensor, MLX90640 thermal camera, Tiva C microcontroller, and SD card module. The interaction between these components enables efficient event-driven operation and low-power functionality.

Figure 1: System Architecture of Thermal Imaging System

3.1 Working Description
The PIR sensor continuously monitors the environment for motion. When motion is detected, it sends a digital signal to the TivaC microcontroller. This signal acts as an interrupt trigger, waking the system from low-power mode.
Upon receiving the interrupt, the microcontroller activates the MLX90640 thermal camera through the I2C interface. The thermal camera captures temperature data in the form of a 32×24 pixel array, which is then processed by the microcontroller.
The processed thermal data is converted into an image format (BMP) using a color mapping algorithm. The microcontroller then communicates with the SD card module via SPI interface to store the generated image.
If no motion is detected, the system remains in sleep or deep sleep mode to conserve power. This architecture ensures efficient operation by combining interrupt-driven processing with low-power techniques.

3.2 Data Flow
• PIR Sensor → Microcontroller: Motion detection signal (interrupt)
• Thermal Camera → Microcontroller: Temperature data (I2C communication)
• Microcontroller → SD Card: Image data storage (SPI communication)

IV.SYSTEM IMEPLEMENTATION 
The implementation of the Interrupt-Driven Low-Power Thermal Imaging System is carried out using the Tiva C LaunchPad microcontroller, MLX90640 thermal camera, PIR sensor, and SD card module. The system is designed to operate in an event driven manner, ensuring efficient power utilization and real-time response.

Figure 2: State Transition Diagram

4.1 Microcontroller Initialization
The system clock is configured using the Phase-Locked Loop (PLL) to achieve stable operation. The Floating Point Unit (FPU) is enabled for efficient processing of thermal data. UART communication is initialized for debugging and monitoring system status.
4.2 Thermal Camera Interface
The MLX90640 thermal camera is interfaced using the I2C protocol. During initialization, EEPROM data is read from the sensor, and calibration parameters are extracted. The sensor is configured with an appropriate refresh rate.
Thermal frames are captured using dedicated API functions. Each frame consists of temperature values for a 32×24 pixel array. These values are processed to obtain accurate temperature readings for each pixel.
4.3 PIR Sensor Interrupt Handling
The PIR sensor is connected to a GPIO pin configured for interrupt generation. When motion is detected, the PIR sensor generates a rising edge signal that triggers an interrupt service routine (ISR).
Inside the ISR:
• The interrupt flag is cleared
• A capture request flag is set
• The system exits low-power mode
This ensures that thermal image capture is initiated only when motion is detected.

4.4 Thermal Image Processing
Captured temperature data is converted into a visual format using a color mapping algorithm. Each temperature value is normalized within a defined range and mapped to RGB color intensities. The processed data is then arranged into pixel format suitable for image generation. A scaling factor is applied to improve image resolution for better visualization.
4.5 SD Card Interface and Data Storage
The SD card module is interfaced using the SPI protocol. The FATFS file system is used to manage file operations such as creating and writing files. Thermal images are stored in BMP format. The implementation includes:
• Generating a BMP file header
• Writing pixel data row-by-row
• Assigning unique filenames for each captured image
This ensures compatibility with standard image viewers.
4.6 Low-Power Operation
To minimize energy consumption, the system operates in different power modes:
• Sleep Mode: Activated during short periods of inactivity
• Deep Sleep Mode: Activated after prolonged inactivity
A timer is used to track idle time. If no motion is detected for a predefined duration, the system transitions to deep sleep mode. The PIR sensor remains active and wakes the system upon detecting motion.
4.7 Main Control Flow
The main program operates in a continuous loop and performs the following steps:
1. Initialize all peripherals and modules
2. Capture an initial thermal image at startup
3. Wait for PIR interrupt trigger
4. Upon motion detection:
• Capture thermal image
• Process temperature data
• Store image on SD card
5. Reset system state and return to low-power mode
This interrupt-driven approach ensures efficient operation, reduced power consumption, and reliable performance in real-time wildlife monitoring applications.

V.RESULTS
The implemented system successfully captures and stores thermal images based on motion detection using the PIR sensor. The MLX90640 thermal camera provides temperature-based imaging, which is processed and stored in BMP format on the SD card. The captured images clearly represent different thermal patterns corresponding to objects and environmental conditions. Regions with higher temperature are represented in red, while lower temperature regions appear in green and yellow shades.

Figure 3: Captured Thermal Images from MLX90640

5.1 Observations
• High-temperature regions are clearly visible in red, indicating detection of warm objects such as animals or humans.
• Background regions appear in green/yellow, representing lower ambient temperatures.
• The system successfully captures different thermal variations under varying conditions.
• Motion-triggered capture ensures that images are recorded only when activity is detected.
• The stored BMP images are compatible with standard image viewers for further analysis.
5.2 Performance Analysis
The system demonstrates reliable performance with efficient power usage. The interrupt-driven mechanism ensures that thermal images are captured only when required, reducing unnecessary processing. The low-power modes significantly enhance system efficiency, making it suitable for long-term deployment in remote wildlife monitoring applications.
VI.CONCLUSION 
The Interrupt-Driven Low-Power Thermal Imaging System for Wildlife Animal Detection has been successfully designed and implemented. The system effectively integrates a Tiva C microcontroller, MLX90640 thermal camera, PIR sensor, and SD card module to achieve real-time and energy-efficient monitoring.
The use of thermal imaging enables reliable detection of animals based on heat signatures, even in low-light or nighttime conditions where conventional cameras fail. The PIR sensor ensures event-driven operation by triggering the system only when motion is detected, thereby reducing unnecessary processing.
Low-power techniques such as sleep and deep sleep modes significantly enhance the systemˆ as energy efficiency, making it suitable for long-term deployment in remote environments. The captured thermal data is processed and stored in BMP format using the FAT file system, ensuring easy accessibility and compatibility with standard devices.
The implementation demonstrates that combining interrupt-driven architecture with thermal sensing and efficient data storage results in a robust and practical solution for wildlife monitoring. The system can be further extended for applications such as security surveillance, border monitoring, and smart environmental sensing. Overall, the project provides a reliable, cost-effective, and scalable approach for real-time animal detection and monitoring in challenging environments.
VII.REFERENCES 
1. Texas Instruments, “TM4C123GH6PM Microcontroller Datasheet”
2. Melexis, “MLX90640 Thermal Camera Datasheet”