fiduciary

Author Topic: TeensySaber newbie thread  (Read 14628 times)

0 Members and 1 Guest are viewing this topic.

Offline profezzorn

  • Board Moderator
  • Master Force User
  • *
  • Posts: 901
  • May the source be with you.
    • Hubbe's Corner
Re: TeensySaber newbie thread
« Reply #45 on: October 02, 2019, 02:50:24 PM »
I've got my teensy v1 wired up and running but have just started testing the audio and I've found that when the blade activates it seems to kill the SD card access. On boot the sounds work fine but once I've activated the blade the dir commands stops returning anything.

Any idea what could be causing this? Do I have a short somewhere between an SD pin and the blade power?

Could be a weak battery, could be a short somewhere.
Does other commands still work? (Like "beep" for instance.)

Offline Supercheez

  • No Force
  • *
  • Posts: 10
  • Ahoy
Re: TeensySaber newbie thread
« Reply #46 on: October 03, 2019, 07:29:44 AM »
I've got my teensy v1 wired up and running but have just started testing the audio and I've found that when the blade activates it seems to kill the SD card access. On boot the sounds work fine but once I've activated the blade the dir commands stops returning anything.

Any idea what could be causing this? Do I have a short somewhere between an SD pin and the blade power?

Could be a weak battery, could be a short somewhere.
Does other commands still work? (Like "beep" for instance.)

Beep works fine, as does dir right up until it loses the SD connection.
Strangely it seems to cut out differently for different presets but is consistent for a given preset:
  • The first preset is a red "vader" style using Kyberphonic's Father font - this cuts out as soon as the blade ignites.
  • Another preset is cyan using one of the fonts that comes with the default SD contents - this works fine but cuts out on the second ignition.
  • A green preset with Kyberphonic's "Little Green Friend" font ignites fine but will cut out on clashes.

I'd guess it's something either software- or battery-related but I don't know how I'd distinguish between the two. Given that the cut-outs don't seem to be related to the blade brightness (a bright lockup with the cyan preset doesn't trigger it) is it possible that playing a particular sound would cause the issue?

Offline profezzorn

  • Board Moderator
  • Master Force User
  • *
  • Posts: 901
  • May the source be with you.
    • Hubbe's Corner
Re: TeensySaber newbie thread
« Reply #47 on: October 03, 2019, 11:09:37 AM »
I've got my teensy v1 wired up and running but have just started testing the audio and I've found that when the blade activates it seems to kill the SD card access. On boot the sounds work fine but once I've activated the blade the dir commands stops returning anything.

Any idea what could be causing this? Do I have a short somewhere between an SD pin and the blade power?

Could be a weak battery, could be a short somewhere.
Does other commands still work? (Like "beep" for instance.)

Beep works fine, as does dir right up until it loses the SD connection.
Strangely it seems to cut out differently for different presets but is consistent for a given preset:
  • The first preset is a red "vader" style using Kyberphonic's Father font - this cuts out as soon as the blade ignites.
  • Another preset is cyan using one of the fonts that comes with the default SD contents - this works fine but cuts out on the second ignition.
  • A green preset with Kyberphonic's "Little Green Friend" font ignites fine but will cut out on clashes.

I'd guess it's something either software- or battery-related but I don't know how I'd distinguish between the two. Given that the cut-outs don't seem to be related to the blade brightness (a bright lockup with the cyan preset doesn't trigger it) is it possible that playing a particular sound would cause the issue?

What version of ProffieOS do you have?

Offline Supercheez

  • No Force
  • *
  • Posts: 10
  • Ahoy
Re: TeensySaber newbie thread
« Reply #48 on: October 03, 2019, 11:58:23 AM »
I'm running version 2.6 with Arduino 1.8.9

Offline Supercheez

  • No Force
  • *
  • Posts: 10
  • Ahoy
Re: TeensySaber newbie thread
« Reply #49 on: October 03, 2019, 12:33:32 PM »
Looking at the serial monitor every time the SD cuts out I get a message with "Audio underflows", e.g.

20:31:24.781 -> Playing Father/blst/blst03.wav
20:31:24.816 -> channels: 1 rate: 44100 bits: 16
20:31:25.119 -> Audio underflows: 581

Offline profezzorn

  • Board Moderator
  • Master Force User
  • *
  • Posts: 901
  • May the source be with you.
    • Hubbe's Corner
Re: TeensySaber newbie thread
« Reply #50 on: October 03, 2019, 08:51:30 PM »
Looking at the serial monitor every time the SD cuts out I get a message with "Audio underflows", e.g.

20:31:24.781 -> Playing Father/blst/blst03.wav
20:31:24.816 -> channels: 1 rate: 44100 bits: 16
20:31:25.119 -> Audio underflows: 581

This does seem to indicate a problem with accessing the SD card, but it could be my fault.
I fixed a problem that looked a lot like this in 2.6. I guess it's possible that the fix didn't quite work.
The whole "second ignition" thing is very very strange though.

I would suggest trying 1.312 and see if it works better. There is some audio optimizations in 2.x that could be responsible for these problems.

Offline Supercheez

  • No Force
  • *
  • Posts: 10
  • Ahoy
Re: TeensySaber newbie thread
« Reply #51 on: October 05, 2019, 01:30:42 AM »
I've tried 1.312 and if anything that seems worse - rather than the SD failure I get a complete freeze.
I then tried 2.7 which seemed slightly more stable.

I'm going to build a "dumb" charging adapter as I'm not convinced that the fancy one is giving the battery a full charge, will post again once I have more info.

Offline Supercheez

  • No Force
  • *
  • Posts: 10
  • Ahoy
Re: TeensySaber newbie thread
« Reply #52 on: October 07, 2019, 07:37:54 AM »
The dumb charger works much better (the other seems to cap out at 3.6v) and I'm getting reasonable performance from 2.7 - there are still a lot of small underflows (~10) that it handles fine but occasionally there's a larger one (~1000) that kills the SD again.

Now that I've charged the battery more I'm getting a "rainbow sparkle" on the blade that some other users have reported with the Teensy so at this point I'm tempted to swap the electronics over as I have a Proffie 1.5 that I can use.

Offline profezzorn

  • Board Moderator
  • Master Force User
  • *
  • Posts: 901
  • May the source be with you.
    • Hubbe's Corner
Re: TeensySaber newbie thread
« Reply #53 on: October 07, 2019, 12:18:59 PM »
The dumb charger works much better (the other seems to cap out at 3.6v) and I'm getting reasonable performance from 2.7 - there are still a lot of small underflows (~10) that it handles fine but occasionally there's a larger one (~1000) that kills the SD again.

Now that I've charged the battery more I'm getting a "rainbow sparkle" on the blade that some other users have reported with the Teensy so at this point I'm tempted to swap the electronics over as I have a Proffie 1.5 that I can use.

There are at least two workarounds for the rainbow sparkle: Overclocking the teensy, or using a serial port to drive the neopixels.
Overclocking is easy, just set the frequency to 120Mhz and see if that helps.

Offline Supercheez

  • No Force
  • *
  • Posts: 10
  • Ahoy
Re: TeensySaber newbie thread
« Reply #54 on: October 09, 2019, 05:30:48 AM »
The dumb charger works much better (the other seems to cap out at 3.6v) and I'm getting reasonable performance from 2.7 - there are still a lot of small underflows (~10) that it handles fine but occasionally there's a larger one (~1000) that kills the SD again.

Now that I've charged the battery more I'm getting a "rainbow sparkle" on the blade that some other users have reported with the Teensy so at this point I'm tempted to swap the electronics over as I have a Proffie 1.5 that I can use.

There are at least two workarounds for the rainbow sparkle: Overclocking the teensy, or using a serial port to drive the neopixels.
Overclocking is easy, just set the frequency to 120Mhz and see if that helps.

Thank you, that all seems to be working now! I've got a brief blue flash when I change blade styles but otherwise everything seems to be working fine (apart from a slightly fried battery connector from when I accidentally shorted something).

Offline Obi-Ken Wanobi

  • No Force
  • *
  • Posts: 48
  • Help me Obi-Ken... you're my only hope.
Re: TeensySaber newbie thread
« Reply #55 on: October 09, 2019, 06:03:03 PM »
I'm finishing up a ProffieBoard v1.5 based build.  Initially I had CLASH_THRESHOLD_G set to 1.0 which seemed to be what is shown in all the example config files.  When I power this up and ignite the blade the clash event triggers rapidly over and over again and is worse when the audio track plays.  I had to bump this value up to 3.5 to get this saber to operator normally (like my other Teensysaber v3 based builds).  Is this normal?  Could there be something wrong with the ProffieBoard or my build?

Also, I am interested in purchasing additional ProffieBoards but can't seem to find a seller that has them in stuck.  Any recommendations where to buy a ProffieBoard right now?

Offline profezzorn

  • Board Moderator
  • Master Force User
  • *
  • Posts: 901
  • May the source be with you.
    • Hubbe's Corner
Re: TeensySaber newbie thread
« Reply #56 on: October 11, 2019, 04:59:54 PM »
I'm finishing up a ProffieBoard v1.5 based build.  Initially I had CLASH_THRESHOLD_G set to 1.0 which seemed to be what is shown in all the example config files.  When I power this up and ignite the blade the clash event triggers rapidly over and over again and is worse when the audio track plays.  I had to bump this value up to 3.5 to get this saber to operator normally (like my other Teensysaber v3 based builds).  Is this normal?  Could there be something wrong with the ProffieBoard or my build?

Also, I am interested in purchasing additional ProffieBoards but can't seem to find a seller that has them in stuck.  Any recommendations where to buy a ProffieBoard right now?

It's pretty normal to have to increase the clash threshold, but 3.5 is pretty high. At that level, it may be difficult to trigger clashes.
The levels needed are can be reduced by putting small amounts of padding around the speaker and/or board. (Like even a layer of electrical tape can be enough sometimes.)
However, if 3.5 works well for you, then there is no need to do anything. :)

 

retrousse