Hello, I am working building a new laser tag protocol.
There are multiple aspects to the design that I would like to implement and I was wondering if the Teensy 4.0 would be a good candidate for this application. I want to use multiple forms of serial communication: SPI for interfacing with a sound card, I2C to communicate to an LCD controller, and UART for the RF. Additionally, I need to be able to generate a 56Khz, 48Khz, or 36Khz carrier frequency for IR communication. The packet structure I am building off of uses a 600us time base. So there are a lot of timing concerns for generating a packet. I would really like to be able to tie the trigger to and IRQ that is handled by an ISR to launch the packet in a minimum number of cycles so I can exit the ISR quickly to make CPU available for receiving packets from other players (possibly in another ISR). I currently have a proof of concept built using an Arduino Mega (just for the IR communication), but the board is so bulky that I need a very large gun to be able to fit it inside. The end product is going to probably run on 4-8 AA batteries. I would love to hear ideas about any other additions, implementations, and improvements.
The core idea is to introduce a feedback loop into a laser tag system. A lot of protocols are just 1 way where an IR packet is sent and received. The person who is tagged knows who shot them and how much damage they did, but the tagger has no information. Most systems have a way of compiling the data at the end of the game for accuracy, number of head shots, etc., but I want to be able to have that happen in real time. Where the tagger knows whether or not a tag was successful and who it was they tagged. I am hoping to use this to implement multiple game modes involving roles that currently aren't feasible due to the 1 way communication. The feedback is most likely going to be completed using WIFI to transmit the data back to the tagging gun. I am also thinking about implementing a server for managing the data and compiling it so people can get their stats and the guns don't have to do that on their own. Additionally, I am looking at developing an app to be able to program the guns in different game modes. This will probably be done through the server, or maybe via bluetooth for smaller games.
So in regards to the questions I have:
1. Is there a way to generate the carrier frequency using the output of a timer tied directly to a GPIO pin so that I don't have to waste CPU cycles generating the signal?
2. When working with the timers are any of the communication protocols dependent on them and will not work as a result?
3. Is the Teensy 4.0 capable of doing all these communication protocols at the same time?
4. How much power does the Teensy consume? Does it have Low Power Modes?
5. How do interrupts work with the Teensy? Can priority be specified via software?
Thanks for reading. I am really looking forward to hearing back from you all.
There are multiple aspects to the design that I would like to implement and I was wondering if the Teensy 4.0 would be a good candidate for this application. I want to use multiple forms of serial communication: SPI for interfacing with a sound card, I2C to communicate to an LCD controller, and UART for the RF. Additionally, I need to be able to generate a 56Khz, 48Khz, or 36Khz carrier frequency for IR communication. The packet structure I am building off of uses a 600us time base. So there are a lot of timing concerns for generating a packet. I would really like to be able to tie the trigger to and IRQ that is handled by an ISR to launch the packet in a minimum number of cycles so I can exit the ISR quickly to make CPU available for receiving packets from other players (possibly in another ISR). I currently have a proof of concept built using an Arduino Mega (just for the IR communication), but the board is so bulky that I need a very large gun to be able to fit it inside. The end product is going to probably run on 4-8 AA batteries. I would love to hear ideas about any other additions, implementations, and improvements.
The core idea is to introduce a feedback loop into a laser tag system. A lot of protocols are just 1 way where an IR packet is sent and received. The person who is tagged knows who shot them and how much damage they did, but the tagger has no information. Most systems have a way of compiling the data at the end of the game for accuracy, number of head shots, etc., but I want to be able to have that happen in real time. Where the tagger knows whether or not a tag was successful and who it was they tagged. I am hoping to use this to implement multiple game modes involving roles that currently aren't feasible due to the 1 way communication. The feedback is most likely going to be completed using WIFI to transmit the data back to the tagging gun. I am also thinking about implementing a server for managing the data and compiling it so people can get their stats and the guns don't have to do that on their own. Additionally, I am looking at developing an app to be able to program the guns in different game modes. This will probably be done through the server, or maybe via bluetooth for smaller games.
So in regards to the questions I have:
1. Is there a way to generate the carrier frequency using the output of a timer tied directly to a GPIO pin so that I don't have to waste CPU cycles generating the signal?
2. When working with the timers are any of the communication protocols dependent on them and will not work as a result?
3. Is the Teensy 4.0 capable of doing all these communication protocols at the same time?
4. How much power does the Teensy consume? Does it have Low Power Modes?
5. How do interrupts work with the Teensy? Can priority be specified via software?
Thanks for reading. I am really looking forward to hearing back from you all.