TankIR - Arduino Nano and TBS

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.

Postby IdefixRC » Tue Aug 31, 2021 2:34 pm

Hello everyone,

I'm in the process of building a Tamiya Gepard. As I'm going for a wireless connection between hull and turret and as the control board does not (yet) support the Tamiya Battle system, I installed an arduino nano with the TankIR sketch.

Loaded the sketch using the instructions (downgraded the driver) and can see it comes up nicely in the serial monitor.
Connected the apple to 5V, common gnd and the D5 and D2 pins. When I bridge D5 with 5V the apple LEDs light up.
Installed the transistor and IR and tested it by bridging D4 to GND. I can see the IR LED fire when I view it through the phone camera and the serial monitor indicates fire cannon correctly. So it overall looks like it works, however when I point the IR emitter at the apple and fire I get no hit indication. neither does the apple LED come on at any other time (when powered up for example).

I'm a bit at a loss on how to troubleshoot this without another working TBS setup (unless TankIR ignores the own IR signal somehow?) and test whether I have an issue with the Arduino/TankIR or the able is faulty.

Will be grateful for any tips.
Thanks !!
User avatar
IdefixRC
Recruit
 
Posts: 6
Joined: Tue Aug 31, 2021 2:23 pm

Postby 971wright » Tue Aug 31, 2021 4:36 pm

Hi when it is transmitting a signal it cannot receive a signal. This is how it dosnt shoot its self, without another unit to test against it is hard to know if you have it correct, you can test the emitter by looking through a digital camera you should see a blue light from the emitter(whether the code is right is another thing) Tamiya code is different to heng long code.

regards pete

971wright
2nd Lieutenant
 
Posts: 2710
Joined: Tue Jul 22, 2008 8:16 pm
Location: nelson Lancashire

Postby LukeZ » Tue Aug 31, 2021 5:49 pm

Hi Eric, it sounds like you have everything set up correctly and have confirmed as much as you can with a single unit. You guessed the "problem," and Pete is right, the circuit ignores its own shots in order not to shoot itself. :)

So to really complete your tests you will need a second Nano IR setup or another brand of tank.
User avatar
LukeZ
Lance Corporal
 
Posts: 167
Joined: Sat Apr 17, 2010 8:03 pm

Postby IdefixRC » Wed Sep 01, 2021 4:45 am

Ahhhhhhh awesome. Thanks for that :-) Spend a few hours trying to get it to shoot itself Lol !!!
I will test with another unit in that case (LED's ordered and on the way :-) !)

Thanks all !
User avatar
IdefixRC
Recruit
 
Posts: 6
Joined: Tue Aug 31, 2021 2:23 pm

Postby IdefixRC » Wed Sep 15, 2021 3:26 am

Hi guys,

Update: I built a 2nd TankIR to shot at my own tank.
Works fine and hits register on the apple now.

I could use some ideas for the trigger though.
I'm using a turret controller in the Gepard Turret which controls the muzzle flash LEDs. In essence, it switches the battery voltage to ground when triggered very rapidly to flash the LEDs.
I used a diode (BAT42 or 47) in an open direction between arduino and the ground wire to switch to gnd in order to tell the arduino to fire. This works great with no muzzle LEDs connected (just switches gnd) but with LEDs connected requires many repeat shots to actually trigger. Checking the voltage on the wire the switching to gnd is very rapid and probably not distinct enough for the arduino to recognize.

Any ideas on how I can get the arduino to recognize the trigger better?

Thanks,
Eric
User avatar
IdefixRC
Recruit
 
Posts: 6
Joined: Tue Aug 31, 2021 2:23 pm

Postby LukeZ » Wed Sep 15, 2021 7:42 pm

I agree the variable input is probably confusing something, though it's strange it works without the LEDs attached. However it would certainly be better to give the Arduino a clean signal. I wonder what signal is triggering your turret controller? That might be a better source to tap into if possible.
User avatar
LukeZ
Lance Corporal
 
Posts: 167
Joined: Sat Apr 17, 2010 8:03 pm

Postby IdefixRC » Thu Sep 16, 2021 12:32 am

The turret controller connects to the main MFU via an IR scale bus so I cannot tap into that directly. Sadly there is no other signal output I can use on the turret controller.

The reason why it works without the non ir gun barrel led is that there is a clear signal to gnd when they are removed, with LEDs installed the line at at 8v and pulled down only for a split second when the leds are fired. I assume that there is a capacitive "lag" of sorts which prevents the arduino pin from dropping to GND fully.

I tried to use a capacitor between gnd and signal pin on the arduino to see if I can improve the signal but without success.

Update: strangely enough I had one instance now in which the IR led fired very consistently each time I triggered them after powering the system up..... Hmmm.....
User avatar
IdefixRC
Recruit
 
Posts: 6
Joined: Tue Aug 31, 2021 2:23 pm

Postby LukeZ » Thu Sep 16, 2021 5:42 am

Well it sounds like the signal is a bit unpredictable, or else possibly a scope would be needed to characterize it more fully. I'm also not sure that 8 volts on the Arduino input is necessarily ideal, but maybe you have accounted for that somehow with your diode.

Since it seems to work well when you don't have the muzzle flash LEDs connected, maybe the most logical thing to do is have the IR Arduino control the muzzle flash. The circuit has a provision already for connecting a Taigen flash unit, see the schematic. They are cheap to buy and would be easy to hook up to this circuit.
User avatar
LukeZ
Lance Corporal
 
Posts: 167
Joined: Sat Apr 17, 2010 8:03 pm


Return to Open Panzer Tank Control Board

Who is online

Users browsing this forum: No registered users and 2 guests