Active Topics

 


Reply
Thread Tools
Posts: 71 | Thanked: 34 times | Joined on Sep 2009
#1
Hi,

OK, now that we have top-level conformation that the n900 has no digital compass, I've spent some time trying to figure out what it would take to build a digital compass and somehow connect it to the n900, so that once AR applications take off we can still use them with the n900.

I'm not skilled enough in electronics to figure this out by myself, so I hope some of you can offer some advice or ideas.

Basically I think we would need two things: (1) a small digital compass that could be held with one hand flush against the n900 case so that the n900 and the compass move together, and (2) some way of getting the compass data into the n900.

For (1), I found the following compasses that seem promising:
a. OS5000-US. Digital compass with USB interface. Best candidate, but expensive: $299, about half the price of the n900 itself! .
b. R117-COMPASS. Digital compass, but no USB interface, instead using a timing pulse and an I2C interface. Reasonable price: $57.00.
c. Dinsmore R1655 analog compass sensor. Provides analog signal only; needs analog-to-digital converter to be useful. The sensor specifications suggest some circuits for extracting the direction, and this project shows how to use a microcontroller to change the analog level to digital. It seems to be a bit involved. However, this sensor is cheap: $37.

Given one of these sensors, the next thing is to get the data to the n900. For that, I could imagine bluetooth or USB. Bluetooth would be nicer that the compass assembly could really be separate and only taken out of your pocket when needed; no need to plug it in to the n900. However I have no idea how complicated it would be to connect one of the above compasses to a bluetooth interface. Bluetooth also has the disadvantage of requiring its own power. USB would need a tethering cable or at least a plug, but might work easier, especially with the above compass (a) that already has a USB interface.

One bluetooth idea I had was to use the cheap Dinsmore analog sensor (c), hook it up somehow to a voltage-controlled audio oscillator that would produce a varying analog audio tone (mixture of the two sine waves that the sensor produces), connect that audio signal to an existing bluetooth headset's microphone, and grab the bluetooth audio signal on the n900 in software. Then on the n900, do signal processing on the (analog) audio signal to extract the orientation. This would be a wireless solution using an existing bluetooth headset with its own power supply, so no new bluetooth transmission circuit or power supply would need to be designed. It could also conceivably be made compact. Again, I don't know enough about electronics to know if this is feasible (in particular how exactly to connect the Dinsmore to a VCO and how to do the software signal processing).

Feasible? Any other ideas?

Thanks guys - the n900 looks super, but the lack of a compass is painful enough that I'm determined to find a DIY solution. After all, the n900 is aimed at hackers, right?
 

The Following 5 Users Say Thank You to Otaku For This Useful Post:
Posts: 1,096 | Thanked: 760 times | Joined on Dec 2008
#2
maybe

http://www.ocean-server.com/compass.html

They also have some sample source code for interfacing with the unit, although it is in C#

Their documentation says silabs.com has linux drivers...

Last edited by quipper8; 2009-09-19 at 02:11.
 
Posts: 1,096 | Thanked: 760 times | Joined on Dec 2008
#3
oh, sorry, I see that the os5000 you have in your post is from what I posted above. I agree, best candidate
 
Posts: 2,014 | Thanked: 1,581 times | Joined on Sep 2009
#4
I have tried a few AR programs on my g1. They really arent all the amazing , but I think the hack to get this to work is a worthwhile pursuit from a "cool" point of view.
 

The Following User Says Thank You to Bratag For This Useful Post:
Posts: 40 | Thanked: 34 times | Joined on May 2009
#5
If your going to hack maybe start here http://www.dealextreme.com/details.dx/sku.11691 with a prebuilt compass its only 13 bucks. There are more expensive devices there also but this one seems reasonable. It has output the the screen I would think that leaching from the screen input and dumping it through the usb would be easier than the bluetooth suggestion.

If the device had a usb connector built in then it would always be in the same orientation for the n900 and you aug reality apps wouldn't get confused by movement of the external compass.

Epi
 

The Following User Says Thank You to epilido For This Useful Post:
Posts: 71 | Thanked: 34 times | Joined on Sep 2009
#6
Originally Posted by epilido View Post
If your going to hack maybe start here http://www.dealextreme.com/details.dx/sku.11691
Thanks, looks interesting. However one thing I'm worried about is the accuracy of the compass in a cheap device like that. The Dinsmore sensors have two types: a cheap kind that outputs only 8 directions (N,NE,E,SE,S,SW,W,NW), and a more expensive kind that is analog and can be decoded to 1-degree accuracy.

Any idea if the clip-compass you linked is accurate to the degree, or if it's just 8 directions?

Thanks - I'll also start looking at consumer digital compasses to see if there are some that look hackable.

Last edited by Otaku; 2009-09-19 at 02:38. Reason: Typo
 

The Following User Says Thank You to Otaku For This Useful Post:
Posts: 40 | Thanked: 34 times | Joined on May 2009
#7
One of the other compasses that was around 20 or so had good reviews on accuracy. to see if it viable 20 vs 299 sounds like a win win situation........
 
Posts: 71 | Thanked: 34 times | Joined on Sep 2009
#8
Found an interesting link: Interfacing I2C sensors with the Nokia n800! The project page says "Attach any I2C client chip (thermo sensors, AD converter, displays, relais driver, ...) to your PC via USB". Compass (b) above that I linked to has I2C.

It says that you need to enable USB host on the n800 - which I think is not yet supported on the n900. Still, this looks like the most promising lead yet.

Last edited by Otaku; 2009-09-19 at 03:25. Reason: Typo
 

The Following User Says Thank You to Otaku For This Useful Post:
Guest | Posts: n/a | Thanked: 0 times | Joined on
#9
Now that the N900 supposedly has IR capability, that's one more connection type to consider. IrDA transmitter/receiver is typically directly connected to a UART, which is really easy to access in Linux.

You would need a clip to keep the IR LED aligned with the receiver on the N900, but software-wise it seems the simplest option. Hardware would consist of a simple 8-bit 8-pin microcontroller ($2 or less a piece) with an internal AD-converter and some support components. Atmel Tiny AVR series is a good fit, and the compiler suite (gcc) is free and runs on Linux. AVR gcc could even be made to run on the tablet if desired...

(Disclaimer: I'm an EE and do this stuff for living.)
 
Posts: 69 | Thanked: 53 times | Joined on Aug 2009
#10
Have a look at these, some are quite cheap http://www.ssec.honeywell.com/magnetic/products.html. For example the full 3 axis/I2C interface (it can give a 3D compass bearing) hmc5843 is only $20 here http://parts.digikey.com/1/parts/159...c-hmc5843.html
I something like that would be your best option, combined with the i2c to usb program above, or using one of the cheaper and simpler 2-axis magnetometers with a microcontroller that has an A/D converter (pic chips like that can cost about a dollar). Either option would probably be small enough that you could make it sit flush to the edge of the phone and attach via usb (so 3 axis would come in handy).
 

The Following User Says Thank You to patstew For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 02:09.