Home Automation by Withour Any Switch and Using Sensors




Posted in TechnologyArduino

Introduction: Home Automation by Withour Any Switch and Using Sensors

About: I am mechatronics student with lots and lots interests in innovations

Apparatus required:

1x Ultrasonic sensor

1x Arduino Atmega328

1x Relay

1x fan

Connecting wires As required

Step 1: ​Connection/Working:

Step 1: Upload the program given below in to Arduino board

Step 2: Connect the Arduino and Ultrasonic sensor in to the pins trigPin-13, echoPin-12

Step 3: Connect relay to Arduino pin 2 and motor to relay

Step 3: Now click serial monitor in the Arduino software

Step 4: Move your sensor and find distance approx,

Step 5: Follow us and subscribe our YouTube channel

Step 2: Program:



    • Pocket-Sized Contest

      Pocket-Sized Contest
    • Spotless Contest

      Spotless Contest
    • Trash to Treasure

      Trash to Treasure

    We have a be nice policy.
    Please be positive and constructive.




    You made great instructions to kill your Arduino. You cannot drive a motor directly from arduino pins. When you stop the motor the returning current can kill your Arduino pin. In adition the motor drive from the arduino pin don't have almost power to do any real job work. It's better use and h-bridge and external power for the motor.

    3 replies

    Hey friend, that is not a motor. Please read and watch my video clearly. That is fan not a motor. And we are using relay on that so we no need to use h-bridge and our Arduino never kills. So must you need to watch it in video. What is use of relay?

    The schematic shows a motor, and that wasn't the first schematich that I with a motor directly conected to an Arduino. Sorry, I start to read from my mobile and I din't read the text.

    I thonk that it's better to draw a relay and then that anybody attatch to the relay the charge of their preference.

    Thanks for your instructable and sorry.