home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / robotics / 2389 < prev    next >
Encoding:
Internet Message Format  |  1992-11-22  |  5.6 KB

  1. Xref: sparky comp.robotics:2389 sci.electronics:19362
  2. Newsgroups: comp.robotics,sci.electronics
  3. Path: sparky!uunet!timbuk.cray.com!hemlock.cray.com!kilian
  4. From: kilian@cray.com (Alan Kilian)
  5. Subject: Measuring the acceleration of an arrow.
  6. Message-ID: <1992Nov22.203815.9006@hemlock.cray.com>
  7. Lines: 115
  8. Nntp-Posting-Host: poplar12
  9. Organization: Cray Research, Inc.
  10. Date: 22 Nov 92 20:38:15 CST
  11.  
  12. Well here's another project for you.
  13.  
  14. A friend of mine (Who shall remain nameless) always makes his hobbies
  15. complicated and scientific.
  16. He's into archery now. Well (you say to yourself) how complicated can you
  17. make archery? Pretty complicated as it turns out. He has measured the draw
  18. force/draw length relationship and made a graph. Then integrated the thing
  19. to get energy and used the weight of an arrow to get acceleration and
  20. velocity (He even knows the Horsepower of the bow). Now he wants to actually
  21. measure the acceleration of the arrow as it goes from rest to about 
  22. 200 Feet per second. This is where I cone into the picture.
  23. First we were going to tape a piece of 8mm movie film to the arrow and have
  24. a LED blinking on and off to generate light and dark strips on the film as
  25. the arrow/film flew past the LED. I tried this with a stick and gravity and
  26. I came up with a good value for the acceleration due to gravity. But it was
  27. messy and I wasn't too cool about shooting arrows in the dark and then trying
  28. to find the film and develop it.
  29.  
  30. The "There's got to be a better way" part:
  31. I thought "Hey, why not turn this thing around and have an arrow painted with
  32. black and white stripes and a photo-transistor pointing at it and record the
  33. photo-transistor's output pulses? Well I use the Motorola MC68HC811E2
  34. microcontroller for robotics stuff and it has a great interrupt/timer
  35. subsystem so I decided to use that.
  36.  
  37. Here's how it works:
  38. Q1 (The photo-transistor) is connected to one input of a LM339 voltage
  39. comparator. A variable resistor is connected to the other input. When the
  40. photo-transistor sees light the comparator is in one state (Let's say +5 Volts)
  41. when the photo-transistor sees dark the comparator switches to the other state
  42. (Like 0 Volts) The variable resistor sets the point at which the comparator
  43. switches. The comparator's output gets sent to a NAND gate which is set
  44. up to be an inverter. (You can use anything that acts like an inverter)
  45. (Even actually an inverter) And this signal interrupts the processor.
  46. The processor records the time of the event and then goes back to doing
  47. whatever it was doing. (Which was nothing as it turns out)
  48. What you get out of the processor is a list of timestamps of the interrupts.
  49. Knowing the spacing of the stripes you can then get a position/time graph.
  50.  
  51. LED2 also blinks on and off with the output of IC2 so you can set VR1.
  52.  
  53. The tricky part:
  54. The output of the photo-transistor is noisy. I was getting about 4-6
  55. interrupts for every event. So I added a hysteresis function to the comparator
  56. using R2 and R3 This prevents multiple triggering from a noisy source.
  57. You will have to choose R3 depending on your input.
  58.  
  59. Oh, the input could be from a microphone or something also.
  60. I used an Infrared photo-transistor so I wouldn't have to worry so much 
  61. about controlling the ambient light conditions. So I need an infrared LED
  62. to illuminate the arrow shaft. That explains R4 and LED1
  63.  
  64. I setup the LED and photo-detector pointing in the same direction and had a
  65. bit of cardboard in-between them so the photo-transistor couldn't see the LED.
  66. Then I dropped some sticks with lines painted on them past the pair and got
  67. some good numbers for G again.
  68.  
  69. We have yet to test the system with an actual bow and arrow.
  70.  
  71. You could use this to detect walls if you were building a robot to follow
  72. a maze. (We all know who that is don't we)
  73.  
  74. If you are interested in more details or want the software contact me
  75. via email.
  76.  
  77. I am not going to do an ASCII schematic because I do have a life.
  78. Here is a layout of the parts for the schematic:
  79. --------------------- +5 Volts DC ----------------------------------------------
  80. R1         VR1      |     R2         |                R5             R4
  81. Q1------------------IC1-------------IC2---------------LED2           LED1
  82. |                   |   R3           |                                |
  83. --------------------- Ground ---------------------------------------------------
  84.  
  85. And now start connecting things together.
  86.  
  87. Things with two ends:
  88. R1: +5,Q1(Collector)(The end without the arrow)
  89. R2: +5,IC1(Pin 1)
  90. R3: IC1(Pin1),IC1(Pin 7)
  91. R4: +5,LED1(Anode)(The end without the bar)
  92. R5: +5,LED2(Anode)
  93.  
  94. Individual connections:
  95. VR1(One end): +5
  96. VR1(Other end): Ground
  97. VR1(Center): IC1(Pin 7)
  98. Q1(Collector)(The end without the arrow): IC1(Pin 6)
  99. Q1(Emitter)(The end with the arrow): Ground
  100. IC1(Pin 3): +5
  101. IC1(Pin 12): Ground
  102. LED1(Cathode)(The end with the bar): Ground
  103. IC1(Pin 1): IC2(Pin 1)
  104. IC2(Pin 2): +5
  105. IC2(Pin 7): Ground
  106. IC2(Pin 14): +5
  107. IC2(Pin 3): LED2(Cathode)
  108. IC2(Pin 3): MC68HC11 (Or variant processor) Interrupt line
  109.  
  110. Parts list: (With Big NASTY Radio Shack part numbers where available)
  111.    Q1 NPN Infrared (Or normal) Photo-transistor SY-54PTR 276-145
  112.  LED1 Infrared Light Emitting Diode              276-143B
  113.  LED2 Normal Light Emitting Diode
  114.   IC1 LM339 Quad comparator                276-1712
  115.   IC2 7400 Quad 2-input NAND Gate
  116.    R1 10K Ohm 1/4 Watt resistor
  117.    R2 3.3K Ohm 1/4 Watt resistor
  118.    R3 100K to 1Meg Ohm 1/4 Watt resistor (I used 460K Ohm)
  119.    R4 100 Ohm 1/4 Watt resistor
  120.    R5 270 Ohm 1/4 Watt resistor
  121.   VR1 10K Ohm variable resistor
  122.  
  123. -- 
  124.  -Alan Kilian           kilian@cray.com 612.683.5499 (Work) 612.721.3990 (Home)
  125.   Cray Research, Inc.   655 F Lone Oak Drive, Eagan  MN, 55121 
  126.                         "It's based on actual math". -Dilbert
  127.