Introduction: Control Room's Fan by Your Mobile Phone

Hi there !, Summer is coming closer and hot weather make us in bad mood ,so here is my contribution to put you in the right mood.

I want to show you how you can control your room fan just by your mobile phone and also you can use the idea to control all house fans .

Step 1: Tools and Materials

So,What we will need to do that ?

  1. A Smartphone
  2. Arduino uno
  3. 1Sheeld
  4. LED
  5. 1shield application from app store
  6. Battery (9v).
  7. Fan
  8. Jumpers
  9. Temperature sensor (LM35)
  10. Test board

Check links above to know how you can get this components.

This is the data sheet for temperature sensor (LM35) http://html.alldatasheet.com/html-pdf/8866/NSC/LM3...

Step 2: Code Time

/*Write the code on the Arduino program and upload it to the Arduino.*/

#define CUSTOM_SETTINGS

/* Include 1Sheeld slider library. */

#define INCLUDE_SLIDER_SHIELD

/* Include 1Sheeld library. */

#include

/* Define a variable to hold the value of the slider. */
int value;

/* A name for the fan on pin 3. */
int MotorPin = 3;

int LedPin=13;

int TempLevel;

/* A name for the temperature sensor LM 35 on pin A0. */
const int TempSensor=A0;

void setup()

{

/* Start communication. */

OneSheeld.begin();

/* Set the motor pin as output. */
pinMode(MotorPin,OUTPUT);

/* Set the LED pin as output. */

pinMode(LedPin,OUTPUT); }

void loop()

{

/* Read analogvalues from temprature sensor */
TempLevel=analogRead(TempSensor);

TempLevel=TempLevel*0.4828125;

/* Print the temperature on the serial monitor */

Serial.print("Temprature = ");

Serial.print(TempLevel);

Serial.print("C");

Serial.println();

if(TempLevel>30)

{

digitalWrite(LedPin,HIGH);

}

/* Always get the value of the slider and output it as PWM to pin 3 to control the fan speed . */

value = Slider.getValue();

analogWrite(MotorPin,value);

}

Step 3: Connect It Up !

  1. install 1shield app on your android smart phone
  2. Connect 1shield board to Arduino Uno board
  3. Connect LED to pin 13 and ground .
  4. Connect fan Vcc to pin 6 and G to ground of the test board.
  5. Connect temperature sensor to pin A0 as shown .
  6. Download 1 shield libraries from http://1sheeld.com/downloads/.
  7. Upload (1shield Slider library) into Arduino IDE
  8. Write the code on Arduino IDE .
  9. Connect Arduino board to PC and upload the code into Arduino board
  10. Connect power source to Arduino board (USB cable OR Battery) .
  11. Take care about upload mode and running mode on the 1 shield board .
  12. Download 1shield mobile application from here https://play.google.com/store/apps/details?id=com....
  13. Connect 1shield mobile app to 1shield board
  14. Open the serial monitor from Arduino IDE to see the change in the temperature .
  15. Select the required tool from 1shield mobile app (Slider).
  16. Make a hot temperature beside the temperature sensor to light up the lED once it reach to 30 degree .
  17. Move the slider UP and Down and notice the change in the speed of the fan .

Step 4: Finally !!

Here is a video I've made to describes the full steps and output ,you can see that when your room temperature increase the lED will light and tell you that it is over 30 degree so you can increase the fan speed .

Feel free to modify this project to your way, and tell me your progress.

Comments are welcomed.

Comments

About This Instructable

449views

12favorites

Bio: Iam Khloud Mohamed and iam biomedical engineer . Love every thing related to embedded systems .
More by KhloudM1:Control room's Fan by your mobile phone girlfiend call and message
Add instructable to: