|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
1) The accelerometer gives the acceleration in "milligs" anyone knows how they are deriving this acceleration equation plus what is "milligs" because i know that acceleration is measure in m/s^2 but haven't heard of "milligs".
2) Also, Anyone knows how can i get distance from the milligs unit? 3) Also, if i want to fuse Kevin's 2006 accelerometer code, 2006 gyro code, and and the CAM code how would i do it? 4) Any one knows how to wire the photoswitch sensors all i see is 2 wires sticking out of the sensor how would i connect it to RC? and where Digital or Analog? |
|
#2
|
||||
|
||||
|
Re: Programming Questions
Quote:
|
|
#3
|
|||
|
|||
|
Re: Programming Questions
Quote:
2. You need to integrate twice. Basically, that looks like this. Code:
int velocity; int position; int accel = /*Get the acceleration from the accelerometers */ velocity += accel * TIME; /*TIME is how frequently the timer you are running the interrupt on is called. If you're alternating the gyro and accelerometers, this'll be timer time / # of things you're checking. */ position += velocity * TIME; /*With the gyro, you may actually need to be doing some trig to do this the way you want */ 4. There's two parts. One's a receiver, one's the source. What we did was have them share power and ground, and you only need to use one of the two signal wires on the receiver. However, there's some weird thing that needs to be done to it to send 5v (It sends 0.01 if you just solder it.) I wasn't involved in that though. I'll try to find out for you. |
|
#4
|
|||
|
|||
|
Re: Programming Questions
Quote:
Thanks, --Quentin |
|
#5
|
||||
|
||||
|
Re: Programming Questions
I would advise against using the accelerometer for computing distance. You have to double-integrate it, which will greatly amplify any inaccuracies of the data. You're better off using the gear tooth sensors, since you can hook them up to your drive train and get a direct computation of distance.
|
|
#6
|
|||
|
|||
|
Re: Programming Questions
Quote:
--Quentin |
|
#7
|
||||
|
||||
|
Re: Programming Questions
Quote:
(it's just an idea) |
|
#8
|
|||
|
|||
|
Re: Programming Questions
Quote:
I think we'll stick to encoders. |
|
#9
|
||||
|
||||
|
Re: Programming Questions
Quote:
|
|
#10
|
||||
|
||||
|
Re: Programming Questions
Quote:
|
|
#11
|
||||||
|
||||||
|
Re: Programming Questions
Quote:
In the past, we've always measured distance using an encoder connected to a non-powered wheel in the center of the robot. If you do not have crab steering, a single wheel along the centerline (left-right centerline, that is) should provide enough accuracy for you to do what you want. Ideally, the wheel should be located at the turning center of your robot, but if it is a little forward or backward from that point, you will be okay. The most important thing is that it is centered side-to-side; otherwise you will think you're moving when you're turning in place. |
|
#12
|
|||
|
|||
|
Re: Programming Questions
Can anyone explain me in simple words what integrate accelerometer means and how it actually works? and how can i integrate my accelerometer?
Also, the photoswitch sensors are pretty kewl this year. However, its bit challenging to get it working! As soon as i get it working i will post code and diagramsLast edited by magical hands : 25-01-2006 at 18:44. |
|
#13
|
|||
|
|||
|
ya this has nothing to do with the subject but I need help trying to post or what ever it is that you have to do to put a question on the website...
thanks |
|
#14
|
||||
|
||||
|
Re: Programming Questions
Quote:
You will be using something called Riemann sums to integrate. Someone on your team who has taken calculus should be able to tell you more about the theory of it if you want to know more. For what you're doing, it boils down to doing: (velocity)+=(acceleration)*(time since last reading) (distance)+=(velocity)*(time since last reading) Think of it this way: If you're moving 60mph in a car, and you drive for 1/2 hour, you'll go 30 miles. Likewise, if you're accelerating at 2 ft./sec for 10 seconds, then you're moving at a rate of 20 ft./sec. |
|
#15
|
|||
|
|||
|
Re: Programming Questions
Thanks for the explanation now i get it!
![]() |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Acceleration Sensor Connected, but values are odd.... | Leav | Electrical | 7 | 04-02-2005 15:28 |