EYE on NPI - Triad Semiconductor TS4631 Light-to-Digital Converter #EYEonNPI @DigiKey @triadsemi
Channel: Adafruit Industries
Date: 29/02/2024

This week's EYE ON NPI is virtually the best chip you could get for VR tracking - it's the TS4631 Light-to-Digital Converter (https://www.digikey.com/en/product-highlight/t/triad-semiconductor/ts4631-light-to-digital-converter) a specialized mixed-signal ASIC that is designed especially for folks who want to design accessories for the SteamVR (https://store.steampowered.com/app/250820/SteamVR/) and specifically, HTC Vive hardware (https://www.vive.com/us/). Thankfully, this chip is available without restriction or NDA, which means it's theoretically possible for anyone to design tracking technology without the hard part of making the fixed-base-transmitters.

Precision 3D tracking within a room is incredibly hard: Cameras can kinda do depth perception but they require a lot of computation and often make mistakes on object recognition. You can try using UWB but it's very pricey and has precision limitations. HTC Vive solves this by using IR light, which is not-sensitive to room illumination, doesn't have RF interference, and is fairly inexpensive. Each 'lighthouse' acts like a lighthouse: after an initial Infrared burst for sync, it sweeps IR over X & Y directions. Check out Alan Yates' detailed talk for how this design works (https://www.youtube.com/watch?v=75ZytcYANTA) The object being tracked has an IR photodiode, which catches the sync pulse, then measures the time between that and the X and Y sweeps. It does this for each lighthouse. With some fun matrix math (https://trmm.net/Lighthouse/), it can then calculate it's X Y Z coordinates with respect to the Lighthouses and, given we know the location of those Lighthouses during an initial calibration step, we can localize that IR diode within the fixed coordinates of the room we're in.

That means that if you want a device that can detect the IR pulses and sweeps, all you need is an IR photodiode like the OSRAM BPW 34 (https://www.digikey.com/short/b5jn4pnp) and a bunch of analog electronics to filter out ambient noise, detect the carrier frequency, and give you the timing pulses detected. Or, you can save yourself a ton of effort, and just go with the Triad TS4631 (https://www.digikey.com/short/fwr173wh). All you need is the photodiode and a couple simple passives and you can have a configurable sensor analog front end at low cost and low complexity. In fact, that's what nearly all Vive-compatible hardware uses. (https://twitter.com/SadlyItsBradley/status/1634146181755355136)

The Triad TS4631 (https://www.digikey.com/short/fwr173wh) comes in a compact 0.4mm-pitch 9-pin BGA package, which thankfully uses the center ball as a second ground so no buried vias are required. Give it 3.3V power, a BPW 34 S (https://www.digikey.com/short/p8j9r7z0) photodiode, and a couple passives for the power supply, and it's ready to go! There's two output pins for the Envelope and Data from the IR signal. Those two pins are also the I2C configuration pins, and you can use any microcontroller to read and write the configuration registers that let you set up the gain, thresholds and sleep modes. There's a library for the TS4231 (https://github.com/TriadSemi/TS4231) available from Triad, and since the TS4631 mostly improves the TS4231's power usage, you can likely start your microcontroller interfacing and development with that code.

There's also lots of other folks playing around with the Triad TS4631 (https://www.digikey.com/short/fwr173wh) and TS4231 (https://www.digikey.com/short/fmcj4wft) which means that you can find hobbyist projects for design inspiration. We found some great info from famed hackers CNLohr (https://hackaday.io/project/153224-ts4231-esp8266-lighthouse-tracking) including libsurvive for desktop tracking (https://github.com/cntools/libsurvive/), Trammell Hudson (https://trmm.net/Lighthouse/), and other YouTube makers (https://www.youtube.com/results?search_query=ts4231). There's also a published project called HiveTracker (https://hivetracker.github.io/) that has hardware and firmware for a fully-designed tracker board with Bluetooth LE as the backchannel.

If you want to get started with making 3D-trackable devices for VR or AR applications, it's great to not have to build the whole system from scratch. With the Triad TS4631, (https://www.digikey.com/short/fwr173wh) you can integrate into the existing SteamVR/HTC Vive ecosystem or you can chart your own path with their hardware and your own software. Either way, you'll want to pick up some TS4631's and you're in luck because DigiKey has them in stock right now, for immediate shipment! Order today and you can be tracking in cyberspace by tomorrow afternoon.