PC REMOTE CONTROLLER
Submitted by
2017 - 2018
Department of Electrical & Electronics Engineering
Sreenidhi Institute of Science & Technology
CERTIFICATE
III
Ms. K. Prasanya
Assistant Professor
Iterrnal Guide
IV
ACKNOWLEDGEMENT
We take this opportunity to thank all our lecturers who have directly
or indirectly helped our project. We pay our respects and love to our
parents and all other family members and friends for their love and
encouragement through out our career. Last but not the least we express
our thanks to our friends for their cooperation and support.
V
ABSTRACT
VI
The results of these project shows that all electronic devices can
be repruposed to create many new things reducing e-waste and
producing cheaper and efficient devices.
TABLE OF CONTENTS
PROJECT REPORT….….….….….….….….….….….….….……….…..….…...i
CERTIFICATION….….….….….….….….….….….….….….…...….….….…..ii
ACKNOWLEDGEMENT……………………………………………………….iii
ABSTRACT……………………………………………………………………...iv
TABLE OF CONTENTS…………………………………………………………v
TABLE OF FIGURES…………………………………………………………..vii
VII
CHAPTER ONE………………………………………………………………………1
INTRODUCTION TO PC REMOTE CONTROLLER……………………………1
1.1 INTRODUCTION…………………………………………………………1
1.2 PROJECT AIM……………………………………………………………1
1.3 PROJECT OBJECTIVE…………………………………………………..1
CHAPTER TWO…………………………………………………………….………..1
LITERATURE REVIEW………………………………………………….…………1
2.1 HISTORY OF WIRELESS PC CONTROLLERS ……………………….1
2.2 PRESENTATION TECHNOLOGY………………………….…………...2
2.3 PC REMOTE IMPLEMENTATION PLATFORMS………….………….2
CHAPTER THREE………………………………………………………….………..2
METHODOLOGY…………………………………………………………….………2
3.1 PRELIMINARY CONCIDERATIONS ……………………….………….2
3.2 SYSTEM DESIGN………………………………………………..……….2
3.2.1 ARDUINO PRO MINI DEVELOPMENT BOARD…………….……3
3.2.1.2 Overview……………………………………………..……….3
3.2.1.3 Technical Specifications……………………………….….….3
3.2.1.4 Documentation…………………………………………..……4
3.2.2 IR DECODER…………………………………………………...…….5
3.2.2.1 Pinout and Description…………………………………..……5
3.2.2.2 Working…………………………………………………...…..6
3.2.3 KEYBOARD CHIP………………………………………………...….7
CHAPTER FOUR………………………………………………………………..……8
DESIGN AND IMPLEMENTATION…………………………………………..……8
4.1 PROJECT BLOCK DIAGRAM AND SCHEMATIC DIAGRAM…..……8
4.2 TRACING THE BUTTONS OF KEYBOARD MEMBRANE……………9
4.3 BUILDING INTERFACE CIRCUIT FOR
VIII
ARDUINO AND KEYBOARD…………………….……………………9
4.4 RECORDING THE HEX CODES OF IR REMOTE………………..……10
4.5 ASSIGNING HEX CODE TO A KEYBOARD BUTTON……………….10
4.6 TESTING THE COMPLETE DESIGN AND CASING……………..……10
CHAPTER FIVE………………………………………………………………….…..11
CONCLUSION……………………………………………………………….…..11
REFERENCES……………………………………………………………...….11
APPENDIX I: Bill of Components…………………………………….……12
APPENDIX II: Code for IR code Recording…………………………………12
Code for PC Remote Controller ……………………………12
IX
X
TABLE OF FIGURES
XI
XII
1.INTRODUCTION
Imagine how helpful it will be to control your PC using T.V remote controller
sitting far away from it. How about giving your presentations using this wireless
controller.
To design and construct a wireless PC remote controller that can simulate any
button press on keyboard.
2.LITERATURE REVIEW
1
There are many technologies that have emerged for controlling computers
using wireless devices, of which some are
Bluetooth Slide remote controllers
Bluetooth Remote control using Android phones
Wireless keyboards
Although there are many technologies for these controllers these are not widely
used because of then being costly or hard to setup.
There are many types of controllers but majority of them use bluetooth as
wireless interface between the controller and computer.
The Bluetooth RF transceiver (or physical layer) operates in the unlicensed ISM
band centered at 2.4 gigahertz (the same range of frequencies used by microwaves
and Wi-Fi). The core system employs a frequency-hopping transceiver to combat
interference and fading.
We are using recycled keyboard circuit and by reverse engineering its circuit
we use it as interface with computer.
But there are other considerations for using keyboard interface to computer,one
of them is
But this is very costly as it costs 10 times more than the previous method.
3.2.1.1 OVERVIEW
Microcontroller ATmega328 *
3.35 -12 V (3.3V model) or 5 - 12 V (5V
Board Power Supply
model)
Circuit Operating Voltage 3.3V or 5V (depending on model)
Digital I/O Pins 14
PWM Pins 6
UART 1
SPI 1
I2C 1
Analog Input Pins 6
External Interrupts 2
DC Current per I/O Pin 40 mA
Flash Memory 32KB of which 2 KB used by bootloader *
SRAM 2 KB *
EEPROM 1 KB *
8 MHz (3.3V versions) or 16 MHz (5V
Clock Speed
versions)
3.2.1.3 DOCUMENTATION
Power: The Arduino Pro Mini can be powered with an FTDI cable or
breakout board connected to its six pin header, or with a regulated 3.3V or
5V supply (depending on the model) on the Vcc pin. There is a voltage
regulator on board so it can accept voltage up to 12VDC. If you're supplying
unregulated power to the board, be sure to connect to the "RAW" pin on not
4
VCC.
The power pins are as follows:
RAW For supplying a raw voltage to the board.
VCC The regulated 3.3 or 5 volt supply.
GND Ground pins.
Memory
The ATmega328 has 32 kB of flash memory for storing code (of which 0.5kB
is used for the bootloader). It has 2 kB of SRAM and 1kBs of EEPROM
(which can be read and written with the EEPROM library.
Each of the 14 digital pins on the Pro Mini can be used as an input or output,
using pinMode,digitalWrite, and digitalRead functions. They operate at 3.3
or 5 volts (depending on the model). Each pin can provide or receive a
maximum of 40 mA and has an internal pull-up resistor (disconnected by
default) of 20-50 kOhms. In addition, some pins have specialized functions:
Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL
serial data. These pins are connected to the TX-0 and RX-1 pins of the six
pin header.
External Interrupts: 2 and 3. These pins can be configured to trigger an
interrupt on a low value, a rising or falling edge, or a change in value. See
the attachInterrupt function for details.
5
Fig. 1
3.2.2 IR DECODER
Fig. 2
Description :
6
The SM0038 is miniaturized receivers for infrared remote control systems. PIN
diode and preamplifier are assembled on lead frame, the epoxy package is designed
as IR filter.
3.2.2.2 WORKING
SM00XX receives the modulated Infrared waves and changes its output. TSOP
is available in many frequency ranges like SM0038. Last two digits represent the
frequency (in Khz) of modulated IR rays, on which SM00 responds. Like for
example SM0038 reacts when it receives the IR radiation modulated at 38Khz.
Means it detects the IR which is switching On and Off at the rate of 38Khz.
SM00’s output is active low, means its output is remains HIGH when there is no
IR, and becomes low when it detects IR radiation. SM00 operates on particular
frequency so that other IRs in the environment can’t interfere, except the
modulated IR of particular frequency. It has three pins, Ground, Vs (power), and
OUTPUT PIN.
Now we know that the sensor works, we want to figure out whats being sent
right? But before we do that let's first examine exactly how data is being sent
from the IR remote (in your hand) to the IR receiving sensor (on the
breadboard)
For this example we will use the Sony power on/off IR code from a Sony
TV remote. Its very simple and commonly documented!
Lets pretend we have a Sony remote, and we can look at exactly what light
is being blasted out of the IR LED. We'll hookup a basic light sensor (like a
basic photocell!) and listen in. We won't use a decoder like a PNA4602 (just yet)
because we want to see the undecoded signal.
Basically we see pulses or IR signal. the high pulse's are when the IR LED
is transmitting and when it is low, the IR LED is off. You can measure the
frequency of the IR pulses. As you can tell, the frequency is about 37.04KHz
7
Fig. 3
The keyboard chip has 2 separate group of contact pins which connect to 2
membranes of conductive traces. Each keyboard button is connected to one pin
from each group.
Fig. 4
whenever the conductive traces touch each other current starts flowing
between these pins and the keyboard function is called in the computer for that
particular key button.
There are three separate layers of plastic that work together to detect your key
presses. Two of them are covered in electrically conducting metal tracks and
there's an insulating layer between them with holes in it. The dots you can see are
places where the keys press the two conducting layers together. The lines are
electrical connections that allow tiny electric currents to flow when the layers are
pressed tight to one another by a key moving down from above.
8
Fig. 5
When you press a key, the top and bottom contact layers come together and the
keyboard sends a signal to your computer
9
Fig.. 6
Fig. 7
10
Fig. 8
First select a key and find it on both the membranes. After finding the key
traces put the multimeter in continuity mode put one probe on the trace and the
check the continuity by placing the probe on different pins of membrane output.
Repeat the same process and find the pin of key trace on the other membrane
too. Like this repeat this for all other pins and note down pin numbers of all keys.
After finding the pins for each key we can test the keys by shorting those keys
and the keyboard button is simulated in computer
11
Whenever HIGH signal is given to arduino output pin switches ON the
Transistor and shorts the two keyboard pins and keyboard button press is
Simulated.
Fig. 9
Fig. 10
Connect the IR decoder to arduino pro mini, upload the program to record the
IR codes. Press the IR remote buttons one-by-one and note down its hex code from
the computer screen.
Record all the button HEX values and tabulate them with their respective
button names.
12
Select all the keys that are to be simulated and assign one IR remote button to
each of them. Note down all the key names their pins along with their assigned IR
remote button and its HEX value into a table.
After assigning all buttons with keys select output pins for each key and start
connecting the outputs to its respective transistor where the related pins of
keyboard are connected.
Test the circuit for any short circuits and loose connections. For testing the
project connect it to a PC and press keys on IR remote and check if the keyboard
button press is simulated in the PC.
Enclose the whole circuit in a casing and arrange such that the circuit wont
tumble around. Put the IR decoder outwards so it receives IR signals
5.CONCLUSION
This project gives a very efficient way to deal with broken or unused
keyboards and turn them into wireless PC controllers. As the construction cost
only involves microcontroller and basic components its overall cost is very low
compared to the PC controllers sold in the market.
The PC controllers in market offer only few buttons upto 6 or 7 and its cost
is also very high. Using this we can create Controller with all the buttons on a
keyboard at a much lower cost.
REFERENCE:
APPENDIX I:
13
Bill of Materials:
APPENDIX II:
14
Code for IR code Recording:
#include <IRremote.h>
IRrecv irrecv(RECV_PIN);
decode_results results;
void setup()
{
Serial.begin(9600);
Serial.println("Enabling IRin");
irrecv.enableIRIn();
Serial.println("Enabled IRin");
}
void loop() {
if (irrecv.decode(&results)) {
Serial.println(results.value, HEX);
irrecv.resume();
}
delay(100);
}
#include <IRremote.h>
15
int RECV_PIN = 11;
int enter = 8;
int up = 5;
int down = 2;
int left = 4;
int right = 3;
int escape = 6;
int f5 = 7;
int windows = 9;
IRrecv irrecv(RECV_PIN);
decode_results results;
void setup()
{
pinMode(enter, OUTPUT);
pinMode(up, OUTPUT);
pinMode(down, OUTPUT);
pinMode(left, OUTPUT);
pinMode(right, OUTPUT);
pinMode(escape, OUTPUT);
pinMode(f5, OUTPUT);
pinMode(windows, OUTPUT);
digitalWrite(enter,LOW);
digitalWrite(up,LOW);
digitalWrite(down,LOW);
digitalWrite(left,LOW);
16
digitalWrite(right,LOW);
digitalWrite(escape,LOW);
digitalWrite(f5,LOW);
digitalWrite(windows,LOW);
irrecv.enableIRIn();
}
void loop() {
if (irrecv.decode(&results)) {
if(results.value == 0x99035F8F)
{
digitalWrite(enter,HIGH);
delay(100);
digitalWrite(enter,LOW);
delay(250);
}
if(results.value == 0x43ADD2DF)
{
digitalWrite(up,HIGH);
delay(50);
digitalWrite(up,LOW);
delay(100);
}
if(results.value == 0x33DEBF3B)
{
digitalWrite(down,HIGH);
delay(50);
digitalWrite(down,LOW);
delay(100);
17
}
if(results.value == 0xCD012473)
{
digitalWrite(left,HIGH);
delay(50);
digitalWrite(left,LOW);
delay(100);
}
if(results.value == 0x3DE8F7D1)
{
digitalWrite(right,HIGH);
delay(20);
digitalWrite(right,LOW);
delay(100);
}
if(results.value == 0xD8C4577D)
{
digitalWrite(f5,HIGH);
delay(50);
digitalWrite(f5,LOW);
delay(100);
}
if(results.value == 0x5FB2B56F)
{
digitalWrite(windows,HIGH);
delay(50);
digitalWrite(windows,LOW);
delay(100);
}
if(results.value == 0xE6FEC245)
18
{
digitalWrite(escape,HIGH);
delay(50);
digitalWrite(escape,LOW);
delay(100);
}
irrecv.resume(); // Receive the next value
}
delay(10);
}
19