Thread: General Q's
View Single Post
  #8   Spotlight this post!  
Unread 23-02-2005, 01:25
Ryan Cumings's Avatar
Ryan Cumings Ryan Cumings is offline
Programmer and University Rejected
#0134 (Team Discovery)
Team Role: Programmer
 
Join Date: Jan 2004
Rookie Year: 2000
Location: Pembroke, NH
Posts: 65
Ryan Cumings is an unknown quantity at this point
Send a message via AIM to Ryan Cumings
Re: General Q's

Quote:
Originally Posted by Kevin Sevcik
The Digital Ins can be used for any number of things. Most commonly, they are used for two things, limit switches and shaft encoders.

A limit switch is a microswitch attached to some part of the robot such that it closes or opens whenever the part reaches some point in its travel where you want it to stop. for instance, when a telescoping arm reaches maximum extension. Then you watch the value of the digital in and disable the motor in one direction when it changes.

Shaft encoders are small opto-electric devices that send n pulses everytime its shaft turns one revolution. This is useful for determining the distance your robot has traveled or its speed.

There's tons of other uses out there as well.

Also, you can easily use a victor like a spike. Write your program to set the particular PWM to 0, 128, or 255 for reverse, off, and forward, respectively.

Edit: also, also, you could use a digital out as a sort of PWM by pulsing it in the program. however, the current PWMs already have all that code taken care of for you, so you might as well use them.

Finally, the PWM cable is just a name. It could also be called a servo cable, etc. Most all the I/Os on the robot have +5(?)V, Ground, and Data pins of various sorts. The only thing that changes is the use of the data pin, so it's convenient to make them all standardized to the 3-pin PWM cable connectors.
The spikes are really two relays. When in the off state both outputs are tied to ground. If you ONLY set relay1_fwd then M+ is tied to the positive voltage (12 v anyone?) and M- is still tied to ground. If you ONLY set relay1_rev then M- is tied to 12v and M+ is still tied to ground. If you set both relay1_fwd and relay1_rev then M+ and M- are both tied to 12v. Taking advantage of this you can run a double solenoid using only one spike.
__________________
Suddenly being rejected from college feels right during the build season. Now I am a mentor.