loading

A few weeks ago, I read up on an Arduino project to create a home automation system. Being a electronic hobbyist, I wanted to be aware of the limits of my skill sets before attempting a project such as this.

One of my major pain points was to open up a remote control, and hack in a microprocessor to manage this remote via a software program. This involved soldering very small contact points on electronic circuit boards.

Cost of the components aside, I wanted to be sure that once I started on an automation project, I would be able to complete it without destroying any of the major functional components such as the remote control.

This instructable is a "flight simulator version" of a web-based home automation system that I intend to put together in the next few days to come.

But before I did that, I had to be sure!

Step 1: From the Parts Bin ...

As this is a flight-simulator version, I put this prototype together with the following parts already lying around in my parts bin:

A Basic Stamp 2 Rev. E. Microprocessor Homework Board from www.parallax.com - the full version of my project will either have an Arduino Uno or Nano.

Or, I would re-purpose the Raspberry Pi B from my other instructable to take on additional responsibilities

A remote from an old pedestal fan - the fan is long gone!

A mechanical relay such as the Songle SRD-05VDC-SL-C - the full version of this project will use a solid-state relay

Three male-to-female connectors (Red, Blue and Brown as shown in the pictures) for the control side of the relay

A couple of male-to-female connectors (purple as shown) for the load side of the relay

A 10 - inch section of Blue speaker wire

A soldering iron and solder for obvious reasons

A fresh 9V battery - This is important because you need good amount of juice to trigger a mechanical relay

Step 2: Simple Objective(s)

The objective(s) of this undertaking are very simple:

What the remote does when the buttons are pressed isn't important - meaning, the appliance it controls does not necessarily have to be part of this exercise. Any remote can be used as long as it works and could be hacked (even possibly be destroyed in the process!)

What really matters is whether or not I be able to wire my remote control buttons to a microprocessor and influence the remote via the micro controller to perform some of its functions as one would normally do by pressing the various buttons.

Examples:

Turning the remote On/Off (the Power button at the very top, right below the LCD screen)

With the remote On, change the speed of the fan that the remote once upon a time controlled (the first button on the left, just below the power button)

Step 3: Taking Apart the Remote

Taking apart the two halves of the remote is most often than not, a painful exercise. I had to pry mine apart and in the process, broke a few tabs on the plastic body. Luckily, the printed circuit board (or PCB) appeared unscathed from the onslaught!

Once the shell was off, all I had to do was undo the 4 tiny screws to dismount the PCB from the body.

The battery connectors soldered to the PCB fit snugly to the plastic body - slip these connectors off the body before dismounting the PCB completely!

Step 4: The Hack...

Luckily, this PCB has a pretty good design with each of the contact points labelled appropriately.

If not, the easiest way to identify the contact points would be to align the PCB with it's key pad and mark the contact points with a permanent marker.

OK. I did not have my hands free when I soldered the speaker wires on to the PCB! So I skipped the "before" picture.

It's important to figure out how the buttons work before proceeding with the hack:

  1. A typical contact point on the PCB consists of two crescent shaped rings
  2. Each ring has tangs projecting into the circular space formed by the two crescents
  3. The tangs have clear spaces between them - very important because these spaces are the ones that make the difference between the "On" and "Off" state of a contact point
  4. As my crude sketch illustrates, to flip the button to the "On" state, simply short the tangs
  5. Which is exactly what the key pad does - below the fancy symbols on the key pad are tiny pieces of conductive material that connect the tangs of the two crescents together forming an electrical connection

Therefore, all we would need to hack the remote is take the buttons away and solder a couple of wires to the crescents taking care not to fill any of the empty spaces with conductive solder!

Step 5: Reassemble the Hacked Remote

For this test, I decided to hack two buttons - the Power On/Off, and the Speed cycle.

The contact points are pretty small even for a remote of this size. Therefore, the two crescents are the only locations I could solder the speaker wires on without having the molten solder spill on to the rest of the PCB and cause undesirable shorts!

Once again, another one of my crude sketches makes the point.

To put the remote back, all that was needed to be done was:

  1. to skip the key pad
  2. run the wires through the holes where the buttons once were
  3. screw the PCB back on to the top shell
  4. close up the remote
  5. put the batteries back in

Remember to use the key pad as a guide when running the wires out through the remote.

The hack is now ready to be tested!

Step 6: Testing the Hack...

Before proceeding any further, I had to make sure that the hack actually works because that's the only way I can confirm that I did not:

  1. Get excessive solder on the PCB causing unintended shorts
  2. Or worse, destroy the PCB by keeping the hot soldering iron in contact with the board for just too long!

But how do I press the buttons?!

Touching the bare ends of the blue wires, and moving them apart is equivalent to pushing the button down on the remote once.

Power On/Off Test:

  • When the batteries are loaded, the remote comes on automatically
  • Therefore, touching the two Blue wires soldered to the power button should turn off the remote
  • Making the wires touch each other again, should make the power come back on
  • The LCD will display the current speed briefly, and then power down to display a tiny fan icon

Test 1 - Success!

Speed Button Test:

  • From the previous test, the remote should be powered on, and the blue wires must not be in contact
  • To increment the speed, short the other pair of Blue wires soldered to the speed button contact point
  • This time, shorting the speed button wires each time increments the speed to the next higher value
  • Shorting the wire repeatedly, cycles the fan speed between 51 > 52 > 53 > 51

Test 2 - Success!

These tests confirm that the hack was successful with no (harmful) side effects :-)

Next, the wiring.

Step 7: Wiring the Microprocessor Circuit

The wiring for this prototype is super basic.

As shown in the simple schematic, there are two parts to this simplicity:

Control (input) side of the Relay:

As Basic Stamp 2 microprocessor is controls the relay, it should be wired on the control side .

  • The digital pin P14 from the BS2 runs to the signal terminal on the relay (the Blue wire)
  • The 5V power from the BS2 runs to the (+) ve supply terminal on the realy (the Red wire)
  • The Ground pin from the PS2 runs to the (-) ve terminal on the relay (the Brown wire)

Load (output) side of the Relay:

  • There's no polarity on the output side therefore, two purple wires have been used for connections
  • Wire 1 runs from the (C)ommon terminal which is usually the middle connector on the relay board, to one of the Blue wires of the remote
  • Wire 2 runs from the Normally Open (NO) terminal to the other Blue wire

Why the Normally Open (NO) Terminal:

The (NO) terminal is the preferred choice because we don't want the remote to be turned on as soon as the power is supplied to the relay.

Instead, the microprocessor must trigger the relay so that a brief contact is established between (C) and (NO) terminals causing an electrical connection between the two blue wires of the remote.

This brief flow of electric current will cause the remote to power On

NOTE:

  • Do not cross wires across two different contact points of the remote!
  • Make sure that the relay is wired to the correctly paired set of Blue wires soldered to the contact points

With all the wires in place, I strapped the relay to the back of the remote - this way, I could make the remote stand upright for more convenient testing.

Step 8: The Ultra-simple Code

The code is ultra-simple. The graphic illustrates the Basic Stamp version which can be easily adapted to another microprocessor such as the Arduino.

When the power's supplied to the circuit by closing the 9V battery terminals this program causes the relay to trigger On and Off many number of times.

The HIGH command indicates that an On signal is being sent to the signal terminal (the Brown wire) of the relay

This causes the circuit on the load side to close causing a current to be sent to the Blue wires of the remote

The LOW command does the opposite and triggers the relay to cut Off power to the load side, thus causing the contact between the two Blue wires of the remote to be lost

This is equivalent to the manual test, when I briefly touched the wires on the remote together and moved them apart.

The PAUSE commands indicate the wait in milliseconds, the program has to wait before issuing the HIGH and LOW commands each time

Step 9: Power On/Off Test

This test is as simple as the code that runs it.

With the 9V battery connected, the remote appears switched off

As the program begins execution, the Green LED on the BS2 board (in the background) comes on indicating that the program is running

The relay triggers for the first time causing the remote to power On

After a brief pause of 750 milliseconds, the relay triggers again - this time, the remote powers Off

Step 10: The Speed Button Test

This test requires a few quick changes to the set up:

  1. Disconnect the 9V battery from the BS2 board
  2. Disconnect the relay from Blue wires for the Power button
  3. Rewire the relay to the Blue wires for the Speed button
  4. Normally a speed function on the remote is used after the remote comes on - for the speed test to work, the remote must already be On
  5. For this, briefly touch the wires of the Power button to turn on the remote - the LCD must display the current speed
  6. Reconnect the 9V power back to the BS2 board to begin program execution
  7. This time, the speed value on the remote will cycle between the 3 speed levels available - 51 > 52 > 53 > 51

That's it!

We now have a prototype of an automation system that can be used to pretty much run an appliance remotely via a computer program

Step 11: So, What's Next?

As mentioned at the beginning of this IBLE, the idea was to scope out my ability to execute a larger project (such as home automation) before I embark on the real deal. Let's summarize some Pros and Cons of taking this route.

The Pros:

  • This definitely is a straight forward solution - Instead of you pressing the buttons, the processor does this for you
  • You don't have to mess with how a remote communicates with its target - like how my other IBLE here demonstrates

The Cons:

  • The remote becomes a "Zombie version" of its former self
  • Soldering tiny terminals on the remote has chances of ruining the remote and rendering it completely unusable
  • You may have to wire as many number of relay as the number of buttons you wish to automate - project becomes bulkier and would require more power

So, what am I looking forward to?

First, extend this prototype out to a proper application that would enable me to control at least 3 remote controls

This will require use of several solid-state relays, and a more detailed Arduino or BS2 or GPIO program

Develop a Web-based application that I can deploy to a local web server hosted on one of my Raspberry Pis or a spare Windows box

I'm seriously considering Microsoft SignalR technology - therefore the Windows IoT flashed to the Raspberry Pi would be a good choice

Finally, I can use my cell phone or tablet to access the local web application to control certain appliances around the house - starting with lights in the living room or garage would be good starting points

Thanks for reading my IBLE!

<p>I disagree about needing a 9V battery to drive the relays - I drive 10 relays (an 8-relay board and a 2-relay board) from the GPIO pins of a Raspberry Pi. Initially I did think I was having problems with power but it turned out I had been sent a relay board with a faulty relay on it. After swapping boards it has worked every time - https://www.instructables.com/id/Control-Any-Remote-From-a-Raspberry-Pi-and-Amazon-/</p>
<p>Have tried for many hours to control home equipment with all sorts of IR remote Arduino libraries and was only able to receive IR codes accurately, but never to transmit them functionally - therefor, as for now i will try to hack a universal remote control (which is not too expensive), according to this nice IBLE and others like it.</p>
Hello roineust,<br>Thanks for reading my IBLE.<br>You're right about cloning IR equipment.<br>Nevertheless, I wrote another IBLE that uses the IRLib Arduino library .<br>The sketch transmits raw codes instead of presuming any kind of protocol. <br>Please take a look at it and let me know your thoughts , because you've had experienced working on other solutions before.<br><br>Best,<br>Am
<p>Hello,</p><p>I just published another IBLE based on your inputs </p><p>Please check it out!</p>
<p>Otherwise recreate the remote control signals is clone them with an infrared receiver and then play them back with a transmitter. I made it successfully with Raspberry PI and an transmitter and receptor IR sensor from old remote control. I want to share it here ASAP</p>
<p>Please do share!<br>I can hopefully integrate it into mine. Like diy_bloke &amp; <a href="https://www.instructables.com/member/hihihizx" rel="nofollow">hihihizx</a> have corrected me below, I can build a soft wired and yet, a less invasive solution. </p><p>thanks</p>
<p>Impressive, but ofcourse it kinda makes your remote a bit dysfunctional.<br>The Seville Classic Ceiling fan is as far as I know operated by an IR signal from the remote. It follows the NEC protocol. An IRLed and driver transistor on your basic stamp might have been easier in this case. For Rf operated remote controls a cheap (50cts) transmitter operated from yr microcontroller usually does the trick and you get to keep yr remote in one piece</p>
<p>Thanks for your comments diy_bloke :)</p><p>Agreed about the dysfunction caused to the remote. And I used this remote because the fan has been gone a long time ago :-)</p><p>I could make this a completely hard wired circuit as you mentioned by integrating it into the micro-controller. </p><p>But then my solution would be just that - too hard wired. If I have to port to a different processor such as the Arduino or Beagle Bone, I will have to reintegrate the hard wired solution all over again.</p><p>Instead, a modified remote would be a small price to pay for a loosely-coupled system that would have the flexibility of moving across platforms.</p>
I don't think you fully understand what diy_bloke. His idea (which I used once to control my TV with an arduino) is much less invasive and versatile.
<p>indeed and one doesnt need to port it to another microcontroller no more than one does to do that with the current solution and even then it would be simple: adding an infrared diode vs adding two relays</p>

About This Instructable

3,493views

61favorites

License:

Bio: I'm a Mechanical Engineer turned IT Professional . I came into the Information Technology world because someone challenged me to. But at heart, I'm ... More »
More by andymenon:Monoprice Mini: Remove Broken Filament From Nozzle Build a Custom ESP8266 Arduino WiFi Library Raspberry Pi 2 Wifi Struggles and Solution 
Add instructable to: