Open Panzer

Open Panzer Help & Info => Show and Tell => Topic started by: Chi-el on August 31, 2021, 07:18:35 AM

Title: High speed tracked vehicle....something different
Post by: Chi-el on August 31, 2021, 07:18:35 AM
Hi All,

So for the past few months I have been entertaining myself with with building a kind of tank-ish looking thing.
Wasn't too sure on what I wanted it to look like, but I wanted it to go fast.
So with 2 x 56112 780 kV motors on 8S, I should be in for some fun. The test runs on the stand where actually pretty scary.
It's 800 mm long and 450 mm wide, weighing in at a healthy 15 kg.

And today, after a bit of waiting, I finally got my 2 brand new OP TCB delivered  ;D
Took the gamble and had them made in China, so fingers crossed they're ok!
Will start digging further in to the startup and configuration as I want to drive it with a pistol grip radio.

Any good suggestions for a shell / body?

For some reasons the pictures don't show in the preview, let's hope they show in the post....
[EDIT]: yes they do :)
Title: Re: High speed tracked vehicle....something different
Post by: LukeZ on August 31, 2021, 02:14:28 PM
Impressive build! I'm curious what service you used to have the boards manufactured? Let us know how they work!
Title: Re: High speed tracked vehicle....something different
Post by: Chi-el on August 31, 2021, 02:38:33 PM
Hi Luke,

Glad that you asked, so far it isn't going too smooth.
Have done the USB driver set up according the Wiki, it is now shown as COM3 in the Device manager. Had to adjust the Baudrate to 115200 and did all the other setting according the Wiki.
Though even with the snoop and trying every USB port on my laptop, it doesn't want to connect.
In the device manager it says that the device is working correctly, but is does also give the message "Device FTDIBUS\VID_0403+PID_6001+AB0M9RB0A\0000 requires further installation".

I have tried installing the FTDI driver several times and re-starting etc, but so far I'm unable to get a response from the TCB unfortunately  :(

Should it make a difference if the TCB power switch is fighting or repairing?
The LED closest to the USB socket does light up when trying to connect, but that is about it.
Title: Re: High speed tracked vehicle....something different
Post by: LukeZ on September 01, 2021, 05:28:41 PM
Hi Chi-el,

Sorry for the slow reply. I think the problem is almost certainly that the processor needs the bootloader installed first. When the board was under production we did this at the factory, but if you are assembling one from scratch then you have to do it yourself. If you buy an Arduino Mega the bootloader already comes installed, but when using a new chip it is blank.

The bootloader only has to be installed once on each board, after that you will not need to do it again. I've attached instructions for how to do this, you will need to buy a USBASP device. They are very cheap, here is one from China (https://www.aliexpress.com/item/32670511994.html) but you can probably find European sellers on eBay who have them. Notice the one I linked to gives you the option of buying an 8-pin to 6-pin adapter, you will need this version because we use a 6-pin ISP port on the TCB. Most places sell them with the adapter included.

In the instructions I discuss a pogo adapter, you won't need this because your boards already have pins installed on the ISP port, so you can just plug in the 6-pin cable from the USBASP directly into your board.

The instructions also mention using an FTDI adapter to load the firmware. You can ignore this and just your USB cable to load the firmware as normal. The FTDI adapter is faster when we are flashing hundreds of boards, but you only have to do two of them so it's no problem.

I hope this helps, let me know if you have any questions!


EDIT: No, it doesn't make a difference what position the fight/repair switch is in.
Title: Re: High speed tracked vehicle....something different
Post by: Chi-el on September 02, 2021, 01:30:02 AM
Fantastic, and what a service, thanks! Have ordered it and will revert with an update once I've got the stuff in.
Title: Re: High speed tracked vehicle....something different
Post by: Chi-el on September 03, 2021, 01:38:35 PM
Hi,

So I got myself an USBasp and 10 to 6 pin adapter https://nl.banggood.com/10-Pin-To-6-Pin-Adapter-Board-Connector-For-ISP-Interface-Converter-AVR-AVRISP-USBASP-STK500-Standard-p-1413166.html?cur_warehouse=CN (https://nl.banggood.com/10-Pin-To-6-Pin-Adapter-Board-Connector-For-ISP-Interface-Converter-AVR-AVRISP-USBASP-STK500-Standard-p-1413166.html?cur_warehouse=CN), downloaded Zadig and changed the driver as per instruction, all fine so far.

Then, amended the batch file as instructed, verified the correct file paths and changed the programmer type to USBasp.
Made triple sure the 6-pin connector was in the right position by checking the ground position
Ran the file, and the attached file is the outcome. It says the target doesn't answer.

I then tried:
- Change USB ports, for programmer and USB cable
- Changed programmer driver
- Checked batch file a few times
- Restarted
- Checked dipswitch positions, tried both position on #5 just in case it had something to do with it.

 ??? Any suggestions?
Title: Re: High speed tracked vehicle....something different
Post by: LukeZ on September 03, 2021, 04:26:43 PM
Did you apply power to the TCB while you tried to flash the bootloader? The board will not be powered through the ISP port so you need to have a battery connected while you do this.

Later when you load firmware the board can be powered through the USB port, so the battery is not necessary for that step. But for the bootloader it does need power.
Title: Re: High speed tracked vehicle....something different
Post by: LukeZ on September 03, 2021, 04:40:05 PM
Also, some USBASP devices have a switch to run at 3.3 volts or 5 volts, if this is the case with yours make sure it is set to 5 volts.
Title: Re: High speed tracked vehicle....something different
Post by: Chi-el on September 04, 2021, 02:50:50 AM
Hi Luke,

I did try it once by moving the jumper on the USBasp to the 5V position, will try that again.

I powered the TCB through the USB connection as shown in the instructions, but should it get more power? I can try it with the USB cable hooked up to an adapter or powerbank instead?
Or should it be powered through the main power connector only or together with a USB cable?
Since the picture in the instructions only showed the USB cable I only tried that.

Thanks for your time!
Title: Re: High speed tracked vehicle....something different
Post by: LukeZ on September 04, 2021, 10:08:51 AM
You're right, the USB cable should provide enough power, but since you are having issues I would recommend disconnecting the USB and giving it power with a battery through the main power connector.
Title: Re: High speed tracked vehicle....something different
Post by: Chi-el on September 04, 2021, 03:13:36 PM
Hi Luke,

I now tried it with an external power supply, up to 15V, desperately expecting the TCB to light up like a christman tree, but no luck.
Figured there might be something wrong with the chip, so tried the second board, but the same message comes up with both boards.
Starting to look like something went wrong with fabrication perhaps?

Attached some pictures in case something might stick out ( I'm aware the radio connection isn't populated).
After a very close look, I did find 2 chip soldering connections that where connected with a tiny bit of solder, I cut it out with a hobby knife.

Is the FTDI friend a more secure way to flash the chip?

[EDIT]: Added the batch file as well, just in case.
Title: Re: High speed tracked vehicle....something different
Post by: LukeZ on September 06, 2021, 12:10:14 AM
Hi Chi-el, thanks for the photos - I definitely do see a problem: they appear to have forgotten to install the crystal. Without that the processor will definitely not work. This is part XT1, I've highlighted it in the attached picture.

I just checked the BOM and it looks like the original crystal is no longer available, maybe that is why they didn't install it (still they should have told you). At least at DigiKey in the US it looks like the replacement is ABM8G-16.000MHZ-18-D2Y-T3 (https://www.digikey.com/en/products/detail/abracon-llc/ABM8G-16-000MHZ-18-D2Y-T3/2637887).

I don't know if you'll be able to source this in Europe but I think DigiKey should ship to you, though I don't know how expensive it will be or how long it will take. There may be other substitutes that would work as well. I'm travelling right now and don't have a lot of time, I'll be back home the middle of next week and if you haven't been able to source a part I will do some more searching then.

This part is SMD with the solder pads on the underneath side of the chip, so it would have been a lot easier to install it during manufacturing. But from your picture I can see there is solder on all the pads already and you might be able to get it on by hand with a soldering iron, or with a heat gun if you have one of those (but be careful with the heat gun because it is easy to re-melt other parts and blow them away).

You asked about the FTDI Friend, we now know what the problem is but I wanted to answer that question anyway. The FTDI Friend is similar to the USB port on the board, in both cases they connect to a serial port on the Mega processor. We use these serial ports to easily load firmware and read information from the chip.

The problem is, when the chip is brand new it doesn't know how to do anything at all - the serial ports aren't even enabled and it doesn't matter what information we send over serial, the chip isn't listening. The bootloader is a small program that gives it the basic functionality of communication. Because we can't yet use serial, this very first small program can only be loaded through the ISP port which is specially designed for this purpose. So for this first step we must use something like the USBASP.

After we get the bootloader on (which we leave on forever and never delete), we can then communicate over serial (via USB or the FTDI Friend), and that is much easier and we can tell the chip to do whatever we want, load different programs, whatever.

Anyway, the crystal is necessary before anything can be done, so I have high hopes that if you can install that you will find the remaining steps will work as expected.
Title: Re: High speed tracked vehicle....something different
Post by: Chi-el on September 06, 2021, 01:19:35 PM
Thank you so much!!  8)

I'm going to have chat with the maker first!
Will revert once I have some crystals in place!
Title: Re: High speed tracked vehicle....something different
Post by: Chi-el on September 09, 2021, 05:34:48 AM
Hi Luke,

For what I was able to find so far, the crystals do not have any specific orientation due to polarity or ground etc, correct?
It can be randomly placed because it is mirrored right?

Regards,
Chi-el
Title: Re: High speed tracked vehicle....something different
Post by: LukeZ on September 09, 2021, 10:02:21 AM
Yes that is correct. In fact they are not exactly square, they are slightly rectangular, so you do need to place it so that it matches the footprint lengthwise. But other than that it doesn't matter which end is which.
Title: Re: High speed tracked vehicle....something different
Post by: Chi-el on September 13, 2021, 10:51:11 AM
Hi Luke,

Got the crystals soldered on and was deeply hoping the board to light up, but it still gives the exact same message as before  :o.
Tried it again with different power sources, both USB and external 15V. Does the USBasp require anything else done in preparation other then the driver and jumper switch to 5V?
I have no other clue on what to try next  :-\
Title: Re: High speed tracked vehicle....something different
Post by: LukeZ on September 15, 2021, 01:35:52 PM
Hi Chi-el, sorry you're having all these problems, and sorry also for the slow reply.

At this point we are back to the basics. First of all, make doubly sure that you are connecting the ISP cable to the board correctly. You might take a photo of the orientation you've been using so I can double check.

You could also try buying a different USBASP (maybe yours is defective).

If you have an off-the shelf Arduino board lying around, you could also try using the USBASP to put a bootloader on that. Open the Arduino IDE, in the Tools menu select your Arduino Board type to match whatever kind of Arduino you have, under Programmer select USBASP, and then select Burn Bootloader (Arduino already knows the stock bootloaders for all boards). Of course your off-the-shelf Arduino will already have a bootloader on it, you'll just be overwriting it with the same thing, but if this works it would tell us your USBASP is functioning, which might lead us to think there is still something wrong with your TCB boards.
Title: Re: High speed tracked vehicle....something different
Post by: Chi-el on September 19, 2021, 03:35:46 AM
Hi Luke,

Thanks for all the support.
I'm a bit of a noob to this all so I don't have the skills or knowledge to really dive into the Arduino proposal.

But one thing I thought of, when the avrdude gives the error that the target isn't responding. What is it referring to? The USBasp or the TCB?
Because the identical comes up with or without the crystal in place would lead me to think the problem is somewhere else?

Could be indeed a faulty USBasp, though the changing of the driver with Zadig work fine every time. :o
Title: Re: High speed tracked vehicle....something different
Post by: LukeZ on September 20, 2021, 04:55:41 PM
Well the Arduino test is fairly simple, it's the same thing as what you're doing now flashing the bootloader to the TCB. Only difference is you don't have to use a batch file, just an option menu in the Arduino IDE. But if you don't have an Arduino lying around I understand, and it won't ultimately solve our problem anyway, it will just confirm that the USBASP is working.

Which I agree if you can get the drivers loaded for it, it seems likely that it does work. Also you raise a good point, the fact that AVRDUDE isn't giving us any message related to the USBASP would seem to indicate it is not the problem (the "target isn't responding" error refers to the TCB, but it is a very vague error and doesn't give us any specifics. You can Google this error and get all kinds of potential things to check if you want.)

Since we know your fabrication house already made one obvious mistake, we are left to wonder if there were others less obvious.

At this point I admit I am somewhat stuck. I am travelling this week, and then next week I am moving house, so I won't have a lot of time in the immediate future to do much. But as time allows I will try to ponder any other troubleshooting ideas we might be able to try.

Title: Re: High speed tracked vehicle....something different
Post by: grahamn1956 on February 12, 2023, 07:19:44 AM
Hi Chi-el,

Sorry for the slow reply. I think the problem is almost certainly that the processor needs the bootloader installed first. When the board was under production we did this at the factory, but if you are assembling one from scratch then you have to do it yourself. If you buy an Arduino Mega the bootloader already comes installed, but when using a new chip it is blank.

The bootloader only has to be installed once on each board, after that you will not need to do it again. I've attached instructions for how to do this, you will need to buy a USBASP device. They are very cheap, here is one from China (https://www.aliexpress.com/item/32670511994.html) but you can probably find European sellers on eBay who have them. Notice the one I linked to gives you the option of buying an 8-pin to 6-pin adapter, you will need this version because we use a 6-pin ISP port on the TCB. Most places sell them with the adapter included.

In the instructions I discuss a pogo adapter, you won't need this because your boards already have pins installed on the ISP port, so you can just plug in the 6-pin cable from the USBASP directly into your board.

The instructions also mention using an FTDI adapter to load the firmware. You can ignore this and just your USB cable to load the firmware as normal. The FTDI adapter is faster when we are flashing hundreds of boards, but you only have to do two of them so it's no problem.

I hope this helps, let me know if you have any questions!


EDIT: No, it doesn't make a difference what position the fight/repair switch is in.

Gosh, I sure wish this was posted in the TCB portion of Downloads!  I have been scratching my head as to why my finished TCB boards (3 off) would not talk on USB, even going to the lengths of changing out one of the FT232 ic's in case it was a fake.  Everything working fine now but sheesh that was a voyage of discovery I could have done without!
Title: Re: High speed tracked vehicle....something different
Post by: LukeZ on February 12, 2023, 11:24:43 AM
Hi Graham,

I can well imagine your frustration and my apologies! When I was creating the Downloads page and other sections of the site I wasn't really thinking of people building their own, but now that is the only option you are right this information should be more prominently displayed. I've added a couple links to the TCB Hardware section that will hopefully help others avoid this kind of head scratching.

Thank you for the recommendation and I wish you success with your boards! If any other questions arise please don't hesitate to ask.

For anyone else at this stage, here is one of the links I posted, which explains the one-time bootloader process on blank chips:

Flashing Bootloader to Blank ATmega2560 (https://openpanzer.org/forum/index.php?topic=290.0)
Title: Re: High speed tracked vehicle....something different
Post by: grahamn1956 on February 12, 2023, 11:57:48 AM
Hi Graham,

I can well imagine your frustration and my apologies! When I was creating the Downloads page and other sections of the site I wasn't really thinking of people building their own, but now that is the only option you are right this information should be more prominently displayed. I've added a couple links to the TCB Hardware section that will hopefully help others avoid this kind of head scratching.

Thank you for the recommendation and I wish you success with your boards! If any other questions arise please don't hesitate to ask.

For anyone else at this stage, here is one of the links I posted, which explains the one-time bootloader process on blank chips:

Flashing Bootloader to Blank ATmega2560 (https://openpanzer.org/forum/index.php?topic=290.0)

Thank you Luke, I'm sure those links will help someone out.   8)