I had a few hours last week and started an experiment for a very basic laser tag system that could mount on an RC plane. It uses some code borrowed from my laser tag hosting station but is stand alone on an Arduino. Because I used the same protocol as my hosting station, it also works with the Phoenix LTX guns. Not that I recommend running out into the field and trying to shoot the plane from the ground but it is good for testing.
This is nothing as cool as
@ioteo's solution above.
The goal was with minimal hardware to be able to play via FPV. You should be able to plug in a single receiver channel for the trigger. Then just turning it on will start the game and the LEDs give you all the status.
Status Display
My goal was to put LED strips on the trailing edge of the wing. A tail mounted FPV camera should be able to see them so the pilot can see their own status. A chasing plane should also be able to see them if they are bright enough.
It looks like:
Code:
* = lit
X = not used
_ = off
Health (Left Wing / Green)
Full [* * * *] [X X X X]
Half [_ _ * *] [X X X X]
Ammo (Right Wing / Blue)
Full [X X X X] [* * * *]
Half [X X X X] [* * _ _]
Dead (Both Wings / White)
[* * * *] [* * * *]
Hit (Both Wings / Red)
Full [* * * *] [* * * *]
IR Receiver / IR LED
The IR Receiver would also be on top. So you need to be 'above' the other plane to hit it. The IR LED would be a small tube you should be able to wing mount to avoid the prop. My goal is to 3d print that and just glue the LED in place. If you happen to have a dual motor design you could mount it in the center. The IR Receiver likely needs a little PCB to keep everything secure as it will be exposed. I found some adjustable 3d printed laser tag lens/LED mounts. But I am having trouble sourcing a small acrylic lens. I am hoping for 20mm or smaller with a focal length < 100mm.
Power
The part I have not figured out is the power regulator for the Arduino. It is a little more complicated then I think I can make myself. I have one on a breakout board I can use for prototyping but if I had to shove that into a plane with the Arduino and connected to either the flight battery and/or a separate battery the case/mounting gets a little complex. There are Arduino's that run off a 1S LIPO battery directly which solves the regulator problem but means you have one more thing to charge and keep track of. They even including charging circuits so you can mount the battery internal and charge via USB.
Setup
I was planning on a basic dip switch on the plane for configuring. Power cycling just restarts the game.
The LTX protocol allows for Solo or 2 teams and tracking player 1-8. This means 2 switches for selecting team and 3 for player Id. Player Id isn't useful unless you want to also support reporting scores. I had no plans yet on how to get the scores off the system. The LTX guns use IR communication back and forth with the 'host' which is what my hosting station did. It is not perfectly reliable and would be even harder with the system attached to a full airplane. A simple wireless solution would work well like Bluetooth LE. Any cell phone would be able to listen and get the score report from each plane once they were on the ground. Again
@ioteo's solution above with an actual wireless data link is much more robust and lets you have full control but this works for scores. Not a feature a I am planning now as it is ALOT more complex on the software side.
Mounting & Case
To keep things simple, I might make a single case that houses Arduino, Arduino shield PCB with IR Receiver, dip switches and plugs for IR LED and LED strips. The alternative is to make the IR Receiver separate which means the Arduino can sit inside but it also means one more part to keep track of. It would also enable multiple receivers to be used so you could bottom mount one. Some Arduino's appear to have limits as to how well they might be able to read from multiple IR receivers at the same time as the timing appears pretty tight. It is possible with some boards, just not sure if mine will or not.
Trigger
I was planning on just using a single switch on the transmitter to control firing. RC Transmitters are not game controllers so they don't have trigger buttons in a good spot. I may try allowing the switch to enable a moderate rate of automatic fire. Something like 1 shot per second. If your plane has 50 shots then you just flip the switch while you are chasing and switch off when not using it. I was hoping to not have to use one of the LEDs for Ammo indicator but it might work.
Component Layout
View attachment 158730
I started the software prototype and bread-boarding some of the parts. Undocumented code here:
https://github.com/afaucher/Tagger My goal is to keep the whole thing < 1000 lines of code.
What works:
- Reading hits and taking damage.
- Tracking health.
- Player 'death'.
- Displaying hits (flash red), health (% green) & death (stay on white) on LED strip.
What doesn't work yet:
- Reading the PWM signal from RC receiver for the 'trigger'
- Shooting
- Ammo tracking
- Dual LEDs, one for each wing.
- IR LED power amplification
- Configuring player / team via switches
- Powering via onboard battery
- All the above parts for mounting on a plane.