View Full Version : Soldering the accelerometer help
LavaEagle
09-02-2010, 20:58
My team understands how to wire and where to wire and want to figure out the programming part of it.
However we do not know exactly how to attach the wires correctly to the accelerometer board and then to the sidecar.
Especially since it needs 4 wires. (5v, scl, sda, Ov)
Thank you!
Team 2660
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.
Al Skierkiewicz
09-02-2010, 21:30
Lava,
There is a really nice Sensor manual available for download on the First website in the 2010 robot documents area. You can find it under Section 8, The Robot. It has most everything you will need and a few links to the manufacturer's websites to help you along. The answer to your question is involved but the manual will answer many of your questions.
http://www.usfirst.org/roboticsprograms/frc/content.aspx?id=452
Alan Anderson
09-02-2010, 23:08
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...
The ADXL345 accelerometer in the 2010 Kit of Parts uses SPI or I2C digital communication. It was the 2009 accelerometer that had analog outputs. I think the I2C connection is the easiest to use, and the LabVIEW support for it is perfect.
samir13k
10-02-2010, 00:26
The ADXL345 accelerometer in the 2010 Kit of Parts uses SPI or I2C digital communication. It was the 2009 accelerometer that had analog outputs. I think the I2C connection is the easiest to use, and the LabVIEW support for it is perfect.
I actually attempted to use the I2C port first with little success, so i went to the SPI ports and had it working just fine... No guarantees i didnt have any errors, we all make some, but i triple checked the I2C and couldnt debug the problem. at the same time i didnt fuss to much about it considering that i still had it functioning...
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.