Showing posts with label LoRa. Show all posts
Showing posts with label LoRa. Show all posts

Trackable Lasertag sensor

As a partner piece to the PDT Tracker I needed to make some 'wearables' to go with it.

My original plan had been to take some of the PCBs made for the PDT Tracker and jury rig them into that wearable.

I did this in May but in the end the software wasn't ready for the event I needed them at and even had it been the game overran and we didn't get to the point where they were necessary.

So I've had a couple of months to come up with a wearable beacon and I decided to go for an MVP of my Lasertag 'holy grail' idea: a  Lasertag sensor that is remotely trackable and sends status updates.

I consider it a 'minimum viable product' because not only is the software a first attempt it relies on external modules for some of its features.

All the PCB has on it is an ESP32-C3 WROOM module, RFM95W LoRa module, LDO voltage regulator, a few passive components and solder headers for various things.

The GPS will always be a bought in module but relying on an external USB breakout, LiPo charger and sounder makes it bulkier than it otherwise might have been. I also put the components all on one side for easy soldering which gives it a fairly large 'footprint'.

Initial desk based testing with the board you can see above showed everything to work so I designed a quite utilitarian 3D printed enclosure and assembled four headband style sensors to test.

Convention in UKLTA is that sensors are worn on the head and this prototype ended up slightly bulkier than the commonly used sensors but with a LiPo inside rather than 3x AAA batteries it was no heavier.

Getting everything inside the case was fairly easy but construction of the headband which includes four IR sensors and four 3mm LEDs was quite tiresome. I'd opted to make little 3D printed enclosures for these and this really exacerbated struggles with getting the wiring done tidily.

In the end this all worked so I'm going to improve on the software between now and our next event in May 2024. I might do a second revision of the PCB with more functionality on-board but without a clear requirement for the system yet the four prototypes I have work and can be used to further test the concept.

One of the things that didn't get tested is haptic feedback, mostly because I was rushing and I didn't have a nice compact vibration motor to use. It's planned though as one of our members is hard-of-hearing and also I really like the haptic feedback in the Laserwar equipment I use at another LARP.

So far this post has been all about the process and the componentry but here's the concept I'm trying to realise.

  • Every participant in a LARP is location tracked, players, crew and 'monsters'
  • The 'health' of every participant in the LARP is tracked
Obviously this only makes sense in an outdoor LARP with an element of tactical combat but that's what I play.

The purpose of this is essentially to allow us to replicate the sort of thing you see in action sci-fi media where there are one or both or some combo of the following two things.
  • A 'tracker' that shows the relative location of friends/foes to players eg. the Alien/Aliens motion tracker
  • A 'squad status' system for squad leaders eg. the 'command desk' in the APC in Aliens that shows the 'health' of the squad.

This is all very mil-sim industrial sci-fi stuff but that's what I want from my games. In principle it should also be able to link the sensor to my prototype Lasertag weapon board using Bluetooth and show when a participant is firing, out of ammo etc.

I would also love to partner it with my HelmetCam prototype for the full Colonial Marines experience but the challenges of WiFi outdoors may make that impractical.

These ideas are taking a long time to come to fruition but I am slowly edging towards them. I bought the GPS modules used in this back in 2020.

Here, put this on.

Some time back I made some LARP props that did GPS tracking and relayed that info to players in a diegetic fashion. They were for a game set in the Supernatural setting and they were a replica of the canon 'EMF Meter' and a 'magic compass' that always pointed towards a currently possessed character.

Now I'm back on this nonsense again but this time it's for a sci-fi game at Dropzone 2023.

The Supernatural props were great at the time but they had a couple of inherent problems.

  • They used some proprietary wireless data radios that are no longer made. So while I could have made more things that work similarly with some spare items I bought from the manufacturer, it's a 'dead end'.
  • Being themed for Supernatural specifically they're not great for other games that aren't that. The compass could have been used in some other game with magic in the setting but almost all of my LARP is modern/sci-fi so it's just not happened.

With the need to make another tracker, I opted for a canon prop replica, but one that doesn't inherently tie it to anything: the PDT locator from Aliens.

A lot of UKLTA games happen in our High Frontier game setting, which is broadly Aliens/Predator/Outland/Space Above & Beyond grungy evil corporations and monsters in space sci-fi.

Which makes an Aliens prop work nicely but the PDT locator is also very generic, it's just a dull tube that shows the distance to something on a display and beeps. So it won't stick out in any modern/sci-fi game. It could function to find a person wearing a tracker or equally be a geiger counter or locator for a stash of equipment.

Since I built the Supernatural props, LoRa has emerged as a cheap and viable long range data radio technology. It's also standards based so not likely to disappear any time soon. I've used an RFM95W module in this, which is the default cheap LoRa module used by 'makers'. It's connected over SPI and handles all the basic LoRa Tx/Rx stuff while also feeding back information about received signal strength etc. Sending data from one device to another is really quite simple but you have to be a good citizen and not transmit too frequently. LoRa comes with rules about duty cycle/spreading factor/power that you should stick to. I've tried to minimise my transmissions but haven't yet actually checked if what I've written complies.

We've also had an explosion in more powerful microcontrollers, I've used an ESP32-C3, which means I can configure the device with a little web interface over WiFi. Should I get around to writing the software using the ESP32-C3 would also allow it to detect Bluetooth tracking beacons and I've got a stash of these, so I intend to have a go at that.

I think the ESP32-C3 is becoming my go-to microcontroller even if something doesn't explicitly need WiFi connectivity. It has a great mix of features and just enough GPIO to get stuff done. With WiFi switched off it still uses more power than some microcontrollers but clocked down to 10Mhz is about the same as a traditional AVR Arduino. Then when you need to configure something you can temporarily turn up the clock, connect to WiFi and have a proper user interface from your phone or PC.

Despite the enclosure being oversize in comparison to the movie prop, mostly to accommodate the display and keep the proportions looking OK, the electronics were still going to be a tight fit.

This led me to order a custom PCB from JLCPCB that combined most of the modules together in a compact manner.

This shrunk everything down an awful lot, with the heart of it squeezing directly behind the display.

With the bulk of the space inside the tube free I easily managed to fit a decent size recovered LiPo cell from a discarded vape, a TP4056 protect/charge board and USB socket for programming.

The end result has come out pretty much exactly how I'd hoped. Minimum order quantity for the PCBs was five, so I may build a second PDT locator on principle.

The only thing I'm unhappy with is how the colour OLED display is not massively bright. In sunlight the glare on the acrylic used to prevent damage means you need to shade it to read it. So it's better for night games, but that's fine as it's getting a first run out in a night game.

I used a colour OLED instead of a fixed 7-segment LED display from the original prop specifically to make it more flexible long term. I plan to find some larger, 'digital clock' style fonts to make it look more like the original. The currents fonts and UI are just a bit of a placeholder to allow me to test with.

So far I've tested it out to 150m from a beacon and it's fine, which is all the range I need for it. With LoRa, even with the slightly compromised wire antenna inside the case I'm expecting it to hit 200m+.


The user interface only needs to be very basic for end users, as I've written a little web configuration page to set it up more fully for games. The step up from traditional Arduino AVR dev boards in these projects to ESP32 boards really opens up so many capabilities while not increasing the cost.


For now I'm testing using beacons assembled on breadboards, but I will probably assemble the other tracker PCBs I ordered to function as beacons in our game next month. This doesn't preclude later turning them into more trackers by soldering on a display.