Registration Notice

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

*

Offline Wibbly

  • 25
    • View Profile
  • Wales, UK
Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #105 on: December 02, 2019, 01:13:11 AM »
Many thanks Luke, your help and advice is much appreciated.  ;)
Been into 1/16 tanks for over 10 years.

*

Offline Wibbly

  • 25
    • View Profile
  • Wales, UK
Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #106 on: December 03, 2019, 06:52:18 AM »
I just hooked up my Turnigy with E9XR firmware as it is a much better tx (yes, I know it's not PPM, lol).

Huge difference in tank control, I edited the acceleration/deceleration/turn etc and it is all as smooth as silk now.

My next problem is the DasMikro Mini. I see that there is a Wiki for hooking one up to the TCB, but is there any info on how to connect one to the Arduino DIY. I have a programming cable so editing settings on the Mini isn't a problem, the Tiger sounds are now loaded and play ok on another RC model.

Basically, do I need to connect the three pins on Prop 1 & 2 to the Arduino 5v/GND and Prop pins?
What are the settings to make the engine, turret and gun sounds operate correctly?

It's already on Autostart, it's really the wiring and Prop settings I am after, especially if they are different to the TCB.

Edit 1: Just had a thought. I am using a PWM receiver and a signal converter. The Mini uses a pass through cable. It usually plugs into the Mini, and the Y lead is then plugged into the receiver and an esc. Will it work if I plug the Y lead into the receiver and the PWM>PPM signal converter? It will read the throttle stick and should theoretically generate the sounds. I might give that a go and see what happens.  ;)

Edit 2: It works perfectly. Super easy just plug the Mini in, in between the standard PWM receiver and the signal converter, video to follow.
« Last Edit: December 03, 2019, 08:53:12 AM by Wibbly »
Been into 1/16 tanks for over 10 years.

*

Offline LukeZ

  • 869
    • View Profile
  • Kansas, USA
Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #107 on: December 03, 2019, 08:54:11 AM »
Hi Wibbly, the TCB and the Arduino operate identically so all the settings on the Wiki for the TCB will apply in your case as well.

As for wiring, you are correct - you need to connect Prop 1, Prop2 and Prop 3 to Arduino pins 22, 23, and 24 (you can use all three Props with the Benedini Mini, but only Prop 1 and 2 with the Micro or Micro clones). Then as you say provide +5v and Gnd to the Benedini (you only need to provide it once, it doesn't have to be copied on each Prop input).

As for using the Y-lead directly from your receiver - yes, you can do that if you want, but at that point you are bypassing completely the TCB so the engine will probably not be synchronized and I don't know how the Benedini would know to play the sounds like the machine gun and cannon unless you program those into your transmitter separately which I think would get to be too complicated.
NO SUPPORT THROUGH PM - Read why
Need a forum account? Read here
Open Panzer FAQs

*

Offline Wibbly

  • 25
    • View Profile
  • Wales, UK
Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #108 on: December 03, 2019, 09:52:49 AM »
Hi Luke,

A quick video of the engine sounds, it seems to work ok, I can't test the turret sounds until I have completed the servo recoil, which is my next job. It's running like a dream now, just needed a decent tx and tweaking the motors via the config.  ;)

Been into 1/16 tanks for over 10 years.

*

Offline LukeZ

  • 869
    • View Profile
  • Kansas, USA
Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #109 on: December 03, 2019, 11:36:33 AM »
I’m glad to hear it! I hope others will be encouraged by your experience to try the same thing. 
NO SUPPORT THROUGH PM - Read why
Need a forum account? Read here
Open Panzer FAQs

*

Offline Wibbly

  • 25
    • View Profile
  • Wales, UK
Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #110 on: December 04, 2019, 03:16:37 AM »
After having tried to get the recoil to work, I have drawn a blank.

Tried using a voltage regulator to power the servo +/-, with the signal going to pin 25. No joy. I discovered today that the digital readout was inaccurate. I set it to 5.9v as the servo's are 6v. A multimeter revealed that the actual output was 6.5v. Damned Chinese electronics...will need to test the servo's on another model to check that they aren't blown.

I also tried using the Arduino 5v, pin 25 and GND, but still no joy.

The best I got was a servo that operated over a small range at all four corners of the left stick, whilst a barely moving pulse in the gun fire position.

Has anyone got any suggestions?

Edit: Note to self...when tidying up wiring ensure that pin 33 is in pin 33 and not 34. I had put it into Repair Mode, as Snoop revealed.


I still had the problem where the low voltage warning would simply shut the board down.
I took a look back through the info available on the site and found a reference to pin 15? Should this be pinned to GND to activate the LV warning correctly?




« Last Edit: December 04, 2019, 12:44:56 PM by Wibbly »
Been into 1/16 tanks for over 10 years.

*

Offline LukeZ

  • 869
    • View Profile
  • Kansas, USA
Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #111 on: December 05, 2019, 08:58:02 AM »
It sounds like you have the servo wired correctly - pin 25 to servo signal, plus +5v and ground or 6 volts if you want, servos usually aren't very picky about source voltage.

If you had it in repair mode then the servo would not recoil when you fire the cannon, but it sounds like you corrected that.

It could be that for some reason the recoil servo's saved endpoints are just too narrow so it doesn't look like it's doing anything. It would be worth going through the recoil setup menu, that will tell you both if the servo is working correctly but also of course let you set up the endpoints to your liking.

You can read about recoil setup on this page and there is even an instructional video. To enter the recoil menu first dipswitch 3 and 4 have to be off but since they aren't even connected on your 2560 they are already off by default. Then you have to "press and hold the input button for 2 seconds." This button (or it can just be a wire) connects to Arduino Analog input 14 (ADC14), and you "push" it by connecting it to ground.

It would be good to do this while Snooping so you can get confirmation that things are working correctly, as you won't probably have the green and red LEDs as visual aids.

I still had the problem where the low voltage warning would simply shut the board down.
I took a look back through the info available on the site and found a reference to pin 15? Should this be pinned to GND to activate the LV warning correctly?
Arduino Pin 15 is the input for digital receivers (SBus or Ibus), but I think you mean pin A15 (or ADC15). It can be confusing, but there are digital and analog pins on your Mega and so even though they have some of the same numbers there is a difference between 15 and A15.

Since you don't have an LVC circuit the best thing to do is disable LVC entirely in OP Config. But the other thing that would not be a bad idea is to connect pin A15 to +5 volts, that will fool the Mega into thinking the battery voltage is somewhere around 16 volts and therefore the cutoff shouldn't happen. Frankly it shouldn't happen either if the LVC is just disabled in OP Config but I don't, maybe an occasional glitch could happen if we leave the pin disconnected.
NO SUPPORT THROUGH PM - Read why
Need a forum account? Read here
Open Panzer FAQs

*

Offline Wibbly

  • 25
    • View Profile
  • Wales, UK
Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #112 on: December 05, 2019, 11:58:06 AM »
Thanks Luke, yes I did mean A15, I should type slower... :(

I have a voltage regulator with a digital display. Press the button and it show the output voltage, press it again and it shows the input voltage, so I can use that to check the battery level, as I have an easy access upper hull. Running a 3300mah 2S Lipo should give me plenty of run time.

I'll check the servo limits, sounds easy enough.

I was looking at Sergey's schematic, it looks like his VR only has the live feed taken off it, the negative isn't shown as having a connection. I've no idea how that works with the servo. He is obviously a clever guy. ;)

Ordinarily an Arduino has both the servo GND and a battery GND onto the Arduino. I am assuming that this isn't required, and that the servo GND is the only one required?
Been into 1/16 tanks for over 10 years.

*

Offline LukeZ

  • 869
    • View Profile
  • Kansas, USA
Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #113 on: December 05, 2019, 01:32:00 PM »
Sergey's schematic could be misleading to newcomers to electronics, but in fact what is important is that every component share the same ground and his circuit does that. Most of the shared grounds are connected up near his on/off switch so it can look like there isn't a ground for example on his voltage regulator, or that his servo outputs don't have a ground connection with the Arduino, but they do.

Ordinarily an Arduino has both the servo GND and a battery GND onto the Arduino. I am assuming that this isn't required, and that the servo GND is the only one required?
Your servo will of course always require GND and positive voltage (as well as the signal). But of those first two only the GND is necessary to share with the Arduino. As long as the ground connection to your servo connects to some wire somewhere that also connects to the ground on your Arduino and the ground on your source battery, then you are fine.

The positive voltage does not have to be shared, for example if you want to run your servo at 6 volts but the Arduino is running at 5. That's fine, they can be powered at different levels just so long as all grounds are common (this means your battery, your voltage regulator, and all devices including Arduino, servos, ESCs, etc all share a common ground).
NO SUPPORT THROUGH PM - Read why
Need a forum account? Read here
Open Panzer FAQs

*

Offline Wibbly

  • 25
    • View Profile
  • Wales, UK
Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #114 on: December 05, 2019, 02:55:56 PM »
Many thanks Luke. I was just looking at the VR without checking upstream to see the source of the loom.

I will go recheck all of the GND connections tomorrow, and see what happens.

Once the servo is working it's only the muzzle flash to resolve.  :)
Been into 1/16 tanks for over 10 years.

*

Offline Wibbly

  • 25
    • View Profile
  • Wales, UK
Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #115 on: December 06, 2019, 11:55:45 AM »
I connected the servo on 5v, Sig, and GND, and it glitched.

I then connected the + and -  to the VR, and ran GND to the balance lead on the Lipo, and added GND from the servo, and - on the VR to Arduino GND.

Added the Cannon fire to the function on left stick up.

The servo worked perfectly, no glitching at all. I didn't need to run the pin 14 menu at all.

I'll solder all the joints tomorrow.

One weird anomaly, the engine starts up when I touch the left stick, as well as the right stick. It's no big deal, but I have no idea why it is doing that.

Lastly, the muzzle flash. If I hook it up on the high intensity pin do I also need to select it in the config. I tried it a couple of days ago without the box checked and the led stayed permanently lit?
Been into 1/16 tanks for over 10 years.

*

Offline Wibbly

  • 25
    • View Profile
  • Wales, UK
Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #116 on: December 07, 2019, 01:23:31 PM »
And it's all done.

I have a Tiger 1 with great sound, perfect throttle control, recoil and muzzle flash.
All neatly installed, and not a resistor, transistor etc used anywhere.
I might wire up the headlight so that I know when it is switched on.

So, it can be done, and a thousand thanks to Luke for his endless patiience.

The only glitches I have are that the engine sounds start when I touch the left stick, as well as the right, and I am not getting a cannon fire sound. I will have to take a look at the sound file to see if there is actually one in there.

 ;D ;D ;D

PS - I'll post up a video when it is all properly back together.

Edit: I've now figured out that the DasMikro Mini is the source of the glitches. I think I just need to disable auto start and set up the sounds properly.
« Last Edit: Today at 02:23:16 AM by Wibbly »
Been into 1/16 tanks for over 10 years.

*

Offline LukeZ

  • 869
    • View Profile
  • Kansas, USA
Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #117 on: Today at 07:01:49 AM »
Hi Wibbly, sorry I've been slow to reply but I see that the longer I've waited the more problems you have solved until now maybe there is nothing left to do. I hope you will consider doing a writeup of the details of your wiring for others to copy.

I don't know how you've got the DasMikro setup but I would suggest following the arrangement described in the Wiki. There are other ways to do it, as you mentioned before even bypassing the TCB/Mega entirely and driving it straight from your receiver, but then the sounds will not be synchronized. I assume that was what you had going on, but let us know when you get it all sorted. I'm sure your experiments will be of great use to others.
NO SUPPORT THROUGH PM - Read why
Need a forum account? Read here
Open Panzer FAQs

*

Offline Wibbly

  • 25
    • View Profile
  • Wales, UK
Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #118 on: Today at 07:18:22 AM »
I have started doing a write up, it will take a while to cover it all so that even a complete novice like myself can do it. Hopefully others will see it and have a go.

Having jumped through all of the hoops, I now know how to configure everything, so anyone will just be able to follow the instructions and it will work.

I changed the Mini connections so that it runs from the Arduino, but having looked at the manual I can see that I need to configure the sounds so that the cannon is triggered correctly. Rad knows the Benedini system inside out, so I will pick his brains. I am taking a guess that the engine sounds are triggered on the left (turret) stick because I have auto start switched on, rather than letting the TCB firmware handle it on the right (throttle) stick.

If I had bought all of the components from China I could have saved a fair amount of cash, and if I do another one I'll simply order everything that way.

I've been out RC rock crawling today at high altitude in freezing weather, and I need to warm up!! :-[





Been into 1/16 tanks for over 10 years.

*

Offline Wibbly

  • 25
    • View Profile
  • Wales, UK
Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #119 on: Today at 01:56:36 PM »
All back together, and all working.

Just need to figure out how to activate the cannon sound from the Mini sound unit, and trigger it from the left stick up.

Been into 1/16 tanks for over 10 years.

 

bomber-explosion