Hi everyone!
First of all, thanks for the inspiring amount of information contained in this thread, you guys have been doing an amazing job!
I'm joining the ranks of those building their own lightsaber, and I have the circuit mostly done, quite similarly to how many of you guys have done it (Arduino Pro Mini 3.3v, adxl335, wt588d-u controlled with a 1-wire configuration, RGB LED controlled via 3 MOSFETs, one 18650 battery with TP-4056 protection/charging circuit). The software is mostly based on Jakesoft's USaber library.
Everything works nicely as long as I test the components one by one (in a configuration Arduino + component). And it still works when I put everything together, as long as I power the wt588-u via USB from my PC.
But as soon as I power the wt588-u with the same battery as the rest of the circuit, a lot of noise starts to appear on the readings of the adxl335, continuously triggering false swings and clashes, even if the sensor is perfectly still.
Note that when I say I power the wt588-u with a battery, I mean I tried every possible way of powering it I could think of:
- 3.3v on VCC and VDD from the arduino
- 3.3v on VCC and VDD from a dc-dc converter
- 5v on VDD via a step-up converter
- 5v on VDD-USB via a step-up converter
- USB cable, from the battery via a step-up converter with USB out.
Notice that I have tried two differernt adxl355 and two different wt588-u, so it is not an issue of a single component.
Also, simply adjusting the thresholds does not work, because the false readings I get when I turn on the sound are higher than what is detected as a the strongest swing when the sound is off: I would have to hit the sensor very hard to get any reading at all, at those levels.
At this point I am seriously considering switching to a different sensor, or a different audio player, but I'd rather avoid it if at all possible, given that it would likely take a couple months for them to be delivered.
Has any of you experienced anything similar and do you guys have any suggestion on how to get stable readings from the sensor?