Go to Post Warning: this reply is just an approximation of what I meant to convey - engineers cannot possibly use just written words to express what they are thinking. Raul - Raul [more]
Home
Go Back   Chief Delphi > Technical > Electrical
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 23-05-2007, 14:37
Dave Flowerday Dave Flowerday is offline
Software Engineer
VRC #0111 (Wildstang)
Team Role: Engineer
 
Join Date: Feb 2002
Rookie Year: 1995
Location: North Barrington, IL
Posts: 1,366
Dave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond repute
Re: Interfacing a digital compass with the RC

Quote:
Originally Posted by Al Skierkiewicz View Post
The I2C reference is a car serial control protocol as I remember.
You're probably thinking of CAN. I2C a very short range, low speed serial interface and designed to be a simple interface between microprocessors/microcontrollers and various peripherals. The uses of I2C are basically the same as SPI - in some ways they could be considered to be competing standards (though many microcontrollers will support both interfaces). It is typically used to connect chips that are all on the same PCB, and isn't that hard to implement in software if necessary.
Quote:
Originally Posted by Al Skierkiewicz
FYI so you don't get too discouraged, we spent some long hours trying to debug the compass while working on a stainless steel conference room table. Rack that up to late hours at the end of the build. It took us a while to realize where the error was coming from.
Al, I'm going to step in here and defend the team that worked on this. Nate and the rest of the firmware team explored the compass as one possible solution to determining orientation, and we all knew that the room we were working in wasn't a good location to test in. We never wasted long hours trying to figure anything like that out. We tested it in many locations, including at our field and in the model shop. The bottom line is that the compass we were using at the time (can't remember the model #) was totally ineffective. When installed on the robot it didn't report anything useful at all (the readings would change with fluctuations in motor speed, which is what we were afraid of). Adjusting the reading with the high-current pulse or whatever method that one used wouldn't have made any difference (the compass we were using was not I2C - as I recall it output an analog signal).

The year this took place was 2003. We explored a bunch of options and ended up going with a gyro and integrating to get rotational position. This worked perfectly for the 15 seconds of autonomous, but unfortunately it would not be stable enough for Kelly's needs (where it would need to maintain correct orientation for basically the whole match).

As for reading the PWM input, sometimes you can take the PWM output and run it through a simple RC circuit to convert it to an analog value that you could read directly with the RC.
  #2   Spotlight this post!  
Unread 23-05-2007, 17:55
Qbranch Qbranch is offline
wow college goes fast.
AKA: Alex
FRC #1024 (Kil-A-Bytes)
Team Role: Alumni
 
Join Date: Apr 2006
Rookie Year: 2006
Location: Indianapolis
Posts: 1,174
Qbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond repute
Re: Interfacing a digital compass with the RC

Quote:
Originally Posted by Dave Flowerday View Post
As for reading the PWM input, sometimes you can take the PWM output and run it through a simple RC circuit to convert it to an analog value that you could read directly with the RC.
Give me a pwm signal, a timer (internal peripheral) and an external interrupt (portb) and i'll time you a pulse...

Have had to do this this year and in the past for getting distance data out of an ultrasonic sensor...

-q
__________________
Electrical Engineer Illini
1024 | Programmer '06, '07, '08 | Driver '08

Last edited by Qbranch : 23-05-2007 at 17:56. Reason: Yeah... commas separate list items in coloquial english... :o
  #3   Spotlight this post!  
Unread 23-05-2007, 18:13
Kelly Kelly is offline
Registered User
FRC #1418
 
Join Date: Jan 2007
Location: VA
Posts: 78
Kelly has much to be proud ofKelly has much to be proud ofKelly has much to be proud ofKelly has much to be proud ofKelly has much to be proud ofKelly has much to be proud ofKelly has much to be proud ofKelly has much to be proud ofKelly has much to be proud of
Re: Interfacing a digital compass with the RC

How hard is that?
  #4   Spotlight this post!  
Unread 23-05-2007, 18:16
Qbranch Qbranch is offline
wow college goes fast.
AKA: Alex
FRC #1024 (Kil-A-Bytes)
Team Role: Alumni
 
Join Date: Apr 2006
Rookie Year: 2006
Location: Indianapolis
Posts: 1,174
Qbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond repute
Re: Interfacing a digital compass with the RC

Algorithm wise its easy peasy. Hardware wise, you'll need to know how to use interrupts, and how to use a hardware timer... nothing too bad.

If you'd like to try, i'll write up how you do it, just don't want to take the time to write it till i'm sure somebody needs it. (call me lazy )

-q
__________________
Electrical Engineer Illini
1024 | Programmer '06, '07, '08 | Driver '08
  #5   Spotlight this post!  
Unread 23-05-2007, 22:11
Dave Flowerday Dave Flowerday is offline
Software Engineer
VRC #0111 (Wildstang)
Team Role: Engineer
 
Join Date: Feb 2002
Rookie Year: 1995
Location: North Barrington, IL
Posts: 1,366
Dave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond repute
Re: Interfacing a digital compass with the RC

Quote:
Originally Posted by Qbranch View Post
Give me a pwm signal, a timer (internal peripheral) and an external interrupt (portb) and i'll time you a pulse...
Yes, that's not hard to do at all. I was simply offering a potential alternative solution in case the original poster isn't comfortable using timer interrupts and such. Occasionally things which seem most obvious to one person can be very daunting to another.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Where can I get a digital compass sensor? EHaskins Technical Discussion 6 26-09-2007 18:33
Interfacing with Allen-Bradley Sensors doubleslash Electrical 9 31-01-2006 14:11
I2C Digital Compass Programming CyberWolf_22 Programming 7 03-01-2005 00:20
Interfacing a PC with last year's Robot Controller punarhero Technical Discussion 2 21-04-2004 00:05
Interfacing a second Micro to the RC Matt Reiland Programming 3 08-06-2003 00:11


All times are GMT -5. The time now is 11:50.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi