Thread: EDUbot Sensors
View Single Post
  #12   Spotlight this post!  
Unread 19-12-2002, 13:38
seanwitte seanwitte is offline
Registered User
None #0116
Team Role: Engineer
 
Join Date: Nov 2002
Location: Herndon, VA
Posts: 378
seanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant futureseanwitte has a brilliant future
Send a message via AIM to seanwitte
gyro and banner optical sensor

GYRO:

The gyro is an analog sensor whose output represents the rate of change of rotation around its axis. The axis is through the center, parallel to the mounting bolts. Connect the gyro to one of the analog inputs on the RC and start up the dashboard program. Hold it in the palm of your hand with the bolts facing outwards. When its not moving, the output is 127. Now twist your wrist to the like you're turning the volume knob on the stereo. The value will increase in one direction and decrease in the other, proportional to the rate of rotation. When you stop moving, no matter what the final orientation is, it goes back to 127.

In your code, you will need to grab the value for the analog input you want to use. Say analog1 for arguments sake. Analog1 maps to the variable sensor1 in the default program. Make sure it is not commented out (line 50). Next, go down to the input constant definition section and enable sensor1 by setting the constant c_sensor1 to 1 (line 225). Add sensor1 to the SERIN command by inserting the variable where it belongs, based on the comments in the code.

Now, in your program you can use the gyro input to do something interesting.

BANNER OPTICAL SENSORS:

<edited>
several people posted a link to the data sheets in another thread:
http://www.chiefdelphi.com/forums/sh...threadid=15538
</edited>

These require 12V power, so I haven't really played with them on the EDUbot. They fire out modulated infrared light and look for the reflection. Banner's web site lists it as having about 6.5m range for reflective sensing, more than double that if you use a second sensor as a beacon. You connect it to a binary input on the RC, the value will be 1 or 0 depending on whether it sees the reflection.

PHYSICAL CONNECTIONS:

The analog inputs on the robot controller have 3 pins, +5V, signal, and ground from left to right. The binary inputs have two pins, signal and ground. Its looking for ground at the input pin, so DO NOT connect a voltage across the pins. These are compatible with female crimp connectors for radio controlled models, but they are expensive. You can order comparable parts from jameco.com:

3 pin connector housing, part number 100811, $0.27 each
2 pin connector housing, part number 157382, $0.27 each
female crimp pins, part number 100765, $0.11 each

I would buy 50% more pins than connectors, it takes practice to do it and you'll mess a lot up. If you don't have a crimper just get a servo extension from a hobby shop and you won't have to worry about wiring it.

For the 3 pin connectors I bought 3 conductor bulk servo wire from a hobby shop, about $0.50 per foot. For the 2 pin connectors I used the cheapest speaker wire I could find.

Last edited by seanwitte : 20-12-2002 at 10:55.