Docstoc

final

Document Sample
final Powered By Docstoc
					Group #8

Shawn Hillers
Marlon Maduro
Dzuy Nguyen
   Project Overview
Radio Frequency



                  Infrared
        Project Requirements
 Stand Alone Power Supply

 Detect Phone Ring

 Compatible With Sony Products

 Wireless Communication Link At Least 10 Feet

 Multi-room Capability
                   SENIOR DESIGN - INTELLIGENT REMOTE CONTROL

                                                     “INTELLIGENT REMOTE CONTROL”
                                                      AUDIO SILENCER FOR INCOMING
                                                              PHONE CALLS




                 PHONE DETECTOR,
                                                                                                       CONTROLLER AND
                 TRANSMITTER, AND
                                                                                                    INFRARED TRANSMITTER
                    RECEIVER




                                                                                                                           INFRARED TRANSMITTER
RING DETECTOR                              RF RECEIVER                          INFRARED DECODING
                                                                                                                              TO OUTPUT DEVICE




                                                                                 CONTROLLER AND
RF TRANSMITTER                        STAND-ALONE POWER                                                                     STAND-ALONE POWER
                                                                                  LEARNING LOGIC




   POWER                                                                        STAND-ALONE POWER
                                                                                                                           BLOCK DIAGRAM LEGEND

                                                                                                                                      MAIN
                                                                                                                                     PROJECT
                                                                                                                                      DETECTOR,
                                                                                                                                    TRANSMITTER,
                                                                                                                                    AND RECEIVER
                                                                                                                                     CONTROLLER
                                                                                                                                    AND INFRARED
                                                                                                                                       DEVICE
                                                                                                                                      Shawn
                        Marlon Maduro is responsible for both chassis designs                                                         Hillers

                                                                                                                                      Marlon
                                                                                                                                      Maduro

                                                                                                                                       Dzuy
                                                                                                                                      Nguyen




                                                                                                                                                Page 1
Ring Detector
 Requirements of Ring Detector
 Needs to detect ring signal when phone is
    only ringing.
   Retains the ability to use the phone line.
   Can not interfere with the phone signal.
   Has to have low power consumption.
   Needs to be in a small package.
      Fairchild Semiconductor
               MCT2E
 Phototransistor Optocoupler
 Reliable
 $.49/ a piece
 Used in many designs that need to detect
  telephone ring
 Easy setup
 Low external part count
 Internal Contents: 1) L.E.D.
                     2) B.J.T.
Schematic using the MCT2E
Wired Ring Detector
  Problems with Ring Detector
 Capacitors were not able to hold the signal
  up at 5V
 Needed a way to hold the signal up to
  transmit a strong signal
              Texas Instruments
                NE555 Timer
   Integrated Circuit
   Reliable
   Free samples
   Very versatile chip that can be used in astable or
    monostable operation
   Used in many designs
   A lot of information about different setups
   Easy setup
   Low external part count
       Monostable Operation
 Triggered Monostable Operation
 Triggered By Input Pulse
 Outputs a single pulse of a fixed time
  duration when triggered
 Period of time determined by RC circuit
 Period of time: T=1.1 x R x C (in seconds)
  =1.1 x 470Kohms x 22uF = 11.374 sec.
Schematic using 555 Timer
                          Relay
 Single Pole, Single Throw
    (SPST) Relay Module
   Normally Open Type
   Rated 1 Amp at 5 Volt DC
   Contains an internal coil
    resistance of 250 ohms
   Nominal Current: 20 mA
   Placed on the output of
    the 555 timer
   Used to isolate the
    MCT2E and 555 timer
    circuit from the Tx Circuit
   Cost: $2.69
Initial Setup of the Ring Detector




    Telephone Line Divider

                             Telephone Wall Cover
Final Setup of the Ring Detector




12‟ Corded Telephone Line Divider   Telephone Line Modular Outlet
    Radio Frequency
Transmitter and Receiver
Requirements of the RF Tx and Rx
 Ability to transmit signal through walls.
 Low power consumption.
 Easy setup and low external parts count.
 Small package size.
         Micrel MICRF102
 Single chip transmitter IC
 Frequency range 300Mhz to 470Mhz
 Automatic antenna tuning
 Highly reliable
 Low external parts count
 Low standby current
 Free samples
 Gerber files to mill boards
Schematic of the MICRF102




     Reprinted with permission from Micrel, Inc.
Picture of the MICRF102
            Micrel MICRF001
 Single chip receiver IC
 Frequency range 300Mhz to 440Mhz
 Typical range over 100 meters with
    monopole antenna
   Automatic antenna tuning
   Low external part count
   Low power consumption
   Gerber files to mill boards
Schematic of MICRF001




   Reprinted with permission from Micrel, Inc.
Picture of the MICRF001
MICRF001 Evaluation Board
    Problems with Micrel Parts
 Soldering surface
  mount 603 footprint
  capacitors and
  resistors
 Acquiring all parts from
  manufacturers
 Gerber files had
  problems with milling
  machine
 Only able to acquire
  transmitter evaluation
  board
     Implemented RF Tx and Rx:
    RX-4 RF Remote Relay Combo
 Ming TX-99 K2 Transmitter Module
 Ming RE-99 RF Receiver Module
 RX-4 Relay Module
 Cost: $49.95
Ming TX-99 K2 Transmitter Module
 2-Button RF Remote Control
 Amplitude Modulated Radio Frequency of
    300MHz
   4-Bit Holtek HT12E Encoder Integrated Circuit
   2 Bits of Data
   Range In Excess
    of 200 feet
   Power Supply:
    12 Volt DC Battery
                           Reprinted with permission from Reynolds Electronics
Schematic of Ming TX-99 K2




        Reprinted with permission from Reynolds Electronics
    Ming RE-99 RF Receiver Module
 Receives Amplitude
    Modulated Radio Frequency
    of 300MHz
   Holtek HT12D Decoder
   Power Supply: 9 Volt
    Battery
   Contains a 5 Volt Regulator
   Antenna: 50 Ohm Coaxial   Reprinted with permission from Reynolds Electronics

    Cable RG58 cut to 9.36”
    (¼ Wavelength)
Schematic of Ming RE-99




      Reprinted with permission from Reynolds Electronics
           RX-4 Relay Module
 Double Pole, Double
  Throw (DPDT) Relay
  Module
 2-Position Screw
  Terminals
  (Normally Open and
  Normally Closed)
 Power Supply: 9 Volt
  Battery
 Contains a 5 Volt      Reprinted with permission from Reynolds Electronics

  Regulator
Schematic of RX-4 Relay Module




         Reprinted with permission from Reynolds Electronics
How the Ring Detector, RF Tx, and
      RF Rx come together
 Signal from telephone is interpreted by the
    MCT2E optocoupler
   Signal goes high on the b.j.t. side of the MCT2E
   555 timer in monostable mode goes high for a
    time of about 11 secs
   Timer closes a relay for the duration of about 11
    secs
   Relay closes the switch of the Ming TX-99 K2
   Signal is sent to the Ming RE-99
   Ming RE-99 signal causes the RX-4 Relay
    Module to close the switch
Infrared Research

MCU – Marlon Maduro
IR Decoder – Dzuy Nguyen
                  Infrared
 Wavelength Approx. 940 nm
 IR Lies Between Visible And Microwave
 IR Can Not Be Seen By Naked Eye
             IR Applications
 Consumer Electronics (Remote Control)
     TV
     VCR
     DVD player
     CD player
 Night Vision
 PDA Communication
  Consumer Electronics IR Rx
 Possible Issues
   False Operation By Ambient Light
   Noise From External Systems
 Solutions
   IR Rx Has BPF Centered At 40KHz To Reject
    Noise
   Device Codes
  Consumer Electronics IR Tx
 Lack Of “Regulation” For IR Tx Standards
 IR Tx Signals Sent With A 40KHz carrier
 Three Main Protocols
   REC-80
   RC-5
   SIRC
                 REC-80
 Essentially A Space Coded Modulation
  Scheme
 Logic State Is Determined By Width Of
  Low Space
 Used By Panasonic
           550    1650     1650




            0      1        1
                    RC-5
 Essentially A Shift Coding Modulation
  Scheme
 Logic State Is Determined By Width Of
  Space And High Pulse
 Used By Phillips
          550       1100       550




                0          1         0
                     SIRC
 Essentially A Pulse Width Modulation
  Scheme
 Logic State Is Determined By Width Of
  High Pulse
 Used By Sony
         600   600     1200   1200




         0     0        1     1
             System Addressing
S    S   T   C0 C1 C2 C3 C4 C5 A0 A1 A2 A3 A4

Example:

• 14 bits system addressing
• „S‟ bits (start bit) to regulate the gain control
• „T‟ bit (toggle bit) toggles with every new data signal
• „A‟ bits (address bits) to send the signal to a specific
   entertainment device (e.g. TV, VCR, DVD, etc.)
• „C‟ bits (commands) are the commands that tell the specific
   entertainment device to mute, pause, channel up/down,
   volume up/down, play, etc.
             Sony Protocol
    2.4 ms   0.4 ms 0.6ms 0.6ms 0.6ms   1.2ms   1.2ms

                                                        …..
 Header Is 2.4ms High Pulse Followed By a
  0.4ms Low Space
 The Signal Is Transmitted 3 Times With
  Each Press Of A Button.
 SIRC Is The Most Documented Protocol
  Of The Three Major Encoding Schemes
 Sent With 40KHz Carrier
             Microcontrollers

• IC8001 by Innotech

• PIC16C54

• PIC16F84 / PIC16F84A
            IC 8001 by Innotech
            “The Learning Chip”
•   Fully Integrated circuit
•   Learns all common IR protocols
•   Have its own remote control code library
•   40 pin DIP package

We are not going to use
• No information about                             with permission of Innotech Inc


• Price $ 39.99
• And only orders from business customers
                                               .
                    PIC16C54
•   8-bit
•   12 I/O ports
•   512 bytes EPROM/ROM
•   Operate on 40MHZ clock input
•   18 pin CERDIP package
•   UV Erasable

Samples from Microchip                with permission of Microchip Inc.




We are not going to use!!!!!!!!!!!!
       PIC16F84 / PIC16F84A
•   8-bit
•   13 I/O Pins
•   64 bytes EEPROM
•   1K Flash program memory (words)
•   Operate on 10 MHz clock input / PIC16F84A 20 MHz
•   18 pin DIP package

Samples from Microchip Inc.


                                      with permission of Microchip Inc.
     IR Decoder Research



 Researched By Dzuy Nguyen
              IR Decoders
 Must Be Able To Receive IR Signals
  Modulated At 40 KHz.
 Sharp GP1U52X (Radio Shack 275-137)
 Vishay TSOP1140
 Also Considered Rohm RPM7140, Could
  Not Find!
             Sharp GP1U52X

 IR Passband Of 980nm.
 Bandpass Filter
  Centered At 40KHz.
 $2.76, Discontinued
 4.7 to 5.3 Operating
  Voltage
 5 mA Current Dissipation
           Vishay TSOP1140

 IR Passband Of 950nm.
 Bandpass Filter
  Centered At 40KHz.
 Free! (Samples), But
  Usually $3
 3.3V Operating Voltage
 5 mA Current Dissipation
Implementation
Power Supply for the Ring Detector
           and MCU



 Responsible For By Marlon Maduro
        Ring Detector / MCU
           Power Supply
Components:
• 9 Volt battery
• Schottky barrel diode (1N5817)
      protects against reverse polarity
• 2* Electrolytic Capacitors (16V / 22F)
• Voltage Regulator (7805)
      Input voltage between 6.5V to 15V
      regulate the voltage to ~ + 5V
Power Supply Schematic

 9V

                                U2
       D1
                       1               3
                           IN    OUT
      1N5817                                       +

               C1                          C2      5V
               22 uF        UA7 805        22 uF
                                                   -
Initial Ring Detector / MCU
     Power Supply Tests
Final Power Supply Hardware
   Ring Detector / MCU
       Power supply
results on the oscilloscope
Current Consumption Analysis




 Ring Detector, RF Rx and MCU powered
  by 9V battery with charge of 625 mAh
 RF Tx powered by 12V A23 battery with
  charge of 40 mAh
      MCU Implementation



 Responsible For By Dzuy Nguyen
      MCU Overview
 RF Rx – after signal received,
closes relay
 Relay enables 5V pull-up, triggers
MCU which mutes the TV
 At the end of phone call, press
reset, opens relay, triggers MCU to
un-mute TV
 Written in CCS PIC C…
      264 lines (615 lines ASM)
      32% EEPROM; 19-21% RAM
 Not going to decode IR signals
        MCU Overview Cont.
 Blue LED for power status indicator
 Orange LED lights when IR LED is
  transmitting
 IR signal integrity good up to ~20 feet
      Functional Diagram
                                  Relay from RF Rx


                                                    IDLE




                                           NO      LEVEL
                                                 CHANGE ON
                                                             RESET
                                                     B4


                                                       YES



                                                   MUTE/
                                                 UNMUTE TV
                                                   (ISR)




Level triggered interrupts available on pins B4 through B7
B4 Level Trigger Interrupt
    Initial State Of Pin RB4 Is Logic 0 (GND)

                                                                       Logic 1 (+5V)



                                                                       Logic 0 (GND)



                                      Level Change, Interrupt Occurs


 ISR tells MCU to send “MUTE”
 Once user is done talking on the
phone, press reset on base unit to
open relay, which triggers interrupt
and un-mutes TV
                      ISR Code Excerpt ISR()
                                    Define
                         Tell MCU to expect
                         RB Level Triggered
#int_rb                  Interrupt          #int_rb
void mute_ISR();                                 void mute_ISR()
…                                                  {
void main()                                        static char check;
{                                                  check = port_b4;
port_b4 = 0;                                       got_interrupt = true;
got_interrupt = false;                             send_command();
…                                                  }
 while(1)
    {                          Initialize port

      disable_interrupts(int_rb)
      ;
      if (got_interrupt == true)                 Disable Interrupts
         {                                       to prevent false
         got_interrupt = false;
                                                 triggering
         }
      enable_interrupts(int_rb);
      }
  }
                 SIRC Protocol




IR Remote Control Signal Begins With A Header Bit. For 12 bit,
the device code is 5 bits long (15 bit – 8 bit device code). Then
the command code is 7 bits wide for both 12 and 15 bit encoding.
Sony televisions are “old” products, therefore they use 12 bit
encoding scheme.
Obtained codes from 3 independent sources.
                 MUTE!!!
 Send out LSB first!
 For 12 Bit , packet consists of
Header – 0010100 - 10000
Total Transmission Cycle = 19 ms.
 Place a 25ms space between each packet
  to make each packet duration equal to
  44ms.
 Each transmission sends out three
  packets
                           Logic Functions
                                 void send_logic1()
void send_pulse(int npulses)       {
  {                                                   void send_command()
                                   send_pulse(48);
  for (i=0; i <= npulses; i++)                          {
                                   delay_us(255);
    {                                                   x=3;
                                   delay_us(255);
    output_high(PIN_B3);                                output_high(PIN_A0);
                                   delay_us(90);
    delay_us(13);                  }
    output_low(PIN_B3);                                  do
    delay_us(12);                                          {
                                 void send_logic0()
    }                                                      send_header();
                                   {
  }                                send_pulse(24);
                                                             if(command_bit0 == 1)
                                   delay_us(255);
                                                                {
                                   delay_us(255);
                                                                send_logic1();
 T=1/F; 1/40K = 25 µs              delay_us(90);
                                                                }
                                   }
 48 * 25 µs = 1200 µs                                        else
                                                                {
                                 void send_header()
 24 * 25 µs = 600 µs               {
                                                                send_logic0();
                                                                }
 96 * 25 µs = 2400 µs              send_pulse(96);
                                   delay_us(245);
                                   delay_us(145);
                                   }
              MCU Schematic (Rev. A)
                                                                                                   5V



                                                                                                        R2
                                                                                                        50
                                                U1

                                           17                           6              R1
                                           18   RA0          RB0 /INT   7                               Q1
                                            1   RA1              RB1    8                               2N2222 A
                                  Y1            RA2              RB2                   10 0
                         5V                 2                           9                     5V
R5             5V   5V                      3   RA3              RB3    10
       R6                     14       8
10 0                                            RA4 /T OCKI      RB4    11
       10 0
                                           16                    RB5    12
                     R4       1        7   15   OSC1 /CLKIN      RB6    13
                     4.7K                       OSC2 /CLKOUT     RB7                 R3
 D2      D3                                                                                              D1
LE D    LE D                                4                                       4.7K
                                                MCLR                                                     IR LED
                                           14
                                                VDD

                                                      PIC16 F84 _P



                                                                             Relay from RF Rx
  Revisions From Initial Design
 Replaced 4 MHz XTAL with 20 MHz VCO
 Moved blue PWR LED to pin A1
 Added orange LED to pin A0
  - Lights up when IR LED is Transmitting
 Isolated IR LED on port B
  - IR LED needed 100 mA for max. efficiency
 Added BJT to amplify current on pin B3
  - Design to give IR LED ~100mA; draw ~10 mA
  from MCU to the base
 Added 4.7K pull-up resistor on pin B4
Initial MCU Hardware
Final MCU Hardware
Bill Of Materials
Testing and Design Verification
            40 KHz Carrier
 Made function called send_pulse() to
  generate a 40 KHz Carrier.
 For a ideal 50% duty cycle, one period
  consists of a logic high for 12.5 µs
  followed by logic low for 12.5 µs
 Instead, we made one period consist of a
  logic high for 13 µs followed by logic low
  for 12 µs
                  40 KHz Code
void send_pulse(int npulses)
  {
  for (i=0; i <= npulses; i++)             Specifies how many
    {                                      pulses are to be sent
    output_high(PIN_B3);
    delay_us(13);
                                     Tells MCU to send
    output_low(PIN_B3);              logic high for 13 µs
    delay_us(12);
    }
  }                        Tells MCU to send
                              logic low for 12 µs
40 KHz Verification
                Clock Issues
 Initially used a 4 MHz crystal oscillator, but too
  noisy and too unstable
 Replaced with a 20 MHz Voltage Controlled
  Oscillator
 Pros:
  - More reliable
  - Leads to more accurate timing
 Cons:
  - More expensive
  - Larger in size
20 MHz Verification
send_command() Verification
       void send_command()
          {
          x=3;
          output_high(PIN_A0);
       if(command_bit0 == 1)
                 {
                 output_high(PIN_A0);
                 delay_ms(200);
                 delay_ms(200);
                 delay_ms(200);
                 delay_ms(200);
                 output_low(PIN_A0);
                 }
               else
                 {
                 output_high(PIN_A1);
                 delay_ms(200);
                 delay_ms(200);
                 delay_ms(200);
                 delay_ms(200);
                 output_low(PIN_A1);
                 }
                 ………
                 output_low(PIN_A0);
                 output_high(PIN_A1);
                 --x;
                 }while(x>0);
send_command() Verification

• Logic 1 lights up LED on pin A0
• Logic 0 lights up LED on pin A1
• Read 12 bits (one packet) per cycle
• At the end of each packet, I made both
LED‟s turn on
• Verified 3 cycles
• After verification, replaced code to send
proper logic functions (i.e. send_logic1() and
send_logic0().)
           PIC Programming
 Where is the PICStart
  Plus?
 Epic Programmer
  Programmer $59.95
  ZIF Socket $34.95
  Power Supply $7.95
 FAST!!! Parallel faster
  than PICStart‟s serial
  programmer
Programmer Setup
              Chassis



 Responsible For By Marlon Maduro
                  Chassis
 2* chassis
  - The Ring detector / RF TX chassis
  - The RF RX / IR TX chassis
 As compact as possible
  - Length = 3      inch
  - Width = 2 9/16 inch
  - Height = 2 12/16 inch

 Easy access to battery
 Chassis for the Ring Detector and
               RF TX
 12.5 feet long phone wire to connect to the
  home phone jack
 1* phone jack, so the consumer can
  connect the home phone
 2* push buttons
  - Power switch, so the consumer can
    turn “on” / “off” the Ring Detector/RF Tx
  - The Reset button
 Chassis for the Ring Detector and
           RF TX (cont.)
 3* LEDs
 - First LED (1/8 ”) is for power indicator, to
   let the consumer know that it‟s “on” or “off
 - Second LED (1/8 ”) is the ring indicator;
   the LED light up when the phone ring
 - Third LED (1/8 ”) is the send indicator;
   the LED light up when the RF TX send
   the signal to the RF RX
Chassis for the Ring Detector and
          RF TX (cont.)
  Chassis for the RF RX / IR TX
 1* “on” / “off” switch, so the consumer can turn
  on/off the RF RX / IR TX
 3* LEDs
  - First LED (1/8 ”) is for power indicator, to
    let the consumer know that it‟s “on” or “off
  - Second LED (7/32 ”) is the IR TX;
    to send Infrared signal to a Sony TV
  - Third LED (1/8 ”) is the IR Tx indicator, it lights
  up when the IR LED is sending the mute
  function
Chassis for the RF RX / IR TX
            (cont.)
Final chassis's
Administrative Content
                         Progress Chart
100


90


80


70


60
                                                                                               Completed
50
                                                                                               To Do
40


30


20


10


 0
      Ring Detector   RF Tx/Rx   Power Supply   Microcontroller   Part Acquisition   Chassis
                      Budget




Estimated $200   Self Funded
QUESTIONS???
Demonstration Time!!!

Please Proceed to
the Senior Design
Lab!!!

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:27
posted:9/15/2011
language:English
pages:97