How to build a working IR Artillery Gun
- silversurfer1947
- Lieutenant
- Posts: 3337
- Joined: Tue Oct 27, 2015 9:54 pm
- Location: Bristol, UK
Re: How to build a working IR Artillery Gun
Sorry, I probably did not explain it well. If you are not a member of rctankregiment (like me) you can not get access to the forum. If I click your link, all it does it take me to the sign in page. I was not referring to your membership of either forum.
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!
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!

- 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
The IR set up is remarkably easy. Getting over the fear of blowing something up is the hard part.
A light sensor is also on my to-do list. The sensor is a light activated on/off switch, so with the right code added to the 'Firecannon' code and replacing the switch on A0 it should be 'fairly' easy to figure out. I wish we had a few Arduino guru's on here as they could probably do these things standing on their head. It would be a far better way of activating the gun.
One thing I did find was that the Uno was heavier on a cheap Nimh than I expected. It didn't last 6 hours, the IR stopped working but the sensors were ok.
I did buy a Mega 2560 board to do the full Monty tank, but I don't have a bang up to date tx, and don't really fancy spending out on a new one just to play with the system. The board that I received was faulty so that went back for a refund anyway...
A light sensor is also on my to-do list. The sensor is a light activated on/off switch, so with the right code added to the 'Firecannon' code and replacing the switch on A0 it should be 'fairly' easy to figure out. I wish we had a few Arduino guru's on here as they could probably do these things standing on their head. It would be a far better way of activating the gun.
One thing I did find was that the Uno was heavier on a cheap Nimh than I expected. It didn't last 6 hours, the IR stopped working but the sensors were ok.
I did buy a Mega 2560 board to do the full Monty tank, but I don't have a bang up to date tx, and don't really fancy spending out on a new one just to play with the system. The board that I received was faulty so that went back for a refund anyway...

Tiger 1 Late
Panther G
King Tiger
M36 B1
Panther G
King Tiger
M36 B1
Re: How to build a working IR Artillery Gun
My apologies for this - I am not totally sure what you mean??silversurfer1947 wrote:Sorry, I probably did not explain it well. If you are not a member of rctankregiment (like me) you can not get access to the forum. If I click your link, all it does it take me to the sign in page. I was not referring to your membership of either forum.
Re: How to build a working IR Artillery Gun
T.Watson wrote:My apologies for this - I am not totally sure what you mean??silversurfer1947 wrote:Sorry, I probably did not explain it well. If you are not a member of rctankregiment (like me) you can not get access to the forum. If I click your link, all it does it take me to the sign in page. I was not referring to your membership of either forum.
- 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
We can't see the page on the link as only forum members are allowed to see that part of the forum.
Tiger 1 Late
Panther G
King Tiger
M36 B1
Panther G
King Tiger
M36 B1
Re: How to build a working IR Artillery Gun
No worrieswibblywobbly wrote:The IR set up is remarkably easy. Getting over the fear of blowing something up is the hard part.
A light sensor is also on my to-do list. The sensor is a light activated on/off switch, so with the right code added to the 'Firecannon' code and replacing the switch on A0 it should be 'fairly' easy to figure out. I wish we had a few Arduino guru's on here as they could probably do these things standing on their head. It would be a far better way of activating the gun.
One thing I did find was that the Uno was heavier on a cheap Nimh than I expected. It didn't last 6 hours, the IR stopped working but the sensors were ok.
I did buy a Mega 2560 board to do the full Monty tank, but I don't have a bang up to date tx, and don't really fancy spending out on a new one just to play with the system. The board that I received was faulty so that went back for a refund anyway...
You have been a great help - I am going to buy a soundboard and go from there - I will post a follow up
I think with the right programming someone with the right know how could make a killing using these boards - hmmm ELMOD comes to mind.....
Re: How to build a working IR Artillery Gun
So far I have spent £37 on this project incase that includes the order for the soundboard which includes a speaker
- 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
Total cost so far, roughly:
Arduino Uno £5.00
Switch £1.00
Emitter £1.00
4 sensors £1.50
Phono plug £0.50
I have just hooked a up an SD card £1.50 and can play a gunfire sound, but without an amp it is very quiet. I hooked up a £0.20 amp and although it is louder, I am getting interference from somewhere...and have yet to find the source.
The artillery gun fires IR off a pressure pad, and takes hits via the sensors, and flashes a hit led as well, so once I have the sound sorted out it will be a 100% working unit.
Once I have done that I can buy a sound detection or PIR movement sensor to replace the pressure switch.
Arduino Uno £5.00
Switch £1.00
Emitter £1.00
4 sensors £1.50
Phono plug £0.50
I have just hooked a up an SD card £1.50 and can play a gunfire sound, but without an amp it is very quiet. I hooked up a £0.20 amp and although it is louder, I am getting interference from somewhere...and have yet to find the source.
The artillery gun fires IR off a pressure pad, and takes hits via the sensors, and flashes a hit led as well, so once I have the sound sorted out it will be a 100% working unit.
Once I have done that I can buy a sound detection or PIR movement sensor to replace the pressure switch.
Tiger 1 Late
Panther G
King Tiger
M36 B1
Panther G
King Tiger
M36 B1
Re: How to build a working IR Artillery Gun
Well I have moved things on a little bit with the electronics finally!
Here is a short video of the gun sound. The sound file is a 16bit wav file and is stored on a 2mb flash memory on the Adafruit FX card. The FX card is connected to an 3.7w class D amplifier, the speaker is 8ohms and has a 15w output.
At the moment the sound is triggered via my mac using the serial monitor in the IDE software
Aside I will probably use a different speaker with the actual model.
https://youtu.be/G3ca6E47AWU
The next stage is get it to work with the Tank IR code - any thoughts as to how I can do this please?
I am also investigating how to get this whole thing to be active by either a PIR or Ultrssonic sensor to trigger an antitank gun (Thats the aim of this project
)
T
Here is a short video of the gun sound. The sound file is a 16bit wav file and is stored on a 2mb flash memory on the Adafruit FX card. The FX card is connected to an 3.7w class D amplifier, the speaker is 8ohms and has a 15w output.
At the moment the sound is triggered via my mac using the serial monitor in the IDE software
Aside I will probably use a different speaker with the actual model.
https://youtu.be/G3ca6E47AWU
The next stage is get it to work with the Tank IR code - any thoughts as to how I can do this please?
I am also investigating how to get this whole thing to be active by either a PIR or Ultrssonic sensor to trigger an antitank gun (Thats the aim of this project

T
- 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
I have been trying to eradicate the horrendous interference, like an out of tune radio, on mine. It is silent, I press the reset button, it plays the gun sound, and then squeals away like a piglet.
If I take the SD card out it carries on squealing, it seems to be a problem with the TMRpcm library, which carries on generating a tone after the track has played. There is a way to stop it by adding
The TankIR part of this, which Luke created, works flawlessly, my artillery gun was taking shots at any tank that ran over the pressure pad, and would take hits, complete with flashing led's. The cheap 7.2v Nimh battery lasted for a few hours too.
If I take the SD card out it carries on squealing, it seems to be a problem with the TMRpcm library, which carries on generating a tone after the track has played. There is a way to stop it by adding
but as to where I add it, I haven't got a clue, I assume the line is added afteraudio.disable();
, but then I need to declaresample.play("gun.wav");
. I will have a go at this when I have the chance.audio
Are you using an Adafruit sketch, or web sourced one? As for getting it working with the Standalone TankIR sketch, it will need to be triggered when the cannon is fired, so presumably calling this routine from a line of code immediately after it, or, included in the cannonfire code. This is all new stuff for me, so will have to solve things one step at a time.#include <SD.h>
#include <pcmRF.h>
#include <TMRpcm.h>
#include <pcmConfig.h>
// set the speaker pin
sample.speakerPin = 9;
// see if the card is ok
if (SD.begin(SD_CARD))
{
return; // It's not there, don't do anything
}
// quite loud
sample.volume(9);
// play the start up sound
sample.play("gun.wav");
The TankIR part of this, which Luke created, works flawlessly, my artillery gun was taking shots at any tank that ran over the pressure pad, and would take hits, complete with flashing led's. The cheap 7.2v Nimh battery lasted for a few hours too.
Tiger 1 Late
Panther G
King Tiger
M36 B1
Panther G
King Tiger
M36 B1