Close
0%
0%

LZRTag - Flexible DIY Lasertag

An easy to build, program, modify and use AVR and ESP based Lasertag system for everyone!

Similar projects worth following
Ever wanted to play Lasertag just ... Anywhere?
Maybe with a different game mode too, or for longer periods than those offered by arenas?
I know I wanted to - so I decided to create my own version of it!

LZRTag (and yes, I know, that's not really a good abbreviation but whatever) has been a long-running project of mine. It's actually a couple of years old, but only recently got started!

Its main motivation has always been, and will always be, to have an easily customizable, cheap to create Lasertag system whose capabilities rival those of professional sets, without adding proprietary software or complex hardware.
Based on an ATMega168P, an ESP-01 (soon to be replaced with an ESP32!), and a simple but powerful MQTT interface and Ruby-based server script, I am proud to say that I am managing just that!

The Hardware

In this regard, I fear, most people won't find my project particularly enticing.

Utilizing only a simple ATMega168 clocked at 4MHz, together with an ESP-01 is enough to perform most tasks. While the ATMega handles the "hard-side" work like flashing the built-in and external LEDs, sending and receiving IR pulses, and generating noise, the ESP is there for communication.

The interface between ESP and AVR is a simple bidirectional UART line, but will eventually be replaced with a I2C line to improve quality and make expanding the system easy.

The mainboard has been kept simple to keep things easy. With only a few passives like capacitors and oscillators, as well as a few driving components like transistors for the LEDs, and not even a voltage regulator (as the LiPo cell never quite exceeds the ESP's acceptable voltage range), it's pretty bare. The addition of a buzzer, vibration motor, and connector for a "trigger" button complete it.

Communication between sets is done via an easy but effective IR channel. A strong LED (OSRAM SFH 4346) sends out pulses at a 40kHz modulation, which are received by standard VISHAY TSOP 4840. Add a small checksum, a ID code for each set, and a small lens or other focus mechanism, and you have a surprisingly precise, long-range (about 40m in good conditions!) way for one set to hit another!

The Software

Now the software is where it gets interesting. While I tried to keep things somewhat simple, it's become a bit of a mess of C++, NodeMCU LUA and Ruby, so stick with me here for a bit.

The AVR Side

The ATMega168, controlling the core of the Lasertag Sets, was programmed in C++, using Eclipse IDE. All libraries are custom and self-created (even though that probably wasn't necessary >.<), but aside from that there isn't much magic here.

All tasks are handled in Interrupts, so the main loop is free for anyone to use, should that be necessary!

It mostly just listens for commands coming in from the ESP, and reports back events, like a detected hit or when the trigger button is pressed. 

Currently, the AVR handles the following tasks:

  • Blinking the RGB LEDs of the board in various patterns (configurable)
  • Beeping the buzzer and vibrating the haptic feedback
  • Sending out IR pulses and decoding received pulses
  • Detecting when the trigger button is pressed down.

The ESP Side

The ESP-01 is the most complex part of the module. It runs using NodeMCU, however it might eventually be switched over to a more powerful C++ code to alleviate some of the annoying limitations of the LUA language.

Using it's WiFi connection and MQTT, it connects to the lasertag server. It receives configuration of ... Basically everything, ranging from the Team and Client-ID, to how many shots per second the set can do. I'll probably write a bit more about the configuration options for the sets one day.

Aside from acting as a receiver for configuration, the ESP also handles all the logic of a client. 

It tells the AVR to shoot out in regular intervals, tracks ammunition and reloads, handles respawing the player after a specific time, and provides some other statistics like battery charge and ping of the set itself.

In theory, the ESP could even be configured to run in a sort-of stand-alone mode! Though that wouldn't allow for very dynamic or interesting games, as no tracking of scores or such are done :P

The Ruby side

The server side code of the lasertag system is written in Ruby. Utilizing my own mqtt-gem, it connects up to a Broker, using it to communicate with the lasertag sets. This is mainly to simplify hack-ability of the whole thing, as well as giving me a well-developed communication protocol with low overhead.

Once the Ruby server is started, it handles a multitude of tasks:

  • It hands out unique IDs to any connected lasertag sets. Up...
Read more »

KiCAD_R_3.2.zip

The revision 3.2 KiCAD files. Preferably pull them from the GitHub site, but they're here if anyone asks!

Zip Archive - 2.39 MB - 09/02/2019 at 19:59

Download

  • 1 × MQTT and Ruby server Could be anything, from a small Raspberry to a huge server rack. The lower ping, the better!
  • 1 × A stable WiFi network throughout the field Anything that allows the ESPs to quickly connect, and stay connected, throughout your entire arena
  • 2 × or more Lasertag PCBs You can find those over on Aisler: https://aisler.net/Xasin/xasworks-lzrtagpcb/mainboard-esp32
  • 2 × or more fancy shells for the PCBs Those could be the 3D printed casings, old airsoft guns, or something made from carton. As long as it glows and looks great!

  • First Bootup of 3.2!

    Xasin14 hours ago 0 comments

    Aw hell yeah <3 

    Aisler took its time with delivering the PCBs, so this project log is coming up a little later than expected.
    However, as usual, the wait time was more than worth it! The PCBs are of the usual high quality I've come to know from them, and the stencil with it was perfect as well.

    Perfect solder paste application, partly thanks to the good stencil, partly thanks to the good stencil-holder I was allowed to use~

    I had just gone through an exam, so sitting down and being able to take some time to solder the Lasertag was ... Actually kinda tranquil.
    It certainly began to rapidly eat up any sense of time I had left, so I was able to, somehow, sit through an entire morning and afternoon just soldering away :>

    So, enough of the talk, let's share some pretty pictures!

    ...

    Ok I might have forgotten to take more pictures.
    I did, however, not forget to write a detailed assembly guide over on GitHub :> 

    Here's the awesome extra: Everything worked first try!
    Seriously, how often does that happen? It did make me rather proud, in a way :>
    The only thing that went wrong was the fact that I didn't have enough PMBT2222A transistors, which means that for now not all weapons have their vibration motor running, but for initial programming etc. that's no problem at all.

    A few minutes after finishing up their solder, I was already able to get some lovely blink action running~

    Gha, just look at these precious little babies! 
    The fourth one is functional too, I just didn't have a USB cable or LiPo at hand to run it.

    So yeah, Revision 3.2 is finally underway at basically full speed. We've even already started adjusting the 3D casing for the new navigation switch at the side, and will be printing them out either today or tomorrow, so stay tuned! 

    It's going well :>

  • Lights? Check

    Xasin6 days ago 0 comments

    Alright, so it seems Aisler is taking their sweet time with the new boards...
    It's still quicker than LCSC, and they'll be here tomorrow, but the wait was a biiit annoying. Happens <.<

    The DigiKey components arrived though, and oh boy: <3

    In the mean time however, I was able to work on some other, extremely important and long-awaited code rewrite:
    The light handling! 

    Before, a lot of the patterns were defined in a rather static manner, making it hard to add new effects and get them integrated in the code in a smooth fashion.

    I was finally able to change this by using a completely new, class-based approach with a proper, abstract interface and a list of components to render.
    The result is a very easy to expand, stable, and quite stunning new effects system!

    I think the video here shows it off best:

    I'll be reviewing the changes in a GitHub PR soon. Those that are interested can poke me for a link :>

    And next monday?
    Time for the new hardware to be soldered~

  • Next hardware rev. underway!

    Xasin09/02/2019 at 19:54 0 comments

    Alright!
    Seems that now that I am out of the confines of my last project (who made DShot and drone ESCs so damn uncooperative :S), things have been moving very smoothly!

    As of today, I've already ordered enough components for 4 whole Lasertag sets off of DigiKey, with the PCBs following shortly, courtesy of Aisler.
    If you want your own, you can find them right here: 
    https://aisler.net/Xasin/xasworks-lzrtagpcb/mainboard-esp32

    The whole thing has turned out a little more pricey than expected, with about 50€ worth of hardware per set, but this does include all sensors, batteries, speakers, etc., so it is a price I can accept!

    Anyhow, enough talking, let's have a few pictures rolling in~

    The backside
    This side has been put chock full of any SMD, QFN and LGA components, making for easy hot air soldering, if you got it!
    The front
    Here we have all the beefy components - ESP, 1A 3.3V regulator, FT231 UART Bridge, etc. - get out your big soldering iron!

    The new board is a thing of beauty - and not just because the first revision was pretty nice~

    It features a self-programming setup instead of RST and GPIO0 push buttons (which turned out to be pretty annoying to use), a much bigger regulator than the previous version, as well as a thicker supply capacitor near the ESP32 to prevent WiFi Brownout at higher power.
    We also have the MAX audio amp on-board now (though soldering a breakout board on is easy), a LSM6DS3 IMU to play hot potato with your device or detect crashes, and a beautiful new navigation switch to change your weapon selection mid-game. That's right, you can have your SMG AND a pistol!
    Or ... Well, whatever.

    There's also a little more protection like resistors to the external cable and a 3.3V ESD diode to make these boards tough as nails, and let's hope the new battery charge IC does not blow up like the previous ones did :S

    Also, fun little side-note:
    The ESP32's GPIO pins are now 100% maxed out! 
    Buuut I bet you can squeeze in more pins if you're smart enough ... Somehow <.<
    For now we don't need any of that - and if we do, we use a I2C expander :P

  • Next revision incoming!

    Xasin08/28/2019 at 09:38 0 comments

    Whew... It's been a while, hasn't it! 

    Don't worry, I never left this project alone - but taking breaks and getting a bit of variation in is healthy and fun, and I got to say, it was great working on the DSKorder and a small Hovercraft and stuff. 

    However, I've been idly collecting ideas, changes and improvements that I've been wanting to implement, and more importantly: I want to document the entire process, from soldering the hardware to setting up the Webserver.

    It would be good practice for me, and helpful for anyone wanting to take inspiration or make their own sets. 

    So, what's planned for Revision 3.2:

    There's a lot for sure, and I'll be chewing down on things over the next few months. In summary:

    • The hardware will be polished. A few better support caps, charger IC, you name it. The MAX chip and a new I2C 6DOF gyro will now also be put on the board, and I'll optimize it for hot air flow resoldering~
    • I'll also run a first larger batch of soldering. I intend to get at least four boards fully functional, which will finally allow me to try out proper games with friends!
    • The software will get multiple new features! After cleaning up the current code and adding the IMU, I'm planning to rework the light control system to make custom light patterns easier to add. There's also going to be a new button to switch weapons on the fly, and a Filesystem based sound and weapon handler. This will give the server a lot more control by being able to upload new weapons on the fly, so... Wheee~
    • The MQTT interface will be changed slightly, mainly to remove some load from the Lasertag sets themselves. Nothing major here ^^
    • Speaking of the server, that thing will be polished a bit more too. After giving the Ruby backend a few small extra features to handle games smoother, I intend to add a SQL database to log events. That way, it's a bit easier to see what happened during a game, print statistics, that sort of stuff~
    • Once all of this stuff is running smoothly, we'll get a Web interface! I've been playing with React, which is a fantastic backend for this sort of work. If everything goes well there will be a Player HUD, a big game statistics page to put on a screen or projector, and a game configuration window to mix and match game modules on the fly, set player teams, etc. This is definitely the most ambitious part, but it I get it right, it'll put this project into a truly professional grade of Lasertag system. 

    I'm really looking forward to this work, especially since I'll make sure it's well documented and reproducible for any guys here. 

    I'll also post updates on hardware and software here, so you can review it. The more eyes the better, since we all make small mistakes ^^'

  • Lack of documentation, or "Always expect people to buy it"

    Xasin07/13/2019 at 09:53 0 comments

    There's an important lesson for everyone here at the bottom, please give it a read!

    This morning I was greeted by a lovely message from Aisler, telling me that my project had been bought by a couple of people!
    That isn't fully unexpected, as I was told a FabLab was working on implementing my Lasertag Project as a small workshop course, but it still comes with a problem:

    The PCBs uploaded to Aisler are faulty

    No, it's not a major problem, or something that requires the people that did buy them to throw them away.

    The problem is the following: In the top right corner of the front of the PCB, a trace coming from the RESET and GPIO0 buttons is shorted against the ground pad.
    The good news is that it is easy to cut with a scalpel, and the rest of the PCB is functional - so for those that did already buy the PCB, don't worry, it will still work!!

    The bottom pads of the buttons, where you can also see the vias, are the "output" pins. They should not be connected to ground, but they are. Cutting them with a scalpel will resolve the issue, and you can not damage anything by accidentally leaving the fault in. If the ESP32 does not boot up, but 3.3V is present, this is likely the problem.

    Other things worthy of note to get it running:

    • You will need a set of 0603 resistors and capacitors to solder up the set. I did not include them in the Aisler parts list, because those are components I always have on hand from a lot of other projects myself.
    • You will need PMBT2222A (or similar BEC SOT-23) transistors for the IR LED and vibration motor (I always keep those on hand as well, they're fantastic little BJT transistors <3)
    • You will need a 480mAh LiPo battery, preferrably with built-in protection. For germans, I can highly recommend eckstein-shop.de for those
    • You will need an Antenna for the ESP32, preferrably a PCB antenna with sticky backside to mount in the casing.
    • For the external vest detector piece, you will need 40kHz VISHAY IR Receivers, as well as a bunch of WS2812 LEDs to chain together. Oh, and a D-SUB cable, the ribbon cable mounted ones are great!
    • You'll also need a I2S Amplifier chip. The MAX98357a is perfect for the job!

    My lesson: Always be vocal about the state of the project

    I feel a bit bad for the people that bought the PCBs and now have to go through the process of reworking them.
    If I had been a bit more vocal about the state of the project, i.e. mentioning that the PCB needs reworking, the Aisler parts list isn't fully complete, then maybe people would have waited a bit longer, or would have been more prepared to deal with these issues.

    The way I made it seem was that the project was fairly easy to build, and ... That's my mistake.

    However, this should also be a lesson to anyone trying to buy or build projects here on HackADay:
    Nothing will be perfect. Mostly, we're all just a bunch of nerds having fun with these things - or at the very least, I know I am!

    There will be undocumented flaws, incomplete parts lists, or other little quirks in the process that the person building them dealt with and ... Never really wrote down, because it didn't seem like a big deal.

    As a maker, the best we can do is to put a huge "WORK IN PROGRESS" above the things that aren't quite ready yet. 

    And as the person trying to build it, we should always make sure the project is replicable: Please, ask about the status of PCB etc.
    If the maker says "The PCB needs a bit of rework", then that means it's not ready yet.

    Continue if you wish, but at your own risk to deal with all those little quirks the Maker left in.

  • Ready player one!

    Xasin05/03/2019 at 16:27 0 comments

    Boy, it's been a long time since my last project update, hasn't it?
    A good number of things came up, including but not limited to the DSKorder project (who's also getting a project log soon <.<), university exams, holiday ... A good bunch of stuff.

    But, there's one really important thing to note:

    The System is now fully functional!


    Read more »

  • Putting a proper case on things!

    Xasin03/04/2019 at 20:34 0 comments

    Whew, it's ... Been a month already?
    Oh boy, I better update you guys. I don't want people starting a mutany D: 

    In any case, progress has been going steadily and nicely! The last month did have a rather tough exam phase in it that kept my productive hours at bay, but I was able to tweak a number of systems!
    More precisely, the current state is:

    • WiFi and MQTT work (the data still needs to be interpreted, but that's a trivial task)
    • The IR system is starting to take shape - TX already works, I still need to solder up a receiver to test RX.
    • Sounds and weapon systems have been tuned a little to fit a new speaker I got.
    • The battery readout and status indicators now do what they're supposed to, but ...

    The most important change of the last few weeks is the completion of the first revision of my brand new casing!
    Just have a look at this gorgeous render:

    And, of course, the whole thing has been test-printed and assembled already!
    Yes, it looks as good as in the computer <3

    The Lasertag case, fully assembled <3
    That thing there? It's the antenna I ordered in the slightly wrong size. Doesn't fit inside the case, still works for testing purposes!

    Oh yeah and the actual lighting? Looks freaking awesome!
    The viewing angle is a bit disturbed at the moment, since the printer I was working with didn't have a fitting multi-material setup. In the second version of the print the slots will have some clear filament filling it, creating a bit of a better light diffusion. However, the whole thing is still quite impressive!

    In the gif above the test idle pattern is flashing, with a few "I WAS HIT!" markers flickering in between.
    Oh yeah, and of course the gun also reacts to shooting:

    PEW PEW PEW
    Note: The front LED isn't installed in the nozzle section just yet. Usually the fire flashes will appear in the four front reliefs, this is just a dirty POC

    All in all I'm super happy with the progress this project is making, but I do feel like taking a small break.
    There's a different project (called the DYSKorder >:3) I wanted to work on for a while, and I got a bit veeeeryy into this ...

    But yeah, this is still alive and kicking some serious ass at this point!

  • Rev. 3 all ready!

    Xasin01/27/2019 at 11:24 0 comments

    So!
    My PCB materials finally arrived! A week later than expected, sure (gee thanks Aisler for no explanation), but the PCB's quality is impeccable!
    Traces are clean cut, the enig-finish is wonderfully shiny, and I think they even chose a thicker kind of copper than what you get from LCSC.
    Just look at that gorgeous chip:

    Aisler's PCB fresh out of the bag - and looking pretty good!

    Now, I didn't want to post an update until I had something interesting to show you guys, so I took a few days to solder up and program the chip.
    Just as I expected the ESP32 was an absolute pleasure to work with, and apart from a small reversed diode that caused one of the PMBT2222A to blow up, everything worked out really well!

    The fully finished piece looks fantastic, and has tons of new features, so I am incredibly happy about it!
    The only thing I'd like to change would be the audio amplifier chip. I discovered that the ESP32's DAC can only handle up to 10kHz of updates - after I had ordered the chip. Luckily the MAX98357A, a proper audio I2S DAC with up to 32 bits at 44.1kHz, is available on a breakout for just 5€, so I got one of those and wired it up.
    The next revision will obviously have the chip on-board, but for now, it works great!

    Have some pics of the current revision:

    Just look at those lights in action! This set has a proper connection status indicator (blue), battery charge indicator (red/green dual LED), and four WS2812 spread out over the body to provide lighting inside the casing. Hell yeah <3

    And a few quick videos of the audio system in action. It's really impressive what a few cheap but well-chosen components can do!

    I'll be working on completing the software for now, and will be ordering a second revision of the PCB with a few fixes, the new audio chip, etc.
    I suppose I could also already get started on designing a new casing for this PCB, but that's a secondary concern. 

    Besides, the huge speaker of this current version will be hard to fit into ... Anywhere :P
    The later versions will probably use a 3cm diameter speaker, but I just had this one laying around, and it seems to work fine!

  • Ordering some hardware

    Xasin01/05/2019 at 22:38 1 comment

    Alright!
    After a few days of intense number-crunching, I've finally wrapped up the PCB design. The new chips do everything I want them to on a small 35x50mm board.
    They'll be ordered from Aisler, and if you wanna grab a hold of a few of your own, the project's public! Find it here!
    All the necessary PCB Schematic files are on GitHub, and I'll be writing a code library soon.

    KiCAD 3D Render
    That feature is just too handy, isn't it? This is what the board will look like, with that gorgeous ESP32 WROOM on the side, and my brand new logo in the middle! <3

    I will be getting the boards after a good night's sleep. Aisler supposedly delivers within a week, and shipping from and to Germany won't take more than two days, so we'll be getting results very soon!

    I encourage you guys to go through my PCBs, found on GitHub. If you spot anything odd, or have an improvement, feel free to open an issue or leave a comment!

  • Revision 3 incoming!

    Xasin01/02/2019 at 20:30 0 comments

    I don't know about you guys, but I certainly always get a bit antsy when I got free time and nothing to do.

    Luckily, that's not the case!

    I might have mentioned that I wanted to rework the hardware to use the ESP32. After multiple very positive experiences, I am happy to say that I officially started working on the next version with said controller!

    The improvement will be noticeable, in a lot of aspects:

    • The RGB LEDs will be replaced by WS2812, which are going to make for MUCH better visual effects than before.
    • Using only one powerful MCU instead of an ESP8266 and an AVR will make developing and maintaining code easier.
    • The WiFi will be much better! (NodeMCU + MQTT loves to swallow up packets :c)
    • There'll be real sound! Instead of a piezo buzzer, I've decided to use the ESP32 I2S + a small audio amp chip (the TDA301) to be able to play back much nicer sound effects. I might even be buying myself a small unity asset for that ... Hehe
    • There'll be proper power filtering, 3.3V LDO, and a built-in charger + USB<->UART bridge. Again, all making developing and maintaining devices easier. Heck, maybe I'll even throw a charge indicator LED in there!


    I've got a small request: If any one of you guys knows a bit more than me (i.e. "nothing") about audio systems, I'd love a pair of second eyes on the amplifier, just to make sure it doesn't blow up.

    With a bit of luck those PCBs will be ready to go by the end of this week. I'll be ordering them from Aisler too, so expect assembled and beeping chips by the end of January!

View all 12 project logs

  • 1
    Solder things up!

    The first step to any good hardware project like this is to take some time (i.e. a whole afternoon <.<) and solder up your first batch of sets.

    For this, you will need:

    • A package from Aisler, found here: https://aisler.net/p/QLILZEMV
    • A couple of standard value 0805 Caps (47uF, 10uF, 1uF and 100nF, though you can use what you have)
    • And a few 0805 resistors (10k, lots of 220R, 100k and 200k) 

    Oh, yeah, and buy some solder paste, because this PCB is best made with hot air reflow due to QFN components on the backside!

    All ready?
    Great, then head over to the GitHub wiki page for the more detailed, up-to-date instructions!

View all instructions

Enjoy this project?

Share

Discussions

Tomm Dool wrote 09/08/2019 at 20:49 point

Just came across you project looks great.  Going to be following this project.
Just played with a Lazertag system at the Halo: Outpost Convention in Anaheim the other weekend, provided by Battlecompany.com.  There system was one of the best I have ever seen and used. It uses a Class 1 Laser that will reach out with accuracy across a football field in day light.   They had a test target out 150 - 200ft and if you didn't have the red dot on it perfectly you would miss.  very accurate and apparently you can adjust the beam width manually based on skill level.

They also use BT to connect to head band sensors, so no wires between head band or vest.  Just a thought as I know how the wiring is the weak link in most commercial products out there.  Thought that was a fantastic idea.  The rest works over wifi so figure a ESP32 or something.

I loved how simple the system was.  you carried just a rifle and a head band connected via BT to that rifle.  It had life indicator through 4 LED that changed colour as you die. Sounds for weapons fireing, hits and enemy hits.  LED read out for shots left and a simple button to reload.  No wires.  Respawn you just had to aim your rifle at the box and it respawned you in 5 seconds.  back in game.   Controlled through there  software, that ran off of tablets and had a display for score for all to see.  Sounds exactly what you are trying to do here.  Which I love.

Looking forward to see the progress, I will be building it myself

  Are you sure? yes | no

Xasin wrote 09/11/2019 at 14:38 point

Aw, why thank you!
I recommend waiting a little while for me to receive and test the newer hardware generation, to see if there are any problems. Most likely it's fine though.

Regarding the Battlecompany com technology, there are a few reasons why I chose to do my system this way:
1) IR Lasers are a bit expensive to come by. Even if you find a model for only 10€, it would still increase the price a good bit. The best I can do is a VSCE IR Laser diode. 4° of spread, 4€ price, should give you 100m range in dark conditions :)
2) A bluetooth headpiece would require another ESP32, LiPo, charge controller ... Essentially, a whole new main board. It could add 20 to 30€ of cost, and while I agree that cables are slightly annoying, they're sadly not that big of a problem to make me want to replace them with Bluetooth. It's still cool stuff though!

Health and ammo indicators are currently not added on the weapon itself, but it's very easy to add modules via I2C to realize this. My current goal is to build a interactive Webpage though, which lets you display stats via phone or projectors or such :)

Oh, one thing that I am going to do a bit nicer is respawning:
I'll be using Infrared beacons to determine player position, and set rooms for players to respawn in, as well as to capture. No weapon-pointing necessary :>

  Are you sure? yes | no

Brandonkeithangelo wrote 09/04/2019 at 19:27 point

I fly scale RC airplanes and would like to mate this to an in-cockpit FPV setup . Xasin, seems you might be into RC as well, might you be interested in getting a project going? here's a cool setup with some fancy optics on a beautiful day- https://www.youtube.com/watch?v=L57KXqWJSDE&t=1s

  Are you sure? yes | no

Xasin wrote 09/04/2019 at 20:55 point

That sounds pretty awesome, actually!
Adapting the code here to work for FPV shouldn't be too hard. The core components like shot handling can essentially stay the same, it just needs a remote trigger and most likely a better network connection. 

I'll be focusing on the normal setup for now, getting the new hardware up and stuff, but after that ... Why not.

  Are you sure? yes | no

Brandonkeithangelo wrote 09/04/2019 at 21:43 point

Hmmm...does seem like a fair amount of work has gone into the networking aspect. I wonder if we could just drop something like an Xbee3 onto the pads and run with that!

  Are you sure? yes | no

Brandonkeithangelo wrote 09/04/2019 at 21:46 point

Also, any reason you aren't using a IR laser diode?

  Are you sure? yes | no

Xasin wrote 09/05/2019 at 06:51 point

Well, the ESP isn't just networking. It also controls all the peripherals, from Audio to the IR data transmission and WS2812 control. I could, however, connect an XBee or LoRa module, and tweak my code to communicate via that. 

Also, if you have a good source of cheap IR Lasers, please do share! 

I just haven't found any on Digikey or similar yet, and so far the IR led has worked well. A laser would be way cooler though... 

  Are you sure? yes | no

Xasin wrote 09/05/2019 at 07:00 point

Actually, I need to go back on my own word here regarding lasers.

Turns out there is a technology called Vertical Cavity Surface Emitting Laser, or VSEL 

I found a emitter for only 4€, so an acceptable price, with monochromatic light output at the wavelength of my detector, and a near perfect 4° beam divergence without further optics. Makes me wonder how far I could push the range with these! 

  Are you sure? yes | no

Dylan Brophy wrote 07/29/2019 at 15:12 point

I haven't looked at this project yet, but all your pictures look really f***ing cool.

  Are you sure? yes | no

Xasin wrote 07/29/2019 at 16:26 point

Hey, what looks good sells better!
Right now there's a bit of a lack of documentation. I'm going through some University stuff right now, and will do a new revision of the Hardware, with a proper clean-up of the Software and Documentation, and a better Server with a nice webinterface.

The whole base is fully functional though, and I got a few "in-action" videos already :>

So feel free to stick around and see what it'll turn into!

  Are you sure? yes | no

Daren Schwenke wrote 05/04/2019 at 04:01 point

I am going to *have* to build this.  Good job!

  Are you sure? yes | no

Xasin wrote 05/04/2019 at 07:00 point

!!!! 

Oh, please do! But don't order the PCBs just yet. There's a bit of a redesign I need to do, since I switched to a different audio processor, and the current design has a PCB trace shorted to ground and needs fixing.

I'm assuming you can Solder QFN parts, but if not I'll include Solder points for a breakout board to be attached on. All other parts are hand-solderable though.

  Are you sure? yes | no

Daren Schwenke wrote 05/04/2019 at 07:53 point

At this point I'm pursuing the #P2 - Pick and Place for 3D Printers project mainly to attempt to compensate for my rapidly failing ability to solder anything small without screwing it up.  :)

  Are you sure? yes | no

Boris van Galvin wrote 03/04/2019 at 21:20 point

What an amazing project! 
Many many moons ago I built the first generation of laser tag units down here in NZ, they used a 8080 processor and ran a HeNe laser tube. A real pain in the rear as after a few big knocks the mirrors would go out of alignment. The vest was constructed from motor cross armor and had a pile of small solar sensors installed to register hits.

We later changed the system to something a little more simple and used a strobe light constructed from an engine timing light. These were a little more robust but there was no communications as to who hit who.

Your project is really cool, having it set up like you have creates so many opportunities to expand on it.  

  Are you sure? yes | no

Xasin wrote 03/04/2019 at 21:33 point

Gha, your version sounds like a heck of a lot of fun too though!
I haven't done much in terms of vest equipment yet, but the connector at the back exposes a WS2812 signal for as many vest LEDs as wanted, as well as a general purpose I2C connector for other peripherals.

All source files are available for others to work with, mainly on the Github site! The PCB uses mostly hand-solderable components, so feel free to take some inspiration from it :D

  Are you sure? yes | no

Daren Schwenke wrote 05/04/2019 at 08:00 point

All the HeNe lasers I used in the 8080 era already had bonded optics.  I guess I was privileged and didn't even realize it..

  Are you sure? yes | no

Michael Obed wrote 09/25/2018 at 12:04 point

This looks awesome, man! Very promising!

I've implemented a Laser Tag project myself using a very similar method...I initially used an ESP8266 + Arduino IDE for the hardware side and C for the software side. It worked well, but for scalability and reliability I re-did the server side in C++ and implemented checksums and a HTTP web server. I want to do the hardware with the ESP-32 as well, as the extra power and comms are attractive...

Who knows, maybe that project will make it here too! ;)

  Are you sure? yes | no

Xasin wrote 10/02/2018 at 18:27 point

You made the server with HTTP and in C? 
Now that's kind of impressive! I had no idea how to make something like that, so I chose Ruby for my server software. I intend to stick with it though, as it is a lot more flexible than C or C++ in terms of live reloading of software - something that could come in very useful for custom servers or similar.

At least I didn't use the Arduino IDE - I prefer the cleaner, more professional environment of Eclipse (as well as the C++ autocompletion it offers <3)

  Are you sure? yes | no

HP (@banjohat) wrote 09/12/2018 at 05:23 point

This is great!

Some interresting details in your build - how uncool of visahy to call the IR receiver TSOP >_< it's not even an SMD package :P

Are you only registering hits on the gun? I would love to see a vest with targets as well!

  Are you sure? yes | no

Xasin wrote 09/13/2018 at 17:04 point

Oh, thanks for pointing out my mistake!
I accidentally called it that because the vendor I buy my parts from has their own naming scheme. Their IDs vary quite a bit from the original ones, I must have mistaken that!

Also, it's exactly the opposite - the guns don't have any built-in sensors (although adding one is trivial), and it's only the "vest piece" (or in this case a tiny strap-on shoulder sensor) that registers the hits.
Since the sensors I use have a pull-down output they're easy to connect in parallel, to have as much sensor coverage as you need.

  Are you sure? yes | no

dlhavema wrote 09/08/2018 at 05:30 point

post some code.  Super cool start man

  Are you sure? yes | no

Xasin wrote 09/08/2018 at 06:49 point

The link to the GitHub is already there. I'm still working on a bit of documentation, but it's mostly self-explanatory. 

There's also a directory with one or two example game scripts ^^

  Are you sure? yes | no

dendad51 wrote 09/07/2018 at 07:54 point

Oh, the IR camera is just to be used to sight the gun in as the "image" is invisible.

I use these sort of flashlights and have IR LEDs to put in them. Just the LED and lens is used, in a 3D printed housing.

https://www.ebay.com.au/itm/5x-CREE-Q5-LED-Zoomable-Focus-Bright-Flashlight-Torch-1200LM-Light-AA-14500/172292965071?epid=2256915909&hash=item281d7602cf:g:4r4AAOSwK8BbQ~4V

And that feeds into one of these...

https://www.ebay.com.au/itm/Clip-on-12x-Optical-Zoom-HD-Telescope-Camera-Lens-For-Universal-Mobile-Phone-JFA/253742359147?epid=730731908&hash=item3b1439226b:g:GWAAAOSwR6RaRD~E

Yes, the WT558D modules are great. But don't forget to buy a programmer too.

  Are you sure? yes | no

Cor van Essen wrote 09/07/2018 at 07:16 point

That looks cool. I made something similar with everything stuffed in a toy gun. And the receiver LED were on the gun itself. Yours looks way nicer. I used an Adafruit board to connect to my phone which would then upload to the internet.  I have a proof of concept, but then other things came along. So this is inspiration to pick it up again.
How good is your IR range? 

  Are you sure? yes | no

Xasin wrote 09/07/2018 at 07:32 point

I'm using a strong IR led, probably over driving it a bit, and it's run through a fairly small hole (0.7mm diameter) to focus it. 

That gives me about 40m of range in low light conditions, some 20m if the sun is out. 

I'm still looking for a good IR lens though. With it I could focus a much larger beam, and the range could skyrocket. How much I sadly don't know.

  Are you sure? yes | no

Nick wrote 09/09/2018 at 11:08 point

Im not sure  how well they work, but have you tried lens's for arcade light guns? https://na.suzohapp.com/products/optical_guns/96-0068-00

They can usually be bought for cheap used on ebay,, or from local arcade operators.

  Are you sure? yes | no

Xasin wrote 09/09/2018 at 11:37 point

@Nick, that lens looks fairly good, thanks for the hint! But I fear glass lenses aren't the best option for IR - some materials don't let those wavelengths through very well. It's also a bit very expensive, so I'll stick with a simple lense-less design for the time being

  Are you sure? yes | no

denys wrote 09/06/2018 at 22:35 point

This is really interesting. I've stalled a bit on my Laser Tag system that was aimed at being finished last Christmas!

Mine is built into Nerf guns and uses an Arduino Pro Mini driving the IR LED from one of those metal flashlights. The LED and lens from the flashlight is mounted in a 3D printed housing that is stuck on the end of a mobile phone telephoto lens so it shows the "picture" of the LED at quite long range. Visible LEDs are used to setting up, but an IR enabled camera will be the way to go.

Sound is from a WT588D module. Various gunshot sounds can be selected, along with an empty click, and any other sound wanted.

It may be worth looking at these for your gun.

Power is an 18650 call with a USB charger/protector board.

But I like your ESP8266 idea.

Maybe I'll get back to it so my son gets it for this Christmas ;)

  Are you sure? yes | no

Xasin wrote 09/07/2018 at 07:32 point

The WT588D module is definitely something I'll have to look at! 

Sound is still something that my project is lacking at, I'm just using a variable frequency PWM output for the buzzer. 

I like the idea of using nerf gun casings, but my system doesn't care about what it's inside. 

As for using the IR LED of a flashlight together with a IR camera, I'm not sure if that is a good idea. A camera wouldn't be capable of decoding a modulated IR signal, meaning that any source of IR light would look like a shot. 

Plus, you wouldn't be able to discern individual players, which would not allow for different weapon types or teams to be used effectively.

Isn't a IR camera a bit expensive too? >.<

If you want, you can look at the code of my AVR chip. With a few modifications it can run in stand-alone mode, without the need for an ESP and server. 

You'd have to change it a bit to work with the sound module too, but that's doable.

  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