Registration Notice

Due to increased spam, forum registration must be manually approved by a moderator! Please see this post for instructions.

*

Offline Sub

  • 42
    • View Profile
Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #210 on: May 25, 2021, 12:08:20 PM »
Hi Luke.

So here goes, I bought 2 Mega 2560 and connected them up in turn, found the com ports shown, installed the jumper from A12 to gnd.
downloaded the DIY TCB hex file and Flashed one straight away and was able to connect the TCB and all was okm  awaiting radio etc.

Now the other one, I did exactly the same, it stated com port 5, but it would not flash the firmware, it kept stating wrong com port,
I could connect to com port 5 through snoop and it showed connected, but again i tried to flash from snoop and it disconnected saying wrong com port.
tried snoop and it connected to com port 5 ?.
I have the latest OP config and latest Firmware so am now stuck anyone any ideas ?  :'(
20210525_175016_resized.jpg
TCB Firmware with Stock Arduino Mega 20210525_175016_resized.jpg
Views: 14689

*

Offline Sub

  • 42
    • View Profile
Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #211 on: May 26, 2021, 10:25:07 AM »
I have now concluded it must be a defective board on the communication port, it has been returned to the Vendor.
Sub

*

Offline Sub

  • 42
    • View Profile
Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #212 on: May 26, 2021, 06:32:35 PM »
Well, wired up my Mega to fit my receiver, connected dipswitches and input button, the large manifold on the right is for servo pos and neg for the tank it will be going into, also red / green leds for board read out.
Bit of a rats nest at the moment but will be cleaned up if it works, now to set radio up in OP config. I will unplug the servo connections for setting up.
Sub.
20210526_201023_resized.jpg
TCB Firmware with Stock Arduino Mega 20210526_201023_resized.jpg
Views: 7116

*

Offline LukeZ

  • 1254
    • View Profile
  • France
Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #213 on: May 26, 2021, 11:29:12 PM »
Hi Sub, my apologies for the slow reply! You've made a lot of progress I see. I will try to catch up.

I was graciously gifted an Arduino Uno and the LCD screen that goes with it plus various other bits by a good friend and was wondering if this screen could be utilised some how with a DIY TCB using a Mega board, all the pins correspond to each other, or is my brain going way too fast for my skill level at the moment ? It would be cool if it could be used to show what the board is doing some how, even if it was only current voltage of the battery.
This is a good question but in short the answer is probably going to lean more to the "brain moving too fast" side of things! Of course almost anything is theoretically possible but you'd need a good understanding of coding and also I think you would need to use a different LCD than the shield you presently have. Yes, that shield will plug directly into a UNO (and probably also a Mega) but it will interfere programmatically with pins required for TCB functions. If I were going to use an LCD the better way would be to get a serial LCD unit, there are lots available, and then send the messages out the SER.1 port. But even this would pose challenges. As an aside, I had originally planned an LCD feature for the TCB and that is what the (now unused) SER.3 connector is for. But even I who know how this thing works decided it wasn't worth the trouble.

If you did want a tiny voltage display inside your tank though you could easily add one with something like this!


Now the other one, I did exactly the same, it stated com port 5, but it would not flash the firmware, it kept stating wrong com port,
I could connect to com port 5 through snoop and it showed connected, but again i tried to flash from snoop and it disconnected saying wrong com port.
tried snoop and it connected to com port 5 ?.
As you've returned this one and will be getting a replacement we'll hope the replacement works on the first go. But if that one also gives you problems let me know, there are several things that could potentially have been going on.


Well, wired up my Mega to fit my receiver, connected dipswitches and input button, the large manifold on the right is for servo pos and neg for the tank it will be going into, also red / green leds for board read out.
That's a great start! If you intend to use a lot of servos (or maybe even just one), I might recommend that you supply them 5 volts through a hobby BEC rather than the 5 volts from the Arduino Mega. The TCB design used a hefty 5 volt regulator that can supply up to 3 amps, but an off the shelf Mega board can probably only supply maybe 500mA of 5 volt power. That's plenty to drive your LEDs and the receiver, but a servo could potentially cause the board to brown out. It won't hurt anything to try it, but for sure if you are using more than one servo I'd get a BEC, they're cheap and plentiful.
NO SUPPORT THROUGH PM - Read why
Need a forum account? Read here
Open Panzer FAQs

*

Offline jhamm

  • 145
  • It´s a hobby no profession!
    • View Profile
  • Germany
Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #214 on: May 27, 2021, 01:06:27 AM »
Hello,
try a ARDUINO Mega 2560 Pro Mini R3.
It´s smaller and cheaper.

arduino-mega-2560-pro-mini.jpg
TCB Firmware with Stock Arduino Mega arduino-mega-2560-pro-mini.jpg
Views: 5874
Mega2560ProMiniR3.jpg
TCB Firmware with Stock Arduino Mega Mega2560ProMiniR3.jpg
Views: 5504

*

Offline Sub

  • 42
    • View Profile
Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #215 on: May 27, 2021, 05:06:40 AM »
Hi, thx for the info and encouragement.
Re the servos, if i use the BEC of the speedo will that be ok or will that be limited with going through the mega too.
Or if i just use a separate power source for the servos and speedo but link all their grounds up to the megas ground will that be ok.
Regards.
Sub.

*

Offline jhamm

  • 145
  • It´s a hobby no profession!
    • View Profile
  • Germany
Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #216 on: May 27, 2021, 05:51:24 AM »
Servos require a current of up to 2 A (sometimes more) under load.
The Arduino's 5V voltage regulator AMS1117 is limited to 1A and chinese copy of the AMS1117 is limited to 0,8A.
It is very annoying when the TCB resets because the power requirement of the servos is too high.
The BEC of the ESC is often limited and only delivers up to 2A.
Therefore, an extra BEC is important.

*

Offline Sub

  • 42
    • View Profile
Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #217 on: May 27, 2021, 10:00:49 AM »
Hi chaps.
Thx for you reply...so if i understand you correctly, the esc would provide about 2 amps to the board but this would only be enough to power 1 servo at max stall ?.

So i would be better off using a separate power supply for the servos as then they could draw what amperage they require from the battery  with a 6 volt regulator and just wire the servo signal wires into the Mega then leave the Mega with its own 7.2v supply from the ESC, bec to run the board and Leds, and just connect the grounds together for Mega and servos.

I have been looking through my electronics spares box

I have found 2 MOSFET modules pics attached, i think ( from my limited electronic knowledge that these could be used with the mega for switching Higher amp load applications, is that correct and for the LEDS  if i need more than the 40 mah that the mega can supply.

A lot of questions so i apologise in advance chaps, bit i am trying to learn and improve my electronics skills and knowledge...or err... lack of...LOL.
regards
Sub.
20210527_153907_resized.jpg
TCB Firmware with Stock Arduino Mega 20210527_153907_resized.jpg
Views: 5146
20210527_153930_resized.jpg
TCB Firmware with Stock Arduino Mega 20210527_153930_resized.jpg
Views: 818
20210527_154317_resized.jpg
TCB Firmware with Stock Arduino Mega 20210527_154317_resized.jpg
Views: 941
« Last Edit: May 27, 2021, 01:38:15 PM by Sub »

*

Offline Sub

  • 42
    • View Profile
Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #218 on: May 27, 2021, 10:29:38 AM »
Hi,
Me again....at risk of becoming a PITA,  i think i have have grasped the MOSFET module and an application i could use it on, I SAY MAY have grasped it.

If i apply 6v to the vin and gnd terminals, my servo + and -  manifold to the V+ and V- terminals, then connect pins gnd to the Mega and sig to 5V pin on the mega when i switch on the mega it will provide 5v to the mosfet module switching it on and supplying the 6v from the battery plus about 1 to 3 Amps to the servo manifold if i use a heat sink over 1 amp.


Or am i just deluding myself....
Sub.
« Last Edit: May 27, 2021, 01:48:46 PM by Sub »

*

Offline Sub

  • 42
    • View Profile
Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #219 on: May 27, 2021, 05:12:19 PM »
Hi.
Well.
Here is where i am at today.
Rx plugged into Mega and recognised, OP opened up and all radio settings added, settings updated for the tank it is going into and preferences written onto the board all without any issues.
Radio functions tested whilst in snoop, all brake lights, forward and reverse (red / green) indicator board lights working and correct way around.
Lights 1 and 2 functional, mg light flashes, cannon fire led flashes when ca nnon activated.
Servo 2 steering works, turret traverse servo works when placed into Rc output.
barrel elevation works on servo pan. This was tested with just 1 servo being moved to its relevant pin number.
Left / right turn indicators work and turn off with steering.
Engine start / stop works and i can engage and dissengage transmission.
The only thing i could not get to work was the recoil servo, snoop said the cannon was firing but the servo didnt move but led flashed....

Edit re above...now have recoil servo working, turned out i had looked at Sergeys schematic which is NOT correct as he has recoil in servo pos 4, pin 26, i found the error after going back to read the pin position PDF, for the upteenth time... the recoil servo is pin 25 servo pos 5.

Dont know if that is how Sergey's radio is set up
 BUT for any other newcomers like me, just go off the PIN PDF and be wary of some one else's Arduino set up schematics.

If i wish to use a heng long motor gearbox for turret traverse i take it i use an esc connected to pin 27 for signal and then one of my mosfet modules for power and ground ?
or will the Mega be able to pwer the ESC  on its own.

Also need to connect the Taigen sound unit to see if that works.

Just gone about as far as i can now without some advice....its working well though it appears. ;D
Regards.
Sub.
« Last Edit: May 28, 2021, 02:38:24 PM by Sub »

*

Offline LukeZ

  • 1254
    • View Profile
  • France
Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #220 on: May 28, 2021, 07:04:05 PM »
Hi again Sub,

so if i understand you correctly, the esc would provide about 2 amps to the board but this would only be enough to power 1 servo at max stall ?
There is no one single answer for every application, but simply to avoid problems a BEC would be a good idea.


I have found 2 MOSFET modules pics attached, i think ( from my limited electronic knowledge that these could be used with the mega for switching Higher amp load applications, is that correct and for the LEDS  if i need more than the 40 mah that the mega can supply.
You certainly can use those MOSFET modules to switch higher current devices, including LEDs if they will draw too much.


If i apply 6v to the vin and gnd terminals, my servo + and -  manifold to the V+ and V- terminals, then connect pins gnd to the Mega and sig to 5V pin on the mega when i switch on the mega it will provide 5v to the mosfet module switching it on and supplying the 6v from the battery plus about 1 to 3 Amps to the servo manifold if i use a heat sink over 1 amp.
Your understanding here seems correct to me, but I don't see what the advantage is of this approach. You still need to come up with a 6 volt power source, so that is yet another thing to add and wires to attach. BECs are inexpensive and you can wire them directly to the battery without involving any wires to the Mega. When you plug the battery in, or flip on the main power switch for the model, then the BEC will turn on and can provide 5 (or 6 volts) to your servos.


The only thing i could not get to work was the recoil servo, snoop said the cannon was firing but the servo didnt move but led flashed....

Edit re above...now have recoil servo working, turned out i had looked at Sergeys schematic which is NOT correct as he has recoil in servo pos 4, pin 26, i found the error after going back to read the pin position PDF, for the upteenth time... the recoil servo is pin 25 servo pos 5.

Dont know if that is how Sergey's radio is set up BUT for any other newcomers like me, just go off the PIN PDF and be wary of some one else's Arduino set up schematics.
Good catch and thanks for letting us know. It looks like he had the wiring correct, he just got the labels switched around. I edited his picture in several places where I found it on this forum, so if anyone looks at it again in the future it should be correct.


If i wish to use a heng long motor gearbox for turret traverse i take it i use an esc connected to pin 27 for signal and then one of my mosfet modules for power and ground ?
You are correct about using pin 27 for the signal to your turret rotation ESC, but again, you do not need any MOSFETs, that is an unnecessary complication. From the Mega to the ESC you need only the signal (pin 27) and a shared ground which you will have anyway. To power the ESC, simply connect it to your battery.


If there were any other questions I missed feel free to ask again!
NO SUPPORT THROUGH PM - Read why
Need a forum account? Read here
Open Panzer FAQs

*

Offline Sub

  • 42
    • View Profile
Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #221 on: May 29, 2021, 03:23:57 PM »
Hi Luke.
Many thx for all your time and patience with these questions, come to think about it the ESC have there own mosfets fitted so bit of an uneducated question on my behalf really LOL.
Thank you once again, other than a BEC / separate supply votage for the servos it looks like i am there  WOHOO.

As an aside the vendor i bought my Megas off sent me a replacement today, took about 3 seconds to connect and download the firmware, so to test it i downloaded the saved settings for the first Mega i had just done and everything was perfect.

So it looks like the other had a defect.

So i now have 2 more working TCB's.

Once again many thx to you and those that have helped.
Regards.
Sub.


« Last Edit: May 29, 2021, 04:21:04 PM by Sub »

*

Offline LukeZ

  • 1254
    • View Profile
  • France
Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #222 on: May 29, 2021, 10:03:58 PM »
Good news it was just a faulty Mega and not something worse, but at least your vendor has been very quick with the replacement. I'm glad you've met with success along the DIY route, it's not always easy I know, the manufactured TCB is complicated enough! :)
NO SUPPORT THROUGH PM - Read why
Need a forum account? Read here
Open Panzer FAQs

*

Offline LukeZ

  • 1254
    • View Profile
  • France
Re: TCB Firmware with Stock Arduino Mega
« Reply #223 on: February 12, 2022, 07:22:35 AM »
Just wanted to mention that I've posted another member's shield design to the Downloads page, called the Baldock Shield by Richard Baldock. It is all through-hole components and while it does not include every last feature of the original TCB the advantage is that it is simple and inexpensive to build and would do the majority of what a lot of people would want. 

He has a thread about it also at RCTankWarfare if you want to read more.
Baldock_Shield_Rev-A.jpg
TCB Firmware with Stock Arduino Mega Baldock_Shield_Rev-A.jpg
Views: 727
NO SUPPORT THROUGH PM - Read why
Need a forum account? Read here
Open Panzer FAQs

*

Offline Sub

  • 42
    • View Profile
Re: TCB Firmware with Stock Arduino Mega
« Reply #224 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.

 

bomber-explosion