Showing posts with label TSOP. Show all posts
Showing posts with label TSOP. Show all posts

Friday, 22 July 2011

SIRC Part II - Arduino

More Parameters:
  Frame Timing:
             The signal to be transmitted is encoded to a form known as a "Frame", which represent 13 bits including start bit. Each bit in the frame is a combination of high and low voltage levels (high followed by low). The pulse-width of each type of bit is listed below:
        Pulse-Width: T = 0.6ms
        Start Bit: (2.4 + 0.6) ms = 3 ms = 5T
        '0' Bit: (0.6 + 0.6) ms = 1.2 ms = 2T
        '1' Bit: (1.2 + 0.6) ms = 1.8 ms = 3T
  Repeat Rate:
            Each frame is repeated atleast 3 times during transmission at an interval of 45 ms.
 What next?
           We have necessary data to start our project. We'll do the following tasks to gain practical experience on this:
                 * Develop an algorithm for encoding the signal to be transmitted.
                 * Produce the encoded signal with the help of a micro-controller.
                 * Transmit the signal through an IR LED in the form of IR.
                 * Recieve the signal using an IR TSOP receiver.
                 * Develop an algorithm for decoding the encoded signal.
                 * Display decoded data on the monitor.


A Platform to Move on: Arduino, a stable, famous and easy-to-understand Platform.  
      What is Arduino?
                   Arduino is a prototyping platform(AVR uC with some generic circuitry) with its own Software Development IDE(Arduino). We dont study much about Arduino here. Instead, We just use it as a tool to test our knowlege. The pictoral representation of Arduino Duemilanove is given below:
         The above figure will give you a good idea about the board. Either Atmega 168 or Atmega 328 can be used along with this board. It has 14(0 - 13) digital pins and 6(14 - 19) analog pins. We use one of those to produce the required signal. We connect an IR LED to that pin and convert the signal into IR form.
To know more about the features of Arduino Duemilanove, Click here.

Arduino IDE:
          Arduino software is one of most user-friendly software built so far. The programs created using this IDE are called as "Sketches". General structure of sketch is

//beggining of sketch
//global declarations goes here
//function definitions also goes here
void setup()
{    
     // here initial settings are done.
     // This function is executed only once
}
void loop()
{
     // here exact set of instructions are written, which will be performed again
     // and again by the controller
}
//end of sketch

All the standard functions to be used can be studied from the following link: Click Here....
Coming up next:
       * Encoding and Decoding codes
       * Practical model
       * Building a project ( An Universal Remote)

Tuesday, 21 June 2011

SIRC Part I

BASICS
  
Wireless infrared communications refers to the use of free-space propagation of light waves in the near infrared band as a transmission medium for communication. Signals sent are encoded using a an encoding algorithm in the transmitter circuitry and is decoded and the essential information is obtained at the receiver part. IR communication is a basic form of wireless communication. It's frequency range is 32-60 KHz. There are several protocols for IR communication. Some are Sony's SIRC, Phillips RC5 protocols.

 SIRC (Sony Infra Red Communication Protocol), is an IR communication protocol for controlling SONY equipment. It consists of three versions based on bit length (12, 15, 20 bit). For convenience, we here discuss about 12 bit version of SIRC. Here Pulse Width Modulation (PWM) is made use of.

  The 13 bits are divided into 12 data bits and 1 start bit. The start bit indicates the start of the information and the following 12 bits indicate the information itself. The data bits are further classified into address and command. The seven bits followed by the start bit represent the command (from LSB to MSB) (ie) in reversed manner. The following 5 bits represent the address in reversed manner. 


What is a command and address?

Command:
    It is more of a self defining term. It consists of a digital word that will server as a command to the receiving system. The following table gives the commands and their digital values in a Sony IR remote.


Command
Function
0
Digit key 1
1
Digit key 2
2
Digit key 3
3
Digit key 4
4
Digit key 5
5
Digit key 6
6
Digit key 7
7
Digit key 8
8
Digit key 9
9
Digit key 0
16
Channel +
17
Channel -
18
Volume +
19
Volume -
20
Mute
21
Power
22
Reset
23
Audio Mode
24
Contrast +
25
Contrast -
26
Colour +
27
Colour -
30
Brightness +
31
Brightness -
38
Balance Left
39
Balance Right
47
Standby



Address:
   It is a digital word that represents the address of the receiving system. Sony has unique address for its products. The following table gives the digital address for various Sony equipment.


AddressDevice
1TV
2VCR 1
3VCR 2
6Laser Disc Unit
12Surround Sound
16Cassette deck / Tuner
17CD Player
18Equalizer


How does a signal to be transmitted look like?

   The following figure gives a rough idea about how the signal looks like:


  The data bits to be transmitted consist of marks and spaces. The marks are the high regions in terms of voltage while spaces are the low regions. Digital high (1) is represented by a mark of 1.2 ms (milli seconds) and digital low (0) is represented by a mark of 0.6 ms ( PWM). The time period of a start bit is 2.4 ms. A space is always represented by 0.6 ms low with respect to voltage.


What is PWM?

       PWM (pulse width modulation) is an encoding process where variation of width of each pulse is used to show the variation in the actual data.


Basic materials for transmission:
      We use an IR LED to transmit PWM signal and an IR receiver to receive the transmitted signal. The receiver always inverts the signal after which the decoding process is done.


 Coming Up :

    * More parameters

    * A platform to move on

    * Encoding and Decoding codes

    * Practical model

    * Building a project ( An Universal Remote)

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites More