Relay for aux port

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.
Jib
Corporal
Posts: 272
Joined: Wed May 29, 2024 1:37 pm
Location: Kentucky, USA
Contact:

Re: Relay for aux port

Post by Jib »

Yeah I’m really beginning to appreciate the level of detail you can mess with with your board (like machine gun flash cadence) and it’s flexibility in how you can run things.
Jib
Corporal
Posts: 272
Joined: Wed May 29, 2024 1:37 pm
Location: Kentucky, USA
Contact:

Re: Relay for aux port

Post by Jib »

Got a really convoluted question, but here we go:

So, I’ve finally gotten my new airsoft motor in the mail, installed it, got it working, but now my solution for blowing out smoke doesn’t work as well.

Before with mechanical recoil, the breach of the airsoft mechanism stayed closed, and all of the smoke went out of the barrel as intended. When I pulled the switch to activate cannon fire, the manual smoke port turned on, which in this case powered a 12v blower. When I released the trigger switch, the manual smoke port turned off.

Now with this setup and the Airsoft functioning, recoil set to Airsoft, when I pulled the trigger the blower activates, but now the breach is open as the plunger is being pulled back, and all of the smoke goes into the turret.

To combat this, I deleted the old manual smoke function/trigger and created a new one: manual smoke toggle function with the trigger of middle left turret stick deflection. I also created an I/O B pulse function with the trigger of Aux 2 Position 1 (Aux 2 Position 1 is the cannon fire switch when it is inactive, Aux 2 Position 3 is what triggers the plunger and the firing sequence).

So what happens here is when I pull the cannon firing switch I create the condition Aux 2 Position 3 and the firing sequence activates. When I release the switch I create the condition Aux 2 Position 1 and now I/O B pulses (I have it set for 700 ms), the cannon blower blower circuit is now closed for 700ms and the cannon blower blows, and because I have that brief period between when the cannon firing sequence activates and the blower activates, the plunger is released by the time the blower activates and most of the smoke goes up the barrel as intended (I have another probably unrelated issue here I will describe in a different post).

My problem is this:

To get the manual smoke port to turn on, thus providing power to the blower for when I/O B pulse is triggered and the cannon blower circuit is closed, I have to hit the middle left turret stick twice. The manual smoke seems to be set to off as default, and even after I hit the middle left turret stick once, there is still no power to it. Only after I hit the middle left turret stick a second time does the manual smoker turn on, and thereafter the toggle function works as expected.

The issue with this is that I have all of my other smoke devices (machine gun smoke blower, machine gun smoke heater, cannon smoke heater) are set to turn on and off via I/O A toggled with left middle turret stick deflection.

And here we get to the crux of my problem. When I do middle left turret stick deflection once, my two smoke heaters turn on, and the circuit for the machine gun blower is closed. But power is still off to the cannon blower. Then when I do left middle turret stick deflection again, the circuit for both of the heaters and the machine gun blower are now open (so they are off), but now the power to the cannon blower (via the manual smoker port) turns on. This doesn’t do me any good, because the cannon smoke heater is now turned off.

I don’t see an ideal way around this, although did come up with a quick fix. It involves having I/O A default set to low so the relay defaults to on when the model is turned on. Then I turn the relay off with one middle left turret stick deflection (manual smoker still off with only one left middle turret stick deflection). Then when I deflect again, both the relay connected to I/O A turns on and the power to the manual smoker port turns on. Then everything acts as expected. I say this is less than ideal because with the relay on when the model is started up, it blows out a bunch of smoke out of the machine gun port. So if I turn the model on and off a lot, as I do when testing things out, I waste a lot of smoke oil.

I came here to ask if having to do left middle turret stick deflection twice to get the manual smoker port to toggle on is working as intended, if there is something I haven’t taken into account, or if this is a bug of some sort.

Sorry for the long convoluted question.

Appreciate any help you can provide Luke
User avatar
LukeZ
Lance Corporal
Posts: 227
Joined: Sat Apr 17, 2010 8:03 pm
Contact:

Re: Relay for aux port

Post by LukeZ »

Hi Jib,

Ok, that was a complicated description, but I think at the end of the day the issue is that the "Smoker - Manual Toggle" function seems to turn the smoker off on the first toggle, rather than turning it on. That theoretically shouldn't happen because of course it's off when we boot, so the first toggle should turn it on.

The toggles can get complicated and in the end it may be worth seeing if you can change your setup to use explicit on/off functions.

However looking at the code there are two thing I can see that might make a difference. It is best to test them separately so we can isolate which change fixes the problem (if either do at all).

I don't have a radio or TCB to test, so I'll ask you to test these firmwares and let me know the results. Here are links:

2025_08_08_tcbmk1_TEST_A
2025_08_08_tcbmk1_TEST_B

If you click on the link it will probably just open the hex file in your browser, instead right-click them and select "Save Link As." Your browser might give you a security warning, but you can tell it to accept the files, I assure you they are safe. :) Save them somewhere to your computer, and then you can flash these to your TCB using OP Config, but instead of clicking the "Get Latest Release" button on the Firmware tab, click the "Use your own Hex" button. These changes shouldn't cause any of your saved settings to be lost, but still, it's always a good idea to save an OPZ file first just in case something happens and you need to re-write them.

Anyway, try Test_A first and if that doesn't do anything try Test_B, and let me know what happens. If by some miracle I have actually fixed anything, I'll put out an official new release.
NO SUPPORT THROUGH PM - read why
Jib
Corporal
Posts: 272
Joined: Wed May 29, 2024 1:37 pm
Location: Kentucky, USA
Contact:

Re: Relay for aux port

Post by Jib »

Yes, TEST_A fixed it! I did not try TEST_B.

Thank you so much for digging through my post and your code for this, I really appreciate it!
User avatar
LukeZ
Lance Corporal
Posts: 227
Joined: Sat Apr 17, 2010 8:03 pm
Contact:

Re: Relay for aux port

Post by LukeZ »

That's great! Would you mind trying Test B as well? It includes the change from A but also a second change. It may work just as well, or the extra change may be too much. It would help me to understand what is going on if I could hear how the second test goes.
NO SUPPORT THROUGH PM - read why
Jib
Corporal
Posts: 272
Joined: Wed May 29, 2024 1:37 pm
Location: Kentucky, USA
Contact:

Re: Relay for aux port

Post by Jib »

Sorry, I just saw this. I’ll give it a try, but I already put it back together (I have to unbolt and unhook the electric to the turret roof to get at the TCB). I got excited because I have everything working finally, hope to put out an update video tomorrow.

I will try to test B tomorrow sometime and report back to this thread.
Jib
Corporal
Posts: 272
Joined: Wed May 29, 2024 1:37 pm
Location: Kentucky, USA
Contact:

Re: Relay for aux port

Post by Jib »

So I flashed B, I saw no difference in how my tank operated. Turn the model on, manual smoke is off, I toggle once, then it turns on, just like it did with A
User avatar
LukeZ
Lance Corporal
Posts: 227
Joined: Sat Apr 17, 2010 8:03 pm
Contact:

Re: Relay for aux port

Post by LukeZ »

Thanks for doing performing that test, I appreciate it. I've posted a new firmware to the official site with both changes, version 0.93.79. You don't have to reflash your TCB since you already have it, but it's now included in the official source code.
NO SUPPORT THROUGH PM - read why
Post Reply

Return to “Open Panzer Tank Control Board”