Open Panzer

Developer's Forum => TCB Dev => Topic started by: vonTirpitz on January 13, 2017, 06:35:16 PM

Title: Setting up a software development environment and other random experiments
Post by: vonTirpitz on January 13, 2017, 06:35:16 PM
Well it seems I have entered into this hobby at an exceptionally interesting time! 

With the intent of starting a new hobby with my son I recently acquired two new Taigen 1/16 IR tanks (the Panther G and Sherman 75).  Even before we opened the tanks on Christmas day I was looking through the vast amounts of forum information at RC Universe and drew the conclusion that I wanted more control of the tanks and how they interact and are controlled.  I also quickly realized that Danville VA is a focal point for this hobby and is just up the road from us so having a Tamiya compatible battle system became a desire as well.

I wanted to raise and lower the gun via the left control stick and not have it "cycle" up and down (I would find another switch to actually fire the gun).  And from what I read and saw on youtube, I decided that I also wanted more realistic acceleration and deceleration rates.  Even having more and better sound options seemed like a good idea.

The day came when we finally opened the tanks and it was a blast.  I had planned ahead and picked up two 5000mA NiMH batteries and had them charged up to supplement the 2000mA batteries that came with the tanks.  Weather permitting, we ran and battled both tanks for many days.  I ended up purchasing a quad charger just so I could exercise and keep enough batteries up to continue running!

As we played with the tanks I continued reading and learning and just as I was about to put a new wish list together for new hardware somebody said to me "wait a few days for something special".   

So I did and am very glad I waited.

Every time it seems I am ready to look for something new and improved you folks keep delivering.  Thank you!

And now the Open Panzer project! 

I haven't been in a R/C hobby for nearly two decades so I am stumbling along a decently sized learning curve trying to catch up with what happened over the years.  Fortunately, I have been developing embedded software for the better part of thirty years so I have that going for me.  Filling up a forum post with my mostly inexperienced attempts to get what I want might provide a little entertainment to some and perhaps hope to others.    ;D

I downloaded and installed the Arduino 1.8.0 IDE yesterday only to find an update today.  So I will go back and install 1.8.1 and continue my post.
Title: Re: Getting Started
Post by: vonTirpitz on January 13, 2017, 06:45:05 PM
Now before I get too far ahead of myself I just want to explain that all I am attempting to do right now is familiarize myself with the hardware and software as well as get set up to "hit the ground" running once the TCB is actually available.

So please bear with me as I fully expect to run into a few "bumps" along the way.  It is my hope that, while getting guidance from the developer, my posts may also smooth the way for others that join the adventure at a later time.

BTW.  If somebody figures out how to embed links in these posts I would really appreciate it.  <a href="http://openpanzer.org/forum/index.php">Open Panzer</a>  <--- Yikes.  My HTML skills are so lame.... sigh.
Title: Re: Getting Started
Post by: vonTirpitz on January 13, 2017, 07:06:03 PM
The Arduino 1.8.1 IDE (Integrated Development Environment for the uninitiated) is now installed and running.

I have copied the contents of OpenPanzerProject-TCB-2da5dca.zip into the Arduino folder that was created in my documents folder and proceeded to open an Arduino sketch (which in my mind is just another name for project).

Opening the most logical .ino file (OpenPanzerTCB) went well.  It appears that opening any .ino file that was in the folder will load the rest automatically.  Fair enough.

Everything seems intuitive and straightforward.  I will go ahead and select Verify/Compile from the Sketch menu on the toolbar.....

Compiling proceeds smoothly up and until....

After several files compile I start getting an errors that several definitions are not declared in scope.   I'll start digging into this condition.  I've likely not properly configured the compiler.  Will be back as soon as I figure this out!   :o



                                                                           ^
Arduino: 1.8.1 (Windows 10), Board: "Arduino/Genuino Uno"

===================I have deleted many lines from the error message to only show the last few lines . ---------------

Utilities:548: error: 'pgm_read_byte_far' was not declared in this scope

         varType = pgm_read_byte_far(pgm_get_far_address(STORAGEVARS) + (i*5) + 4);                                                                                 ^

exit status 1
'Serial1' was not declared in this scope


Title: Re: Getting Started
Post by: vonTirpitz on January 13, 2017, 08:03:17 PM
I'm cheating a little bit by downloading and installing Arduino IDE for Visual Studio as I am much more familiar with VS and can navigate and work in the project (sketch) much faster this way.

Arduino IDE for Visual Studio can be found here:
https://visualstudiogallery.msdn.microsoft.com/069a905d-387d-4415-bc37-665a5ac9caba?redir=0 (https://visualstudiogallery.msdn.microsoft.com/069a905d-387d-4415-bc37-665a5ac9caba?redir=0)

A free version of Visual Studio (Visual Studio Community Edition) can be downloaded here if you do not have a licensed version:
https://www.visualstudio.com/downloads/ (https://www.visualstudio.com/downloads/)

Title: Re: Getting Started
Post by: LukeZ on January 14, 2017, 12:48:02 AM
vonTirpitz, welcome, and thank you for starting the first real thread of this entire website! And thank you for being interested enough in this project to document your experiences.

I've just come in late and I won't write much tonight. But a few thoughts -

As for inserting hyperlinks into your posts - for security reasons this forum (and all other forums) ignore HTML. Instead the forum uses something called BBC, which stands for Bulletin Board Code. So rather than using html tags, to insert a hyperlink do this instead: [url=www.google.com]Google[/url]. Then the forum will render it as Google (http://www.google.com).

BBC is standard across pretty much every forum you might encounter so once you get the hang of it then you can use it anywhere.

You can also just highlight the text you want to make a link in your message, then click on the little globe icon in the message editor and it will help you create the link. There are actually two editing modes - advanced (where you have to enter the BBC yourself), or standard (where when you click on the buttons in the editor it does things for you). You can toggle the editing mode when posting by clicking the button that has an icon of an arrow within brackets. See the image below.

Here's a page (http://forums.tieline.com/help/?area=bbcode) with more detail on all the BBC codes.

More later!
Title: Re: Getting Started
Post by: vonTirpitz on January 14, 2017, 09:24:23 AM
vonT, try reading through again the introductory section of the GitHub page where you downloaded the project: GitHub TCB (https://github.com/OpenPanzerProject/TCB). The reason Arduino is giving you errors when compiling is that it thinks you are trying to compile for the "Genuino Uno" board, but the code is designed for the TCB board. The TCB is based on the Arduino Mega board which uses a different processor. So in the Arduino IDE go to the Tools menu, then Boards, then select Arduino Mega, and it should compile. [/li][/list]

Thank you!  That's what I deserve for just downloading the zip file.  I didn't even go to GitHub to read the notes until now.  lol   ::)


As for inserting hyperlinks into your posts - for security reasons this forum (and all other forums) ignore HTML. Instead the forum uses something called BBC, which stands for Bulletin Board Code. So rather than using html tags, to insert a hyperlink do this instead: Google (http://www.google.com). Then the forum will render it as Google.

And thank you again!  I just have to go back another few years and pull out my old bulletin board memories from the 90s.   :o

Well I did state that I was just stumbling into this....   ;)

I have become a digital dinosaur....

(https://farm1.staticflickr.com/301/32265057246_a31f16b8af_m.jpg)
Title: Re: Getting Started
Post by: vonTirpitz on January 14, 2017, 10:34:43 AM
With the newly absorbed knowledge gleaned from the notes on GitHub I have successfully verified and compiled the TCB code as well as exported a compiled binary.  Huzzah!

It's amazing what can get done if you actually stop to read the instructions (https://github.com/OpenPanzerProject/TCB/)...   :P

Now I can spend some time studying the code logic and understanding the process flow.

I decided a couple of days ago that I didn't want to relegate my new Panther or Sherman to R&D duties.  Therefore it became necessary to find an adequate test bed.

Lo and behold.  Yesterday, I find new additions to the scratch and dent section (http://www.taigentanks.com/scratch-dent-specials/) for sale on the Taigen Tanks website (http://www.taigentanks.com/)!  A second Huzzah is order!   ;D

(https://farm1.staticflickr.com/481/32155245082_b17dcde932_m.jpg)

My son desperately wanted a Tiger I so this should work out perfectly.  I ordered the IR plastic edition model that was listed thinking it would be perfect for indoor testing.  Eventually I will get the metal wheels and metal tracks to upgrade the vehicle but, for now, the plastic edition should meet my future OP needs.   8)

It will also give me a good chance to brush off my painting skills because he wanted a replica of Tiger 131.  Surely it won't be difficult going from dark grey to desert yellow right?   :-\
Title: Re: Getting Started
Post by: vonTirpitz on January 14, 2017, 04:42:10 PM
Just taking a few moments to step back and take stock of where I am (or think I am) with this project.  This is mostly for me to simply get my thoughts in order since I am barrel rolling into this project and a new hobby at the same time.  If I have glaringly missed something important feel free to chime in!  :)


1 S&D Taigen Tiger I Early Version (Plastic Edition) with IR, 360 Turret Rotation, 3:1 Metal Gearbox, Smoke, Recoil and Lights.
2 Sabertooth Dual 5A 6V-18V Regenerative Motor Driver Serial ESC until the Scout ESC becomes available.

*Still looking for a US Vendor for Benedini products but may just order direct if it comes down to it.  I am still pondering what might be needed for TCB sound development and the Benedini Mini is as good a place to start as any I suppose.
Title: Re: Getting Started
Post by: LukeZ on January 14, 2017, 04:45:26 PM
Don't feel bad vonT, I consider myself in some ways a digital dinosaur as well (I have never owned a smartphone for example). And using HTML in a forum post was only a mistake someone makes who knows too much, not too little. 

You and I have had the exact same idea with regards to testbeds. For the last seven years (http://www.rcuniverse.com/forum/rc-tanks-369/11635636-intro-open-panzer-project-new-tank-control-board-2.html#post12295775) I have been using a PZIII which, while reliable beyond expectation, is really too small. I've since done the same as you, ordered a Taigen Tiger 1 lower chassis to which I will fit plastic wheels and tracks.

If you don't mind sharing I'd be curious to know what sort of embedded work you have done. With any sort of formal education, or even just the long experience you possess, my coding practices may seem unusual - or maybe not, I guess I don't know. I often wonder if I've missed context, perspective or sense of proportion from self-education, but it's hard to know what you missed if you don't what you missed!
Title: Re: Getting Started
Post by: LukeZ on January 14, 2017, 05:00:05 PM
  • Download and compile OPConfig source code to review from GitHub: Still looking around for my old Qt license!
Holy moly, you really are jumping in the deep end!  :o I applaud you sir.

As you mentioned the sound unit, I can volunteer that I purchased my TBS directly from Thomas and at the time I don't think I could have gotten it any cheaper from a US source.

I will also volunteer for what it's worth that my current open source sound card development is using a PJRC Teensy 3.2 (https://www.pjrc.com/store/teensy32.html), Prop shield (https://www.pjrc.com/store/prop_shield.html), SD card shield (https://www.pjrc.com/store/wiz820_sd_adaptor.html), and a simple carrier board (https://oshpark.com/shared_projects/6DH2rzbP). The hardware needs to be simplified but this works for testing.

[EDIT: That is what I'm using for testing now, but please don't follow along yet, or worse, buy any of these components. I have a strong suspicion some of these pieces are going to need to be changed.]

I will attempt to start a thread soon about this project for anyone to follow along with and contribute to. The hardware is basically all off-the-shelf other than the carrier board, which doesn't really do much and could simply be bread-boarded. In the absence of a TCB people could still use a standard Arduino Mega for the purposes of sound card development.

But I am only in the earliest stages now and I need to get some things organized first before posting them...
Title: Re: Getting Started
Post by: vonTirpitz on January 15, 2017, 10:35:12 AM
Whew!  I had forgotten how long it took to install the Qt IDE!  :P.

If you don't mind sharing I'd be curious to know what sort of embedded work you have done. With any sort of formal education, or even just the long experience you possess, my coding practices may seem unusual - or maybe not, I guess I don't know. I often wonder if I've missed context, perspective or sense of proportion from self-education, but it's hard to know what you missed if you don't what you missed!

Well it is a long sordid history I suppose.  ;)  I started out back in the 80's writing code for scientific analysis and some very early robotics.  After college, I moved into aerospace and automotive engine controls focusing on layered communications throughout the 90s.  For the next decade or so I moved around the medical device industry which involved numerous motor and sensor controls.  Currently I am mostly just lifting legacy code (mostly my own) up through the ages trying to keep the energy sector paced with advances in technology.

I wouldn't worry too much about your "coding practices" as that tends to be very objective by whomever is working with it.  Everyone has their own background and experiences through which they see the world.  I figure as long as it is clean and well documented (which yours appears to be) then I would have no worries.   8)

Besides, the project is a work-in-progress and now open source which should bring many positive elements to it.  I am sure that as more folks get involved there will be much to grow upon but I suspect the bulk of your original work will remain the solid platform you developed by yourself.

I salute your perseverance getting it this far.  Personally, I have way too many projects sitting on the shelf that never made it anywhere close to the functionality you have achieved so good job!.   ;)
Title: Re: Getting Started
Post by: LukeZ on January 15, 2017, 12:15:59 PM
Well it sounds like you have a very diverse background and I'm sure we will benefit from any contributions you may decide to make. The beauty of open source is that we can potentially involve a wide variety of skills and by definition, everybody working on the project is interested in and personally motivated.

As for projects on the shelf - believe me I have plenty of those too! But many of them are still there because I have focused on this one.

On the topic of code, there is a brief synopsis of all the custom classes used in the TCB firmware here: TCB Libraries (http://openpanzer.org/wiki/doku.php?id=wiki:devl:libref). At whatever point people start wanting to change things, it is a good place to go to figure out where to look for certain functionalities.

Whew!  I had forgotten how long it took to install the Qt IDE!  :P.
Qt is a bear to get going as I recall, but simple to use once it is setup. This was my first exposure to it and I didn't take advantage of all it could do I'm sure. I hadn't figured anyone would bother to mess with it but seeing you charge ahead I hope we get more like you in time! There is much that could still be done on the Qt side.
Title: Re: Getting Started
Post by: vonTirpitz on January 15, 2017, 05:29:31 PM
You are quite right about Qt.  I'll need a few more quiet hours to get it configured the way I want.  I'll heed your advice and read through the class synopsis.  I primarily just wanted to get all of the IDE's set up and be in a position where I can compile all of the code at any time.  Once that is done then I won't have to worry about it once I get a TCB to play with.  The time between now and then will mostly be reading and learning the codebase.  ;D

I took my son out today and ran the tanks for a few hours.  What's the point of all this if I don't actually run our tanks!  lol.

The one thing that struck me again was just how "coarse" the turret control is on the stock units.  I will definitely want to find improvements with turret and gun elevation control.

I really like both of these tanks but the Sherman 75 has been a real "diva" right out of the box.  If it isn't one thing it is another with this beast.  The Panther has one paint chip.  That's it.  The Sherman, on the other hand, has been a tease.  I swear it has a personality.  Today it developed a strange mechanical "squelch" when turning left.  Checked the gearbox and didn't seem to find anything seized up but will have to go over to RC Universe or email Erik to see if anyone has any ideas about it.

Truth be told, I wouldn't send the tank back or sell it.  For some reason all of the little problems it has so far presented to me have somehow made it more endearing.  Strange.   :-\
Title: Re: Getting Started
Post by: vonTirpitz on January 16, 2017, 07:10:34 PM
Today it developed a strange mechanical "squelch" when turning left.

So I go out to video and record this new "behavior" so I can solicit help and my diva M4A3 decides to make no unusual noises and it performs flawlessly.  I may have to customize it and name it the "Problem Child" (custom decals! whoot!).  Go figure.    ;D

In other news... I finally managed to get Qt configured properly enough to build and run a release version of OP Config!  Hurrah!   :)  <- Edit: Still true but it actually happened a few days after this post.   ::)

A couple of quick reminders for those who follow in my footsteps.


1Not sure how I missed that particular .dll in the build but I am way too tired to look into it tonight.  Ditto for the help files and anything else that didn't quite make it into the build.  The only other thing I noted was that the menu items on the left of the UI weren't highlighting properly so I guess I am not quite ready for prime time.   :P   lol.

Nevertheless, I can now build, deploy and execute both the TCB firmware and the PC configuration software (to a somewhat lesser degree).  I'll consider that a personal victory at this point and can now turn my attention mostly to the code itself.  Aside from fixing some of the Qt config issues I will likely focus on the firmware from this point forward.

Edit: A couple posts further down I have provided step by step instructions to quickly and easily install and configure the Qt IDE for use with this project so most of this post isn't applicable.
Title: Re: Getting Started
Post by: LukeZ on January 16, 2017, 07:57:41 PM
I'd kind of forgotten a lot of this stuff myself and hadn't ever expected anyone to set up a Qt environment, which explains why my installation notes are non-existent. You've gotten 99% of the way there with no help, in just a few days! It took me weeks just to get to where you're at now.


As for the highlighting issue in the sidebar menus - this is a known issue with Qt 5.6. I posted an issue here (https://bugreports.qt.io/browse/QTBUG-53186) almost a year ago but I seriously doubt anyone is going to address it (they are probably waiting for me to solve it). So if you are compiling with 5.6 that may explain what you see. There is a workaround in the source but it's commented out (do a search in the project for "changeStackedWidget56Fix").

The other thing 5.6 does is deprecate elements needed to run the Assistant application. Last time I looked there was no good replacement. Since i kind of liked the help files within the program (even though they are all available online too), I've stayed with Qt 5.4 for now.

I am using Qt Creator 3.6.1 as my IDE and MinGW 4.9.1 as the complier. If you select Qt in your Windows "Add or Remove Programs" (or "Programs and Features" as they call it in new versions), right click and select "Change", the MinGW compiler should be one of the components you can install. But if you are using a different IDE than Creator then this won't be much help.

In Qt Creator you can build your project using different "Kits" and perhaps you are compiling with Visual Studio or something which may explain some of the differences we seem to have. I tried at one time compiling with Microsoft Visual C++ (MSVC) but never got it to work for some reasons I don't recall.

I don't know if any of this is useful or not, just thought I'd throw it all out there.
Title: Re: Getting Started
Post by: vonTirpitz on January 17, 2017, 10:27:41 AM
  I've stayed with Qt 5.4 for now.

I believe you are right so I have decided to roll back to the versions you are using.  I had hoped to stay current with the latest Qt versions just out of my habit of thinking that newer might be better.   ::)
Title: Re: Getting Started
Post by: vonTirpitz on January 19, 2017, 08:34:18 PM
Mostly out of stubbornness, I completely uninstalled my previous Qt IDE attempts and performed a clean installation of the Qt IDE. 

Therefore, I would like to quickly revisit my successful Qt installation for compiling and running the OP Config utility. 

I will simply state that I really, really made the process more difficult than it needed to be the first time by attempting to integrate Qt into my Visual Studio 2015 IDE.   :-\

By rolling back to QT 5.4 (In this case 5.4.2) and using the MinGW compiler and tools for that version, everything progressed quite quickly.  Perhaps someday in the future I will attempt to bring the project build up to the latest Qt version and integrate the Visual Studio IDE.

Anyway, in order to compile and run OP Config (for windows 10 in this case) I performed the following steps:


At this point you should be able to build the project.  On the left side of the IDE screen select the computer icon that is just above the green "run" arrow icon.  From there, select "release" as your build type (the IDE will default to debug otherwise).  You can now select the "hammer" icon at the bottom left to build the project.


Once the build has successfully completed, you will want to copy all of the sub-folders and .dll files from the officially released version of OP Config into the folder where your newly built OPConfig.exe is located. 

(https://c1.staticflickr.com/1/258/32263146812_f74b61b504_z.jpg)

I suspect there are better configuration methods in the IDE to properly create and add these libraries during the build process (without having to manually move them).  However, I am quite satisfied at the moment that anyone can now modify and test changes to the OP Config program. 

Once the build is complete and files copied you should be good to go!  Just select OPConfig.exe and run it.

While I haven't yet messed with the debugger I have been able to build and test all of the functionality in the program short of actually having a TCB to talk to.

By the way, if you receive any compiler errors right off the bat I suggest clearing the system environment (from the project tab on the left side of the creator screen) and running qmake from build menu.  This step really shouldn't be necessary for most of you unless you installed/uninstalled multiple versions of Qt as I had done prior to getting it right. 

Hope this helps and good luck!   8)

-Marc
Title: Re: Getting Started
Post by: LukeZ on January 20, 2017, 10:34:17 AM
It's been over a year since I went through all this myself but I do remember it seemed much harder than it really should be to get Qt working. I think we took a different approach but there are probably a hundred ways to skin this cat. To be honest I found documentation to be one of the weak points of the Qt ecosystem, especially in this topic, and they have download links spread out all over their site for different things, and different ways of actually getting their software, which makes it very confusing.

What I ended up using was their Online Installer (https://www.qt.io/download-open-source/). It may not (probably will not) actually download exactly what you want the first time, but you can always run the tool again afterwards, select "Add or Remove Components" and install the pieces it missed. Most notably I seem to recall the default compiler was MSVC and what I really wanted was the MinGW compiler, but this was easy to add.

In the screenshots below you can see I actually have Qt 5.4 and 5.6 installed, with the MinGW compiler for both (I also still have the MSVC compiler for 5.4 which I don't need). From within Qt Creator (not the same thing as Qt), I can select which Kit to use and I am able to for 5.6 if I want, but due to the above mentioned issues I've kept it at 5.4 for now (5.4 was the latest release back when I started this project).

Anyway thanks Marc for posting a step-by-step guide. If you can think of something that would make it easier for others to get going let me know. Maybe different arrangement of the files on GitHub, I don't know. What's on GitHub does reflect exactly my own project directory.

I kind of try not even to think about Qt installation and had mostly been happy to forget that chapter in my life... ;) I take images of my C: drive at routine intervals precisely so if my computer crashes I don't have to re-install this thing a second time.
Title: Re: Getting Started
Post by: vonTirpitz on February 01, 2017, 09:52:18 PM
Since the desktop software and firmware builds seem to be squared away now I figured it was time to go out and invest in some hardware to play and work with while I wait for the TCB.

All I basically started with were two Taigen tanks and a decent computer and some tools from my workbench.   So after a lot of research and investigation I have received (or am waiting for) the following goodies:


I already own a good Laboratory Bench Power Supply (http://www.mcmelectronics.com/product/TENMA-72-7245-/72-7245) so I am planning to use it in lieu of batteries while testing.  A couple of XT-60 plugs from Aloft Hobbies will let me use the extra two leads I had from my Venom Charger. I know the IBU3 will operates up to 12VDC so I'm planning to emulating my fully charged NiMH at about 8.2VDC.  The TCB should work fine in that range (7-15VDC).

Hopefully I should have everything in hand in the next week or two and can fire up the test Tiger.  I'll try and get some sample recordings from the other speakers and post them in a future installment.

Title: Re: Getting Started
Post by: vonTirpitz on February 10, 2017, 09:38:09 AM
I have started the process of upgrading my test platform (the Tiger I) with an IBU3 so I can play around and experiment with the new hardware as well as familiarizing myself with the QX7 transmitter.

Since the FRS-7 speaker is still out of stock at MCM as well as other vendors I will use a variety of 8W and 20W speakers I picked up to experiment with sound options (Note to self- read the technical descriptions more carefully as the 12W speaker I ordered turned out to only be 8W RMS).  I do not want to use the stock Taigen 3W speaker as I am afraid I would damage it with too much output power. 

One thing I have quickly noticed about this hobby is that I seem to always be short of connectors or wiring harnesses (I had to order a pack of Male JST-XH 1S leads to wire into the speakers). The cost to stock up isn’t too bad but I seem to have a bad habit of overlooking my connection requirements.

So far, I have removed the Taigen motherboard and receiver from my Tiger I as well as the 3W speaker.  My next step will be to wire up the IBU3, a speaker and a FrSky X8R receiver with which to communicate.

I already had the FrSky X4R-SB that I planned to use with the TCB but it didn’t occur to me that the IBU3 doesn’t support SBus until I went to wire it in.  It worked well enough to test the transmitter as well as check out the IBU software but I had to go back and order a X8R so I could get all 8 channels working.  Live and learn…

A few other notable (newbie) learning experiences include discovery that the stock NiMH battery that comes with the QX7 radio has a 2S connector that I did not have an adapter for.  I guess the 9X had a built-in charging port or something but it doesn’t appear to be a feature with the QX7.  Fortunately, the radio accepts standard AA batteries so it wasn’t a show stopper.  (The vendor I purchased from indicated that adapters would be forthcoming after I inquired).

And a 3” speaker sounds small until you get it in your hands and start thinking about where to put it in a 1/16 scale vehicle.  The FRS 7 2.5” is definitely looking to be my go to speaker once they are in stock again.  I still want to try and record some comparative videos with the other speakers to get a better idea about sound quality differences.  If the larger speakers are better quality I might still try to wedge one into that Tiger.   ;)

Despite how novice this might sound I will admit to it anyway as information for any poor soul that is new to the hobby with the tendency to leap before looking.  When I received the FrSky battery with the 2S connector the only thing I had that came close to mating to it was my balance board from the Venom Quad Pro.  The whole thing was confusing the devil out of me so I emailed Venom to find out exactly just how the balance board worked and they politely educated me that it was not capable of charging anything and only acted as a sensor for LiPo batteries.  Makes sense now but for someone with basically no prior experience it needed explanation.

So aside from connecting things up as per the instructions I think I might have an operational Tiger I again this weekend to let me son drive around.  I am sure I will discover and overcome more learning experiences as this progresses.
Title: Re: Getting Started
Post by: vonTirpitz on February 11, 2017, 02:10:16 PM
Well a number of ideas come to mind as I am tinkering with the new gear and radio...

1) We definitely want to consider adding "pictures" to the Troubleshooting section in the wiki when dealing with wiring or other physical issues.  I'm running into a few of problems that are forcing me to scour all over the place to try and resolve.  Is it the receiver? Is it the radio?  Are your controls configured properly? Why does everything shut down when X happens? Why are the signal pins inverted on version X?  Why didn't the answer work?  etc.  Sometimes answers are still elusive even with explanation.  Pictures help tremendously.

2) The term "Plug and Play" is subjective and doesn't necessitate the omission of instructions and diagrams.   PnP compatibility may change over time as products evolve.  ???

3) If the circuit board does not clearly label pin 1 on non-keyed connectors then it might warrant a little more description and imagery in the wiki.  From what I've seen this may not be that big of an issue with the TCB but I'll note it to look at when I get my hands on a production unit.

4) I need to really learn more about programming my radio and what some of the settings might be doing without my current knowledge.  If there are parameters that should be set on a particular radio that would affect TCB functions then we will have to add that to the setup and/or troubleshooting sections.

5) The TCB has many features I am already looking forward to having as I am already identifying shortcomings (in my opinion) in existing commercial products from a novices point of view.   It just occurred to me that I may actually get a production TCB working from Hobby King before I figure out some of the issues I am currently troubleshooting....   :-\

More to follow...


Please ignore most of the above as I was playing around with just random electronics and trying to figure out my own new radio equipment.   Most of the above rambling was a result of frustration not at all related to OP.  My apologies.

Nothing to see here....   :-*

Another realization....  If I had actually listed out eight issues then I would have to again figure out the BBCode so I didn't get a 8).  lol





Title: Re: Getting Started
Post by: LukeZ on February 11, 2017, 09:02:19 PM
I'm concerned this thread is going to end up confusing newcomers here once the TCB is released. It has what appears to be a helpful title ("Getting Started") but then it discusses things which no user will actually need to get started. Compiling code and setting up Qt are topics of interest only to developers and completely unnecessary for any end-user to concern themselves with.

The list of items you just enumerated could also be quite confusing:


Good forum etiquette typically involves creating a "New Topic" that defines a specific topic and sticks to that topic in the discussion. We have to keep in mind these threads are going to stay here for eternity, and be read by many others. My concern is that noobs are going to come in here and see a thread titled "Getting Started" and then get all kinds of turned around or worse, turned off.

The goal of most technical forums is primarily to provide a place to answer (or work through and solve) specific questions and problems, and store that information for others to find later.

At the same time a forum can also be a place for general socializing with others who share our interest, and in that regard threads consisting of non specific chit chat that traverse a wide variety of topics are perfectly fine, but the title needs to make that clear.

So please don't stop what you're doing, I like following your exploration of all things tank related! But I think we should do two things: First, move this thread to the TCB Developer's forum since many of the aspect you delve into are not end-user topics. This I have just done. Second, I would ask that you change the topic title to something better reflecting the discussion here, perhaps along the lines of "Random Experiments" or whatever you like, so long as it doesn't sound attractive or informative to newbies, and makes clear the topic is not about any specific topic. (To change a topic title edit your first post).
Title: Re: Playing around with the software and other random experiments
Post by: vonTirpitz on February 12, 2017, 12:45:17 AM
Agreed.  Sorry for rambling off course.
Title: Re: Setting up a software development environment and other random experiments
Post by: vonTirpitz on February 14, 2017, 02:49:00 PM
Well I have made some progress with my efforts to get the IBU3 electronics configured and running in my test tank.

I acquired the IBU3 as my way of learning my way around custom hardware and software that already existed for the past few years in the RC tanking hobby.   Since the production OP TCB isn’t yet available through Hobby King it seemed like a logical path to follow in aiding my effort to learn and comprehend not only fundamental RC concepts, but also gain valuable experience in the custom electronics arena.  While I could build a TCB from the information provided on this website I am going to go with "I am too lazy and lack the patience to do that" and wait for Hobby King to release it...

So, as a precursor to the Open Panzer TCB, I feel that this path would also give me some advantage when it comes to comparing the existing features and capabilities of the Taigen OEM motherboard and IBU3 with the upcoming release of the OP TCB.  As I learn about what is already out there I think I can better understand and appreciate what the Open Panzer project truly brings to the table.  The whole process has given me several ideas and I am looking forward to using the TCB once it comes out.   (One thing I want to definitely look at in the TCB code is when it is controlling the servos how it keep tracks of the pulse count(s).   I believe that the idea is already been touched upon from what I've read about maintaining barrel elevation and having the turret traverse back or stay at a known location but I need to dig into it to see how exactly it works).

==== Self Reminder: Meet the Power Requirements

Anyway, I found myself with a few issues working with the IBU3 initially.  First and foremost, I realized last night that I had set the current limit on my benchtop power supply too low.  With the V2 Taigen smoke unit connected and everything running at maximum settings I needed more than the 2 amp limit I had initially set.  Ultimately, I just set my power supply to provide maximum amperes (~3A) on that channel and so many of the little mysteries vanished and it seems to max out at around 2.8A.    Leave it to a software guy to overlook the power requirements....   :-[

On the flip side, knowing that my Tiger can gobble up upwards of 3A running all out also means I can more accurately calculate how long my batteries would hold up under such conditions.  It also has me thinking about the possibility of wiring up my batteries in parallel to get more run time (alas, this is would be another mini project for a future time).

With regard to wiring, I also need to remember to solder that single ground wire coming out of the IR module in the turret to the switch ground.  I was going to just use a common ground on the IBU module but was told that could have negative repercussions on the electronics should a malfunction occur.  No problem.  Just a little more soldering on my part.

And I want some better cooling fans.   I am not yet running into any thermal issues but I like the idea of keeping electronics as cool as possible and the little PC fans I currently have just aren't moving that much air.  I'll go out to my usual online store haunts and see what is out there....

==== Self Reminder: 2.4GHz can potentially be a noisy environment

An issue I was dealing with in conjunction with my self inflicted power mix up is that I am losing radio contact with the receiver and sometimes get unusual responses from the tank.  The low current may have factored into some of this early on but now that the power issue has been alleviated I am still seeing some problems maintaining radio contact with the X8R receiver.  The fact that I am only a foot away would tend to eliminate distance as a factor.

I first replaced the already installed PCB trace antenna with the “whip” antenna that were also included thinking that might be a factor for some reason.  This change seemed to help somewhat even though I would not think directional aspects would apply.  Maybe someone out there can tell me if the PCB antenna work better in tanks than the whips.  I guess I need to add antennas to my list of reading materials...   :P

As I continued to pursue this issue a thought occurred to me while I was working with the hardware last night...

My work area is particularly compact and I tend to lay my radio down in front of me in such a way as to where its antenna extends out over my computer keyboard.  The computer workstation is also nearby and I am pretty sure it is just radiating EMI and causing potential radio interference.
 
I suspect that my computer and/or keyboard are to blame as the interference “appears” to go away when I pick up the radio and move it away from these potential sources (I need to figure out a way of getting my hands on a spectrum analyzer one of these days).

Once I clear up the radio interference to my satisfaction I am just about done with this part of my experimentation.  I will likely play around with some of the IBU features such as acceleration mapping as well as using it to test and compare the various speakers I have for audio quality purposes.  In retrospect, I am not really certain I can distinguish and present speaker quality from recordings I've made.  The nuances between speakers that I can hear don't really get picked up by the recording hardware I have and I am sure the recording software I use is likely filtering as well.  More conundrums...   :o

==== Self Reminder: Learning what my radio can do

My next big target of exploration is going to be the Taranis Q X7 and OpenTX (http://www.open-tx.org) to get a better handle on the programmable features and capabilities it provides.  I have already been told that some folks have been able to program their Turnigy radios and move the IBU3 gun firing from the joystick to discrete switches on their transmitters.   Surely there is a way I can figure out how to do this on the Taranis I have.  Just a little more reading....   8)

The documents section of the OpenTX website presents an enormous amount of reading material.  So, in addition to the task of reading and understanding the information provided in the Open Panzer wiki (http://openpanzer.org/wiki/doku.php) , I can also add all this OpenTX and Taranis material to my plate of reading material.  I know that all of this really isn’t a requirement (or necessary) to have fun and use the TCB in my tanks but I would like to know more about my radio and what kind of performance I can squeeze out of it.

In summary, I have to give a nod of credit to forum members and cottage industry owners across the RC and modeling communities as everyone I has been helpful and willing to answer questions (Of which I still have plenty).   And, for me, the Open Panzer project was exactly what I needed to get into this.  ;D
Title: Re: Setting up a software development environment and other random experiments
Post by: vonTirpitz on February 14, 2017, 04:40:31 PM
=== Current Draw Reference (IBU3 Controller, 8W 3" Speaker, FrSky X8R, Taigen V2 Smoker configuration @9VDC):

Powered ON (no USB connection): 0.26A
Powered ON (USB connection): ~0.27A

Powered ON (USB: Engine Startup and Audio 50% volume): ~0.33A
Powered ON (USB: Full Throttle and Audio @50% volume): ~1.7A
Powered ON (USB: ZeroThrottle and Audio @50% volume: Proportional Smoker): ~0.67A
Powered ON (USB: Full Throttle and Audio @50% volume: Proportional Smoker): ~2.6A

Powered ON (USB: ZeroThrottle and Audio @50% volume: Relay Smoker): ~1.85A
Powered ON (USB: Full Throttle and Audio @50% volume: Relay Smoker): ~2.6A

====

I wonder if the Smoker pulls more current if it runs low on oil?  If so, that would be something to look into as a way to automate smoker shutoff if someone hasn't thought of it already.

And, yes, I just tested out my theory from the previous post.  Apparently my keyboard does interfere with the 2.4GHz transmitter when the antenna is within 4-6 inches of it.  Who would've guessed???   Now I wonder if I was premature in replacing the PCB antenna on the receiver.  :P
Title: Re: Setting up a software development environment and other random experiments
Post by: vonTirpitz on February 18, 2017, 04:47:49 PM
Today, with a little trial and error, I was able to get the functionality I was looking for between the Taranis Q X7 and the IBU3.  Aside from the normal functions I wanted to remove the gun firing trigger from the elevation joystick and assign each gun firing to a discrete switch.

Using the OpenTX functionality I reduced the Weighted value of the gun barrel elevation channel (In my case Channel 1) to 80 to prevent the joystick from reaching the trigger value and causing the guns to fire for both the main gun and machine guns (which would normally fire with the joystick fully engaged up or down).

I then used the Special Functions to enable the switch SC↑ to override CH1 with a Weighted parameter of 100 and likewise switch SC↓ to override CH1 with a Weighted parameter of -100 which effectively fire the main gun and machine guns respectively depending on whether the SC switch was moved forward or back.  I suspect that there are many other ways of customizing this given the spectacular flexibility of OpenTX but I am satisfied with my results

IMPORTANT! Make sure to make plenty of backups!  I had to use my original backup a few times to “unbreak” things I muddled with unsuccessfully.   :P  \

At one point I somehow managed to reset the radio so it was giving a low battery alarm at less than 9v.  Finally figured out to get to the radio settings by pressing the Enter and Menu buttons on the Q X7 at the same time (Surprised I haven't found that menu in the OpenTX Companion yet).  Oh well.  I still look at it all as small personal victory.  lol.
Title: Re: Setting up a software development environment and other random experiments
Post by: LukeZ on February 23, 2017, 08:05:46 PM
Marc, just wanted to let you know I've updated the TCB project to work with the new process the Arduino IDE uses for custom boards.

Previously one needed to edit Arduino's boards.txt file and this is what the instructions on the TCB GitHub page said at the time you got set up.

The new method involves giving the Arduino IDE a link and then letting it install the board using Tools->Board->Boards Manager. There are updated instructions (with photos!) in the TCB GitHub repository readme (https://github.com/OpenPanzerProject/TCB).

You can delete the old entry in your boards.txt file if you want.

New developers hopefully will read the new instructions and be set from the get-go. The new system was a lot of work to set up, but it's easier for the end-user (coders in this case), and also gives us better control of how the code is compiled, and makes maintaining future changes, or even adding new boards later, much easier.
Title: Re: Setting up a software development environment and other random experiments
Post by: vonTirpitz on February 24, 2017, 08:36:07 PM
Marc, just wanted to let you know I've updated the TCB project to work with the new process the Arduino IDE uses for custom boards.

Previously one needed to edit Arduino's boards.txt file and this is what the instructions on the TCB GitHub page said at the time you got set up.

The new method involves giving the Arduino IDE a link and then letting it install the board using Tools->Board->Boards Manager. There are updated instructions (with photos!) in the TCB GitHub repository readme (https://github.com/OpenPanzerProject/TCB).

You can delete the old entry in your boards.txt file if you want.

New developers hopefully will read the new instructions and be set from the get-go. The new system was a lot of work to set up, but it's easier for the end-user (coders in this case), and also gives us better control of how the code is compiled, and makes maintaining future changes, or even adding new boards later, much easier.

That's great news.  Thanks!  I'm playing with the code this weekend and looking into some emulation options I can test without the hardware.  I'll post if I make any useful progress.

Marc
Title: Re: Setting up a software development environment and other random experiments
Post by: LukeZ on February 28, 2017, 03:26:39 PM
Marc, more updates. I've decided to move all libraries into a src/ subfolder of the sketch folder, rather than having them jumbled in with the user's general Arduino library folder. This means the entire project can reside in a single folder which will make it much easier to manage for people wishing to contribute via GitHub.

I have also released a new version of the custom boards that you should install in Boards Manager. I am new to boards manager and have been learning more about it, so the original needed to be replaced. You should just be able to do this by going to Tools->Board->Boards Manager, selecting the Open Panzer board and clicking Install or Update, but if it gives you problems you might need to delete any Open Panzer packages from:
C:\Users\your_name\AppData\Local\Arduino15\staging\packages\

Sorry for the hassle. Up to very recently this project has been set up in a way that was convenient for me to develop, without much thought to future contributors. So I'm afraid you're a victim of early adoption. I think these various changes will make life much easier for developers going forward.
Title: Re: Setting up a software development environment and other random experiments
Post by: vonTirpitz on March 02, 2017, 05:10:06 PM
Marc, more updates. I've decided to move all libraries into a src/ subfolder of the sketch folder, rather than having them jumbled in with the user's general Arduino library folder. This means the entire project can reside in a single folder which will make it much easier to manage for people wishing to contribute via GitHub.

I have also released a new version of the custom boards that you should install in Boards Manager. I am new to boards manager and have been learning more about it, so the original needed to be replaced. You should just be able to do this by going to Tools->Board->Boards Manager, selecting the Open Panzer board and clicking Install or Update, but if it gives you problems you might need to delete any Open Panzer packages from:
C:\Users\your_name\AppData\Local\Arduino15\staging\packages\

Sorry for the hassle. Up to very recently this project has been set up in a way that was convenient for me to develop, without much thought to future contributors. So I'm afraid you're a victim of early adoption. I think these various changes will make life much easier for developers going forward.

No hassle.  Any improvements are well worth the experimentation.   ;D
Title: Re: Setting up a software development environment and other random experiments
Post by: vonTirpitz on March 25, 2017, 10:07:36 AM
Well I'm back after a two week coding binge on a project for work.  Sheesh.

Now I can go back and play with everything OP again.  I wonder if there are any Hobby King updates?

Quote
"Personally, I liked the university. They gave us money and facilities, we didn't have to produce anything! You've never been out of college! You don't know what it's like out there! I've WORKED in the private sector. They expect results".

- Dr. Raymond Stantz
Title: Re: Setting up a software development environment and other random experiments
Post by: LukeZ on March 25, 2017, 05:09:18 PM
I wonder if there are any Hobby King updates?
No updates from HK yet. Originally they said production in February and then I contacted them earlier this month and they said they were still goofing off. Communication with them is not great.

As soon as I know something, it will definitely be publicized.
Title: Re: Setting up a software development environment and other random experiments
Post by: vonTirpitz on November 20, 2017, 06:15:47 PM
Alrighty then.  Long time between posts.   ::)

Hobby King ran a sale a week or so ago and I saw they had the TCB on sale so I pulled the proverbial 'trigger' and ordered two for $35 apiece.  Shipping and handling wasn't too bad at just under $8 considering they shipped from HK I think. 

The boards and accessories were well packaged and came with a printed quick start guide (from the OP site).  A quick glance at the pcb looked to me like they have replaced the MOSFETs so I am hopeful that I won't have to modify either board. 

I plan to fire up my development software and test the boards this weekend.  I'll post as I make progress.  Thanks Luke!

(https://farm5.staticflickr.com/4547/38495391716_1602702a8b_m.jpg)
 (https://www.flickr.com/photos/28801742@N04/shares/486W0x)


Title: Re: Setting up a software development environment and other random experiments
Post by: LukeZ on November 21, 2017, 01:05:13 PM
Long time between posts but you also skipped all the drama from this summer so just as well. Good luck on your tinkering and I will be interested to hear how you get along.