I am experiencing an issue when using polyphonic fonts. The background hum goes away if I swing the saber for more than a few seconds. Clashes don't seem to cause the hum to stop, and it will hum forever if the saber remains still. When the hum does disappear, the other sounds (swing / clash) still continue to work. Do you have any idea as to what might cause this? Also, when using polyphonic fonts do I need to remove the monophonic fonts?
I shall have to investigate this.
It might be helpful to know more about the font you're using.
Normally, each font should live it's own directory on the sdcard, and it's fine to have both polyphonic and monophonic fonts. (Just not in the *same* directory...)
Regarding the discussion on PWMing the LED, have you considered putting an inductor in series with the LED? (A parallel diode would also be required to allow the current to recirculate when the FET turns off.) With the inductor sized properly, the LED would see a lower continuous current with a bit of ripple on top of it rather than alternating between zero current and peak current. As a bonus, per the Cree paper you linked to earlier, the LED efficiency should increase. Note that the switching frequency would need to be increased at least into the tens of kHz range to keep the inductor a reasonable size. I might try this with my daughter's saber.
Hmm, it's an interesting idea. I'm trying to figure out how to code for it, because we would want to adjust the PWM rate to adjust the voltage and the PWM duty cycle to control the brightness. (Not sure if there are enough timers in the teensy to have per-pin PWM frequencies...)
Also, there are options for as to where the inductors would go. They could either go in the hilt, or they could go in the blade adapter. (In a TeensySaber V2, they could potentially go on the board) However, if they go in the hilt, they would also be in-line when I hook up a neopixel blade, which can eat as much as 17 amps, so the inductors would have to be pretty beefy. Putting them in the blade adapter might be a better option, as they would not need to handle as much current.
Another option might be to use parallel capacitors instead of serial inductors. The result should be the same, but since the current doesn't go through the capacitors, they don't have to be sized to handle 17A, and perhaps that could be in the hilt and/or on the TeensySaberV2 board.
Of course, if you just add a resistor and a feedback loop, it's a proper constant-current drive system, which would be nice....