Registration Notice

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

*

Offline LukeZ

  • 1255
    • View Profile
  • France
Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #15 on: April 17, 2017, 11:18:49 PM »
Hi Danny,

First of all, make sure you have pin A12 jumpered to ground as shown in the schematic at the top of this thread, otherwise the TCB is going to ignore communication attempts over the USB port. That's the most likely issue.

Otherwise it's hard to say what might be happening. Failure to connect often happens even with legit devices but in my experience it is always a momentary glitch that clears up on the second or third try if you keep trying to connect.

115200 is the correct baud rate. And you shouldn't need to change the rate in device manager although that shouldn't hurt anything.

I don't have a clone to test with. I would think they should still work and obviously some communication is possible since you flashed the firmware. But "connecting" is different than flashing and who knows, maybe there is something different about those serial chips that is causing an issue.

I'd try some of the standard things first - perhaps try re-installing the CH341 drivers, for sure reboot the computer, and also make sure no other programs are open (such as the Arduino IDE) that might be tying up the COM port.

In OP Config you can also go to the Firmware tab while trying to connect and you will see in the console screen whatever activity is going on. OP Config sends the connection command ("OPZ") several times, and if connection is successful the TCB will respond with something like "133|133|0|27641".

You can also try the "Snoop" button on that same tab to see if the TCB is even operating correctly - at the very least you should see a "Waiting for radio" message from the TCB, unless you have a receiver connected in which case you will see all kinds of status information dumped out. If you don't see either of those things try flashing again.

Let me know how you get on.

EDIT: There is also a connection workaround - connect first via Snoop (rather than the Connect button). If this is successful, wait for all the TCB messages to complete, then click the Connect button and connection should work.
NO SUPPORT THROUGH PM - Read why
Need a forum account? Read here
Open Panzer FAQs

*

dannydeleon

Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #16 on: April 18, 2017, 11:29:08 PM »
Hi Luke,

Thanks for your help :) It was the missing jumpers all along. I missed that part from your first post. Now just waiting for my ESC and PPM receiver. I am going to test regular RC ESC just to see how the driving behaves. I use a lot of TBS minis/micros in my tanks so I got the sound portion covered. I wanted to test the TBS micro in particular because based on my experience, I cannot get the Function 1/2 to work on the micro. On the Mini, I basically have the same parameter configuration as the TCB but when I tried it on the micro, setting PROP2 to Function 1/2 was very inconsistent. I basically have the same tank config on all my models in my 9xRPro running eR9X. but had to use PROP3, set it to 12 coder for the engine start if I use the micro for it to work consistently.

Anyway thanks again. On with the testing :).

-Danny

*

Offline LukeZ

  • 1255
    • View Profile
  • France
Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #17 on: April 19, 2017, 11:13:23 AM »
Danny I don't know if you saw, but Thomas Benedini released a firmware update and a new version of his TBS Flash software over the weekend (Flash v3). This adds some more usable sounds when paired with our TCB, and simplifies the interface between the two (there is no longer the need to run through a teaching routine on the Mini).

But - his new software only works on the Mini, and I don't believe he intends to support the Micro with it. So keep that in mind. I've never actually tested a Micro even on the old firmware, I've only ever used the Mini. I can only assume he is trying to move away from the Micro because it has been cloned by the Chinese, which is great for the customer but obviously not good for his business.

Moving forward our project is only going to support his new software both because of the added functionality but also because it's too much hassle to keep two different versions going at once. The Wiki page on the Benedini has been updated, you can read it for the new setup instructions.

To use the new version you'll have to download Flash V3 from Benedini, update your TBS Mini, and also update your Mega with the latest TCB firmware (0.92.04 or greater).
NO SUPPORT THROUGH PM - Read why
Need a forum account? Read here
Open Panzer FAQs

*

dannydeleon

Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #18 on: April 26, 2017, 06:04:19 PM »
Hi Luke,

Since I bought my TBS from Dan of Battlearmorrc, I reached out to Thomas to see if I can get the usercode/password for the download section and he sent it to me after I showed him my invoice :). Thanks again for clueing me on the new TBS Flash version.

I am having a problem with OP Config reading my radio. Since I was going to do this as a test, I bought a Frysky DJT Tx module and it came with a V8FR-II Rx not knowing that the V8FR-II Rx cannot do PPM. I had a small Frysky compatible 8Channel Rx that does PPM which I bought from banggood for my micro drone, https://www.banggood.com/FD800-Tiny-Frsky-8CH-PPMSBUS-Receiver-Compatible-FRSKY-ACCST-X9DPlusDJTDFTDHT-For-QX95-QX90-p-1108071.html, which I tried binding with the DJT. It binded but when I go to the Radio section and hit the Read Radio button, it says "Radio is not found". I tried different things but no success so I ordered a D4R-II RX to see if the problem is my TX or RX. The 9xRPro is set to PPM Protocol, 8Channels, and FrameLength of 22.5ms, I think.

Oh, and I followed your instruction to turn the TX first before connecting to the TCB. It still didn't work. Any other suggestions while I wait for my D4R-II RX?

Thanks,
-Danny

*

Offline LukeZ

  • 1255
    • View Profile
  • France
Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #19 on: April 26, 2017, 06:29:54 PM »
The first thing to check is whether your Mega is able to read the receiver correctly. Connect your receiver to the Mega and the Mega to your computer. In OP Config, select the correct COM port, then go to the Firmware tab and click the Snoop button. If the Mega can't read the receiver it will say something like "Waiting for radio..." and just hang until the receiver is detected. This would indicate there is an issue with the PPM output of your receiver perhaps, or the connection to the Mega. The receiver you linked to says it can do PPM or SBus, but I don't see the instructions on that page for how you select one or the other. Perhaps your receiver is in SBus mode rather than PPM. (The TCB can read SBus but your stock Mega won't be able to without additional hardware).

If the TCB is able to read the receiver then it will proceed to spit out a bunch of debugging information, some of which will be information about the receiver including the protocol type (which should be PPM in your case) and the number of detected channels. If that looks good then the issue could be with OP Config reading the signal in real time. But that is less likely, so try the Snoop thing first and see what you get.
NO SUPPORT THROUGH PM - Read why
Need a forum account? Read here
Open Panzer FAQs

*

dannydeleon

Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #20 on: April 29, 2017, 02:06:06 AM »
Hi Luke,

Thanks for your help. I was able to make the radio work by attaching the signal pin of the receiver to pin 3 of the Mega instead of pin 15 as in the diagram of your first post. I looked at the TCB_pinout.xls that you provided and I saw pin 3 says PPM so I thought I might try it and it worked.

-Danny

*

Offline LukeZ

  • 1255
    • View Profile
  • France
Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #21 on: April 29, 2017, 01:33:33 PM »
Good catch Danny! You're absolutely right, that was my bad for omitting that in the instructions. On the actual TCB the radio signal is sent to both pin 3 and pin 15 and the processor picks up the correct one depending on the protocol, but I had forgotten that.

I've updated the pictures at the beginning of this thread. For anyone following along, Danny is correct - connect your PPM receiver to Arduino Mega pin 3. If you have an iBus receiver, connect it to Mega pin 15.

Thanks again for catching that.
NO SUPPORT THROUGH PM - Read why
Need a forum account? Read here
Open Panzer FAQs

*

dannydeleon

Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #22 on: May 11, 2017, 01:38:06 PM »
Hi Luke,

I am back. Thanks for all your help, I was able to make the RC ESC work with the Mega. It works like a charm. Now I encountered something that I cannot explain and you probably can. This might just be because I am using a Mega instead of the real TCB.  So my T9xPro uses er9X and I wanted to test the RC PassThrough using my TBS Micro card. My radio is set for RETA channel order. When I read the radio in OPConfig, every channel work as expected and the track motors move as expected (I haven't tested the turret channels). I wanted to see if I can make the TBS Micro work. Since the TCB only supports the TBS mini now, I thought if I can just pass through the RC signal to the Micro as if it is connected to the RX, maybe it will work. So I assigned Aux1 to Channel 5 of type analog, Aux3 to Channel 7 of type analog in OPConfig. Now in the Functions tab, I created 2 functions, one is RC Passthrough triggered by Aux1 variable, second is RC Passthrough triggered by Aux3 variable. Aux1 (Channel 5) will be the engine off/on toggle and Aux3 (Channel 7 will be the engine sounds). On my radio, Channel 5 is assigned to a 2-way switch and Channel 7 is assigned Channel 2 as the source (Channel 2 is my throttle). So every time Channel 2 moves, Channel 7 moves in unison. Now when I upload this to the Mega and test it, when I flick the 2 way switch on my radio, the Micro turns off and on. When I move the throttle stick up and down, the engine sound changes. BUT, my track motors no longer no longer spin. If I revert it to no Micro, the motors work :(. When I read the radio, the display shows Channel 2 (Throttle) moves and Aux3(channel 7) moves in unison.

Anyway, not that important since I'll be using the Mini anyway but just wondering why it is behaving that way.

-Danny

*

Offline LukeZ

  • 1255
    • View Profile
  • France
Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #23 on: May 11, 2017, 11:53:21 PM »
Danny,

A couple things. First, the only real difference between the Mini and the Micro as it relates to being controlled by the TCB are the auxillary sounds triggered on Prop 3. On the Micro there is a limit of 12 sounds and on the Mini (when used with the new version of TBS Flash v3) the limit is increased to 16. Because there are more sounds the signal that gets sent to the Benedini to trigger those sounds is different, and this is why they are not compatible.

However the signals for engine speed (Prop 1) and engine on/off (Prop 2) should be pretty much the same. You could try setting the sound card in OP Config to Benedini and then hooking up the Micro to Prop 1 and Prop 2 (leave Prop 3 disconnected). This might work to get you engine sounds on the Micro and you don't need to worry about RC pass-throughs. 

But - it sounds like using RC pass-throughs you have gotten the Micro to work anyway, the only thing is you are lacking motor control. Have you tried keeping the Mega connected to the computer and using the Snoop console to see what is going on? Perhaps it is as simple as the TCB not being told to turn the "engine" on (it has its own internal engine state variable which must be enabled before it will allow you to control the motors). If you have Channel 5 assigned to a 2-way switch and this channel is passed-through to the Micro, that's great for starting the engine sounds on the Micro - but did you remember you need to assign a function to start the engine on the TCB as well? Ideally you would just assign it to the same 2-way switch on Channel 5, unfortunately to get the pass-through to work on that channel you have to set it to "analog" in OP Config, as you know. This lets the signal be passed-through but because it is now an analog trigger you can't assign it to the engine on/off function which is of type digital. If you have enough extra channels in your 9X you could mix some other channel to Channel 5, let's say for example Channel 9, then in OP Config set Channel 5 to Analog -> assign to RC pass-through function -> connect to Micro (as you have already done), but set Channel 9 to digital of type 2-position switch -> assign to engine on/off functions.

Alternatively you could just set the engine to start automatically with the first blip of throttle (this option is on the Driving tab). So you still have to use Channel 5 to turn on the Micro, but when you advance the throttle the TCB will turn its internal "engine" on as well.

If there is some other problem going on then we'd need to do more troubleshooting. Like I say, running things while viewing the console output should help you pinpoint the issue.


NO SUPPORT THROUGH PM - Read why
Need a forum account? Read here
Open Panzer FAQs

*

Offline uglyduck

  • 15
    • View Profile
  • US
Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #24 on: May 23, 2017, 10:09:37 PM »
A couple of questions regarding using the Mega before the TCB arrives:

I plan on using a pair of HobbyKing X-Car 45's for ESC's.  Where would I plug them into the Mega?  The same pins as listed in the TCB Pinout?  Same method as described in the wiki for the TCB?

If using the Mega, would it be IR battle capable (with the battle apple of course) or would this function be limited to the TCB?

And finally a general question about the TCB; is it compatible with the DBU? http://darkith.dyndns.org/~darkith/html/dbu_inst.shtml
I ask because is far less expensive than the Tamiya system and may appeal to those willing to engage in a project like this anyway.


-Mitch-

*

Offline LukeZ

  • 1255
    • View Profile
  • France
Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #25 on: May 24, 2017, 01:12:10 PM »
I plan on using a pair of HobbyKing X-Car 45's for ESC's.  Where would I plug them into the Mega?  The same pins as listed in the TCB Pinout?
See this post from earlier in this thread. Right tread ESC goes to pin 28 on the Mega, left tread to pin 29. These pins are for the signal wires to the ESCs. Both ESCs will also need a Ground connection to the Mega, which you can get from various places on the Mega board. Whether you connect the +5v from the ESC to the Mega is up to you. You could do so and use the ESC to power the Mega (connect the +5v from only a single ESC, not both). Or if you power your Mega directly from your main battery then leave the +5v from both ESCs disconnected. Either way you are going to have a real rat's nest of wiring!

If using the Mega, would it be IR battle capable (with the battle apple of course) or would this function be limited to the TCB?
You could connect an Apple to the Mega and you would be able to receive hits, but to send IR you would need additional circuitry because the Mega doesn't have the power to drive the IR LED directly (at least not with any kind of range). You don't need a lot, just a transistor/MOSFET and a few resistors, but again you start to really get into a wiring mess.

And finally a general question about the TCB; is it compatible with the DBU? http://darkith.dyndns.org/~darkith/html/dbu_inst.shtml
I ask because is far less expensive than the Tamiya system and may appeal to those willing to engage in a project like this anyway.
All the various "apples" operate the same way, so yes you can use the DBU with the TCB as long as you connect it properly (easy to do on the TCB since every pin is labelled on the bottom of the board). You can also use the Taigen apple which is dirt cheap but doesn't have indicator LEDs, there is a photo of it wired to the TCB on the IR page in the Wiki.

NO SUPPORT THROUGH PM - Read why
Need a forum account? Read here
Open Panzer FAQs

*

Rebus

Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #26 on: October 23, 2017, 09:58:52 AM »
Hello Luke,

I am really sorry that your project was devalued by Hobbyking attitude. 

Why don't use my piggyback solution on a classic Mega2560 card ?
This proto card can and must be improved, and my Eagle files are available to all, as a working basis.

Using through holes components (except 1206 resistors), allows that everybody is able to built it.
As an example, I'm interrested with the Scout Esc but ... my old eyes and fingers stop myself because I can't achieve safe soldering on these very small parts.

Your firmware should be adapted because some ATMega2560 pins are not available on the I/O connectors.

With low price and excellent quality of SEED pcbs, this could be a cheap and temporary solution ... waiting better days !

Best Regards.

*
TCBproto.zip
(65.59 kB ~ Downloads: 690)
« Last Edit: October 24, 2017, 06:17:58 AM by Rebus »

*

Offline LukeZ

  • 1255
    • View Profile
  • France
Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #27 on: October 23, 2017, 01:08:17 PM »
Thanks for the offer of your files. If anyone would like to follow your approach and build a shield PCB I would encourage them to do so!
NO SUPPORT THROUGH PM - Read why
Need a forum account? Read here
Open Panzer FAQs

*

Offline LukeZ

  • 1255
    • View Profile
  • France
Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #28 on: March 03, 2019, 10:44:01 PM »
Since the TCB is no longer available commercially there has been an increased interest in using an off-the-shelf Arduino Mega board as a do-it-yourself (DIY) solution. There are several challenges with this approach, but also one big problem: the TCB assigns two of its functions to pins on the ATmega2560 processor that are not actually connected on Arduino Mega boards. The processor on the TCB and Arduino Mega is the same, but for space constraints the Arduino Mega doesn't connect all the pins that are actually available, but because I designed the TCB from scratch, I was able to use any pin I wanted.

To solve this problem for those wanting to experiment with Arduino Mega boards, I have just released a new version of OP Config (v0.93.46). In this new release, you will have the ability to download a "TCB - DIY Version" firmware. This "DIY" firmware will always have the same options and features as the regular TCB firmware, and will be updated on the same schedule, the only difference is that the DIY firmware will relocate the two problematic pins from the traditional TCB design.

The pins that change on the DIY firmware are:
  • Machine Gun LED - will now be on Arduino Pin 20 (also labeled SDA on the Mega board)
  • Airsoft/Mechanical Recoil Switch - will now be on Arduino Pin 21 (also labeled SCL on the Mega board)
I need to create some updated documentation to permanently record this but in the meantime the new firmware is there and will work for DIY projects.
DIY_FirmwareOption.jpg
TCB Firmware with Stock Arduino Mega DIY_FirmwareOption.jpg
Views: 14282
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 #29 on: August 01, 2019, 12:15:46 AM »
Hi,
made my own TCB´s from scratch.
First test  with Mega Core and the other with Mega Pro Mini:
Five.jpg
TCB Firmware with Stock Arduino Mega Five.jpg
Views: 9806

 

bomber-explosion