One of the common uses of Arduino is to remote control things. Most of the times we are interested to control something that we built, but sometimes we would like to improve someting that already has a remote. In this project I would like to improve the control of my Air Suimmer Shark. More specific, I´d like to control the shark using a Sony PS/2-like control.
In this first post I´ll show how to hack the shark remote. It ill be a second one showing the PS/2 connection stuff.
The easiest way to do that is to hack the control itself, that is, instead of try to replace the remote with another gadget, the idea is to "control the control", that is, to create a stuff that acts in paralell with the control, "pressing" the same buttons that already are in the original one. Most of the simple remote controls are like this one, so this post will be useful to you to hack another devices lke remote cars, hellicopters etc.
This is the original control face. It has three buttons: one to switch on and of the remote, another one that move the fin left and right and the last one that makes the shark to climb and dive (it changes the gravity center of the shark).
When we open the control (there are four screwdrivers in rear), we can see this:
As you can see, there are four push buttons that corresponds to the shark controls. Now we have to study them in a way to discover wich kind of sinal he sends to he rest of the remote when pressed. To do that, we should check the other side of the circuit, where are the connections between components. Here you have it.
The red circles shows the four connections corresponding to each pushbutton. Those pushbuttons are usually a parallel switch, that is, when pressed, they connect two terminals to the other two.
There are two possibilities: when the button is pressed, the sinal that is sent is high or low, that is, output sinal changes to 5V or ground. As you can observe in the leftiest button, three buttons are self connected, and only one is separated (the right bottom one). It brings me to suspect that the output connection is the lonely one. We should use the voltmeter to check what's going on when I press the button.
If I put the positive voltmeter probe in the lonelly pin and the ground one in the battery ground, I get about 4,5V value. When I press the button, the value changes to 0V. It shows me that, when the button is pressed, it connects the output to ground. That is, when the key is open (button is no pressed), the circuit reads 5V, an d when one button is pressed, it "grounds" the output. I already hacked anothersimilar remotes, and all works in that same way.
I checked the other buttons and the behavior was the same: press the button grounds the circuit. So we have to provide a circuit that works the same way, that is, Arduino should ground the remote buttons in a way to command the shark.
The first step is to solder some wires to the remote, in a way to connect it to Arduino´s circuit:
I solded filve wires to the circuit: one for each button output and one for ground, because we need to connect Arduino´s ground to remot ground. In fact, after I took this picture I decided to connect another wire in a way to connect Arduino power source to remote source, in a way to unify the power source, that is, make not necessary to provide batteries to the remote.
Now, the circuit:
The red part of the circuit is thhat one inside the shark remote. As you can see, this is a so called pull up circuit, the is, when the button is not pressed the resistor "pull up" (force the signal to high) the exit signal, that is the wire between 5V and the resistor.
To create the same effect, I used 4 transistors. Transistors are one of the most important 20th century invention. They can have different roles in different circuits. In this case, we will use it like a switch, that is, they will switch on and off exactly as the push buttons in the control. I used BC 545 transistors, but there are many different ones that could be used in this case. Any NPN transistor that are capable to deal with 5V will work.
We have the (E)miter terminal connected to 5V and to the shark remote button output. The (C)olector is connect to ground, and the (B)ase is connected to an Arduino digital pin.
When there´s no eletric signal in the base, we have an open circuit in transistor, that is, it´s the same if we have an open switch. Consequently,
When we put a small current in the base B, the switch "closes", that is , the transistor connects the emiter to collector, and "grounds" the input of the remote. That is, now we have two switches, the mecanical and eletronical ones that are capable to switch the signal.
This is the circuit mounted, with the four transistors.
I wrote a small application to test the circuit. With this circuit snd this example you can hack a lot of simple remote controls and make your shark as a drone, for example.
This program tests the shark tail fin, pushing it left and right.
This circuit can be used in dozens of different remote types, in a way to hack and control it, so I hope it will be very useful for you.
In my blog, www.automatobr.blogspot.com.br, you can find other interesting posts aboud Arduino, Raspberry etc.