Tamiya IR battle system

Greets all... a newb here!

I have bought an Arduino Uno to play with and to try an implement a project I have been toying with for ages.

Tamiya radio controlled tanks use an IR system to shoot each other, I am trying to create a static gun, it will fire at random intervals but stop for a fixed period if "hit". There is very little data I can find on the protocol or data stream etc. other than it uses 940nm sensors and 38Khz carrier. This seems decidedly like an IR remote control so I thought of using either the IRremote or IRLib libraries. I have got the Arduino to receive something but the tank won't respond when I replay the sequence. I really don't know if what I am trying to do is a goer or where to turn for help.

Any thoughts please?

Thanks V. much.
Drew

Should be do-able...

Post the IR signal output from the IRrecvDUMP example sketch (from the toy tank) & I will have a look at it for you...

the output required looks like Raw (??) folowed by a series of numbers

Have you managed or tried to get IRremote working with your TV remote?

Check out 'rcuniverse.com' RCTanks WarRoom Forum. There used to be a guy on there who was making PIC based battle boards and IR apples do go in HL tanks and battle Tamiyas.

Hi,

Thanks very much for you help.

I did PM a couple of the guys on RC Universe forum who have done similar, I haven't as yet had a reply.

I have tried two different sensors, on is a is Vishay TSMP58138, the other a VS1838B. They do seem to give different results... I TSMP58138 yet had chance to try it with a TV remote.

Below are the outputs from the two sensors, the pulse seems to last about 1 second total each time the gun is fired, I believe a patter is repeated lots of time, the receiver has to get three iterations to register a hit (if the info I can find on the 'net is correct).
Output from Vishay module...

Decoded Unknown: Value:0 (0 bits)
Raw samples(32): Gap:8550
Head: m150 s350
0:m200 s400 1:m200 s400 2:m150 s400 3:m150 s3300
4:m200 s350 5:m250 s350 6:m200 s350 7:m200 s350
8:m250 s350 9:m200 s350 10:m200 s400 11:m200 s400
12:m150 s400 13:m200 s350 14:m0
Extent=11400
Mark min:0 max:250
Space min:350 max:3300

Decoded Unknown: Value:0 (0 bits)
Raw samples(34): Gap:8050
Head: m200 s350
0:m200 s400 1:m200 s400 2:m150 s400 3:m200 s350
4:m0 s3100 5:m0 s350 6:m200 s400 7:m200 s400
8:m150 s400 9:m200 s400 10:m200 s350 11:m150 s400
12:m250 s350 13:m200 s400 14:m150 s400 15:m150
Extent=11650
Mark min:0 max:250
Space min:350 max:3100

Decoded Unknown: Value:0 (0 bits)
Raw samples(32): Gap:8100
Head: m50 s350
0:m200 s400 1:m200 s350 2:m200 s350 3:m200 s450
4:m100 s3300 5:m200 s350 6:m200 s400 7:m200 s350
8:m200 s400 9:m200 s400 10:m150 s400 11:m150 s450
12:m200 s350 13:m200 s350 14:m200
Extent=11500
Mark min:100 max:200
Space min:350 max:3300

Decoded Unknown: Value:0 (0 bits)
Raw samples(32): Gap:8150
Head: m0 s400
0:m150 s400 1:m200 s400 2:m150 s400 3:m200 s400
4:m100 s3300 5:m200 s400 6:m200 s350 7:m200 s350
8:m250 s400 9:m150 s400 10:m150 s450 11:m200 s350
12:m200 s350 13:m200 s400 14:m200
Extent=11500
Mark min:100 max:250
Space min:350 max:3300

and from the VS 1838B...

Decoded Unknown: Value:0 (0 bits)
Raw samples(4): Gap:34264
Head: m3100 s2800
0:m5950
Extent=11850
Mark min:5950 max:5950
Space min:32767 max:0

Decoded Unknown: Value:0 (0 bits)
Raw samples(4): Gap:7950
Head: m2850 s3050
0:m5850
Extent=11750
Mark min:5850 max:5850
Space min:32767 max:0

Decoded Unknown: Value:0 (0 bits)
Raw samples(4): Gap:8100
Head: m2850 s3050
0:m5800
Extent=11700
Mark min:5800 max:5800
Space min:32767 max:0

Decoded Unknown: Value:0 (0 bits)
Raw samples(4): Gap:8100
Head: m2800 s3050
0:m5850
Extent=11700
Mark min:5850 max:5850
Space min:32767 max:0

First of all the TSMP58138 outputs the full modulated signal, so will not work in this scenario (without more detailed coding)

The other sensor is a cheaper one. Normally I would suggest going with the VIshay receivers eg TSOP....38), but it seems to work in your case.

However, based on a quick review of the output provided it looks like the signal is just 2 marks & one space in-between.

....in short a very simple IR code

So to send this all you should need is to add something like this to you code, when sending via IRLib:

/*
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:

Thanks so much!

I have ordered some Vishay TSOP 38 sensors.. I suppose as it's only sending a gun signal it only needs to be a short signal. As a test I added your code to the IRsendDemo and it worked a treat! That's a major step on the road to my first useful project!

Thanks again!

Great - glad to be of help

Yes, I know this is an old thread, but it's the only one relevant to my needs on the web.

I am also looking to undertake a project based on the Tamiya IR code. The emitters I use are the Maplins YH70M and the sensors are TSOP4838. The reason being that these components are tried and tested and work in RC tanks, and give a comparable performance to the industry standard for IR battle systems. The emitter will hit sensors at over 30m, and the sensors will receive hits at the same range when powered by proprietary RC tank control boards.

As far as the Uno is concerned, and never having undertaken this sort of thing before, there appears to be a 5v limit on the led. I am rather concerned that repeated use of the emitter will burn the chip.

I can get to grips with the IR sketch using libraries and the info in this thread hopefully, but Uno electronics and controlling current is unknown territory for me. I will be powering the board from an 7.2v battery (full charge 8.4v/cut off at 6v), the pulse to the emitter will be about 1000ms, so do I simply need a simple inline resistor that will give me 5v at the emitter led?

Hoping someone can assist...total newbie to Arduino programming here, even though I have two Reprap printers powered by them... :confused:

Rob