View Single Post
  #1   Spotlight this post!  
Unread 09-02-2010, 21:24
apalrd's Avatar
apalrd apalrd is offline
More Torque!
AKA: Andrew Palardy (Most people call me Palardy)
VRC #3333
Team Role: College Student
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Auburn Hills, MI
Posts: 1,347
apalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond repute
Re: Soldering the accelerometer help

Do you mean accelerometer or encoder?
Accelerometers measure the speed of an object.
Encoder measures speed of a rotating shaft
Accelerometer is like a gyro, but linear and not rotary


If you are mounting it to a shaft on your transmission and it has a colored disc with a bunch of lines on it, it is an encoder. You wire the +5, GND, and A to a PWM cable (+5 to Red, GND to Black, A to White) and plug it in to a DIO port on the DSC. You wire the B to the white wire of another PWM cable and connect it to another DIO port, preferably one next to the other one. If the software thinks it driving backwards when it is driving forward, swap the A and B channels (by physically swapping the two PWM cables or in software).

If you actually mean an accelerometer, then the +5, GND, and A would go to 1 PWM cable and the B would go to another, and they would go to the first two analog channels on the first analog board (those are the only ones you can use accelerometers or gyros on). A would measure movement in one direction, B would measure movement in a direction perpendicular to it.

If you are trying to make an acurate auton. program, I suggest the rotary encoders. They don't drift like analog sensors do. For rotation, I suggest using the gyro, not trying to determine rotation from the two encoders.
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor

"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack