home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / robotics / 2675 < prev    next >
Encoding:
Text File  |  1992-12-18  |  8.3 KB  |  224 lines

  1. Newsgroups: comp.robotics
  2. Path: sparky!uunet!spool.mu.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!rpi!bray1a.its.rpi.edu!reinej
  3. From: reinej@bray1a.its.rpi.edu (John Theodore Reine)
  4. Subject: RE: Infrared Remote Controls
  5. Message-ID: <j-n2hap@rpi.edu>
  6. Nntp-Posting-Host: bray1a.its.rpi.edu
  7. Reply-To: reinej@rpi.edu
  8. Organization: Rensselaer Polytechnic Institute, Troy, NY.
  9. Date: Thu, 17 Dec 1992 22:54:10 GMT
  10. Lines: 212
  11.  
  12.  
  13.                                           
  14.   Here what I found out about Infrared Remote Controls
  15.   during a high school science fair project:
  16.   I plan to answer the following questions here:
  17.  
  18.     -What kind of signal comes out of the remote control?
  19.     -How does the component know what button was pressed?
  20.     -What happens when you keep a button pressed down?
  21.     -Some possible computer interfacing- what i did (and tried to do).
  22.  
  23. The remote control emits a series of on and off pulses of Infrared light
  24. when a button is pressed. It is the pattern of these signals that lets
  25. the component decipher which button was pressed.  There are two kinds
  26. of on pulses that it emits, a short one and a long one.  These are in
  27. a pattern from 7 to 15 pulses long, depending on the remote, that is 
  28. different for each button pressed.
  29. Here is a sample of a pattern from a Sony CD remote control.  The short
  30. pulses are represented by a S and the long pulses are represented by a B.
  31. The timing space between each pulse, long or short, is the same. 
  32. The button #'s are the actual 1,2,3.. on the remote.
  33. This is button #1
  34.  
  35.    S S S S S S S B S S S B
  36.  
  37. here it is plotted out:
  38.  
  39. ON  - - - - - - - -- - - - --
  40. off- - - - - - - -  - - - -  --
  41.  
  42. This pattern is repeated over and over again on sony remotes as
  43. long as you hold down the button.  What this pattern contains
  44. is a pattern that tells the component what button is being pressed,
  45. and another pattern that is the same for all buttons.  After 
  46. looking at a few patterns, you will see.
  47.  
  48.  
  49. Button #2
  50.  
  51.        B S S S S S S B S S S B
  52.  
  53. plotted:              (as you can see, the big pulses are twice the little
  54.             ones.  I am not sure of the timing, and do not
  55.                          trust the timing that I got since I was learning
  56.                            how to use an oscilloscope)
  57. on     __ _ _ _ _ _ _ __ _ _ _ __
  58. off____  _ _ _ _ _ _ _  _ _ _ _  ______
  59.  
  60. Now, for the pattern for Button #3, I will put a marker where the 
  61. two patterns are divided.  The pattern for the particular button 
  62. will be on the left, the other on the right.  The one on the right
  63. is slightly different for different components made by sony so
  64. they will not get confused.  The pattern for, say yamaha, is about
  65. 15 pulses long and completely different than Sony's, exept for one
  66. aspect that will be discussed.
  67.  
  68. Button #3
  69.                |             
  70.     S B S S S S S B S S S B
  71.    
  72. BUTTON #4
  73.                |
  74.     B B S S S S S B S S S B
  75.  
  76. As you can see, the pattern on the right is changing while the 
  77. one on the left is not.  Now I will replace all the B's with 1's 
  78. and all the S's with 0's and repeat the pattern for button #4.
  79.  
  80. BUTTON #4
  81.               |
  82.    1 1 0 0 0 0 0 1 0 0 0 1
  83. Now i will isolate the first pattern:
  84.    1 1 0 0 0 0            and rotate it
  85.    
  86.  
  87.    0 0 0 0 1 1 
  88.  And now we have what looks to be a binary code...
  89.   This binary number, for button #4, is 3
  90.   hmmmm...
  91.  
  92.   now let us look at the two previouse buttons, 1 and two
  93.  
  94. Button #1
  95.               |
  96.    S S S S S S S B S S S B 
  97.    0 0 0 0 0 0 0 1 0 0 0 1     
  98.   
  99.     rotate:
  100.  
  101.    0 0 0 0 0 0     and we have the binary equivalent of Button #1 = to 0
  102.  
  103. Button #2
  104.               |  
  105.    B S S S S S S B S S S B
  106.    1 0 0 0 0 0 0 1 0 0 0 1
  107.      rotate:
  108.  
  109.    0 0 0 0 0 1    and we have the binary equivalent on Button #2 = to 1
  110.  
  111. Lets skip right to button #9
  112.               |
  113.    S S S B S S S B S S S B
  114.    0 0 0 1 0 0 0 1 0 0 0 1
  115.  
  116.    rotate:
  117.    0 0 1 0 0 0   and we have the binary equivalent of Button #9 = to 8
  118.  
  119. By now, you see the pattern.  That for every numbered button on a 
  120. remote control, the reversed binary equivalent of the code is one 
  121. less than the number of the button that was pressed.  The trick is, 
  122. it is not like this on only sony remotes.  While the rest of the 
  123. pattern is longer or shorter, for every remote that I tested, this 
  124. pattern was true.
  125. Now, as long as the button was pressed down on the sony remote, it 
  126. is the complete above patterns that are sent again and again.  But 
  127. on some remotes, this pattern is sent only once, and then as long 
  128. as the button was pressed, a small trailing pattern is sent to tell 
  129. the component that the button was pressed. These kinds of remotes 
  130. are not good for practical purposes because if you aim it wrong 
  131. when you press the button, you have to repress it instead of waving 
  132. it around with the button held down to get the light to the component 
  133. as you can do with the sony.  You can tell if you have a one shot 
  134. or continuous remote by pressing a button with you hand over the 
  135. emitter, then keeping it pressed and remove your hand.  If the 
  136. component reacts then it is a continuous.
  137.     The way that I looked at the signal was to attach an infrared 
  138. detector to an oscilloscope.  With good triggering, you can get 
  139. it so that the signal appears beutifully.  The little metal box 
  140. with a detector and a chip that makes the signal constant and 
  141. perfect and wipes out all the noise from Radio Shack is better 
  142. than a plain detector.
  143.     Recap:
  144.  
  145. There is a signal coming out of the remote, say in this case a 
  146. continuous, that as long as you press the button, will repeat 
  147. over and over again
  148. remote        button #17                             _____
  149. | ________              signal                      |     |
  150.  |________|               |                         |      \
  151.             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  | tv    |
  152.        enlarged    /~\                              |_____ / 
  153.       ____________/   \_______
  154.       S S S S B S S B S S S B 
  155.       0 0 0 0 1 0 0 1 0 0 0 1
  156. rotated
  157.  
  158.       0 1 0 0 0 0   and we get binary number of 16, one less than 17, the 
  159.                     button pressed!
  160.  
  161.  
  162. If that were a one shot remote, only one ~ would be sent, with 
  163. trailing stuff. but one shot remotes are not that imortant for 
  164. hacking, but are good to know  about.  here is a list of brands.
  165.  
  166.         One Shot              Continuous
  167.         Onkyo            pioneer
  168.         carver            sony
  169.         aiwa            JVC
  170.         yamaha            mitstubishi
  171.         denon            rca
  172.         toshiba            proscan
  173.         sanyo            vcr2
  174.         zamzung            goldstar
  175.         hitachi            panasonic
  176.         nakamichi
  177. Maybe someone could tell me why there are two formats, and why use oneshot
  178. when continuous is obviously better?  Just curious.
  179.  
  180.  
  181. Interfacing with computers:
  182.  
  183.     Pure speculation on my part, but couldn't one use any kind 
  184. of digital interface, connect an IR detector, and write a simple 
  185. program to time the intervals between pulses, and the length of 
  186. pulses?  Then for output, simply have the program blink an emitter 
  187. at the same times.  I made a 24 input/output digital interface 
  188. card a while ago, and when i have time will try the above experiment.
  189. One thing that might slow me down is that currently i only have 
  190. an XT for interfacing purposes (mom and dad won't let me go inside 
  191. the at's] This could also be done thru the parallel port, too.  
  192. I have tried to do some timing on a 286, but couldn't get results
  193. that were correct because I was using an interface that was
  194. connected through a communications port and was set at the max, 9600 
  195. baud.
  196.  
  197. For analysis of the signal, an oscilloscope is the bast way.  To look at
  198. the code of one-shot remotes, you need storage.  I have an old techtronix
  199. that happens to have it.  You can also "listen" to the light by connecting
  200. an IR detector to an amplifier.    
  201.     
  202.      I have only read about the miniboard, so the following is 
  203. only what I have thought up.  In article 2083 of comp.robotics, 
  204. Fred Martin talks about the high speed bus option on the miniboard, 
  205. with a master out slave in line, and a master in slave out line. 
  206. By looking at the schematic, there are 4 lines thatare connected 
  207. to other 6811's.  The SCK line, the master clock, SS line,that 
  208. selects slaves, which is always true in the case of the miniboard, 
  209. and the MOSIand MISO lines.  Is there a way to have a master and 
  210. a slave talk over IR light? How would the clock be transmitted?  
  211. Could one binary light connection do all three lines?    
  212.         
  213. Any comments or suggestions are appreciated.
  214.                         
  215.  
  216.  
  217.                 John Reine
  218.                 email  reinej@rpi.edu
  219.                 rpi:518 217 7741
  220.                 home:617 235 6489
  221.  
  222. Keywords: 
  223.  
  224.