Project showcase
Control a Fan with Your Mobile Phone

Control a Fan with Your Mobile Phone © GPL3+

I want to show you how to control your room's fan just with your mobile phone, also you can use the same idea to control all house fans.

  • 2,235 views
  • 0 comments
  • 6 respects

Components and supplies

About this project

How I made it

  • Install 1sheeld app on your Android smart phone
  • Connect 1sheeld board to Arduino Uno board
  • Connect LED to pin 13 and ground
  • Connect fan Vcc to pin 6 and G to ground of the test board.
  • Connect temperature sensor to pin A0 as shown
  • Upload (1shield Slider library) into Arduino IDE
  • Write the code on Arduino IDE
  • Connect Arduino board to PC and upload the code into Arduino board
  • Connect power source to Arduino board (USB cable OR Battery).
  • Take care about upload mode and running mode on the 1 shield board.
  • Download 1sheeld mobile application from here.
  • Connect 1sheeld mobile app to 1shield board
  • Open the serial monitor from Arduino IDE to see the change in the temperature
  • Select the required tool from 1sheeld mobile app (Slider).
  • Make a hot temperature beside the temperature sensor to light up the lED once it reach to 30 degree
  • Move the slider UP and Down and notice the change in the speed of the fan

Finally this video describes the project. Thanks and any comments are welcome.

Code

Control room's Fan by your mobile phoneArduino
Upload the code on Arduino IDE, then burn it to Arduino board.
/*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);

}

Schematics

How to connect
13321150 10206961112289418 1119285043 o

Comments

Similar projects you might like

Control your Light System Using Smart Phone

Project tutorial by Ahmed Yassin

  • 35,264 views
  • 4 comments
  • 55 respects

How To Control Arduino From Mobile Phone

Project showcase by lubosrusnak

  • 5,298 views
  • 0 comments
  • 7 respects

Control Lights with your Phone from Anywhere in the World!

Project showcase by Kaustubh Agarwal

  • 15,053 views
  • 4 comments
  • 36 respects

Control electronics by sliding your phone

Project tutorial by Tanishq Jaiswal

  • 14,760 views
  • 13 comments
  • 61 respects

Control your light system with your voice

Project tutorial by Maha Raafat

  • 33,136 views
  • 22 comments
  • 147 respects

Control Robot Arm with your Android Phone

Project tutorial by Ammar Atef Ali

  • 12,076 views
  • 0 comments
  • 25 respects
Add projectSign up / Login