Registration Notice

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

*

Offline Lotuswins

  • 96
    • View Profile
  • Roseburg, oregon
Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #45 on: September 09, 2019, 06:44:54 PM »
Hi all,

So I'm getting started on this, and have a Mega, a spare sabertooth, a spare taigen sound card, etc. all plugged into a test board.  I'm having trouble understanding where to plug in the DIP switch inputs.  The OP schematic shows pins 91,92,87,86,85 for sw 1 thru 5.  Yet the Mega diagrams don't show those pins coming out?  Are they reassigned in the DIY firmware? 

Also, I seem to have gotten the board to respond to PPM, and can start it (engine starting sound) but then it automatically shuts down, won't stay running.  Any thoughts? so far all the DIP inputs are not connected, is that the issue perhaps?

thanks, Jerry

*

Offline LukeZ

  • 786
    • View Profile
  • Kansas, USA
Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #46 on: September 09, 2019, 08:07:26 PM »
Hi Jerry, when referring to the pinout PDF at the beginning of this thread, you want to use the pin numbers in the Ard column (for "Arduino"). You're looking at the Atm column (for "ATmega") which are the pin numbers on the physical chip itself. But Arduino renames things and that is what is marked on your Mega board.

Therefore Dipswitches 1-5 will be Arduino pins A6, A5, A10, A11, and A12.

Any number of things could be going on with your rebooting issue. It is not likely to be anything related to the dipswitches. Are you possibly trying to power everything with USB? It won't be able to handle the load. Try using a battery, and try removing the Taigen sound card and see if that makes any difference. You can use USB for testing responsiveness to your radio commands using Snoop, but as soon as you start attaching peripherals you need a real power source.
NO SUPPORT THROUGH PM - Read why
Need a forum account? Read here
Open Panzer FAQs

*

Offline Lotuswins

  • 96
    • View Profile
  • Roseburg, oregon
Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #47 on: September 10, 2019, 05:01:26 PM »
Thanks Luke, I overlooked the pinout pdf, thinking it was just for the TCB.....dooh!

So I got the dip switch included with jumpers, but still no joy on the staying running.  I then hooked up an LED for the MG, and it was blinking like a low voltage issue.  So I disabled the LV cutoff, and bingo it now stays running.  I'm using an external source for all 5 volt power, and I checked with my Fluke, all voltages rock solid at 5v and 7.2v.  However, the MG light blinks on startup, etc. but no machine gun sound nor blinking from pin 20.  Hmmmm, more work to do. 

Fun to be trouble shooting again....

Jerry

arduinotest.JPG
Testing TCB Firmware with Stock Arduino Mega arduinotest.JPG
Views: 19

*

Offline Lotuswins

  • 96
    • View Profile
  • Roseburg, oregon
Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #48 on: September 10, 2019, 05:06:41 PM »
Okay, had my channels crossed....MG now working!!  on to the other LEDs.....jerry

*

Offline LukeZ

  • 786
    • View Profile
  • Kansas, USA
Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #49 on: September 10, 2019, 05:26:42 PM »
I'm using an external source for all 5 volt power, and I checked with my Fluke, all voltages rock solid at 5v and 7.2v.
That is slightly confusing, typically we provide an Arduino board with something higher than 5 volts and the Arduino steps it down to 5 with its onboard regulator. In fact these regulators typically require at least 1 volt higher and often more even to function. So if you are feeding 5 volts directly to the Arduino it could be browning out.

Now using a second 5 volt supply to drive external 5 volt components (such as LEDs or the Taigen sound card or a recoil servo) is fine, that is like using a BEC in an RC truck. But give the Arduino whatever your full battery voltage is on the VIN input.
NO SUPPORT THROUGH PM - Read why
Need a forum account? Read here
Open Panzer FAQs

*

Offline Lotuswins

  • 96
    • View Profile
  • Roseburg, oregon
Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #50 on: September 10, 2019, 08:36:39 PM »
Hi Luke, I guess I explained it poorly.  I'm putting 7.4 volts onto vin on the arduino board and not using 5v out of the arduino for anything.  The sabertooth is also powered by the 7.4 volt source.  I'm using a 5v source independent of the arduino for the receiver, sound board, etc., connected to a common ground.

Perhaps the little jumpers are too small to feed the arduino power in?  causing a voltage drop and the voltage shutdown?? 

jerry

*

Offline LukeZ

  • 786
    • View Profile
  • Kansas, USA
Re: Testing TCB Firmware with Stock Arduino Mega
« Reply #51 on: September 10, 2019, 10:33:25 PM »
Ok, in that case I'm sure you have plenty of power to the Arduino and your little jumpers are fine. The chip itself draws very little current and your external devices are being powered independently of the onboard regulator on the Arduino so power shouldn't be a problem. 

You're right though that you should disable the LVC since you don't have a voltage sense circuit hooked up and that will just cause issues, but anyway you figured that out.

You'll have to keep troubleshooting. Try disconnecting peripherals and see if the program still works, try looking at Snoop to see if anything informative shows up or if you can pinpoint what specific actions cause the reset.

Due to the infinite number of possible combinations it is also possible to create a combination of trigger functions that will cause a reset, but these would be illogical combinations and I'm sure you have a very simple and abbreviated list going anyway.

I see you're using the PWM-to-PPM converter again, another thing to try would be a PPM/digital receiver directly.

I'm sure it will be something simple in the end but you'll have to keep sleuthing to narrow down what the issue might be.
NO SUPPORT THROUGH PM - Read why
Need a forum account? Read here
Open Panzer FAQs