View Single Post
  #12   Spotlight this post!  
Unread 15-03-2004, 08:25
KenWittlief KenWittlief is offline
.
no team
Team Role: Engineer
 
Join Date: Mar 2003
Location: Rochester, NY
Posts: 4,213
KenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond repute
Re: Differences programming ADXRS150EBs to BEI Gyrochips?

ok, there was one more thing - the accuracy of the 26.2ms loop timing.

there is a layer of SW over our code that we dont have access to, which controls the input and output data to the operator interface - our code is synch to that by the

if (statusflag.NEW_SPI_DATA)

statement - that flag will go active once every 26.2mS - which is whats gating the 38Hz loop frequency.

I have seen posts on CD where people have put oscilloscopes out output pins and measured the loop rate by toggling a digital output on each loop, and they have reported it is dead accurate - so consistant that you cant measure the difference from loop to loop.

As it was pointed out above, if you have a bunch of code after that, with conditional branches, then that code might be executing at different rates - to get around that I put the Get_analog statement for the gyro code right after the statusflag statement - at least that will be reading the gyros at consistant fixe intervals

but at the bottom of you code is were you output new values to the PWMs, which affect the motors - if this is not done at precise intervals then you are introducting some dither into your closed loop feedback loop

but to be honest, I dont think its enough to make a difference - it will average itself out over several cycles and you wont notice any adverse effects in the operation of the bot as a whole.

BTW - if anyone is wondering if this gyro stuff really works - our bot is designed to collect and deliver small balls as our primary function - so getting the release ball is critial to our team.

we use the gyro to run straight ahead in auton mode until the IR sensor sees the beacon 90° out to one side

then we drop our suctioncup arm down to the height of the release ball while backing up straight for a second, turn exactly 90° towards the release ball, move forwards for 2 seconds at 1/3 speed (knocking the release ball off) then back up for a second, turn towards our drivers exactly 90°, raise our arm, turn our front rollers on and move full speed towards the drivers to try and catch some of those 18 balls that are now all over the field.

How well does its work? we have a finalist trophy from Pittsburgh - we only missed the ball once in the elimination rounds - and I think the other teams robot was between us and the beacon, preventing our bot from detecting it - Not sure - wish I could see a video of the last round of the finals at pittsburgh to make sure thats what it was.

Last edited by KenWittlief : 15-03-2004 at 08:34.