Introduction: How to Control Your Light Switch From Your Smartphone?

About: Mahmoud Tolba is an Egyptian engineer who is passionate about building intelligent robots. using his expertise in robotics, embedded systems, electronics, computer vision, programming and product designing and…

Usually, when makers decide to convert their houses from ordinary houses to smart ones, they buy some relays to control the lights but this adventure's result will be an ugly packaging with horrible mess of wires that we won't love to put it in your home. That's why I'm writing this instructable, lets learn how to convert our houses to smart houses with neat packaging that will impress your guests.

I've built a set of home automation kits based on Arduino, that allows you to control light switches and door locks at home with your smartphone. Here I will present the light switch kit, think of it as Switchmate DIY kit.

It is a kit composed of electronic components (Arduino, jumper wires), plastic parts and an app. It can be easily assembled using a screwdriver, and installed at home with an elegant design.

Hope you like my Instructable.

You can watch my teammate Amr explaining the project idea in the next video, Enjoy the demo :D

Step 1: Gather Your Components

What you will need for this project:

1. Arduino Uno.
2. 1Sheeld.
3. Micro servo motor.
4. Laser cut parts for the mechanism.
Note: I will explain this part in details in a separate step.
5. Some screws, washers and nuts.
6. 3D printed covers for the Arduino and the mechanism.
Note: I will explain this part in details in a separate step.
7.
Screwdriver

Step 2: Laser Cut Your Parts

The project consists of 4 main plastic parts:
1. Fixing plate (Laser cut from an Acrylic sheet 3 mm)

2. Cover for the Arduino (3D printed)

3. Cover for the mechanism (3D printed)

4. The mechanism itself (Laser cut from an Acrylic sheet 3 mm)

After I designed these parts on SolidWorks, I exported the files into two types:

1. DXF files for the laser cutter.
2. STL files for the 3D printer.

In this step, I'll talk about the laser cut parts and you will find all the dxf files attached.

For the fixing plate:

It consists of two part, the big Acrylic sheet and the small circular dots.

I used 3 mm Acrylic sheet to cut the big part then I used 6 mm Acrylic sheet to cut the small circular dots. After that I used super glue to fix them together.

I will use these dots to fix the covers on the fixing plate like the LEGO parts.


For the mechanism parts:

I believe in the concept of "Do not reinvent the wheel", so I followed this great instructable.
In this instructable you will find all the required details to make the mechanism parts and assemble them together.

Now, Lets warm up the 3D printer :D

Step 3: 3D Print the Covers

We have two parts needs to be 3D printed, the cover for the Arduino and the cover for the mechanism.

I used LEGO technique to fix them with the fixing plate.

All you have to do is to pick the attached STL filel and find a good 3D printer in a nearby Makerspace or Fablab, then pick you favorite color and tell the guys responsible for the 3D printer to configure the 3D printer settings to fit with your parts.

In my case, I used white ABS filament and after that I asked the guys there to sand the parts and paint them to look glossy.

Step 4: Electronic Circuit & Arduino Coding & Mobile App

Let make these parts move :D

The electronics in this projects is very simple, all you have to do is to put 1Sheeld on Arduino UNO then connect the servo motor to 1Sheeld and Arduino as explained in the attached photos.

Use your USB cable to connect the Arduino to your PC and upload the attached Arduino sketch.

If you face any troubles with using 1Sheeld, please follow this getting stated tutorial.

You can used adapter 5V/2A to power the whole system.

After that, you should use the attached apk to run the mobile app on your smartphone to control your lights.

You can build your custom mobile app using 1Sheeld SDK, you can download it from this link.

Step 5: Enjoy Controlling Your Lights

Thanks guys for reading my instructable, hope you loved it and I would be grateful to receive your feedback and comments :D