The new light sensor

In my last post, I spoke about creating a light sensing “widget” that I could attach to my projects. I used a 10k resistor and was reading the light readings off of the analog pin on Arduino. However, I noticed that attaching an LED to the circuit was throwing the readings way off.

so, I found another way of calculating brightness. I found this article which talked about using a capacitor attached to the photocell which is in turned attached to a digital pin on Arduino. I was able to attach an LED without throwing off my readings a lot. While I was making these modifications, I also decided to make some other improvements (like getting an LED holder to hold my power indicator)

Here’s a pic:

The new light sensor

If you guys are looking for an informative tutorial on how to use a photocell, I found this article very helpful:

Wirelessly controlling Arduino

After I got my curtains open/close from my computer, I wanted to be able to do things wirelessly so I didn’t have to go to my computer every time I wanted to switch my fan on or open and close my curtains.

If you don’t want to get the XBee wireless module for Arduino (which is expensive if you ask me), you can control your Arduino through an RF receiver and transmitter. I had an old cheap remote controlled car laying around so I took out the RF receiver from the car and attached it to Arduino. The RF receiver board had 4 data wires, and 2 power wires (positive and ground).

I attached the board to Arduino’s 3.3v, ground and PWM pins, and read the signals sent by the RF receiver board when the remote was at normal state and when I pressed a button. Then using those values, I wrote a program to turn the relay on/off. If you don’t already have a cheap remote controlled car or can’t get one for less than 10 dollars, then you can buy RF receiver and transmitter from

Here is a video of me controlling my fan through the remote. I can also control it from my computer.

Here’s a picture of the car I destroyed for my project:

Here’s the RF receiver I took out of the car and soldered wires to:

My adventures with Arduino

About two month ago, someone I know told me about this micro-controller called Arduino that can be used to make some cool things. So, I started experimenting with it and I have to say it really is very cool. You can make robots with it, control your lights, open or close your curtains, etc. The possibilities are endless. Since then, I have been playing around with it.

Over this weekend, I tried getting it to open and close my curtains. I was half successful. I can get it to close but opening it is a problem because the rope gets tangled. Here is a video of the curtain closing (and stopping mid way)

Here’s a video of the fan being controlled from my computer: