How to build a working IR Artillery Gun

This forum relates to the Open Source Tank Control Board (TCB). Please read the sticky and visit the main site to find out all about the board and how to install it.
Post Reply
User avatar
wibblywobbly
Major
Posts: 6396
Joined: Fri Oct 17, 2008 9:30 am
Location: South Wales Valley
Contact:

How to build a working IR Artillery Gun

Post by wibblywobbly »

This is a how-to on how to build a stand alone system that function as a gun that will fire an IR beam, take hits, and which has a muzzle flash. It is powered by an Arduino Uno.

Parts required:
Arduino Uno - Available off Ebay, any Uno will do, they are around £5 in UK money.
Image
An IR emitter board - Available off Ebay, they are around £3 in UK money.
Image
Anything from China will be ok.
1 x Jack plug.
1 x Battery socket
1 x Battery (I used a cheap old tank battery).
1 x TSOP 4838 IR sensor.
1 x Emitter (optional - one is soldered onto the emitter board).
2.54mm Pin Strips.
Fine gauge wire - A cheap way to get this is to buy a length of multi core cable, it will have around 5 insulated cores inside.
Microswitch - Free if you have a bind button or an old airsoft unit.

So, total cost is less than £10.

Arduino's are complicated aren't they? It's all computer code and stuff.
No need to worry, all of the complicated stuff has been done.
Just follow these instructions.

1. Arduino Board

Buy the board.
It arrives.
Go to this link
https://www.arduino.cc/en/Main/Software
and download what is called the IDE. This is free. It is the operating system for the board. At the time I am typing this the latest version was 1.8.2.
It runs on Windows, Linux or a Mac. Arduino software is cross platform compatible.
Ok, you have downloaded it.
Create a new folder and call it Arduino Uno or something imaginative like that.
Install the IDE into the folder.

There you go, that was easy. You now have an Arduino Board, and a way of talking to it from your PC.

2. The TankIR Software

This is the software that you install on the Arduino board that enables it to operate as a battle system and controls all of the functions.
All that you need to do is download it, and install it on the board.
How is this done?
Easy. Click on this link.
https://github.com/OpenPanzerProject/TankIR
Download the gubbins.
Create a New folder, and unzip the downloaded files into the folder.
Now you have the entire operating system for the Arduino on your PC.

3. How to get the TankIR software onto the Arduino

Just in case you get confused, an Arduino program or app, is called a Sketch, so whenever you see that term, its the code that you are working with. A Sketch can be named in any way, same as any other program. You only install something called the xxxx.ino file, this installs everything that you need.

An Arduino board operates very simply.
It can only hold one Sketch at a time.
It can only run one Sketch at a time.
It runs when power is switched on.
It stops when power is swtched off.
It remembers the Sketch that was last loaded, so it will still be there when you switch it off and back on again.

Ok, do something scary.
Use a usb cable to plug the Arduino into your PC (they usually supply one).
A light will come on, on the Arduino. That's normal.
Run the Arduino IDE that you installed.
At the top click on 'Tools'.
Select 'Board'
Select 'Uno'.
Your PC should auto detect the Port and Baud Rate.
A blank Sketch screen will appear (if you were programming it, this is where you would type the code).
Click on File
Click on Open
Browse to the TankIR folder.
Open it and look for the xxxx.ino file.
Double Click on that.
A new Sketch window will open, containing the Tank IR Sketch.
Click on the -> arrow below the menu. It will say 'Upload' when you hover over it.
Sit on your hands.
The Sketch will upload to the Arduino.
You may see some warnings, just ignore them.
Wait until the message 'Upload Completed' is displayed.
Unplug the usb.
Close the IDE screens.
Job done.

How to wire it all up.

This wiring diagram shows you how to do it. Just do one wire at a time, until you have done all of them.
tankIRwiring.png
tankIRwiring.png (38.31 KiB) Viewed 9592 times
If you solder the wires from the components to the pin strips, it means that you will be able to unplug the wiring if you ever need to.
I strongly recommend getting some narrow heatshrink to go over each solder joint both on the pin strips, and on the led's and other components.
I will see if the activation switch can be replaced by a random timer that will fire the gun at intervals without a switch when I have the time.

Firing:
phpBB [video]


Taking Hits:
phpBB [video]
Tiger 1 Late
Panther G
King Tiger
M36 B1
User avatar
silversurfer1947
Lieutenant
Posts: 3337
Joined: Tue Oct 27, 2015 9:54 pm
Location: Bristol, UK

Re: How to build a working IR Artillery Gun

Post by silversurfer1947 »

Things must be improving. I can actually understand some of this.
Richard
Tamiya Tiger 1, Taigen FlakPanzer IV,Torro M16 half-track, Tamiya Panther,WSN/Torro T34,Taigen M41 Bulldog,H/l/Taigen Sherman M4A3,H/L T90, Haya M3 Grant, Metal Origins 234/2 Puma, Nashorn by Alwyn. I was only going to have one tank - honest! :D
User avatar
HERMAN BIX
Major-General
Posts: 10656
Joined: Sun Jan 12, 2014 12:15 am
Location: Gold Coast,Australia

Re: How to build a working IR Artillery Gun

Post by HERMAN BIX »

You are way ahead of me Mr Surfer.........I have a nose bleed.
HL JAGDPANTHER,HL TIGER 1,HL PzIII MUNITIONSCHLEPPER, HL KT OCTOPUS,HL PANTHER ZU-FUSS,HL STuG III,HL T34/85 BEDSPRING,
HL PZIV MALTA,MATORRO JAGDTIGER,HL F05 TIGER,TAMIYA KT,HL PANTHERDOZER,HL EARLY PANTHER G,TAIGEN/RAMINATOR T34/76,
HL AN-BRI-RAM SU-85
User avatar
silversurfer1947
Lieutenant
Posts: 3337
Joined: Tue Oct 27, 2015 9:54 pm
Location: Bristol, UK

Re: How to build a working IR Artillery Gun

Post by silversurfer1947 »

I did say SOME of it. :D
Richard
Tamiya Tiger 1, Taigen FlakPanzer IV,Torro M16 half-track, Tamiya Panther,WSN/Torro T34,Taigen M41 Bulldog,H/l/Taigen Sherman M4A3,H/L T90, Haya M3 Grant, Metal Origins 234/2 Puma, Nashorn by Alwyn. I was only going to have one tank - honest! :D
T.Watson
Recruit
Posts: 37
Joined: Sat Jul 30, 2016 5:48 pm

Re: How to build a working IR Artillery Gun

Post by T.Watson »

Apart from linking it to the tank - how would you wire a speaker unit to a diorama setup
See my PAK40
link
http://www.rctankregiment.com/rctankfor ... 34&t=10078

MTA
Trevor
User avatar
silversurfer1947
Lieutenant
Posts: 3337
Joined: Tue Oct 27, 2015 9:54 pm
Location: Bristol, UK

Re: How to build a working IR Artillery Gun

Post by silversurfer1947 »

T.Watson wrote:Apart from linking it to the tank - how would you wire a speaker unit to a diorama setup
See my PAK40
link
http://www.rctankregiment.com/rctankfor ... 34&t=10078

MTA
Trevor
Unfortunately, the rctankregiment no longer allows guest access.
Richard
Tamiya Tiger 1, Taigen FlakPanzer IV,Torro M16 half-track, Tamiya Panther,WSN/Torro T34,Taigen M41 Bulldog,H/l/Taigen Sherman M4A3,H/L T90, Haya M3 Grant, Metal Origins 234/2 Puma, Nashorn by Alwyn. I was only going to have one tank - honest! :D
T.Watson
Recruit
Posts: 37
Joined: Sat Jul 30, 2016 5:48 pm

Re: How to build a working IR Artillery Gun

Post by T.Watson »

ok how do I become a member?
I thoughtI was....
I am TWA2016 on http://www.rctankregiment.com/rctankforum/index.php
Last edited by T.Watson on Thu Jun 01, 2017 7:37 pm, edited 1 time in total.
User avatar
wibblywobbly
Major
Posts: 6396
Joined: Fri Oct 17, 2008 9:30 am
Location: South Wales Valley
Contact:

Re: How to build a working IR Artillery Gun

Post by wibblywobbly »

I can't see the link as I am not a member on the site, however, to get sound, and its something that I will work on when I get the chance, you will need a sound card and and amp. Both are cheap, and depending on the card it will change how it is hooked up.

The basics are get an SD sound card.
Program the Arduino to see it and read it. Also what will trigger the process to read the sound that you want and play it.
Hook an amp to the sound card.
Hook a speaker to the amp.

The sound usually has to be a .wav file. I have seen numerous ways to do it on the web, but haven't tried any of them yet.

https://medium.com/@colten_jackson/simp ... a135eabad0

https://www.youtube.com/watch?v=cjHldoeQLoY
Tiger 1 Late
Panther G
King Tiger
M36 B1
T.Watson
Recruit
Posts: 37
Joined: Sat Jul 30, 2016 5:48 pm

Re: How to build a working IR Artillery Gun

Post by T.Watson »

I have built a Vandramodel Pak 40 and want to build a a diorama that does the IR stuff along with sound - I have an arduino UNO which I have uploaded with the IR tank sketch - so next step add some sound so that we can add a bit of fun at our tank battles
I am waiting for the the IR emitter to arrive from china :)
Also - seriously sorry to bore you as I am a novice at this - Motion detection I want to add a 'motion detector to the setup - any thoughts?

I also have M7 priest model to build and I am wondering if I could do the full programming with IR Tamiya compatible etc - if you have any pointers on this that would be fantastic :)

Sorry for the question/info overload
All the best
Trevor
T.Watson
Recruit
Posts: 37
Joined: Sat Jul 30, 2016 5:48 pm

Re: How to build a working IR Artillery Gun

Post by T.Watson »

seen the links I will study :)
Post Reply

Return to “Open Panzer Tank Control Board”