Page 1 of 3

Open-Hardware Magnetic Tracker - Call to Arms

Posted: Thu Sep 06, 2012 9:31 pm
by brantlew
I've been sitting on this idea for a few weeks not sure whether to keep it to myself or let it out in the open. But I figure why not get it out there and maybe everybody can benefit.

So now that we're all VR-crazy because of the Rift, everybody is trying to figure out 6DOF tracking solutions. Every thread gets off topic occasionally talking about the need for position tracking and I've been involved in a lot of those discussions. Many people are coming to the conclusion that the Hydra is currently the best solution - and they're probably right. It's fast, mostly accurate (despite Carmack's concerns), and does not suffer from occlusion. So magnetic technology is one of the best solutions to this problem - probably why the military uses it for many of their tracking needs.

Great - except that we're stuck with the Hydra as the only consumer level magnetic tracker which severely limits the applications because it has only two tracked points (which cannot be disassembled or repackaged easily) and must be wired. The only other options are companies like Polhemus that provide medical and military solutions at insane prices. I contacted a rep and asked about a basic wireless system with 4 tracked points - and they quoted me almost $10,000!!!

That is insane! There is nothing fundamentally expensive or secret about magnetic tracking. This stuff was developed decades ago using radio-era technologies. Look. Here's what it is and the basic recipe for making one...

http://www.na-mic.org/Wiki/index.php/6D ... tion_HOWTO
http://www.virtualreality.net.au/6DOF_Tracker
http://www.na-mic.org/Wiki/index.php/20 ... penIGTLink


Image

I'm not even a hardware guy and it sounds like something that I might be able to pull off. Which got me thinking...why aren't these things widely available? All sorts of motion applications could benefit from them. I assume it's just like fused inertial sensors a few years ago. Those were exotic expensive devices as well until game and phone companies figured out you could use them. Now there are plenty of cheap sources for those devices. So hopefully there will be a VR movement that will push this technology cheaper and more widespread as well. Maybe Sixense will start selling wireless modular tracking kits. But until that happens, we've got nothing except the crummy Hydra to work with.

So why not make them ourselves? There are a lot of skilled people around here with a lot of motivation for tracking solutions. I wonder if we could pool talent and develop a sort of open-hardware magnetic tracker device? I'm envisioning a system with a base transmitter that could be paired with up to 4 or 8 wired and/or wireless modules. A generic system like that would be amazing for VR applications. Head tracking, weapon tracking, hand tracking, feet tracking - all sorts of motion controllers and applications could be powered by a device like this.

Re: Open-Hardware Magnetic Tracker - Call to Arms

Posted: Fri Sep 07, 2012 12:39 am
by nrp
This is something I've been interested in working on. The design I had in mind depends on the project I am currently in the process of completing, which is an inexpensive, low power, low latency method of interfacing wireless devices with USB HID (the actual sensor portion of the Adjacent Reality Tracker is pretty simple). I'm planning on diving into it once I have a good platform to work off of.

For reference, this is basically the entire analog end of the Hydra receivers:
Image
Image

Re: Open-Hardware Magnetic Tracker - Call to Arms

Posted: Fri Sep 07, 2012 3:23 am
by Chriky
I stripped down one of my Hydra controllers a couple of days ago and yes I was quite surprised to see the position/rotation sensing is done purely by those three little coils. I am definitely on board with this for the purpose of skeletal tracking. For skeletal tracking occlusion become a nightmare very quickly. You wouldn't even really need orientation data, just the positioning which seems very accurate.

The only problem I can think of is in a multi-user situation, is it possible to stop interference between base stations? Is there enough bandwidth for several users? It looks like it already uses different bandwidths for getting the x/y/z positions.

Re: Open-Hardware Magnetic Tracker - Call to Arms

Posted: Fri Sep 07, 2012 5:58 am
by brantlew
@nrp: Thanks for the Hydra pics. The hardware required for this does seem really minimal. I mean seriously - we're talkin' spooled wire here. ;)

@Chriky: Skeletal tracking does seem to be the application that would benefit the most from this technology. I imagine a sort of Kinect-like solution except that it would be low power, low latency, high accuracy, and would not suffer from occlusion. Also - it could be localized and made mobile. So instead of doing absolute skeletal tracking from a fixed location you could wear the transmitter and do a relative skeleton. Which ( if accurate enough) is almost as good as global tracking. Actually in many ways it's better to do localized tracking because the precision never drops. The distance from transmitter to sensor stays within a tight range so your skeletal poses will have a very tightly defined accuracy. This is better than something like IR optical where you have to mount lots of cameras to keep the player close and in view. And it basically creates an unlimited play range. You could take your localized skeletal tracker on-the-go and have precise 6DOF body tracking in large spaces or within complex occluded environments. Basically - a near perfect solution for creating realistic VR scenarios and games.

Multi-user could be a bit of problem. You might have to use something like time multi-plexing to handle that scenario - at least when the players are close together. For multiple trackers, bandwidth could become an issue. Having a flexible set of sensors could help. For example - you could use wired sensors where it was convenient (like a wired VR suit that had sensors woven into the joints) and you could use wireless on things like weapons and the head. Also, some sensors could be driven at lower frequencies. You probably don't need super accurate foot detection so you could drive that at 30Hz while your head might need 120Hz.

Re: Open-Hardware Magnetic Tracker - Call to Arms

Posted: Fri Sep 07, 2012 1:36 pm
by Krenzo
I'm glad you made this thread. Magnetic tracking is cheap and easy to implement. You could probably put a system together with a breadboard and an arduino which makes it very accessible.

Does anyone have pictures of the Hydra's base station disassembled? I'm curious how they wrap the magnetic wire around their sphere.

Re: Open-Hardware Magnetic Tracker - Call to Arms

Posted: Fri Sep 07, 2012 1:54 pm
by brantlew
I'm guessing they do it sort of like this. I found a real picture of a production unit in this cube formation once, but I can't find it anymore.

Image

Re: Open-Hardware Magnetic Tracker - Call to Arms

Posted: Fri Sep 07, 2012 2:15 pm
by bobv5
Brantlew, I think you should just chuck some hardware together and see if you can make the software work. Use whatever your prefered microcontroler is, the coils you know about, might need opamps to boost the signal from the coil, but that is easy. For intial tests you might be able to connect a transmitter coil the the audio output of your computer, and use tone generator software.

If you want I can design a super simple version on computer and run a few simulations, but I don't have money at the moment to build any hardware. (Rift made me poor!)

Re: Open-Hardware Magnetic Tracker - Call to Arms

Posted: Fri Sep 07, 2012 2:17 pm
by nrp
The Hydra base station has three perpendicular cylindrically wound coils around a common core. I'll take a picture when I get home.

Re: Open-Hardware Magnetic Tracker - Call to Arms

Posted: Fri Sep 07, 2012 2:22 pm
by brantlew
bobv5 wrote:Brantlew, I think you should just chuck some hardware together and see if you can make the software work. Use whatever your prefered microcontroler is, the coils you know about, might need opamps to boost the signal from the coil, but that is easy. For intial tests you might be able to connect a transmitter coil the the audio output of your computer, and use tone generator software.

If you want I can design a super simple version on computer and run a few simulations, but I don't have money at the moment to build any hardware. (Rift made me poor!)
Busy at the moment, but I'll find some time in a few months to really dig into this. In the meantime...I think we found your college project. :lol:

Re: Open-Hardware Magnetic Tracker - Call to Arms

Posted: Fri Sep 07, 2012 2:38 pm
by Krenzo
Here's the best shot I can get of my base unit. I would take mine apart, but I'm planning on returning it because the left control stick arrived broken. I'm fine with breaking it myself but won't accept someone else's brokenness. :p

Re: Open-Hardware Magnetic Tracker - Call to Arms

Posted: Fri Sep 07, 2012 2:52 pm
by bobv5
brantlew wrote:
bobv5 wrote:Brantlew, I think you should just chuck some hardware together and see if you can make the software work. Use whatever your prefered microcontroler is, the coils you know about, might need opamps to boost the signal from the coil, but that is easy. For intial tests you might be able to connect a transmitter coil the the audio output of your computer, and use tone generator software.

If you want I can design a super simple version on computer and run a few simulations, but I don't have money at the moment to build any hardware. (Rift made me poor!)
Busy at the moment, but I'll find some time in a few months to really dig into this. In the meantime...I think we found your college project. :lol:
Umm, probably not. I will ask, but as you (or some other software guy) would be doing 70% of the work, I expect that would count as cheating.

Re: Open-Hardware Magnetic Tracker - Call to Arms

Posted: Fri Sep 07, 2012 6:57 pm
by Chriky
brantlew wrote: I found a real picture of a production unit in this cube formation once, but I can't find it anymore.
Probably this one, I found it on one of your links
Image

Re: Open-Hardware Magnetic Tracker - Call to Arms

Posted: Fri Sep 07, 2012 8:38 pm
by zalo
This sounds really cool! I'm wondering if maybe it's the chips transmitting the sinewave and the chips interpreting/processing/filtering the raw signal data that are the expensive bits here.

This is a pic of one of the sinewave generator/transmitter circuit:
Image
Transmitter coils plug into plug on the top right. This one could look nicer as a printed circuit board.

And this is a pic of the receiver board:
Image
This includes the power supply and a dedicated ADC board.

To do it well, I read that you'll have to use at least a 4 channel ADC (analog to digital converter) to get good measurements (1 ADC switching between the three transmitter coils for slower general measurements, and the other 3 dedicated to each receiver coil for quicker). So 7 (3 more for second receiver) High Resolution/Rate ADCs and a Sinewave generator+amplifier with a trivial amount of spooled wire for less than $100? Can it be done well? I know all those components are mass produced to some extent...

Re: Open-Hardware Magnetic Tracker - Call to Arms

Posted: Fri Sep 07, 2012 9:10 pm
by WiredEarp
An open source magnetic tracker is a great idea, i've thought there has been not enough progress towards cheap magnetic trackers. The Hydra shows it is possible! Perhaps much of the processing can be done on the PC nowadays anyway?

Re: Open-Hardware Magnetic Tracker - Call to Arms

Posted: Fri Sep 07, 2012 10:11 pm
by brantlew
I suspect you could offload the calculations to the PC - at least for prototyping and probably for production as well. I mean - if they can stream raw video feeds and do PTAM-type image flow algorithms on a PC, surely a little bit of sensor math is possible.

Another thought - I wonder if a sensor fusion with an IMU would be helpful. Say for instance you threw a rough draft together that could only achieve 5 millimeter and 1/2 a degree accuracy. Or maybe your accuracy was decent most of the time but there were problem regions where it was pretty far off. The gyros are already accurate enough so we don't really need the magnetic angles - just the position. So maybe you could use the gyro measurements and just use the magnetic angles to calibrate and control drift.

Also with position - you might be able to limit the error of the magnetic reading with the accelerometers. Say you registered a 5 millimeter position jump over a span of 20 milliseconds. You could double check the inertial signal for spikes and use it to dampen position errors in the magnetic reading. Stuff like that...

I'm not sure if anyone has done a fused inertial / magnetic sensor like that but it might be worthwhile to investigate. It would also flow nicely into your project nrp.

Re: Open-Hardware Magnetic Tracker - Call to Arms

Posted: Fri Sep 07, 2012 11:21 pm
by MSat
This is fascinating. I'll research the topic in the next couple of days (hopefully). I think this may be particularly suitable for my microcontroller of choice (8-core Parallax Propeller). The ADC circuits, and sine wave generators should be more than fast enough. Though from my brief look at those web sites, I didn't see any mention of ADC bit-depth requirements.

Re: Open-Hardware Magnetic Tracker - Call to Arms

Posted: Sat Sep 08, 2012 1:17 am
by Krenzo
The bigger the better. If you were to only use an 8-bit ADC and wanted a range of 10 ft (~120 in), then your resolution would be ~0.5 in. With a 16-bit ADC, you would get a resolution of ~0.002 in. I wouldn't go for less than 14-bit (~0.007 in) since positional resolution will also affect your rotational resolution. Also, the falloff of your measurement is squared. It's not going to be a linear 1-bit=0.002 in relationship so you may get less precision the closer you are to the base unit.

Re: Open-Hardware Magnetic Tracker - Call to Arms

Posted: Sat Sep 08, 2012 11:27 am
by MSat
Thanks Krenzo. I was sort of thinking that last night while laying in bed. I figured the Hydra may have been tethered in part to assure that a maximum distance from the base station is maintained for good accuracy. It should also be possible to still have good positional accuracy with lower bit-depth ADCs if you have a multi gain amplifier stage between the coils and the ADC, though I couldn't say if this would be worthwhile instead of just going with a higher resolution ADC from the get-go. Anyone have some more web links on magnetic tracking?

Re: Open-Hardware Magnetic Tracker - Call to Arms

Posted: Sat Sep 08, 2012 2:57 pm
by Krenzo
MSat wrote:It should also be possible to still have good positional accuracy with lower bit-depth ADCs if you have a multi gain amplifier stage between the coils and the ADC, though I couldn't say if this would be worthwhile instead of just going with a higher resolution ADC from the get-go.
That is possible, but I would say that it isn't worthwhile as adding a DAC to control the amplification would probably equal or exceed the cost/complexity of a simple Amp->ADC setup. There are systems where that is a good approach, but I don't see it here.

Re: Open-Hardware Magnetic Tracker - Call to Arms

Posted: Sat Sep 08, 2012 6:17 pm
by MSat
Expanding a bit on the topic a little:

If the signal at all 3 coils on a given receiver drops below or goes above a given threshold, then gain to the ADC is adjusted using a stepped programmable gain amplifier (PGA) - some ADCs even have these built-in. Noise is probably reduced, and conversion accuracy in increased. This is probably completely irrelevant if you have limited range between the base and receiver.

So lets refine the requirements a bit. What are we looking to track? Just relative body motions? Obviously we want to track the arms - one sensor at the elbow, and one at the wrist? Head tracking is also a good idea, though I think it should still be augmented by gyro/g sensors. What about the base-station? Can this be attached as a belt around the waist? If so, then all the receivers can be wired. Even if we're not so concerned with tracking legs, knowing their position can help with tracking upper-body rotations and leaning motions.

Re: Open-Hardware Magnetic Tracker - Call to Arms

Posted: Sat Sep 08, 2012 7:26 pm
by brantlew
If the goal is only for relative skeletal tracking then probably a wired device with a 1 meter tracking radius would suffice. But I suspect that for many applications and absolute tracking method would be desirable. In that case, I think a wireless solution and a 2 or 3 meter radius would be necessary.

I guess there could also be a hybrid solution. You could construct a central hub that transmitted wirelessly to the base station but was wired to a number of sensors. That would simplify the sensor hardware and would also eliminate wireless network contention.

Re: Open-Hardware Magnetic Tracker - Call to Arms

Posted: Sat Sep 08, 2012 7:53 pm
by MSat
Can you give an example of where absolute position would be desirable? Maybe it would just be better to have a floor pad that detects where the person is located, and have the magnetic tracker for relative tracking? Such a pad can also help to assure that the person is kept within a safe movement area.

Re: Open-Hardware Magnetic Tracker - Call to Arms

Posted: Sat Sep 08, 2012 8:11 pm
by brantlew
Well a cockpit simulator would be one situation where absolute position is necessary. Maybe you could string a wired sensor to the back of your chair or to the desk to serve as a reference point for that scenario. Also, we are just hypothesizing that you can achieve proper head translation using a relative tracking system but that might not be the case. It seems that you could track the position of the head relative to the feet and that would serve as a good enough fixed reference, but you could probably trick the system by squirming your feet around. The system might interpret that as tiny head movements. Also jumping would be hard to determine without absolutes.

I don't know. I'm just thinking in terms of what would be the most general solution for all problems and untethered absolute tracking seems like a big class of systems to leave out.

Re: Open-Hardware Magnetic Tracker - Call to Arms

Posted: Sat Sep 08, 2012 8:36 pm
by MSat
I've also considered the "squirming feet" issue, but I think that can be detected, but it would probably be a bit of a PITA. If you're seated, it would seem that relative positioning would be even simpler, although I think optical tracking would be better in such a scenario.

Also, I think the overall skeletal tracking system could be wireless, while the various nodes are attached to a belt-mounted base.

Re: Open-Hardware Magnetic Tracker - Call to Arms

Posted: Sun Sep 09, 2012 11:54 am
by MSat
Actually, if the floor mat can track feet, detecting a slide/squirm/etc would be easy.

Re: Open-Hardware Magnetic Tracker - Call to Arms

Posted: Sun Sep 09, 2012 6:05 pm
by android78
Does anyone know what are the legalities with regards to reverse engineering an existing product for homebrew use? The following signal amplifiers:
http://www.analog.com/en/all-operationa ... oduct.html

... And the following ADC:
http://www.analog.com/en/analog-to-digi ... oduct.html

... would seem perfectly suited to this project. :D

Re: Open-Hardware Magnetic Tracker - Call to Arms

Posted: Thu Sep 13, 2012 10:17 am
by TheLostBrain
Hey guys I know's it's older technology but if you think it might be helpful I own an Ascension Technology Flock of Birds 6DOF magnetic tracker w/ the 10ft Extended Range Transmitter. I'd be more than happy to open 'er up and take some high res shots of the boards, etc. if you think you might glean something from it. Can even open the ERT block too if you like - damn things a heavy bastard... big coil in there or something. ;)

Basically have everything you see here minus the little transmitter (little white square guy) - have the bigger black ert:
http://www.inition.co.uk/sites/default/ ... irds_1.jpg

Just let me know - can maybe do it tonight or sometime over the weekend the latest.

Re: Open-Hardware Magnetic Tracker - Call to Arms

Posted: Thu Sep 13, 2012 1:40 pm
by Krenzo
TheLostBrain wrote:I'd be more than happy to open 'er up and take some high res shots of the boards, etc.
Yes please!

Re: Open-Hardware Magnetic Tracker - Call to Arms

Posted: Thu Sep 13, 2012 4:42 pm
by MSat
I always love to see pics of the guts of electronics :) There aren't many things around my house that I haven't taken apart at some time or another.

@TheLostBrain
I've been wondering about tracking errors due to distortions in the magnetic field. Have you experienced anything of the sort? Does it require calibration?

Re: Open-Hardware Magnetic Tracker - Call to Arms

Posted: Thu Sep 13, 2012 5:25 pm
by MSat
So I finally bothered to look up the ICs in nrp's pic of the Hydra controller, and am somewhat perplexed. I figured there would be opamps, but instead of the ADC I had expected, there is a quad analog 2:1 mux. I'm really curious as to how/why it's implemented. It's kind of hard to see the traces in the picture, so I'm wondering if some of the weird stuff I'm seeing is actually real, or just my eyes playing tricks on me. :shock:

Is it too much to ask if someone can trace it out real quick? ;) Something magical is going on in there :lol:

Re: Open-Hardware Magnetic Tracker - Call to Arms

Posted: Thu Sep 13, 2012 7:42 pm
by android78
Really? I thought they were two op amps and the adc I put in my post!

Re: Open-Hardware Magnetic Tracker - Call to Arms

Posted: Thu Sep 13, 2012 8:44 pm
by Krenzo
MSat wrote:I figured there would be opamps, but instead of the ADC I had expected, there is a quad analog 2:1 mux. I'm really curious as to how/why it's implemented.
How else are you going to get 3 separate hall effect sensors into a single ADC? The MUX takes the 3 sensor outputs and outputs one to the ADC. The ADC is probably in the base unit (with another MUX to choose between each controller) so that you only need one to handle both controllers.

Re: Open-Hardware Magnetic Tracker - Call to Arms

Posted: Thu Sep 13, 2012 9:20 pm
by MSat
Yeah, I'm assuming there's an ADC somewhere along in the chain, but the mux implementation isn't so straight forward.

http://www.analog.com/en/switchesmultip ... oduct.html

It's a qaud 2:1 mux with a 1-bit control line and chip enable. How do you send just one of the 3 signals down the wire with such a device? Did they just figure out a way to use it as a 3:1 mux (since none appear to exist), or is there something else going on here? Even if it's just the first way, I cant really see how it was done, unless they short the coils to disable them 2 at a time. which would require them to use the chip select line in a "non-standard" way. Very crafty, imo.

Re: Open-Hardware Magnetic Tracker - Call to Arms

Posted: Thu Sep 13, 2012 10:41 pm
by nrp
The analog end is actually more complex than it appears at first glance. There is an ARM Cortex M0 (an LPC1111FHN33/102) in each controller, which has 8 10-bit ADC channels, but it is not used to measure the voltage coming out of the op-amps. It seems to only be using its ADCs for the joystick and trigger. The three op-amp outputs are actually going over the wire back to the base station. I haven't figured out exactly what is going on with the mux yet, but it seems to be switching between closing the inductor circuit and connecting it to each op amp. It is possible there is some kind of LC circuit in action. I may take my scope to it when I have time.

Re: Open-Hardware Magnetic Tracker - Call to Arms

Posted: Thu Sep 13, 2012 11:08 pm
by MSat
Whoa! I completely forgot about the buttons, and joystick. I have the sudden urge to buy one :D

Re: Open-Hardware Magnetic Tracker - Call to Arms

Posted: Thu Sep 13, 2012 11:21 pm
by nrp
And there's more! The base station has two additional quad op amps, an ADC with branding I don't recognize, and a 400Mhz Blackfin! The Blackfin is being used entirely for the sensors too, as there is another Cortex M3 being used for the USB interface.

Image

Album of images in full res: http://imgur.com/a/2zZ1c

Re: Open-Hardware Magnetic Tracker - Call to Arms

Posted: Fri Sep 14, 2012 3:33 pm
by MSat
nrp wrote:And there's more! The base station has two additional quad op amps, an ADC with branding I don't recognize, and a 400Mhz Blackfin! The Blackfin is being used entirely for the sensors too, as there is another Cortex M3 being used for the USB interface.

Image

Album of images in full res: http://imgur.com/a/2zZ1c

:shock:

I wonder if the opamps in the base are used to drive the coil. I am surprised they are using such a beefy DSP - I guess it makes sense if they're doing most of the heavy lifting on the device, rather than the driver. Good magnetic tracking is probably much more complex than I had assumed.

Re: Open-Hardware Magnetic Tracker - Call to Arms

Posted: Fri Sep 14, 2012 4:37 pm
by bobv5
It seems a very odd design. The seperate MCU for usb is the really odd bit. Surely a single 500mhz main controller would be cheaper and equally good with the right software?

Re: Open-Hardware Magnetic Tracker - Call to Arms

Posted: Fri Sep 14, 2012 8:16 pm
by MSat
I tried tracing out as much as I could from the images, but there's far too much missing to get a picture of what's going on *at all*.

Re: Open-Hardware Magnetic Tracker - Call to Arms

Posted: Fri Sep 14, 2012 9:13 pm
by nrp
bobv5 wrote:It seems a very odd design. The seperate MCU for usb is the really odd bit. Surely a single 500mhz main controller would be cheaper and equally good with the right software?
It makes sense to dedicate a relatively inexpensive DSP to doing constant real time measurement, calculation, and signal generation while the also fairly inexpensive ARM deals with interrupt based USB and interfacing to the microcontrollers reading the joysticks and buttons. Using a Blackfin with USB support or a beefy ARM may have been more expensive, and would also have resulted in more a complicated software effort. Though, these days, there are single IC Cortex M4/M0 combinations that would probably do the job as well.