In theory, and it is only a theory at this moment in time, I can do this using an Arduino Uno board, some IR code to transmit and receive the signals, and a few components consisting of a couple of resistors and a transistor, and of course, an IR led, and the sensors.
The Tamiya IR code can be obtained using the Uno, as I should be able to load in some code from the online library, fire a tank at a sensor, and have the code appear on screen.
This code is then written into the programming so that the battle system knows what to detect.
It's standard 38khz frequency, but within that the pattern of the signal needs to be known.
I already know that a Maplins YH70M emitter will provide the correct 940nm IR beam.
I already know that TSOP4838 sensors will detect the 940nm IR signal.
The Arduino has a limitation on the power that it can put through an led. 5v volts is the absolute maximum.
The led is 5v.
To get around this a small pcb will be required that controls the current, and that will allow the emitter to operate at full power, thus allowing full range, otherwise it will be around 10ft, rather than 30m. This may explain why the HL IR has such a short range.
I am intending to have the Arduino powered from the 7.2v tank battery.
The board will be connected to the RX18 IR socket.
When a pulse is detected on the HL circuit, the Arduino will fire the emitter.
The sensors will be wired into the Arduino.
When a hit is detected it will flash an led.
The theory is that using one of the T90 RX18's which have better sounds, I will get the gun fire sound when the gun is fired, a muzzle flash is easily done, and the IR will fire as well.
What may be possible, and it's all pie in the sky at the moment, is to plumb the power supply to the RX18 through the board, and incorporate voltage reduction with each hit. I can't at the moment see an easy way to set light/medium/heavy tank hit counts without a USB hookup to a pc, but it should be possible to set them when the programming code is loaded, which takes seconds to do.
Hit sounds may also be possible if I can find a cheap enough soundboard.
This will all be done as and when time allows, and my objective is to use the RX18 which comes in every tank, and see if a battle system can be designed that anyone can put together and plug in.
http://www.ebay.co.uk/itm/UNO-R3-ATmega ... Compatible
http://cdn.sparkfun.com/datasheets/Kits/PowerIR-v11.pdf
Code: Select all
/*
Automatically Generated by AnalysIR - Batch Export Utility
Registered to: xxxxxxxx
Session History
Type : Key : Value : Bits
0 : RAW : : : 0
*/
// NB: Not all protocols are supported by IRremote or IRLib. You may need to edit the code below manually
// Automatically Generated by AnalysIR for xxxxxxxx, visit http://www.AnalysIR.com or email info@....... for further details
int khz=38; //NB Change this default value as neccessary to the correct modulation frequency
unsigned int Signal_0_0[] = {3100,2800,5950}; //AnalysIR Batch Export - RAW
My_Sender.IRsendRaw::send(Signal_0_0, sizeof(Signal_0_0)/sizeof(int), khz); //AnalysIR Batch Export - RAW
// AnalysIR IR Protocol: RAW, Key:
