Proffie IR implementation

I have been doing a lot of blasters lately. How would I go about implementing these features into a blaster and saber?

Ideally the blaster would send a signal when fired that would be received by the saber to activate a blaster block.

I know I need the IR LED to send the signal and would need a receiver. Are there any confirmed components that work? Does the prop file need to be changed at all allow for this action?

How visible does the receiver need to be?

Any information about this would be very helpful!

There isn’t a whole lot of information to be had unfortunately, because not a lot of people have experimented with it.

At the very minimum, the setup you need looks something like this:

Sender

// In CONFIG_BUTTONS
BlasterIRSender blaster_ir_sender;

Then hook up an IR Led (with a resistor) to LED2. (yes, it has be LED2, you cannot use another LED pad.) ProffieOS will handle all the signal encoding, including the 40kHz modulation, so a plain IR led is all you need. Might want to check that the IR led and the IR receiver use the same wavelengths though.t

There are also NEC, RC5 and RC6 IR decoders available if you want to receive other kinds of IR signals.

Receiver

// in CONFIG_BUTTONS
IRReceiver<blade3Pin> ir_receiver;
BlasterDecoder blaster_decoder;
PrintDecoder print_decoder;

Then hook up an IR receiver module to data3. Any pin can be used for this, just change the configuration code accordingly. The IR receiver module will also need power and GND. In most cases, you probably want to hook up the power to the 3.3v pad. I don’t think the IR module will draw enough power to matter, but I’m not sure.

By default, the blaster decoder will activate SaberBase::DoBlast() when it receives the right IR sequence, you can change that here:

Most IR receivers all works basically the same way, so most of them should work just fine. No idea how visible the receiver needs to be. I imagine that a clear line of site between the receiver and the sender is basically required for this to work though.

No changes are required to the prop file, but you may want some anyways.

As for components that work. I used these for my testing:

I’m not sure if I would recommend them since they don’t come with proper data sheets and stuff, but they did work…

Well this is still very helpful :nerd_face:

I was thinking the same thing on my NN-14 or sonic… btw your builds for your blasters inspired me. I am working on a thin blaster proffie for my a180s and a working on a new blaster prop file. restructuring the button set up and feature set.

I been looking at embedding them for a tv begone feat on a blaster or my sonic. And Fredrick is right any 940 nm will work. the 5mm ones sure are the easiest to fined. But I have seen tiny 2mm smd ones. I have used them on my Flux cap build.

Lets say that the IR receiver is not exactly small you might what to use it for an exposed CC build like starkiller or maybe ventress reforged or the like.

@profezzorn I remember some of us chatting about this a couple years back. I ended up getting the kids a current LaserTag setup to use. I can look at the guns and chest sensors and see if there’s anything identifiable as far as how they’re built if that would further the cause. @LadyTea Teagan, FWIW I still have this link: Build a Laser tag game unit - Gadgetronicx

Thoughts?

The laser tag set I have use lenses to focus the beams, but I don’t think that’s really required, especially if you use powerful IR LEDs. Proffieboards can easily drive IR leds up to a couple of amperes, but IR leds that powerful can be hard to find.

Over-volting IR leds seems to be fairly common. The link you showed puts a full 3V into each of the two LEDs, even though they are only rated for 1.5 volts. This may still be safe since IR leds generally have a maximum duty cycle of 30%

Not overvolting is safer though, otherwise a short or something could leave the FET open and destroy the LED. (I had one that literally exploded because I over-volted it.)

I mean you could set it up to trigger on any ir … thats how this laser tag works. well a IR blast of 40khz… you could even set it up for different commands like your tv remote works. Like on off, block, hit, change font, etc… the fun one would be to set up a Bluetooth remote. totally control it from like remote. or another microcontroller. like an esp32. or you can set up a saber to send off commands to another proffie or micro controller running proffie OS but all it does is play sounds. I wonder If it could send motion info and event trigger info fast enough. basically the idea that one handles motion and trigger events and leds and the other plays sounds to match.

any ways. IR signal at a certain freq is always going to be more reliable than exact digital codes that proffie uses. If you are only doing one thing. Like the basic laser tag system here. If you have multiple then digital codes work better.

@profezzorn I think you can easily send a signal 30-40ft away. TV remotes use only 2.5v.

The laser tag guns I have specific coded signals. These signals contain the ID of the shooter and the damage. (The guns have different modes that work like different guns, which shoots at different speeds. Slow guns generally do more damage.)

Setting it up trigger on any IR can work, but would have lots of false positives, in particular if you have fluorescent lighting, or a plasma TV nearby. Setting it up to work with any remote control is also fairly easy, but works a lot better if you have a proper decoder for the IR format that the control uses. (NEC, RC5, RC6, etc.)

40khz-modulated IR is not fast enough for motion data, we would need to use a different protocol for that, which is harder to do. Just triggering events would work well though.

I’m pretty sure you can send signal much further than, but it might require a more powerful LED, and/or some optics to direct the light.

Sorry I mean via bluetooth to transfer that info, I was amusing about how font makers want a wireless experience when it comes to sound. I wonder if BT had enough bandwidth for that info.

And of course the lazer tag would have different signals for different uses. I was talking about this single use case. of lazer tag…

Bluetooth might be fast enough, depending on how it’s configured.
Wifi would definitely be fast enough so if I ever manage to make an ESP32-based proffieboard, experimenting with remote audio would be fun.