Go to Post Diversity means diversity in ideas too. Some of the robots from the singapore competition might have employed strategies or ideas that we may not even have come up with in North America. - J Flex 188 [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 30-01-2010, 16:47
nabioullinr nabioullinr is offline
Registered User
FRC #1073
 
Join Date: Jan 2010
Location: Hollis, NH
Posts: 17
nabioullinr has a spectacular aura aboutnabioullinr has a spectacular aura aboutnabioullinr has a spectacular aura about
Which Compass to Use?

I want to implement a compass in the robot (I understand it is very sensitive to magnetic fields, but I still want to experiment); which compass sensor is recommended?
I couldn't really find any useful info other than the HiTechnicCompass header file (http://www.hitechnic.com/cgi-bin/com...on&key=NMC1034 ?) which seems to have an I2C interface.
  #2   Spotlight this post!  
Unread 30-01-2010, 16:56
basicxman basicxman is offline
Emily Horsman
FRC #2200 (MMRambotics)
Team Role: Programmer
 
Join Date: Oct 2007
Rookie Year: 2007
Location: Burlington, Ontario
Posts: 971
basicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant future
Send a message via AIM to basicxman Send a message via MSN to basicxman Send a message via Yahoo to basicxman
Re: Which Compass to Use?

The HiTechnic Compass plugs directly into the i^2c port on the digital sidecar. Programming it in C++ with the WPI library is incredibly simple, see program below.

Here's the WPI doc on it:
http://www.virtualroadside.com/WPILi...c_compass.html

Code:
#include "WPILib.h"

class CompassBot : public SimpleRobot {

	HiTechnicCompass compass; // Define compass object

public:
	float angle;

	CompassBot(void):
		compass(1) // Initialize to i2c port 1
	{
		GetWatchdog().SetExpiration(0.1);
	}

	void Autonomous(void) { }

	void OperatorControl(void) {
		while (IsOperatorControl()) {
			angle = compass.GetAngle(); // Get the angle (returns float)
			printf("Current Angle: %f", angle); // Print angle
		}
	}

};

START_ROBOT_CLASS(CompassBot);
  #3   Spotlight this post!  
Unread 30-01-2010, 18:16
EHaskins EHaskins is offline
Needs to change his user title.
AKA: Eric Haskins
no team (CARD #6 (SCOE))
Team Role: College Student
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Elkhorn, WI USA
Posts: 998
EHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond reputeEHaskins has a reputation beyond repute
Send a message via MSN to EHaskins
Re: Which Compass to Use?

I second the HiTechnic compass. I found it to have a normal accuracy of +/-2-3 degrees, and a worst case accuracy of +/- 5 degrees. Your results may very, but I found the only issue to be the lag getting info from the sensor.

If you need quick response times you should look at using the included gyro. It is almost as simple to configure and use as the compass.
__________________
Eric Haskins KC9JVH
  #4   Spotlight this post!  
Unread 01-02-2010, 00:37
nickmagus's Avatar
nickmagus nickmagus is offline
Registered User
AKA: Nick Clayton
FRC #0008 (Paly Robotics)
Team Role: Programmer
 
Join Date: Dec 2007
Rookie Year: 2007
Location: Palo Alto, Califorinia
Posts: 56
nickmagus is an unknown quantity at this point
Send a message via AIM to nickmagus
Re: Which Compass to Use?

I will third the HiTechnic but might I sugest a gyro. The gyro only floats by a couple degrees throughout the match it you mount it flat and it isn't as sensative to interference.
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
Which operating system do you use/want to use? neutrino15 Programming 17 12-01-2008 00:05
Which gear pitch to use Someone Technical Discussion 11 02-11-2005 12:50
Which shaft encoder to use? Jeff Waegelin Electrical 22 18-06-2005 03:57
Which browser do you use? jonathan lall Website Design/Showcase 17 11-07-2004 17:20
Which motors should i use??? archiver 2001 2 23-06-2002 23:10


All times are GMT -5. The time now is 12:36.

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