Maker Pro
Maker Pro

digital compass output being fed into an analogue input

Hi everyone,

Hoping I could get someone's opinion out there. I need to get the
output from a compass into an analogue input port. The output from the
compass can either be digital or analogue, the input is rated between
0V and 5V.

My initial thoughts on the problem is to get a digital compass, put the
output through a DAC which gives me an analogue signal from 0 to 5V,
and then feed that into the analgoue input.

I've done an engineering degree which means that I have just about no
practical electronics knowledge (regulators, optical isolators, what
are they used for? :) ) I was wondering if there are any caveats I
should be aware of in this kind of setup, or is there a better way of
doing it?

Can anybody recommend any parts (digital compass/DAC)? The digital
compass doesn't have to be anything too flash, one degree resolution is
fine, all the parts have to run off 6V.

Thanks!

Taras
 
C

Chris

Jan 1, 1970
0
Hi everyone,

Hoping I could get someone's opinion out there. I need to get the
output from a compass into an analogue input port. The output from the
compass can either be digital or analogue, the input is rated between
0V and 5V.

My initial thoughts on the problem is to get a digital compass, put the
output through a DAC which gives me an analogue signal from 0 to 5V,
and then feed that into the analgoue input.

I've done an engineering degree which means that I have just about no
practical electronics knowledge (regulators, optical isolators, what
are they used for? :) ) I was wondering if there are any caveats I
should be aware of in this kind of setup, or is there a better way of
doing it?

Can anybody recommend any parts (digital compass/DAC)? The digital
compass doesn't have to be anything too flash, one degree resolution is
fine, all the parts have to run off 6V.

Thanks!

Taras

Hi, Taras. You didn't identify the compass you were using, which would
have helped a lot. Especially if documentation was available -- the
first thing you would do in something like this is to look at what the
manufacturer's provided for you to use.

I've seen digital compasses with analog outputs. The ones I've seen
have an RS-232 serial data output, and I'd guess your device has one of
those rather than, say, a 10-bit BCD output.

The way to go with this is with a PIC or other small microcontroller
that has serial input capability and a DAC output pin. You'll probably
want to use a rail-to-rail output op amp as a buffer of the PIC signal.

On the power side, you'll need to use an LDO (low dropout regulator) to
change your 6V battery voltage into the 5V power supply the uC can use.

It's kind of tough to be very specific without more information.
Please let us know what compass you're using.

Good luck
Chris
 
Hey Chris,

Thanks for the reply. I didn't identify the compass I'm using because I
haven't decided on one yet! The only requirements are that it has to be
low cost and simple to use (its for a toy robot, so the requirements
are not strict).

I've been looking at the honeywell website:
http://www.magneticsensors.com/products.html#components and I think the
things on there are a bit too complicated (what is a z-axis sensor?)

I was hoping to keep it simple. Basically any compass will do as long
as it can run on 6 volts and has about a 1 degree resolution (only the
heading is required, not pitch or roll). I was hoping that there would
be a compass out there that either has an analgoue output (the voltage
is proportional to the heading) or a simple digital output - One that,
for example, outputs 340 in binary on its output lines when the heading
is 340 - a bit like the 1490 (http://www.dinsmoresensors.com/), but an
output that isn't encoded and has better resolution.

So in short I was hoping for any suggestions reg the compass to use.
One that communicates via a bus (RS-232, I2C, SPI, etc..) would be fine
(although not as desirable as the simpler options), but as you said it
would require a micro able to read from the bus and convert to an
analogue signal.

Any suggestions would be appreciated!!

Taras
 
C

Chris

Jan 1, 1970
0
Hi everyone,

Hoping I could get someone's opinion out there. I need to get the
output from a compass into an analogue input port. The output from the
compass can either be digital or analogue, the input is rated between
0V and 5V.

My initial thoughts on the problem is to get a digital compass, put the
output through a DAC which gives me an analogue signal from 0 to 5V,
and then feed that into the analgoue input.

I've done an engineering degree which means that I have just about no
practical electronics knowledge (regulators, optical isolators, what
are they used for? :) ) I was wondering if there are any caveats I
should be aware of in this kind of setup, or is there a better way of
doing it?

Can anybody recommend any parts (digital compass/DAC)? The digital
compass doesn't have to be anything too flash, one degree resolution is
fine, all the parts have to run off 6V.

Thanks!

Taras


Hey Chris,

Thanks for the reply. I didn't identify the compass I'm using because I
haven't decided on one yet! The only requirements are that it has to be
low cost and simple to use (its for a toy robot, so the requirements
are not strict).

I've been looking at the honeywell website:
http://www.magneticsensors.com/products.html#components and I think the
things on there are a bit too complicated (what is a z-axis sensor?)

I was hoping to keep it simple. Basically any compass will do as long
as it can run on 6 volts and has about a 1 degree resolution (only the
heading is required, not pitch or roll). I was hoping that there would
be a compass out there that either has an analgoue output (the voltage
is proportional to the heading) or a simple digital output - One that,
for example, outputs 340 in binary on its output lines when the heading
is 340 - a bit like the 1490 (http://www.dinsmoresensors.com/), but an
output that isn't encoded and has better resolution.

So in short I was hoping for any suggestions reg the compass to use.
One that communicates via a bus (RS-232, I2C, SPI, etc..) would be fine
(although not as desirable as the simpler options), but as you said it
would require a micro able to read from the bus and convert to an
analogue signal.

Any suggestions would be appreciated!!

Taras


The analogue output on this:
http://www.mil.ufl.edu/projects/gnuman/spec_sheets/tcm2_productsheet.pdf
compass looks like what I would ideally want, but the entire thing
looks way too expensive - don't even want to try to look for a price

Hi, Taras. First off, if you're looking for one of these electronic
compasses with a standard parallel BCD output that you could feed to a
standard 8- or 10-bit DAC, you're out of luck. Those don't exist.

I'm not familiar with a low-end, good precision electronic compass that
has the analog output you're looking for.

Most of these come with a serial digital output. I've used the Arrick
(now Precision Navigation) Vector 2X, which is available at Jameco for
$49.99 USD. It has a serial SPI output, though. You might want to
look into this if the price range is right, and you can find a way to
hve your uC do SPI (many PICs have this capability).

If I had to do what you're talking about, I'd add a $2 PIC to take care
of the SPI, and output an analog PWM output. You could then use some
filtering (and possibly an op amp) to give your analog voltage.

But if you want to come down from there on price (I'd guess that's your
goal if you're talking toys), you might want to look at a short
description of the technology used in the Vector 2X from Don Lancaster:

http://www.tinaja.com/glib/muse104.pdf

Feel free to post back.

Chris
 
HI
Most of these come with a serial digital output. I've used the Arrick
(now Precision Navigation) Vector 2X, which is available at Jameco for
$49.99 USD. It has a serial SPI output, though. You might want to
look into this if the price range is right, and you can find a way to
hve your uC do SPI (many PICs have this capability).

I've had a look at this - its pretty much exactly what I need except
probably at the top end of my price range. I also found this digital
compass, which seems to meet my requirements and is a little cheaper:

http://www.robot-electronics.co.uk/shop/Compass_CMPS032004.htm

This is still pretty expensive, so I had a look at the magnetic sensor
it uses. It is the Phillips KMZ51
http://www.semiconductors.philips.com/pip/KMZ51.html. I had a quick
look at the datasheet and it seems that using this would require some
real engineering work - its not simply plugging prebuilt components
together. Any idea how difficult it would be?
If I had to do what you're talking about, I'd add a $2 PIC to take care
of the SPI, and output an analog PWM output. You could then use some
filtering (and possibly an op amp) to give your analog voltage.

As you said you would have to filter the PWM output, which implies you
would lose some accuracy (with a simple filter at least). Had a look
around on the microchip website and found a DAC (TC1320) that converts
from I2C/SPI to analgoue for around $1. I think this is a good
solution.

http://www.microchip.com/ParamChartSearch/chart.aspx?branchID=11028&mid=11&lang=en&pageId=79

What do you think?

Thanks for your time

Taras

PS: Cheers for the link regarding posting on google groups - I was
wondering how to do that
 
C

Chris

Jan 1, 1970
0
HI


I've had a look at this - its pretty much exactly what I need except
probably at the top end of my price range. I also found this digital
compass, which seems to meet my requirements and is a little cheaper:

http://www.robot-electronics.co.uk/shop/Compass_CMPS032004.htm

This is still pretty expensive, so I had a look at the magnetic sensor
it uses. It is the Phillips KMZ51
http://www.semiconductors.philips.com/pip/KMZ51.html. I had a quick
look at the datasheet and it seems that using this would require some
real engineering work - its not simply plugging prebuilt components
together. Any idea how difficult it would be?


As you said you would have to filter the PWM output, which implies you
would lose some accuracy (with a simple filter at least). Had a look
around on the microchip website and found a DAC (TC1320) that converts
from I2C/SPI to analgoue for around $1. I think this is a good
solution.

http://www.microchip.com/ParamChartSearch/chart.aspx?branchID=11028&mid=11&lang=en&pageId=79

What do you think?

Thanks for your time

Taras

PS: Cheers for the link regarding posting on google groups - I was
wondering how to do that

Hi, Taras. It looks like you're on your way to a solution.

You know, I don't know if the serial DAC is compatible. I haven't used
it myself, and I don't know if the data formats are compatible. If I
were in your shoes, I'd just give Precision Navigation a call on Monday
and ask. Back when they were Arrick, I used some of their other stuff
for a few of industrial and lab automation applications, and found them
to be really helpful. Possibly they've done work on this, and can
recommend something.

Good luck
Chris
 
Top