Introduction: Servo Controlled LightSwitch

Automating something by lightswitch can be tough. Sure, you can pay big bucks to get some custom automated switch, but that takes investment, and is also rather permanent. If you're renting, or not quite ready to take that commitment, sometimes it's good to create something that can be moved a bit easier. To accomplish this we can hook up a servo to our LinkIT ONE and control it however we wish! For this guide, we will control it by SMS. This way we can easily flip our light switch on and off from any location we want!

Step 1: Supplies

In the spirit of keeping things easy and quick to prototype., we will use Seeedstudio's Grove technology to get our light switcher up and running quickly. If you're looking to get a great starter pack for the LinkIT ONE, I would recommend the Grove Arduino Starter Kit. ; This kit is compatible with the LinkIT ONE due to the same pin layout. You get a lot of great sensors that are easy to hook up!

  • LinkIT ONE Mediatek Board
  • Grove Arduino Base Shield
  • Grove Server Sensor
  • Sim Card
  • Small (and thin) nail
  • GSM Antenna (Included with your LinkIT ONE)

Step 2: Set Up Your LinkIT ONE for Text Messaging

First, we need to change a few settings on our LinkIT ONE to get it ready for receiving text messages.

The first, and probably most important, is to enter a sim card into your LinkIT ONE. This will enable you access the GSM network and send and receive text messages.

First, gather your SIM card. Buying a pre-paid SIM card can be overkill sometimes, especially if all you want to do is prototype the project first. If that is all you're after, you can just borrow the SIM card from either your phone or a friends. That way you can test it out first. Insert your SIM card just like the arrow in the diagram suggests.

Next, you'll have to mess around with a few switches to make sure your LinkIT ONE is configured properly. The main switch to keep an eye on here is SD/SPI switch. Make sure to switch it to SPI. This will ensure that your LinkIT ONE enables the SIM card versus the SD card slot, enabling you to receive text messages!

Step 3: Getting Into the Grove

Now let's work on wiring everything up, the Grove way. This enables us rapidly prototype and create our project without much hassle.

First, you'll need to connect the Arduino Grove Base Shield to your LinkIT ONE. Lucky for us, their pin layout is the exact same! This is great since the Arduino already has so many accessories. Just align the pins and press in to connect the base shield.

Next, we'll need to connect our Servo. Go ahead and connect it to D2 on your Grove Base Shield. If you connect it to something else, just remember that pin number when it comes to writing the code.

Step 4: Setting Up Your Servo

So, how exactly will this servo magically turn on and off our lightswitch? Well, in the spirit of keeping this "renter-friendly", we'll simply use a small nail to attach it to the lightswitch plate. Plate's are relatively cheap to replace, and I have found that a framing nail works best to attach the servo to switch plate to prevent it from moving in an the reverse direction.

Before you start putting holes in anything, be sure to figure out where exactly your servo will go. You want it so that the servo arm is able to both flip the switch up and down.

Step 5: Deploying the Code

Next, let's deploy the code to our LinkIT ONE.

The code is heavily commented, so you should be able to follow along just by reading. The basic logic goes like this

Texting 'OFF' turns the switch down, and flips your light off.

Texting 'ON' turns the switch up, and flips your light on!

Step 6: Let There Be Light

And WHAM! You're done! Now you have a renter friendly Home automation set up that won't get your landlord in a tiff! I hope this has provided you with a valuable use-case for the LinkIT ONE and given you some ideas on how to take it forward! Best of Luck tinkering!