Pages: [1]   Go Down
Author Topic: Hack a simple remote to turn off/on the light  (Read 2489 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 smiley
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 ;-)

Thank you for your replies smiley
« Last Edit: May 28, 2012, 06:22:40 am by Killi » Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 208
Posts: 8856
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Offline Offline
Newbie
*
Karma: 0
Posts: 14
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Have a look at rc-switch http://code.google.com/p/rc-switch/, 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.

http://www.humpadilly.com/

Cheers
HumpA
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@johnwasser: sorry for the late reply, I had to buy a new multimeter, first ;-)
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!
Logged

0
Offline Offline
Tesla Member
***
Karma: 145
Posts: 9631
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

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

Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   smiley-cool

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 208
Posts: 8856
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you for your answers smiley

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 smiley-sad

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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

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 smiley-wink
Logged

Pages: [1]   Go Up
Jump to: