Recent Posts

Pages: 1 ... 4 5 6 [7] 8 9 10
61
Other Open Source Projects / Re: Standalone Tank IR
« Last post by Rongyos on October 26, 2023, 02:52:33 PM »
Hi everybody!

I am stuck on modifying the code and cannot figure it out, I ask assistance:

I want to actively modify the WEIGHT CLASS value with a jumper which connect the pin D7 and GND (I defined the pin and pinMode as input_pullup) but cannot do so much stuff. I know the setup is in the begin() function so I dont want to modify the value of weight class during the loop.
Can you please help me where should I put a code like this? I am lost in the lot libraries :(
Just a draft, IDK what I am doing right now :(
Code: [Select]
 
  if (jumperState == LOW) {
    WEIGHT_CLASS = WC_HEAVY;
  } else {
    WEIGHT_CLASS = WC_MEDIUM;
  }

Thank you for your help.
Rongyos
62
TCB Dev / Re: TCB Firmware with Stock Arduino Mega
« Last post by LukeZ on September 04, 2023, 01:48:56 PM »
Hi Sub, sorry for the slow reply. I would have guessed the voltage regulator as well, but you discovered it yourself. Good work, and thanks for reporting back.

I remember reading somewhere that some of the Chinese Arduino boards use voltage regulators which have a lower current rating than what they claim in the specifications. At higher currents, this could cause the thermal shutoff that you theorize. And the higher the input voltage that the regulator has to drop to 5 volts, the more current and heat will be created. This might explain why yours worked with a lower voltage battery but not with a higher voltage battery.

In your case it seems like the regulator worked for a long time but slowly began to fail. I guess it was just a poor quality part. I agree, hopefully this information will be useful to others.
63
TCB Dev / Re: TCB Firmware with Stock Arduino Mega
« Last post by Sub on September 04, 2023, 10:15:13 AM »
Hi,
Thx for your quick reply, to answer a few of your questions,
The board is a stock Arduino mega 2560, nothing i have made, it is flashed with Luke's DIY Arduino firmware, 7.2volts power is supplied to the board via the jack plug utilising the on board 5v volt regulator for running the board only and utilises a separate 5v independant board for positive and negative feeds for the ancillary components, servos, leds etc with a common negative.

I have now managed to identify and isolate the issue, i had an incling what it was and further testing has confirmed it, as i mentioned in my earlier post, it works fine on 7.4volts but not on anything more despite being rated from 5 volts to 12v input
I checked the specs and various youtube testing videos of the AMS 1117 5.0 VOLT regulator chip mounted on the board and it appears that they are equipped with a thermal regulator that shuts the chip down if it gets over voltage or over current, then re sets when cooled ( provided you have not blown the chip off the board )
It would appear that for some reason my regulator chip has become defective and its parameters have gone out of whack and it tripping this failsafe too early.

I had another chip on an Arduino Uno i was not using so removed it and soldered it back onto my Mega board and everthing is now working fine
A pic of the offending regulator chip.
Hope this may be of use if someone else has this issue.
Regards.
Sub
64
TCB Dev / Re: TCB Firmware with Stock Arduino Mega
« Last post by NS-21 on September 03, 2023, 04:57:34 PM »
Hi,
I have suddenly started having an issue with my Arduino Mega 2560 diy board.
The issue is that if i connect a freshly charged NIMH 7.2v pack or 2cell lipo via the jack plug the board throws a fit by flashing all the lights on in quick time, All the lights, those on the model and board and forward and reverse indicators, the board will not function, the receiver is powered up and lights up but the board is giving the signal of no radio connection yet it is, or low voltage but it is not???
The puzzling part is if i connect a slightly used NIMH pack say around 7.5 volts the board powers up first time every time, even when i connect a 6v NIMH pack it functions correctly, but not with a fully charged pack. It is as if something is limiting the voltage going into the board at a set voltage

Does any one have any ideas how to fix this issue its driving me nuts..thx
Regards.
Sub.

I'm certainly not a direct expert, but there is very little data.

For example:

1. I would like to see a diagram. Have you created your own version based on a respected author's board, or are you following his design?

2. Many interesting points, but so far you have provided little information.



Like mine.

I have created many versions (about 16 software versions and four hardware versions) based on Luke's original product.

I tested the microcircuit, the main power supply was 20 volts. I shared the power, and powered the 2560 DIY version from 16 volts. I have not seen such problems.

P.S. Yes, I've had a lot of fun with this project.
65
TCB Dev / Re: TCB Firmware with Stock Arduino Mega
« Last post by Sub on September 03, 2023, 03:53:13 PM »
Hi,
I have suddenly started having an issue with my Arduino Mega 2560 diy board.
The issue is that if i connect a freshly charged NIMH 7.2v pack or 2cell lipo via the jack plug the board throws a fit by flashing all the lights on in quick time, All the lights, those on the model and board and forward and reverse indicators, the board will not function, the receiver is powered up and lights up but the board is giving the signal of no radio connection yet it is, or low voltage but it is not???
The puzzling part is if i connect a slightly used NIMH pack say around 7.5 volts the board powers up first time every time, even when i connect a 6v NIMH pack it functions correctly, but not with a fully charged pack. It is as if something is limiting the voltage going into the board at a set voltage

Does any one have any ideas how to fix this issue its driving me nuts..thx
Regards.
Sub.
66
Other Open Source Projects / Re: Standalone Tank IR
« Last post by Rongyos on July 10, 2023, 02:08:38 AM »

First of all, if we reach the code you have posted, we already know that we have received a cannon hit (not a machine gun hit).

[...]

This means that we've added up all our damage and it's equal to or over 100%, therefore the tank is "destroyed" and must be disabled.

[...]
I hope that helps!

Hi Luke,

Yes, silly me tought that part of code is for determine if the hit is from cannon or MG. Thats why I didn't understand why cannon hit notification sent out to LEDS and not MG hit.
It is now clear for me, thanks.

Rongyos
67
Other Open Source Projects / Re: Standalone Tank IR
« Last post by LukeZ on July 08, 2023, 03:29:05 PM »
Hi Rongyos,

I don't know if I understand your question exactly, but I will try to explain this bit of code and maybe that will help you.

First of all, if we reach the code you have posted, we already know that we have received a cannon hit (not a machine gun hit).

By this point we have also already calculated our new damage percentage based on this cannon hit. All that has come before this code.

Now, in the code you posted, we have the first part of the "if" statement: if (DamagePct >= 100.0)

This means that we've added up all our damage and it's equal to or over 100%, therefore the tank is "destroyed" and must be disabled.

The second part of the "if" statement is the "else" condition: else we have been hit, and our damage has increased, but we are not yet destroyed (in other words, damage is less than 100%).

In that case we flash the LEDs in the apple that indicate a hit was received. We also enable an invulnerability timer, but only a very brief one. This is simply to prevent receiving multiple hits from a single shot of someone's cannon. As you know, the Tamiya signal lasts for a full second - that would be enough time for us to register many hits if we didn't have this brief timer.

I hope that helps!
68
Other Open Source Projects / Re: Standalone Tank IR
« Last post by Rongyos on July 07, 2023, 04:16:24 PM »
Hi Luke!

I'm just modifying the code for using relays for disconnect motors (to reduce advantages relating tamiya speed reducing function) and just dont understand the code below. After the "else" statement the HitLEDs_CannonHit object shouldn't be HitLEDs_MGHit? If yes my relay object shouldn't be there :)
Code: [Select]
if (DamagePct >= 100.0)
                {
                    // Don't let damage go above 100%
                    DamagePct = 100.0;
                                       
                    // After destruction, the tank becomes inoperative for some period of time (15 seconds is the Tamiya spec - NOT the same as recovery/invulnerability time!)
                    // After that time it will automatically recover itself. During invulnerability time, the tank can fire but is impervious to enemy fire.
                    // Invulnerabilty time is dependent on the weight class.
                    isDestroyed = true;
                    TankTimer->setTimeout(DESTROYED_INOPERATIVE_TIME_mS, ResetBattle);   // DESTROYED_INOPERATIVE_TIME_mS is defined in OP_BattleTimes.h
                    // Start the destroyed light effect
                    HitLEDs_CannonHit();   // After the cannon hit effect, because isDestroyed is true, the subsequent HitLEDs_Destroyed effect will start automatically
                    HitRelay();    //After the cannon hit effect the relay disconnect the motors. Tank cannot move
                    ClearHitRelay();
                }
                else
                {
                    // Flash the hit notification LEDs
                    HitLEDs_CannonHit();
                   HitRelay();
                    ClearHitRelay();
                    // Start a brief invulnerability timer. Each IR signal is sent multiple times, but we only want to count
                    // one hit per shot. For the next second after being hit, we ignore further hits
                    TankTimer->setTimeout(HIT_FILTER_mS, EnableHitReception);

Thanks and regards!
Rongyos
69
TCB Dev / Re: Barrel Smoke
« Last post by LukeZ on June 14, 2023, 03:27:15 PM »
Well it took me two years, but I finally got around to adding the Wiki page for the barrel smoker.

Please feel free to continue using this thread for questions and discussions about barrel smokers.

Barrel Smoker Wiki page
70
TCB Dev / Re: Ideas for the OP Config
« Last post by NS-21 on June 04, 2023, 04:29:40 PM »
Yes, I put a hat on my head, immediately take it off, and put it on my chest.
This is a great addition!

Pages: 1 ... 4 5 6 [7] 8 9 10