Go Down

Topic: Hack a simple remote to turn off/on the light (Read 2747 times) previous topic - next topic

Killi

May 28, 2012, 01:19 pm Last Edit: May 28, 2012, 01:22 pm by Killi Reason: 1
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 :)
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 :)

johnwasser

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.
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

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

Killi

@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!

zoomkat

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

http://web.comporium.net/~shb/irmods.htm
Google forum search: Use Google Advanced Search and use Http://forum.arduino.cc/index in the "site or domain:" box.

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?

Killi

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?

johnwasser


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.
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Killi

Thank you for your answers :)

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 :(

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.

Killi

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

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

Go Up