From: kilian@cray.com (Alan Kilian)
Subject: Measuring the acceleration of an arrow.
Organization: Cray Research, Inc.
Date: 22 Nov 92 20:38:15 CST

Well here's another project for you.
 
A friend of mine (Who shall remain nameless) always makes his hobbies
complicated and scientific.
He's into archery now. Well (you say to yourself) how complicated can you
make archery? Pretty complicated as it turns out. He has measured the draw
force/draw length relationship and made a graph. Then integrated the thing
to get energy and used the weight of an arrow to get acceleration and
velocity (He even knows the Horsepower of the bow). Now he wants to actually
measure the acceleration of the arrow as it goes from rest to about 
200 Feet per second. This is where I cone into the picture.
First we were going to tape a piece of 8mm movie film to the arrow and have
a LED blinking on and off to generate light and dark strips on the film as
the arrow/film flew past the LED. I tried this with a stick and gravity and
I came up with a good value for the acceleration due to gravity. But it was
messy and I wasn't too cool about shooting arrows in the dark and then trying
to find the film and develop it.
 
The "There's got to be a better way" part:
I thought "Hey, why not turn this thing around and have an arrow painted with
black and white stripes and a photo-transistor pointing at it and record the
photo-transistor's output pulses? Well I use the Motorola MC68HC811E2
microcontroller for robotics stuff and it has a great interrupt/timer
subsystem so I decided to use that.
 
Here's how it works:
Q1 (The photo-transistor) is connected to one input of a LM339 voltage
comparator. A variable resistor is connected to the other input. When the
photo-transistor sees light the comparator is in one state (Let's say +5 Volts)
when the photo-transistor sees dark the comparator switches to the other state
(Like 0 Volts) The variable resistor sets the point at which the comparator
switches. The comparator's output gets sent to a NAND gate which is set
up to be an inverter. (You can use anything that acts like an inverter)
(Even actually an inverter) And this signal interrupts the processor.
The processor records the time of the event and then goes back to doing
whatever it was doing. (Which was nothing as it turns out)
What you get out of the processor is a list of timestamps of the interrupts.
Knowing the spacing of the stripes you can then get a position/time graph.
 
LED2 also blinks on and off with the output of IC2 so you can set VR1.
 
The tricky part:
The output of the photo-transistor is noisy. I was getting about 4-6
interrupts for every event. So I added a hysteresis function to the comparator
using R2 and R3 This prevents multiple triggering from a noisy source.
You will have to choose R3 depending on your input.
 
Oh, the input could be from a microphone or something also.
I used an Infrared photo-transistor so I wouldn't have to worry so much 
about controlling the ambient light conditions. So I need an infrared LED
to illuminate the arrow shaft. That explains R4 and LED1
 
I setup the LED and photo-detector pointing in the same direction and had a
bit of cardboard in-between them so the photo-transistor couldn't see the LED.
Then I dropped some sticks with lines painted on them past the pair and got
some good numbers for G again.
 
We have yet to test the system with an actual bow and arrow.
 
You could use this to detect walls if you were building a robot to follow
a maze. (We all know who that is don't we)
 
If you are interested in more details or want the software contact me
via email.
 
I am not going to do an ASCII schematic because I do have a life.
Here is a layout of the parts for the schematic:
--------------------- +5 Volts DC ----------------------------------------------
R1         VR1      |     R2         |                R5             R4
Q1------------------IC1-------------IC2---------------LED2           LED1
|                   |   R3           |                                |
--------------------- Ground ---------------------------------------------------
 
And now start connecting things together.
 
Things with two ends:
R1: +5,Q1(Collector)(The end without the arrow)
R2: +5,IC1(Pin 1)
R3: IC1(Pin1),IC1(Pin 7)
R4: +5,LED1(Anode)(The end without the bar)
R5: +5,LED2(Anode)
 
Individual connections:
VR1(One end): +5
VR1(Other end): Ground
VR1(Center): IC1(Pin 7)
Q1(Collector)(The end without the arrow): IC1(Pin 6)
Q1(Emitter)(The end with the arrow): Ground
IC1(Pin 3): +5
IC1(Pin 12): Ground
LED1(Cathode)(The end with the bar): Ground
IC1(Pin 1): IC2(Pin 1)
IC2(Pin 2): +5
IC2(Pin 7): Ground
IC2(Pin 14): +5
IC2(Pin 3): LED2(Cathode)
IC2(Pin 3): MC68HC11 (Or variant processor) Interrupt line
 
Parts list: (With Big NASTY Radio Shack part numbers where available)
   Q1 NPN Infrared (Or normal) Photo-transistor SY-54PTR 276-145
 LED1 Infrared Light Emitting Diode  			276-143B
 LED2 Normal Light Emitting Diode
  IC1 LM339 Quad comparator				276-1712
  IC2 7400 Quad 2-input NAND Gate
   R1 10K Ohm 1/4 Watt resistor
   R2 3.3K Ohm 1/4 Watt resistor
   R3 100K to 1Meg Ohm 1/4 Watt resistor (I used 460K Ohm)
   R4 100 Ohm 1/4 Watt resistor
   R5 270 Ohm 1/4 Watt resistor
  VR1 10K Ohm variable resistor

-- 
 -Alan Kilian           kilian@cray.com 612.683.5499 (Work) 612.721.3990 (Home)
  Cray Research, Inc.   655 F Lone Oak Drive, Eagan  MN, 55121 
                        "It's based on actual math". -Dilbert