Close
0%
0%

TS4231 - ESP8266 Lighthouse Tracking

Experimentation with the Triad Semiconductor TS4231, control words and gen 1 lighthouses (is it possible?!)

Similar projects worth following
I want to build a custom system for room, house even warehouse-scale 3D localization and tracking using Valve's lighthouse tracking. This should allow for high precision, noise resistant indoor 6-dof pose tracking of objects. Originally I was going to use a custom TIA design that worked moderately well giving 50 kHz channel spacing, but, now that Triad Semiconductor has a chip that may do what I need, I have decided to move over to that.

If all goes well, I should be able to use this to track an object in 3D space using a multitude of Vive Generation 1 lighthouses when used in conjunction with libsurvive.

I'm trying to understand enough of the TS4231 to get it to operate FDM (frequency division multiplexing) with gen 1 valve lighthouses. If testing goes well, I will move from an ESP8266 to an ESP32 and from one sensor per processor to 4 or 8.

The TS4231 has a "legacy" mode that works without issue with gen1 lighthouses, however, the legacy mode does not provide carrier information.  If we can get this working, we should be able to do house- or warehouse- scale tracking with gen1 lighthouses by using different carrier frequencies for each lighthouse, axis and sync pulse.

  • First attempt at comms to TS4231

    CNLohr04/22/2018 at 16:24 0 comments

    I was able to use the existing code I had prepared for esp8266lighthouse (https://github.com/cnlohr/esp8266lighthouse) and was able to modify the provided code from triad (https://github.com/TriadSemi/TS4231/blob/master/ts4231.cpp) to operate on the ESP8266.

    I tried configuring the TS4231 using the default configuration word 0x392B, which is the default configuration.  The TS4231 conveniently allows you to read back the configuration word so I verified it could have its configurations set arbitrarily.  Sadly, when operating the base stations at 1.8MHz, no more envelopes or data passed. So, I figured maybe the message I need to send the TS4231 a different configuration, so I chugged away...


    By using esp82xx's custom command system, it allows me to write javascript code to control and monitor things, so, I wrote some javascript to read GPIO inputs and configure the TS4231.  Automatically advancing through.  If the GPIOs ever received any lighting events, I would display them.  It allowed me to automatically test all 14-bit codes over the course of about 6 hours.

    function GPIOUpdateCallback( n, m )
    {
    	var buttons = n;
    	if( buttons != lastbuttons )
    	{
    		mark = 1;
    	}
    	lastbuttons = buttons;
    	if( countthis++ > 120 )
    	{
    		if( mark ) 
    		{
    			console.log("!!!\n");
    			document.getElementById( "results" ).innerHTML += commandid + "<BR>";
    			mark = 0;
    		}
    
                    //Set the configuration word.
    		QueueOperation( "CS"+commandid, function( req,data) { $("#custom_command_response").val( data ); } );
    
    		document.getElementById("current").innerHTML = commandid;
    		commandid++; //Advanced to next configuration word.
    		countthis = 0;
    	}
    	
    }
     

     I tried all 16384 combinations of config words.  There were no lighting events from the TS4231 after it was configured with the 1.8 MHz base station.  This is disheartening.  I am worried the TS4231 cannot operate at all unless there is encoded data in the OOTX and sweeps.

    Up Next: Will be trying to use Nairol's custom base station firmware to increase frequency of base station and see if there's any combinations that the configured TS4231 will work with.

View project log

Enjoy this project?

Share

Discussions

ahmedhassan wrote 06/14/2022 at 12:17 point

This can be fun for Halloween - having a cranium head flow around to music people, or for a portray with eyes that follow you to get  tracking signals.

  Are you sure? yes | no

metehanemlik wrote 02/08/2020 at 14:48 point

any update ? 

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates