Registration Notice

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

*

Offline Heclo

  • 15
    • View Profile
Heclo TCB Shield for Mega2560 Boards
« on: July 09, 2020, 07:38:56 AM »
Hello everyone!

I have been following the Open Panzer project for a while and in my education as a electronics technician I made a "shield" that fit on an arduino mega 2560 R3 board, with most of the functions of the Open Panzer TCB and the Open Panzer sound card onboard, plus some extras.

Instead of the L298 motor driver as the onboard drivers I have opted for 2 x VNH5050 chips which are similar to those found on the OP Scout ESC, but in a smaller package. They can draw 30A each and therefore should be adaquete to most aplications. I have also added 2 additional H-bridges to power the turret elevation and traverse motors, they can draw 3A each.

The high-current drivers have current monitoring which I have implemented into the TCB code so that throttle commands corrosponds to engine wattage instead of a PWM setting, this makes simulating a models scale power a lot easier, resulting in realistic slow down when going uphill or through rough terrain.

All in all this makes Open Panzer a stand-alone board with all the necessary components onboard (except for a radio recaiver I suppose).

It has been tested in so far 6 different tanks with great results.
 
I have attached the schematics and a pinout rendering for those interested.

 
*
MCU V3A4.pdf
(393.4 kB ~ Downloads: 60)
MCU V3A3 pinout.png
Heclo TCB Shield for Mega2560 Boards MCU V3A3 pinout.png
Views: 177
IMG_20200325_142716.jpg
Heclo TCB Shield for Mega2560 Boards IMG_20200325_142716.jpg
Views: 178
IMG_20200325_211209.jpg
Heclo TCB Shield for Mega2560 Boards IMG_20200325_211209.jpg
Views: 167
IMG_20200325_211259.jpg
Heclo TCB Shield for Mega2560 Boards IMG_20200325_211259.jpg
Views: 165
IMG_20200326_235035.jpg
Heclo TCB Shield for Mega2560 Boards IMG_20200326_235035.jpg
Views: 154

*

Offline Heclo

  • 15
    • View Profile
Re: Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #1 on: July 10, 2020, 02:42:55 AM »
I could however use some help making some additions to the OP config, to implement some of the changes I have made, a little better.
In order to use 2 sets of onboard motor drivers I have had to "hi-jack" the code of one of the selectable ESC's, I chose the Sabertooth, but it would be neat to have an actual parameter that was called "Build-in driver (Motor C)" and "Build-in driver (Motor D)" or something like that.

I have also made some exspansions to the Forces of Valor IR library, defining ammo types with different armor penetration, and on the receiving end definitions of armor thickness (I'm also working on a directional IR receiver, making side and rear shots a possibility, with a higher chance to penetrate as a result). This is also something I wish to have implemented in the menues.

I know I am asking a lot, but I really wish to keep this project alive and we are a 1/16 rc tank club with about 20 members testing my creations out and the enthusiasm is high.

Best regards Kim Olsen Panzer Club Denmark.

*

Offline LukeZ

  • 998
    • View Profile
  • France
Re: Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #2 on: July 12, 2020, 09:08:47 AM »
Hello Kim! Your design is extremely impressive and interesting. Thank you for sharing! It is very educational to see the design choices you have made and the components you have chosen, I think a lot can be learned from this design. I see you have changed some of the pins in order to manage the onboard main motor drivers, it looks like you had to sacrifice PWM on the Hit Notify and Aux outputs? 

I may be willing to make some changes to OP Config on your behalf but it is something I will want to think about and I may not do it right away. Of course it would benefit you and your club but the extra options in the documentation will only confuse all the hundreds of other people who already have a TCB, so I have to weigh these things carefully.

In the meantime it would be great if you could make your project open source, including the firmware for the Arduino Mega, and board files and bill of materials for your shield. This could be hosted on GitHub. If you are able you can make a fork of the TCB firmware with your changes on your own GitHub, or if you prefer you can provide me the source code and I can fork it myself and host it on the Open Panzer GitHub page.

You may be interested to know that in fact all the functions could be simplified onto the Teensy 3.2 alone, eliminating the need for the 2560 altogether. In other words, we can combine both the sound card ability and all the rest of the TCB functions onto just the Teensy, including onboard main motor drivers as you have done, so that in the end we have a complete single board product. The 3.2 has barely just enough pins if we use some shift registers! I have started writing code for this but it is not yet complete and I don't know when I will have the time to finish it. I haven't even started on a board design. I am not spending much time in development this year due to other commitments, but if the project were to be revived someday I think that would be the way to do it. But for now it is just an idea.
NO SUPPORT THROUGH PM - Read why
Need a forum account? Read here
Open Panzer FAQs

*

Offline Heclo

  • 15
    • View Profile
Re: Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #3 on: July 14, 2020, 03:02:34 AM »
Hello Kim! Your design is extremely impressive and interesting. Thank you for sharing! It is very educational to see the design choices you have made and the components you have chosen, I think a lot can be learned from this design. I see you have changed some of the pins in order to manage the onboard main motor drivers, it looks like you had to sacrifice PWM on the Hit Notify and Aux outputs? 

I may be willing to make some changes to OP Config on your behalf but it is something I will want to think about and I may not do it right away. Of course it would benefit you and your club but the extra options in the documentation will only confuse all the hundreds of other people who already have a TCB, so I have to weigh these things carefully.

In the meantime it would be great if you could make your project open source, including the firmware for the Arduino Mega, and board files and bill of materials for your shield. This could be hosted on GitHub. If you are able you can make a fork of the TCB firmware with your changes on your own GitHub, or if you prefer you can provide me the source code and I can fork it myself and host it on the Open Panzer GitHub page.

You may be interested to know that in fact all the functions could be simplified onto the Teensy 3.2 alone, eliminating the need for the 2560 altogether. In other words, we can combine both the sound card ability and all the rest of the TCB functions onto just the Teensy, including onboard main motor drivers as you have done, so that in the end we have a complete single board product. The 3.2 has barely just enough pins if we use some shift registers! I have started writing code for this but it is not yet complete and I don't know when I will have the time to finish it. I haven't even started on a board design. I am not spending much time in development this year due to other commitments, but if the project were to be revived someday I think that would be the way to do it. But for now it is just an idea.

Thank you for the praise  :) Yes I needed an extra timer for the motor C and D PWM, not really sacrificed as such, they can still be PWM controlled they are just running at a different frequency XD.

Yes this should perhaps be an entire new branch of OP, to differentiate it. I do not intent to make things harder for the rest of the OP userbase. I will work on putting my designs on GitHub and make a fork on the firmware (I should probably comment a bit more in my code "gulp") I think i prefer it to be on the Open Panzer GitHub page, I think it will reach more people this way.

Yeah in my research I also considered going with Teensy alone (4.0 specifically) but due to time constraints before my exam, I stuck to the current setup. As an after thought, I considered the teensy 4.1 because of the plethora of outputs. STM32 F4 and F7 series would also be interesting. Many posibilities, a lot of coding required :D
I would be delighted to help you with the board design if you want on that teensy branch ;)

In my Frankenstein Leopard 2 I went to exam with I used the teensy 4.0 and an external DAC for the sound card (16bit sound is awesome!) that's what the EXT_DAC port on my design is for, a PCM5102 based module

Cheers Kim

*

Offline Heclo

  • 15
    • View Profile
Re: Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #4 on: July 15, 2020, 08:18:46 AM »
Here are the schematics for my latest build, it is drawn in KiCad (free open source)
I have attached a zip with the compiled gerber files aswell.

I will post the custom code later.

Cheers!
*
MCU V3A4 KiCad.zip
(378.89 kB ~ Downloads: 32)
*
MCU V3A4 Gerber.zip
(865.26 kB ~ Downloads: 33)

*

Offline LukeZ

  • 998
    • View Profile
  • France
Re: Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #5 on: July 16, 2020, 12:06:25 PM »
Thanks for the Gerbers, I took a look at them in KiCad. You have done a professional layout job, I am impressed. You said you used this project for an exam, are you an engineering student? I think you deserve a good grade, I hope you get one!

I look forward to inspecting your firmware and I will be happy to host it on the OP GitHub, it should be possible to make you a contributor so you can maintain that repository. It also should not be a problem to add an entry to OP Config Firmware tab so users can select your firmware for download/flashing.

As you say, with all the microcontroller advancements constantly being made there are now many tantalizing possibilities, but people who possess time and skill are necessary to realize them, and in so far as there is no great financial reward for doing this work, these must also be special people who have other motivations (educational achievements appears to be a good one!)

Thank you for the offer to help with board layout, I will keep it in mind and let you know if I can get the design to the layout stage.
NO SUPPORT THROUGH PM - Read why
Need a forum account? Read here
Open Panzer FAQs

*

Offline JPS99

  • 25
    • View Profile
Re: Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #6 on: August 14, 2020, 07:19:50 PM »
Hello everyone!

I have been following the Open Panzer project for a while and in my education as a electronics technician I made a "shield" that fit on an arduino mega 2560 R3 board, with most of the functions of the Open Panzer TCB and the Open Panzer sound card onboard, plus some extras.
......
It has been tested in so far 6 different tanks with great results.
 
I have attached the schematics and a pinout rendering for those interested.

Wow, this is very interesting! I am currently building a tank and am looking for a control board. Having the control and sound integrated into one package is quite appealing.

Do you have a BOM (bill of materials) prepared that you could share?  Is there a site (perhaps Youtube or ??) where I could see some of your tanks in operation?

I'm building a T-35a and it will need a control board.Definitely interested!
Cheers,
Joe in Pennsylvania USA

*

Offline Heclo

  • 15
    • View Profile
Re: Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #7 on: August 17, 2020, 06:49:19 AM »

Wow, this is very interesting! I am currently building a tank and am looking for a control board. Having the control and sound integrated into one package is quite appealing.

Do you have a BOM (bill of materials) prepared that you could share?  Is there a site (perhaps Youtube or ??) where I could see some of your tanks in operation?

I'm building a T-35a and it will need a control board.Definitely interested!
Cheers,
Joe in Pennsylvania USA

Thank you! Sounds interesting ;) If you download KiCad (freeware) you can open the project schematic and generate a BOM from that.
The schematic and layout will also be a great help if you decide to build it.

I am working on commenting the code alterrations/additions I have made, so that they will be comprehensible to others than myself  ::) ;D

Best regards Kim

*

Offline Heclo

  • 15
    • View Profile
Re: Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #8 on: August 18, 2020, 05:39:14 AM »
Thanks for the Gerbers, I took a look at them in KiCad. You have done a professional layout job, I am impressed. You said you used this project for an exam, are you an engineering student? I think you deserve a good grade, I hope you get one!

I look forward to inspecting your firmware and I will be happy to host it on the OP GitHub, it should be possible to make you a contributor so you can maintain that repository. It also should not be a problem to add an entry to OP Config Firmware tab so users can select your firmware for download/flashing.

As you say, with all the microcontroller advancements constantly being made there are now many tantalizing possibilities, but people who possess time and skill are necessary to realize them, and in so far as there is no great financial reward for doing this work, these must also be special people who have other motivations (educational achievements appears to be a good one!)

Thank you for the offer to help with board layout, I will keep it in mind and let you know if I can get the design to the layout stage.


As promised: the modified code for my version of the TCB, with comments  :D

Just ask if there is something I havn't explained properly ;)

I am still learning so there might be some odd solutions in there XD

The modifications are in:

OpenPanzerTCB.ino
Objectsetup.ino
LVC.ino
OP_Driver.cpp
OP_Driver.h
OP_Motors.cpp
OP_Settings.h

and an addition in form of:

Status.ino
*
OpenPanzerTCB.zip
(791.46 kB ~ Downloads: 18)

*

Offline JPS99

  • 25
    • View Profile
Re: Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #9 on: August 18, 2020, 04:29:31 PM »
Thanks very much HECLO. Now that the code is posted I will order the PCBs.  I have two tanks that will need your board. One is built already (my IS-1) and I'm working on a second tank, a T-35.

I appreciate your efforts to design this board and software and thank you for being generous enough to share it with us on the forum!
Regards,
Joe

*

Offline Heclo

  • 15
    • View Profile
Re: Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #10 on: August 19, 2020, 08:11:57 AM »
Thanks very much HECLO. Now that the code is posted I will order the PCBs.  I have two tanks that will need your board. One is built already (my IS-1) and I'm working on a second tank, a T-35.

I appreciate your efforts to design this board and software and thank you for being generous enough to share it with us on the forum!
Regards,
Joe

Glad to hear that you can use it! I have some notes on the BOM:

U7 The teensy controller, *this is only relevant if using an  external DAC*: if using 3.2 = remove pin 7, 20 and 21. If using 4.0 = remove pin 9, 22 and 23. The incentive to use an external DAC is to get 16bit sound instead of 12bit, which only matters if your audio files, and speaker are top notch.

U9 I use the 7805 as a placeholder in reality i use these  DC-DC converters for efficiency

U10 INA181 needs to be the A3 version with a gain of 100

Q2 can be any N-Channel MOSFET in a SOT-23 package with the same pinout and a continous current of 1A or more.

Input_jmp1 if using the onboard Teensy DAC, jumper pin 2 and 3.

VNH5050A (the main motor drivers) are truly a PITA to solder. I check every solder for continuity and shorts on these chips.

I wish you the best of luck ;)

Cheers Kim



*

Offline LukeZ

  • 998
    • View Profile
  • France
Re: Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #11 on: August 19, 2020, 02:15:48 PM »
Hi Kim, thanks for posting the firmware. I am in the middle of moving right now so I have not yet had time to look at it. Next week when I get settled into my new place I will try to set aside some time and get it posted to GitHub.
NO SUPPORT THROUGH PM - Read why
Need a forum account? Read here
Open Panzer FAQs

*

Offline Heclo

  • 15
    • View Profile
Re: Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #12 on: August 20, 2020, 01:12:37 AM »
Hi Kim, thanks for posting the firmware. I am in the middle of moving right now so I have not yet had time to look at it. Next week when I get settled into my new place I will try to set aside some time and get it posted to GitHub.

No rush good sir ;) I am just glad you want to give it a look!

Cheers Kim

*

Offline JPS99

  • 25
    • View Profile
Re: Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #13 on: August 20, 2020, 08:27:50 PM »
Hi Kim, I'm trying to put together a BOM spreadsheet, but when I view your Kicad schematic there appear to be holes in it. (please see attachment)

The schematic appears complete in the PDF version you uploaded, but some of the values are overwritten by other components and the values or names can not be read.

Is there a problem with the uploaded schematic you posted above, or is this a configuration setting in my installation of Kicad. Sorry, I don't know how to use that Ecad software, so maybe I just don't have it set up correctly.

Regards,
Joe
SCHEMATIC.jpg
Heclo TCB Shield for Mega2560 Boards SCHEMATIC.jpg
Views: 61

*

Offline Heclo

  • 15
    • View Profile
Re: Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #14 on: August 21, 2020, 06:49:32 AM »
Hi Kim, I'm trying to put together a BOM spreadsheet, but when I view your Kicad schematic there appear to be holes in it. (please see attachment)

The schematic appears complete in the PDF version you uploaded, but some of the values are overwritten by other components and the values or names can not be read.

Is there a problem with the uploaded schematic you posted above, or is this a configuration setting in my installation of Kicad. Sorry, I don't know how to use that Ecad software, so maybe I just don't have it set up correctly.

Regards,
Joe


I have attached the project folder with all of the dependencies. Just unzip the entire folder and open the project file, that should solve it.  ;)

Cheers
*
MCU V3A4.zip
(3232.47 kB ~ Downloads: 19)

 

bomber-explosion