Smartphones are crazy awesome. You can do your banking, track your children, find directions, and even pretend to have a mustache. The only thing that these personal supercomputers are missing is physical interaction with the environment.
I wanted to be able to call my house and turn on the lights and television during nights when I was away on vacation. What's more, I didn't want to spend any money on cell phone bills and wanted to be able to use virtually any phone. I came up with a light-activated cell phone switch box that uses the display screen that you get from an incoming call to control a physical output.
- LDR (light dependent resistor)
- 10k resistor
Step 1 Examine Phone
We will be sensing the light that comes from the cell phone screen when you get an incoming call. This means that you need to have a phone that lights up your screen when this happens. I have an old flip phone and my outer screen lights up when I get a call or text message. Look through your settings and adjust your phone accordingly.
Step 2 Circuit
We will be hooking up the circuit as shown below. The light sensor (LDR) will be wired as an analog input to the Arduino. Connect one end of the LDR to 5 volts. Connect the other end to Arduino analog input 0. At the junction or the LDR and analog 0, place a 10k resistor. Connect the other side of the 10k resistor to ground. This is the standard set up for analog inputs to the Arduino so it doesn't hurt to dedicate this simple circuit to memory.
In this circuit, the servo can be used to automate whatever you like. You can even replace the servo with a relay like we did in this project.
Step 3 Code
Connect your Arduino circuit to the computer and load up the example analog read program. Go to File > Examples > Basics > Analog Read Serial. Upload the program and open the serial monitor.
You will see a string of numbers that vary when you cover the LDR with your hand. Place the phone in a box with the LDR and take a baseline reading of the sensor value. Call the phone so that the screen lights up and take note of the change in light values. This new value will be the threshold for activating the phone switch system.
Download the final code here and replace the highlighted value with the new value you got from the serial monitor.
Step 4 Phone Box
To get the best results, we need to isolate the phone and light sensor from all outside light sources. A cardboard box will work fine for this, but feel free to get as fancy as you like. Duct tape the LDR face down onto the phone screen for maximum sensitivity. If you want to make a permanent installation, plug the phone into a wall socket to keep it charged.
The beauty of this set up is that you never have to answer the phone and pay the phone company if you have a pay as you go plan.
Step 5 Rejoice
Hooray! The rest is up to you. Position your servo or attach your relay to whatever you require automated. This activation scheme would work great for precision pranks, mobile monkey-wrenching, and hidden hijinks. The sky is literally the limit with this project.
You could even use it to activate sensors or motors in a high altitude weather balloon! It's like a one-channel remote control with infinite reach. Try it for yourself today! I can't wait to see what applications the community comes up with for this one. If you have a question, feel free to post in the comments below, ask in the forum, or message me personally.
Don't forget! We are currently accepting entries into our photo contest for a chance to win your very own lucid dreaming goggles kit! Just post a picture on the corkboard of a project you have made or are currently working on. All projects are welcome. Here is my example entry.
Main photo by Daily Edge