Author Topic: Digital Compass  (Read 2240 times)

0 Members and 1 Guest are viewing this topic.

Offline vidamTopic starter

  • Supreme Robot
  • *****
  • Posts: 423
  • Helpful? 1
  • Robotronics.org
Digital Compass
« on: January 30, 2008, 07:26:19 PM »
I'm trying to figure out which compass module will have the least trouble interfacing with the Robostix which is based on Atmel. I'm not using I2C on the Robostix. I'm using the SPI interface. I'm really confused. Does the digital compass go into the A/D input channels? Can I query the values of the digital compass through my laptop connection to this micro-controller?

Also there are a couple of models:

Sparkfun:
1) http://www.sparkfun.com/commerce/product_info.php?products_id=236
Price: $84.95

2) http://www.sparkfun.com/commerce/product_info.php?products_id=7915
Price: $59.95

Acroname:
http://www.acroname.com/robotics/parts/R117-COMPASS.html
$59.00

The Acroname has an I2C interface while the Sparkfun-1 has an SPI interface and no additional circuitry is necessary.
Sparkfun-2 looks like it might be easier to interface to the Robostix but I'm not sure exactly how to do it.

My question is which one will interface most easily with my Robostix based on Atmel. I'm using the Robostix in standalone mode so I am thinking to use SPI mode and the Sparkfun compass might work best.

« Last Edit: January 30, 2008, 07:59:06 PM by vidam »

Offline frank26080115

  • Supreme Robot
  • *****
  • Posts: 322
  • Helpful? 2
Re: Digital Compass
« Reply #1 on: January 30, 2008, 08:42:54 PM »
Just so you know, SparkFun sells a cheaper model which is analog
http://www.sparkfun.com/commerce/product_info.php?products_id=761
only $25
plug that into your ADC pins, and read the voltage and use that to calculate direction

Offline Ro-Bot-X

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,431
  • Helpful? 25
  • Store: RoBotXDesigns.ca
Re: Digital Compass
« Reply #2 on: January 31, 2008, 12:53:13 AM »
Devantech CMPS03 that Acroname sells also has PWM (output1) that you can pass it through a RC filter and have an analog voltage. Or just count the pulse width to stay in the digital realm.
Check out the uBotino robot controller!

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,657
  • Helpful? 169
    • Society of Robots
Re: Digital Compass
« Reply #3 on: February 04, 2008, 10:35:30 PM »
Im confused on what you are trying to do . . .

The easiest way to interface with a sensor is using ADC.

Then if you want your laptop involved, use UART.

(hope that gets you in the right direction)

Offline vidamTopic starter

  • Supreme Robot
  • *****
  • Posts: 423
  • Helpful? 1
  • Robotronics.org
Re: Digital Compass
« Reply #4 on: February 05, 2008, 12:22:01 AM »
Admin,

To program the Atmel Robostix (that does not have bootloader):
Use ISP connector right? To program the robostix I think that I need the ISP interface? Please confirm?


To get sensor values from the Atmel (no bootloader) use UART or ISP? Please confirm which one?

Thanks,

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,657
  • Helpful? 169
    • Society of Robots
Re: Digital Compass
« Reply #5 on: February 05, 2008, 05:47:11 AM »
Quote
To program the robostix I think that I need the ISP interface?
yeap (isn't it in the instructions? ;))

Quote
To get sensor values from the Atmel (no bootloader) use UART or ISP?
UART

The bootloader is unrelated. Its a method to program your microcontroller without a hardware programmer - using UART instead.

Just look this stuff up in my tutorials and it will make more sense.

 


Get Your Ad Here

data_list