Replies: 6 comments 27 replies
|
Hi, thanks for the kind words :-). Yes you are correct in your assumption that for Lighthouse V1 all you need it to time pulses. You must be prepared to have a timer input for all the sensors though so it might limit a bit what MCU you are using: Raspberry pi Pico (RP2) do not have any timer input but I think most stm32 might have more than enough timer input to get you going. For lighthouse V1, the only information you are getting is pulse timestamp and width, so this is the only thing you will need to log. Good luck for your project! |
|
Thank you! I've done some more reading and I now have a v2 base station for testing en route to my office :) I usually work with ESP32s, but the RP2350 looks like an excellent choice for this because the 3 PIOs have 12 state machines between that should be able to read both the envelope and data signals from the TS4231 (for v2 base stations). Then I can just push them to the CPU (potentially using DMA). Timestamping is indeed a bit of a head-scratcher, but I think I could maybe count samples on the PIO and use that as a very accurate reference.... But even taking a timestamp in the DMA completion handler should be accurate enough for my purposes, I believe! Now working my way through your position estimation code! |
|
Interesting project! The RP2350 with PIOs is indeed a great fit for lighthouse V2. I actually have a prototype project that does exactly this: https://github.com/ataffanel/lh2_on_rp2040/tree/lighthouse_deck_v2 (branch lighthouse_deck_v2). You can disregard the name of the repos and most of the readme: this branch runs on the RP2350. It uses PIO state machines to sample TS4231 data lines at 32 MS/s, with DMA to move the captured data to RAM, and then decodes everything on the CPU cores. It can decode a full sweep (8 pulses) in less than 3ms. I have not had time to work on it recently (it is in our quaterly plan, but we have not gotten to it yet ...) but it should be a good starting point for your project. The RP2350 has great potential and has already shown that it can identify and decode the LFSR fast enough. Though there are a couple of things I was looking at working on: The sensor acquisition architecture is inherited from an earlier nRF5 implementation where everything had to be done in software. It is likely that decoding the differential manchester/FM1 signals directly in the PIO would work well and improve performance quite a bit compared to the current approach of sampling and decoding on the CPU. I believe the pico-sdk already has a differential Manchester decoder PIO program example (this is the same encoding used by audio-digital link like SPDIF I believe so it makes sense to have example for it ...). It will also free us from locking the CPU frequency: the current algorithm requires an exact 32MHz sampling rate, PIO implementation will be more flexible. Also, the current code acquires sensors independently which comes from the original single-sensor implementation. A better approach would be to handle the sensors as "sweeps" early in the pipeline, the same way the Crazyflie lighthouse deck handles the data. This makes it possible to identify basestation from further away: a single sensor only allow identification up to ~2-3m. Using 2 sensor in a sweep allows for the 6m range of the system by correlating multiple sensor like we are currently doing in the FPGA. If you have time to work on that, I would welcome feedback and imrpovements :-). Do not hesitate if you have any questions. This is something I would really like to get going but until I have time allocated for it I can offer advice and guidance :-). Good luck! |
|
@marcpabst You mentioned that your first prototype board had issues getting some of the TS4231 sensors working. I've designed about a dozen PCBs that use the TS4231, and noticed that it seems to be notoriously sensitive to power supply noise and proper ground return routing. Too much noise in the VCC pin often prevents the chip from initializing correctly. This results in a DATA pin that is completely silent, or has bunch of random noise. Let me know if you want help reviewing your PCB. I'll be happy to give some pointers that might help. :) |
|
Hi everyone, and thanks to @SaidAlvarado for the amazing resources regarding the LFSR data extraction! Would you have any clue on why is this behaviour hapenning and how to adress it ? |
|
Hey @marcpabst could you give me the contact information that you used to talk to HTC?? My email is eduardogs31306@gmail.com if you think it is better this way. Thank you so much!! |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
First of all, thank you for these amazing projects and for making them open source! I hope you don't mind me asking a few questions even though I might not be in the core target audience.
I'm working on a research project that requires accurately tracking children's head position in 3D space using a wearable tracker. So I'm essentially planning to stick your Lighthouse tracking board on top of an existing wearable device (glases). But since human heads are not quadcopters (and they tend to move a lot more in 6 DoF), I'm not entirely sure the existing sensor geometry works well for our use case. So I created a handfull of small module PCBs with a TS4231 plus a photodiode, and my plan is to experiment with different numbers of sensors and geometries.
We currently have an old Lighthouse V1 setup collecting dust, so I'm planning to use that for testing. Am I correct in understanding that the FPGA is primarily needed for decoding the payload in the Lighthouse V2 sweeps, and that with a V1 system a simple microcontroller would suffice? Would that be enough to log the raw sensor data somewhere and then do some offline analysis later?
In any case, your work is an incredible ressource for us!
All reactions