Registration Notice

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

Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #60 on: October 22, 2019, 11:23:10 AM »
Dear LukeZ, long time no see, I my very busy before, and now I can take a break.
I have made some sound card without teensy, and it works well. So my next step it to design some TCB card for my trucks. I wound make you a surprise when all the things finshed, but TCB does not work. So I have to get some help from you.
In fact I have made some TCB from empty pcb and new atmega2560. Is the bootloader for TCB  special? I use stk500boot_v2_mega2560.hex as bootloader, is that right? When I finished flash the bootloader , I connect TCB with USB but OP config can't connect.
Can you tell my some detials about how can I make a empty 2560 be a TCB? Thank you.
And here is my sound card, It is just 5*3 cm .
0191023002058.jpg
Testing TCB Firmware with Stock Arduino Mega 0191023002058.jpg
Views: 102

*

Offline LukeZ

  • 849
    • View Profile
  • Kansas, USA
Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #61 on: October 22, 2019, 12:02:19 PM »
Hi Luck. I am very impressed with your work on the miniature sound card, excellent job. Are you use a 4-layer board?

With the elimination of the Teensy and the reduction in size, production costs of such a board should be much more reasonable. I don't know if you have any contacts with Chinese manufacturing but there might be a greater willingness for someone to take this to market than the existing design.

As for the TCB - yes, it does use a custom bootloader, I have attached it to this post along with some instructions if you want to use it. The main difference is that it has been reduced in size from the standard bootloader and it also permits flashing on an alternate serial port depending on the position of Dipswitch 5 (Arduino A12, ATmega2560 pin number 85, port K4). When this pin is held to Gnd the processor will accept firmware flashing through Serial 0 (USB on the stock TCB board), when held to +5v it will accept firmware flashing through Serial 1.

However you can still use the stock Arduino bootloader since we usually don't need the alternate flashing port. Everyone here using off-the-shelf Arduino Megas are using the stock bootloader.

You mention that you flashed the bootloader, but you didn't say whether you had flashed the firmware. After you burn the bootloader then flash the latest firmware. After both of those are done then you can try to connect. I don't know if you are having a problem at the firmware stage or the connecting stage.

If you are having problems flashing the firmware, you can try to flash a simple test sketch from the Arduino IDE, something like blink an LED. See if the IDE has problems or not.

For connecting, have you tried the alternate connection method where you connect first via Snoop, and once that has been established then click the Connect button?

Let me know what you find and I will help you out.

*
TCB_Bootloader.zip
(1053.17 kB ~ Downloads: 13)
NO SUPPORT THROUGH PM - Read why
Need a forum account? Read here
Open Panzer FAQs

Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #62 on: October 23, 2019, 02:09:17 AM »
Hi Luck. I am very impressed with your work on the miniature sound card, excellent job. Are you use a 4-layer board?

With the elimination of the Teensy and the reduction in size, production costs of such a board should be much more reasonable. I don't know if you have any contacts with Chinese manufacturing but there might be a greater willingness for someone to take this to market than the existing design.

As for the TCB - yes, it does use a custom bootloader, I have attached it to this post along with some instructions if you want to use it. The main difference is that it has been reduced in size from the standard bootloader and it also permits flashing on an alternate serial port depending on the position of Dipswitch 5 (Arduino A12, ATmega2560 pin number 85, port K4). When this pin is held to Gnd the processor will accept firmware flashing through Serial 0 (USB on the stock TCB board), when held to +5v it will accept firmware flashing through Serial 1.

However you can still use the stock Arduino bootloader since we usually don't need the alternate flashing port. Everyone here using off-the-shelf Arduino Megas are using the stock bootloader.

You mention that you flashed the bootloader, but you didn't say whether you had flashed the firmware. After you burn the bootloader then flash the latest firmware. After both of those are done then you can try to connect. I don't know if you are having a problem at the firmware stage or the connecting stage.

If you are having problems flashing the firmware, you can try to flash a simple test sketch from the Arduino IDE, something like blink an LED. See if the IDE has problems or not.

For connecting, have you tried the alternate connection method where you connect first via Snoop, and once that has been established then click the Connect button?

Let me know what you find and I will help you out.
I just use a 2-layer board because I don't need to use all the pin of MK20. And the 2-layer board is cheap. Many of my friend is very interesting in this little sound card.Your work is very good, I can only improve a little.I think that the acceleration sound should change with frequency instead of just playing in the original sound. Have you tried this? I am trying to do this, but I have only little time.
Before that, I think I should have perfect hardware first. Light card is useful for tucks as there are always many lights on a truck.This well be a fully new design.
For TCB . I think I have a bad programmer. So the Hex may not be on the TCB. The light don't work. So I have to buy a new one. Thank you for your suggestion.I will tell you if there is any progress.

*

Offline LukeZ

  • 849
    • View Profile
  • Kansas, USA
Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #63 on: October 23, 2019, 09:17:58 AM »
I think that the acceleration sound should change with frequency instead of just playing in the original sound. Have you tried this? I am trying to do this, but I have only little time.
I am not sure I understand exactly what you are asking. But I will say, the current audio capabilities of the Teensy do not allow us to speed up or slow down a .wav file. If we want an acceleration sound that sounds faster, we have to create two sound files - one slow, one fast.

Before that, I think I should have perfect hardware first. Light card is useful for tucks as there are always many lights on a truck.This well be a fully new design.
You might also be interested in an earlier project of mine called Open Source Lights (OSL). It is not very sophisticated but it does have a lot of options for lights on cars/trucks. You can read about it here - Open Source Lights - Arduino based RC Light Controller

I think I have a bad programmer. So the Hex may not be on the TCB. The light don't work. So I have to buy a new one. Thank you for your suggestion.I will tell you if there is any progress.
AVRDUDE should tell you (through the IDE or the command line, whichever one you are using) if the burn bootloader failed. But a bad programmer is very often a problem. I have used this one with success (set it to 5v).

It's hard to tell exactly from your picture, but I don't see a USB connector. Did you go with your previous plan of using a separate board for the bootloader chip?
NO SUPPORT THROUGH PM - Read why
Need a forum account? Read here
Open Panzer FAQs

*

Offline Wibbly

  • 8
    • View Profile
  • Wales, UK
Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #64 on: October 25, 2019, 02:34:48 AM »
I recently bought a 2560 off Ebay, did it in a rush, just looked for a cheap one. Having spent hours trying to get a driver that worked, I went back and looked at the listing. I had purchased a board with a 328P chip, not a 340/341. >:(

The board will hook up to the IDE, but will not connect to the OP configuration. Depending on the driver it will either show a blank port field, or it will show one, but when I click on Connect, it just displays 'Disconnected'. It sometimes displays 'Port not Open'.

I've no idea what the conflict is, I have tried every driver I can find on the web, Zadig 2.4 etc, tried deleting the device, deleting drivers etc, but no joy whatsoever.

My other 2650 with a 340 chip simply plugs in on the USB and connects no problem.

The vendor accepts free returns so I can send it back, and I have ordered another one that actually has a 340 chip on it.
Been into 1/16 tanks for over 10 years.

*

Offline LukeZ

  • 849
    • View Profile
  • Kansas, USA
Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #65 on: October 25, 2019, 12:25:11 PM »
What can I say but that cheap stuff from China often comes with a hidden cost!
NO SUPPORT THROUGH PM - Read why
Need a forum account? Read here
Open Panzer FAQs

*

Offline Wibbly

  • 8
    • View Profile
  • Wales, UK
Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #66 on: October 26, 2019, 05:13:15 AM »
There is a reason why I don't buy lottery tickets,  ;D ;D ;D

Been into 1/16 tanks for over 10 years.

*

Offline Wibbly

  • 8
    • View Profile
  • Wales, UK
Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #67 on: October 26, 2019, 06:07:16 AM »
The new board arrived, I had specifically looked for a board that had a 340 chip on it. The Ebay ad had a pic of the chip, and stated that it was a 340.

I got a magnifying glass out, the chip on the board I received was unmarked, as was the last one. In fact the new board is identical to the last one purchased from a different vendor, so is probably a 328P.

This one is also going back as it has the same problem, Ebay is a nightmare!
Ebay.png
Testing TCB Firmware with Stock Arduino Mega Ebay.png
Views: 76
IMG_20191026_113450.jpg
Testing TCB Firmware with Stock Arduino Mega IMG_20191026_113450.jpg
Views: 76
Been into 1/16 tanks for over 10 years.

Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #68 on: October 28, 2019, 06:53:26 AM »
I think that the acceleration sound should change with frequency instead of just playing in the original sound. Have you tried this? I am trying to do this, but I have only little time.
I am not sure I understand exactly what you are asking. But I will say, the current audio capabilities of the Teensy do not allow us to speed up or slow down a .wav file. If we want an acceleration sound that sounds faster, we have to create two sound files - one slow, one fast.

Before that, I think I should have perfect hardware first. Light card is useful for tucks as there are always many lights on a truck.This well be a fully new design.
You might also be interested in an earlier project of mine called Open Source Lights (OSL). It is not very sophisticated but it does have a lot of options for lights on cars/trucks. You can read about it here - Open Source Lights - Arduino based RC Light Controller

I think I have a bad programmer. So the Hex may not be on the TCB. The light don't work. So I have to buy a new one. Thank you for your suggestion.I will tell you if there is any progress.
AVRDUDE should tell you (through the IDE or the command line, whichever one you are using) if the burn bootloader failed. But a bad programmer is very often a problem. I have used this one with success (set it to 5v).

It's hard to tell exactly from your picture, but I don't see a USB connector. Did you go with your previous plan of using a separate board for the bootloader chip?
Yes ,I want an acceleration  sound  when PWM frequency is high, and a slow sound  when the frequency is low. So I can just need a idle sound to creat all the sound for all of the PWM.I don't need any other thing. And it is what I will do with your code.
I have see the light card, another great job. I will see more when the sound card and TCB is OK.
I have got a new programmer and it is OK. I am working on some test.

*

Offline Rad_Schuhart

  • 108
    • View Profile
  • Graz, Austria.
Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #69 on: October 29, 2019, 07:06:54 AM »
luckowner, I am very impressed about your soundcard too! Does it have lights output? Do you have more info, and do you plan to sell it?


*

Offline Wibbly

  • 8
    • View Profile
  • Wales, UK
Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #70 on: November 02, 2019, 02:48:27 AM »
Ok, I have a problem and despite hours trying to solve it, I am completely stuck.

I am using the latest Config download.

I tried two clones but the TCB config would not connect to them.
I now have a genuine, boxed 2560 and that will not connect either.

I have tried the Arduino IDE on a Linux PC, a Vista laptop, and a Windows 10 laptop, and they all simply plugged in, found the port and I could click on Serial Monitor, no problem.

I have tried the same boards on the Vista laptop and the Windows 10 laptop, and they will not connect to the TCB config.

I have 'Arduino 2560' displayed in Device Manager, I have a port displayed in the Config.

When I click on Connect it either displays 'Device is Disconnected', or 'Port is Closed'.

I have tried all of the drivers in Zadig, no joy.
I have tried manually installing drivers via Windows, no joy.

Something, somewhere is refusing to allow communication between the USB and the Genuine 2560 and I have no idea what it is. I have been all over the web looking for solutions. I've tried installing, uninstalling drivers, reboots, and downloaded the latest Net Framework, Windows 10 is also the latest up to date version.

Oddly I have a broken 2560 clone, though a good clone with the right chipset, I can plug that in and it hooks up to the TCB config no problem. I have the GND>12 jumper in place at all times.

Does anyone know what the problem could be?   :-[ :-[ :-[
Been into 1/16 tanks for over 10 years.

*

Offline LukeZ

  • 849
    • View Profile
  • Kansas, USA
Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #71 on: November 02, 2019, 12:10:23 PM »
There are two types of connection in OP Config - the first is what you are trying when you click the "Connect" button. The second is the Snoop connection and that is the equivalent of the Serial Monitor in the Arduino IDE (it just listens or "snoops" but doesn't actually communicate).

Have you tried just connecting with Snoop to see what it does? If it can connect via Snoop, while snooping you can then click the Connect button, and see if it will connect that way.
NO SUPPORT THROUGH PM - Read why
Need a forum account? Read here
Open Panzer FAQs

*

Offline LukeZ

  • 849
    • View Profile
  • Kansas, USA
Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #72 on: November 02, 2019, 12:56:30 PM »
Another thing to mention - your Mega boards obviously don't come with any firmware on them. You will not be able to connect with OP Config until you've flashed the TCB firmware to them, this can be done using the Flash utility in OP Config or it can also be done with the the Arduino IDE if you download the source code.

Have you been able to successfully flash the firmware first?
NO SUPPORT THROUGH PM - Read why
Need a forum account? Read here
Open Panzer FAQs

*

Offline Wibbly

  • 8
    • View Profile
  • Wales, UK
Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #73 on: November 02, 2019, 01:32:54 PM »
OMG Luke, I am absolutely kicking myself now.  :) :) :)

Sat here, tried snoop, nothing, selected the DIY firmware, clicked Flash and it all worked perfectly.

When I tried it on the first board I must have flashed it first, totally forgot the most logical thing in the world when I tried the second one.

Many thanks!

Rob
Been into 1/16 tanks for over 10 years.

*

Offline LukeZ

  • 849
    • View Profile
  • Kansas, USA
Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #74 on: November 02, 2019, 01:40:09 PM »
Well I'm glad that's all it was! So many times here on the forum, and to be honest in my own experience as well, it's the simple things that really bite you!  8)
NO SUPPORT THROUGH PM - Read why
Need a forum account? Read here
Open Panzer FAQs

 

bomber-explosion