Temperature Sensor Fan Control

Description

Project completed by Joanna Krug, Brian Surber, Alex Willis, Timothy Yang

This project is a wearable skin temperature sensor that controls a fan/air conditioning unit. A fan will be used for demonstration purposes. Data on past and present skin temperatures and fan speeds will be sent to a website via Ethernet for the user to view. The device is worn on an armband, but can also be worn around other parts of the body if more comfortable. The temperature sensor reads in the user's skin temperature and adjusts the speed of the fan accordingly. The "comfortable temperature" is the temperature threshold where the fan turns on/off, and the speed of the fan is a function of how far above this temperature your skin is. The "comfortable temperature" can later be calibrated by the user.

On the transmitting end, a temperature is read in using an infrared sensor and the temperature is transmitted via the TX xBee. However, if a switch is switched on, the xBee is disabled. RTOS is used on the receiving end with multiple threads controlling the uLCD, Ethernet, xBee receiver, fan speed, and push buttons controlling the "comfortable temperature." PC printouts were used during the debugging of the program.

Video

Components

mbed NXP LPC1768 (x2)
uLCD-144-G2 (x2)
xBee Pro S2B w/ Breakout Boards (x2)
Pololu md08a Motor Driver
Melexis MLX90614 Infrared Thermometer
Ethernet RJ45
External 5V/2A Power Supply
Gdt Brushless DC Fan
Push Buttons (x2)
DIP Switch

Wiring

TX

mbeduLCD Header
5V=VU5V
GndGnd
p11Reset
TX=p13RX
RX=p14TX
mbedxBee Breakout
3.3V=VOUTVCC
GndGnd
TX=p9DIN
RX=p10DOUT
mbedTemp SensorPullups
3.3V=VOUTVDD
GndVSS
I2C scl=p27I2C scl4.7k
I2C sda=p28I2C sda4.7k
mbedSwitch
Gndp2
DigitialIn=p20p1

RX

mbeduLCD HeaderExternal Power
VIN5VPositive
GndGndGnd
p12Reset
TX=p13RX
RX=p14TX
mbedxBee Breakout
3.3V=VOUTVCC
GndGnd
TX=p9DIN
RX=p10DOUT
p8RST
mbedMotor DriverDC FanExt Power Supply
3.3V=VOUTVCC & STBY
GndGndGnd
p21PWMA
p19AIN1
p20AIN2
AO1Red
AO2Black
VMOT5V
mbedEthernet Breakout
3.3V=VOUTp3 & p6
TD+p1
TD-p2
RD+p7
RD-p8
mbedPB 1PB 2
p29p1
p30p1
Gndp2p2

Code

TX Code

Import program1FINALTX

TX for Temperature Controlled Fan

RX Code

Import program1FINALRX

RX for Temperature Controlled Fan


Please log in to post comments.