NXP FRDM
Building and home automation
SS
August 17, 2024 by sukhoi steephan
The objective of the project is to develop an intelligent and smart home automation system using NXP Freedom board. A variety of sensors and actuator module are designed to improve convenience, security, and energy efficiency through automated control of light and fan, environmental monitoring, and security features
Scroll to continue with content
System design
With the components I have, the system can be like this:
- Lighting control: LED module connected for ambient light
- Environment monitoring: Temperature, humidity, and light level monitoring using the temperature and humidity sensor and photosensitive module
- Security: Motion detection and alarm using the human body Infrared sensor, ultrasonic module, and buzzer module
- Appliance control: Appliances like Air conditioning or similar products can be controlled using the relay module.
- User Interface: with the OLED display module which can be connected to I2C to visualize some texts
- Speech Recognition: I have a sound sensor that can be used to take input from the user for some commands as well
- Hygiene: Exhaust fans and lights can be turned ON/OFF with human-body IR sensor
Software development
Initialize the GPIOs, PWM, ADC, I2C(OLED)
- write the code to control the LED module based on time-based automation
- Read input from temperature, humidity, and light sensors and can be displayed on the LED as well as this information can be used to aid in switching off/on light and air conditioning
- If you are not home you can use button_1 as GPIO input and then introduce the human body infrared sensor to improve security. Write the code as if (button==1&&human body infrared sensor == 1) then the buzzer module is turned ON and a message is transmitted to your mobile
- Relay can be programmed in such a way that it can be used to control any appliance using Infrared controller and receiver
- I2C data and clock lines are configured to send the response after every control action takes place
Hardware setup
- Connect the temperature and humidity sensor and photosensitive module to analog pins
- Connect the relay module to a digital output pin
- The OLED display is connected to the I2C pins(SDA and SCL)
- The Buzzer module is connected to PWM pins