Android Phone Universal Remote Control

terrificbeepedMobile - Wireless

Dec 10, 2013 (3 years and 10 months ago)

78 views






ECE 445


Senior Design Project Proposal



Android Phone Universal Remote Control



Matt Madeja


Xun Jian


09/08/2010











Introduction

Title:
For our senior design project we have chosen to create a universal remote control on the Android
smart
phone. The concept of a universal remote has helped in solving the problem of having different
remote controls for different things around the house. Our project will serve to extend the “All in One”
capability of a smart phone to include universal remote
functionality. This project will use code
learning technology as opposed to code entering to ensure that every button is functional when using
the smartphone remote control.


This project will be applied specifically to the Android based phones which do n
ot have an IR
LED located on the phone. The system will include an Android phone and an IR transceiver box that
will consist of a microcontroller, IR LEDs, a photodiode and connective circuitry. Bluetooth
technology will be used to allow the phone to commu
nicate with the transceiver box so that no wires
are necessary. The box will be powered by either a wall outlet or battery power. This device will also
add code learning ability to the typical universal remote technology. Instead of entering manufacturing
codes to enable the remote, which often results in non
-
functioning buttons, this system will be able to
learn control codes directly from the remote control.

In a typical household, there are many remote controls for different electronic appliances. It i
s a
waste of time to search for the remote controls in order to use them and also a waste of money to put
batteries in all of them. Won't it be nice to be able to control every electronic appliance right from one's
cell phone? We are excited about bringing

this functionality to the Android phone and are looking
forward to programming IR signal processing algorithms on the Android platform.


Objective:

The purpose of the project is to convert a smart phone into a universal remote control for
electric devices
. This device will provide a plethora of benefits and features to the user.

Benefits:

1.

The user can use the cell phone to control electronic devices from any room in his/her home.

2.

The user can customize the appearance of his/her virtual universal remote c
ontrol.

3.

The user will not need to look up manufacturer codes to enable button functionality.

Features:



The virtual remote control GUI can be readily installed on any Android cell phone.



The GUI will automatically connect the cell phone to the associated h
ardware device via
Bluetooth.



The Learning Mode allows the user to program the Android cell phone with any remote control
that he/she owns.



The use of Bluetooth Radio technology will remove the necessity to operate the electronic
devices in direct line of

sight as is the case of conventional remote control.



The IR transceiver can be battery powered so that the system can be completely wireless.

Design

Block Diagram



Block Description

Android OS Graphical User Interface (GUI):

The GUI will be built on
the Android platform and run on any Android based smartphone. The intuitive
GUI will allow the user to organize all the learned remote control signals on a customized layout where
the user can set the name and appearance of each signal button. In addition,

the software will save
digital IR code decoded by the IR controller unto the Android phone. It also sends out the saved digital
IR code to the IR controller to be transmitted. The GUI issues commands to the IR controller via the
Bluetooth API supported by

the Android platform.


Bluetooth Serial Adapter:

This is a commercial preprogrammed micro
-
controller that implements the Bluetooth protocol stack
and outputs serial data. This device will provide the communication link between the Android Phone
and the I
R controller. This device enables the phone, which contains a Bluetooth interface, to
communicate with the IR transceiver. Data sent from the Bluetooth module on the phone will be
received by the Bluetooth Serial Adaptor. The adaptor will output the data a
s bit
-
bang to the
microcontroller.


IR Controller:

The IR Controller will serve to both send and receive IR signals. A PIC 18F5420 microcontroller will
process the signal from the photodiode when learning a code, drive the IR LED when transmitting a
cod
e and manage communication of code data with the Android phone. First, to learn codes, the
controller converts the analog signals from the IR transmitter into timing data to be stored in the
Android phone. Furthermore, when transmitting codes, the microcon
troller will read the timing data
from the phone via the Bluetooth module and output a digital signal on the IR LED representing the
desired control code.


Amplifier:

The amplifier will consist of two transistor circuits. One transistor will amplify cur
rent to drive the IR
LED and the other will amplify the voltage from the photo diode. As the microcontroller may not be
able to supply an output pin with the necessary current to drive the IR LED, this amplifier will use the
digital logic from the microco
ntroller to saturate an NMOS transistor to allow DC current from the
batter/wall to drive the LED. The second transistor is needed because, depending on the range of the
host remote control and the photo diode, the output from the photo diode may not be hi
gh enough to be
considered as a logic one by the microcontroller. This transistor will amplify the signal to be more
sensitive to the wide range if IR intensity incident on the photodiode.


IR Transmitter and Receiver:


These are IR LED and IR photodiode
that transmits and receives IR signals. They interface with the IR
controller via the Amplifier circuit.


Performance Requirement

The different parts of the project must meet specific requirements to make this project practical.
First, the IR Controller mu
st be able to decode any IR code from any manufacturer. This means that
three criteria must be met. First, the photodiode must be able to receive various wavelengths from the
different IR LED spectrums. Second, the IR LEDs must be able to transmit in the n
ecessary spectrum
to control the device. Finally, the microcontroller must be able to accommodate the different carrier
frequencies and modulation schemes used by different manufacturers.


In addition, the Android OS GUI must be user friendly. It must pre
sent itself as aesthetically
pleasing as well as be very easy to navigate. Most importantly, the software must successfully
communicate with the IR Controller.


Finally, the device must work in practical situations. These factors include the ability to wo
rk in
rooms of various sizes, transmit data successfully within a 15 foot range, and learn codes from remotes
within a <4 inch range.


Verification

Testing Procedures:
Ultimately the device functionality will be verified by its ability to control an
elect
ronic device with the code learned from the remote control of the device. For more quantitative
verification, we will test the “Learn Code” and “Transmit Code” features individually. First, to test the
“Learn Code” feature we will

measure how closely the s
ignal captured by the IR Controller matches
the actual code transmitted by the remote control. To do this, we will capture the output of the
photodiode using a digital logic analyzer. The logic analyzer will sample the ~40KHz IR code at
>5MHz and this will

be used as the “actual code”. This waveform will be compared with the waveform
generated using the timing signals captured by the microcontroller. The timing data will be obtained by
extracting data from MCU memory during debugging. Next, the quality of t
he transmitted signal will
be measured by connecting the pin of the output signal on the microcontroller to a digital logic
analyzer. The error will be calculated in the same way as the receiver test in that the difference in
transition timings will be cal
culated, and we will determine if the error is within tolerable range. The
final product will be a “Signal Match Percentage” vs “Remote Control Signal” table to show how
closely the output signal matches the input signal for different remote functions and
electronic
appliances.


Another test will verify that the code is properly learned while having the remote at a >15 foot
range. The system will attempt to learn code signals from the remote as the remote is moved away from
the IR transceiver. The increase

in distance will result in a lower intensity IR signal incident on the
photo diode and therefore a lower voltage will be captured by the microcontroller. This data will be
used to construct a “Receiver Voltage” vs “Remote Control Distance” graph which wil
l reveal the max
range between the remote and the IR transceiver that the code will be learned with 100% accuracy.


Tolerance Analysis:
The strength of the analog output from the IR receiver can affect the quality of the
decoded IR signal. Therefore we pl
an to determine the sensitivity of the strength of the receiver output
to the distance of a remote control. The data will be presented in a “Receiver Voltage” vs “Remote
Control Distance” graph. The data obtained will be used to inform the end users the op
timum distance
to place the remote control during the learning mode of the device.


Cost and Schedule

Cost:

We plan to spend 15 hours per person each week on the project for the following 11 weeks. At a rate of
$35 per hour, total labor cost will be:



T
able 1 is a cost summary of the necessary parts needed to develop the project.

Part

#

Cost

NMOS Transistor

2

$1.00

Biasing Resistors

6

$1.00

IR LED

1

$2.00

IR Photo Diode

1

$3.00

PIC 18F4520

1

$3.25

Bluetooth Serial Adapter

1

$25.00

DC Transf
ormer

1

$6.00

SRAM

1

$2.50

Voltage Regulator

1

$1.00



Total Cost

$44.75



Table 1


The total Cost for parts and labor:


$14,437
.50+$44.75 = $14,482.2
5















Schedule:

ID
Task Name
Start
Finish
Duration
Sep
2010
9
/
5
9
/
12
9
/
19
2
5
d
9
/
12
/
2010
9
/
8
/
2010
Research Parts
2
d
9
/
12
/
2010
9
/
11
/
2010
Order Parts
3
8
d
9
/
20
/
2010
9
/
13
/
2010
Design Circuit
5
9
d
10
/
18
/
2010
10
/
10
/
2010
Build Board
19
d
10
/
9
/
2010
9
/
21
/
2010
Test Circuit
6
7
8
9
10
11
28
d
10
/
10
/
2010
9
/
13
/
2010
Program Microcontroller
3
d
9
/
15
/
2010
9
/
13
/
2010
Plan
6
d
9
/
21
/
2010
9
/
16
/
2010
Write
19
d
10
/
10
/
2010
9
/
22
/
2010
Debug
71
d
11
/
17
/
2010
9
/
8
/
2010
Program Android
3
d
9
/
10
/
2010
9
/
8
/
2010
Install Desktop Software
5
d
9
/
15
/
2010
9
/
11
/
2010
Learn Environment
13
12
14
14
d
9
/
29
/
2010
9
/
16
/
2010
Build GUI
4
d
10
/
1
/
2010
9
/
28
/
2010
Learn Bluetooth
32
d
11
/
2
/
2010
10
/
2
/
2010

Write Software
4
Oct
2010
Nov
2010
9
/
26
10
/
3
10
/
10
10
/
17
10
/
24
10
/
31
11
/
7
11
/
14
17
23
d
11
/
27
/
2010
11
/
5
/
2010
Write Final Report
1
Stevo
Stevo
&
Matt
Stevo
&
Matt
Stevo
&
Matt
Stevo
&
Matt
Matt
Steve
&
Matt
Stevo
&
Matt
Stevo
&
Matt
Stevo
Stevo
Stevo
Stevo
&
Matt
Group Member
16
15
23
d
11
/
15
/
2010
10
/
24
/
2010
Stevo
&
Matt

Debug Software