Hack a simple remote to turn off/on the light

Hi,

I'm completely new to arduino. I want to control my light in the living room with my android device over arduino (with RedFly wifi shield). I've just written the code and it works perfect! I love this little arduino board :slight_smile:
Now I have to "hack" the remote for the light. Here is a picture:

I googled around and found a lot of tutorials for hacking remotes. I have only a simple one - just a switch for "light on" and another for "light off". If I'm correct, I have to connect the power to the arduino (it also works with only 5 V, somebody else just did that, too) and then I have to "fake" the button click on the switch.

To fake that click, I can solder a cable on the left side of the switch. Then, in the arduino, I control it like a LED to turn on (give HIGH signal on the port).

Is that correct? I just want to understand it before I destroy 10 remotes :wink:

Thank you for your replies :slight_smile:

A pushbutton switch will generally either pull a HIGH line to LOW or a LOW line to HIGH. Measure the voltage between Ground and each side of the button, both while pressed and not pressed. Report those values back and we will have a much better chance of giving you correct information.

Hint: One side of the button will change and the other side won't. The side that changes is the signal you need to control. If the voltages are 5V and 0V then you can control it directly from the Arduino.

Have a look at rc-switch GitHub - sui77/rc-switch: Arduino lib to operate 433/315Mhz devices like power outlet sockets., they have both wireless and soldered directly to the remote solutions in the library... I have been experimenting with controlling my lights also... I have built relays which operate over 315mhz and which i cant control from my Android using DomoticHome

Have a looks at my blog if you are intrested ... i post all the code.

Cheers
HumpA

@johnwasser: sorry for the late reply, I had to buy a new multimeter, first :wink:
But I was correct - on the left side of the button there is 4,5 V if it is pushed down and 0 if not. The button on the bottom is the same.
Only the antenna gets 12 V - so I think it will loose range if I put 5 V on it...but that won't be a problem for me...

@humpadilly: thank you, I'll take a look on that!

You probably just use an NPN transistor across the switches somewhat like below.

http://web.comporium.net/~shb/irmods.htm

Damn, I got stuck!

Everything is working fine, I wired the remote control like my picture above, but nothing happens!
I realized that the digitalWrite HIGH only puts 3.3V on the ports. I thought this would be 5V??? In the tutorials I read something about 5V and 3.3V boards. I have an Arduino UNO.

How can I produce 5V on the port? Impossible?

One more strange thing: I used the normal battery for the control and wired the 5V power output from arduino to the switch(for testing).
Also nothing happened...could it be that this thing isn't only a normal switch or what am I doing wrong?

Killi:
Damn, I got stuck!

Everything is working fine, I wired the remote control like my picture above, but nothing happens!
I realized that the digitalWrite HIGH only puts 3.3V on the ports. I thought this would be 5V??? In the tutorials I read something about 5V and 3.3V boards. I have an Arduino UNO.

How can I produce 5V on the port? Impossible?

Your output pins should go to 5V is you are powering the UNO with USB or 7+V on Vin or 5V on the 5V pin. Did you remember to put in the pinMode(pin, OUTPUT) for your output pins? If you don't you are just turning on the internal pull-up resistor on an input pin and that can't supply much current.

Thank you for your answers :slight_smile:

First of all: yes, I set the pin 13 to output mode in the setup() method.

I measured around a little bit. I think I have only problems with the wirering / eletric...I made a little pic for better understanding:

If I wire the remote control to the arduino, the measure point 1 gives me only 3V. If I DON'T wire the remote control to arduino and measure on point 2, I'll get 5V...if it's wired, it's 3V, too...I don't understand why. I'm a developer, not an electrican :frowning:

Also, if I put the original battery in the remote control and set 5V on the "on"-switch, nothing happens...I think I need help with the wiring to understand how to hack this thing.

Ok, it's solved. Not by hacking the remote but by buying a 434MHz transmitter/reciever :slight_smile:

Thanks on humpadilly, the RCSwitch Library is damn easy! I captured the signals from the original remote and used them to control my lights!

Hell yeah :wink:

please I am just learning about arduino .. how do I begin to power a light bulb with arduino + rilay using php .. can I ask for help him or give tutorials