A Mini Project Report on
PC REMOTE CONTROLLER
Submitted by
T. HARI PRIYA
- 16315A0216
S. SANDEEP
- 16315A0218
S. SHAIK SHA VALI - 16315A0220
Under the Guidance of
Ms. K. PRASANYA ( Assistant prof., )
Department of Electrical & Electronics Engineering
Sreenidhi Institute of Science & Technology Yamnampet, Ghatkesar, Hyderabad – 501301.
2017 - 2018
Department of Electrical & Electronics Engineering Sreenidhi Institute of Science & Technology
CERTIFICATE
This is to certify that the project report on “PC Remote Controller” is a bonafide work carried out by T. Haripriya, S. Sandeep and S. Shaik sha vali in the partial fulfillment for the award of B’Tech Degree in Electrical and Electronics Engineering at Sreenidhi Institute of Science and Technology, Hyderabad affiliated to Jawaharlal Nehru Technological University, Hyderabad.
III
Ms. K. Prasanya Assistant Professor
Iterrnal Guide
Dr. P. Ravi Babu Professor and Head of
Electrical and Electronics Engg.
IV
ACKNOWLEDGEMENT
It is our privilege to express our sincerest regards to our project coordinator, Ms. K. Prasanya, for her valuable inputs, able guidance, encouragement, whole-hearted cooperation and constructive criticism throughout the duration of our project.
We deeply express our sincere thanks to our Head of Department Dr Prof. for encouraging and allowing us to present the project on the topic “PC Remote Controller “at our department premises.
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
This project involves the design and construction of “PC Remote Controller” using Arduino pro mini development board with Atmega328P microcontroller.
Modern PC wireless controllers are very costly and its functions are limited to controlling slides or just basic Functions. This project uses recycled keyboard chips and control these keyboard circuits using microcontroller and get desired functions on the keyboard by using IR decoder to receive signals from IR remote.
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
FIGURE NO.
DESCRIPTION
PAGE NO.
1
Arduino Pin Diagram
5
2
IR Decoder Pin Diagram
5
3
IR output signals
6
4
Keyboard Chip
7
5
Keyboard Internal Working
7
6
Block diagram of project
8
7
Schematic Diagram of Project
8
8
Keyboard Internal Membranes
9
9
Control circuit for Keyboard
9
10
IR Receiver circuit
10
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.
The project introduces a new concept of operating computer from TV remote instead of Keyboard. Usually a PC/ laptop require a keyboard to control the applications. This becomes tedious during presentations hence with the help of a TV remote as a cordless keyboard one can easily operate PC from anywhere.
The project requires an IR sensor interfaced to microcontroller that receives the coded infrared rays sent by TV remote. The microcontroller controls the keyboard circuit by controlling the trigger circuit. Thus the all operations of a keyboard can be performed by using TV remote.
1.1
PROJECT AIM
To design and construct a wireless PC remote controller that can simulate any button press on keyboard.
1.2
PROJECT OBJECTIVE
To make wireless keyboard controller which is cost efficient and Eco-friendly. Provide wide range of buttons and features.
2.LITERATURE REVIEW 2.1
HISTORY OF WIRELESS PC CONTROLLERS 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.
2.2
PC REMOTE IMPLEMENTATION PLATFORMS
There are many types of controllers but majority of them use bluetooth as wireless interface between the controller and computer.
Bluetooth technology is a short-range wireless communications technology to replace the cables connecting electronic devices, allowing a person to have a phone conversation via a headset, use a wireless mouse and synchronize information from a mobile phone to a PC, all using the same core system. 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. Bluetooth devices are managed using an RF topology known as a "star topology." A group of devices synchronized in this fashion forms a piconet, which may contain one master and up to seven active slaves, with additional slaves that are not actively participating in the network. (A given device may also be part of one or more piconets, either as a master or as a slave.) In a piconet, the physical radio channel is shared by a group of devices that are synchronized to a common clock and frequency-hopping pattern, with the master device providing the synchronization references. 2
3.METHODOLOGY 3.1
PRELIMINARY CONCIDERATIONS
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
Teensy USB Development Board: The Teensy is a complete USB-based microcontroller development system, in a very small footprint, capable of implementing many types of projects. All programming is done via the USB port.
But this is very costly as it costs 10 times more than the previous method.
3.2
SYSTEM DESIGN
3.2.1 ARDUINO PRO MINI DEVELOPMENT BOARD
3.2.1.1
OVERVIEW
The Arduino Pro Mini is a microcontroller board based on the ATmega328. It has 14 digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, an on-board resonator, a reset button, and holes for mounting pin headers. A six pin header can be connected to an FTDI cable or Sparkfun breakout board to provide USB power and communication to the board. 3
The Arduino Pro Mini is intended for semi-permanent installation in objects or exhibitions. The board comes without pre-mounted headers, allowing the use of various types of connectors or direct soldering of wires. The pin layout is compatible with the Arduino Mini. There are two version of the Pro Mini. One runs at 3.3V and 8 MHz, the other at 5V and 16 MHz. The Arduino Pro Mini was designed and is manufactured by SparkFun Electronics.
3.2.1.2
TECHNICAL SPECIFICATIONS
Microcontroller Board Power Supply Circuit Operating Voltage Digital I/O Pins PWM Pins UART SPI I2C Analog Input Pins External Interrupts DC Current per I/O Pin Flash Memory SRAM EEPROM Clock Speed
3.2.1.3
ATmega328 * 3.35 -12 V (3.3V model) or 5 - 12 V (5V model) 3.3V or 5V (depending on model) 14 6 1 1 1 6 2 40 mA 32KB of which 2 KB used by bootloader * 2 KB * 1 KB * 8 MHz (3.3V versions) or 16 MHz (5V versions)
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. Input and Output 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. PWM: 3, 5, 6, 9, 10, and 11. Provide 8-bit PWM output with the analogWrite function. SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support SPI communication, which, although provided by the underlying hardware, is not currently included in the Arduino language.
5
Fig. 1
3.2.2 IR DECODER 3.2.2.1
PINOUT AND DESCRIPTION
Fig. 2
Description : The SM0038 is an alternative to popular TSOP1738 IR receiver.
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
3.3 KEYBOARD CHIP 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
The matrices are actually an interface technique. It can be used to interface inputs like the PC keyboard keys, but also to control multiple outputs like LEDs. According to this technique, the I/O are divided into two sections: the columns and the rows. You can imagine a matrix as an excel sheet. Here is a 4 x 4 matrix
4.DESIGN AND IMPLEMENTATION 4.1
BLOCK DIAGRAM AND SCHEMATIC
9
Fig.. 6
Fig. 7
4.2
TRACING THE BUTTONS OF KEYBOARD MEMBRANE
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.
4.3
BUILDING INTERFACE CIRCUIT FOR ARDUINO AND KEYBOARD
After finding the pins for each key we can test the keys by shorting those keys and the keyboard button is simulated in computer
To control this keyboard using micro controller we use transistor as a switch between the two pins of keyboard.
Give the micro controller output pin to base of transistor using 1Kohm resistor..
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
4.4
RECORDING THE HEX CODES OF IR REMOTE
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.
4.5
ASSIGNING HEX CODE TO A KEYBOARD BUTTON
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.
4.6
TESTING THE COMPLETE DESIGN AND CASING
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:
Component Name
Identification in Circuit
Vendor/Distribu Manufactur tor er part /Manufacturer Number Name
Resistor
Rn
Ohmite
ON1065E-R 1K, 1/4 W, 58 50 Volt
Arduino pro mini
M1
Sparkfun
DEV09218
3.3/5 V, 500mA
SM0038
IR1
Vishay telefunken
TSOP1738
5v, 1.5mA
Transistor
Tn
Mouser
APPENDIX II:
14
BC547
Value
-
Code for IR code Recording:
#include
int RECV_PIN = 11;
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); }
Code for PC Remote Controller:
#include 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