btp_ppt_end_sem
TRANSCRIPT
Embedded System for Control of an AC Compressor Based on Sleep Stage
Detection
B.Tech Project Abhishek Kumar Agrawal
Supervisor:Prof. A. Routray
Introduction: No need of maintaining Room temperature at reference temperature for entire sleep period. User in NREM stage 2,3,4 AC compressor OFF User in NREM stage 1 and REM AC compressor ON Variation in Respiratory rate with different sleep stages has ben used as key for control.
Objective: To develop a Real time Respiratory rate counter
Using Active noise cancellation algorithm has been developed Prototyped using ADMP401 microphone and STM32f4 board
To establish a wireless link for sleep data transfer Using ESP8266 Wi-Fi module, sleep stage has been transferred
To develop an application for viewing sleep data An Android application has been developed for collecting and
viewing data for entire sleep period
Overview of the system:
Respiratory rate counter:
Breath rate per minute
Smoothing and envelope
detection
Active noise cancellation
Absolute sum of windowed
data
Breath signaland noise
Input
Algorithm Development Sampling Frequency selection:
Signal from 10000: 13000, 4096 point FFT. Sampling frequency = 2KHz
Active noise cancellation A 2nd Order LMS adaptive FIR filter has been used
Respiratory Rate counting Signal has been divided in to window of 0.05 (=100)For each window sum of absolute value has been computed
Low Pass filter design for smoothing FFT of windowed sum of absolute data has been computed 0.2 has been chosen as cutoff frequency of LPF
Low Pass filterAn IIR low pass filter has been designed using Butterworth approximation and impulse invariance design method.
= 0.15, = 0.25, =0.9, = 0.1
Order of filter (N) = 6Cutoff frequency() = 0.1918
Response of LPF Magnitude Response: Phase Response:
Smoothened Output of LPF Now by setting threshold number of respiratory rate can be determined.
Wireless Link : wi-fi module on Human side Connects to access pointActs as clientTakes data through UART from uc and transfer to server over TCP
wi-fi module on AC side Configured as Access pointActs as Server Collect sleep stage data through TCP and generate On-Off flag for AC compressor. Write all sleep data to a file As app ask for data it transfer content of file and reset the file
Mobile Application:
Connects to server using wi-fi
Receive the file containing last sleep data
Plot the received data for viewing to user
Can be used for deleting data on server without viewing
Hardware selection: Microphone:
Analog devices ADMP401
wi-fi module:
ESP8266-01 wifi module
Development Board: ARM Cortex M4 based STM32F4 discovery board:
source@www. galeria.tech-blog.pl
Prototype Developed: Human Side
With STM32F4 board and microphones collect and transmit sleep stage data
AC side
Acts as access point and server. Get sleep data and generate On-Off control signal. Writes data to a file and transmit to App if asked
Android App Developed:With connect a LED glows on server side indicating connection establishment
With read new activity opens showing a plot for sleep data for last periods