Input Devices
Project Overview
This week's project focused on developing an IoT-based environmental sensing device to measure temperature, pressure, and humidity using Bluetooth Low Energy (BLE). The philosophy behind this project was to create a low cost device that can be used for people to be mindful of their environment for sleep and optimize accordingly to maximize recovery.
Development Process
Environment Setup
Configured Zephyr OS for the nRF53 MCU, enabling Bluetooth, sensor functionalities, and PWM control for LEDs.
CONFIG_BT=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_DEVICE_NAME="Thingy53"
CONFIG_SENSOR=y
CONFIG_PWM=y
CONFIG_BME680=y
CONFIG_IPC_SERVICE=y
CONFIG_LED_PWM=y
CONFIG_BOARD_ENABLE_CPUNET=y
Sensor Integration
Integrated the BME688 sensor for environmental data collection, implementing continuous reading of temperature, humidity, and pressure values.
sensor_sample_fetch(bme);
sensor_channel_get(bme, SENSOR_CHAN_AMBIENT_TEMP, &temperature);
sensor_channel_get(bme, SENSOR_CHAN_HUMIDITY, &humidity);
sensor_channel_get(bme, SENSOR_CHAN_PRESS, &pressure);
BLE Communication
Implemented Bluetooth Low Energy communication between the Thingy53 and a custom web interface for real-time data visualization.
Web Interface Features
BLE Connection
Direct connection to the Thingy53 via Bluetooth Low Energy.
Real-time Visualization
Dynamic display of environmental metrics with color-coded indicators for optimal ranges:
- Temperature: 16-20°C (optimal range)
- Humidity: 30-50% (optimal range)
Visual Feedback
RGB LED indicators on the Thingy53 showing environmental status:
- Blue: Too cold
- Green: Optimal conditions
- Red: Too hot
Results & Testing
Thingy53 device with BME688 sensor integration
Real-time web interface displaying environmental data
Challenges & Solutions
Technical Challenges
Encountered temperature sensor calibration issues and power management concerns.
Solutions & Future Improvements:
- Implement more accurate temperature sensor calibration
- Optimize power consumption for longer battery life
- Enhance data processing algorithms for more reliable readings
Project Impact
The IoT environmental sensing system successfully demonstrates the integration of multiple technologies:
- Bluetooth Low Energy for wireless communication
- Environmental sensors for data collection
- Web interface for real-time monitoring
- Visual feedback system using RGB LEDs