I made an attempt to transfer the most useful drawing from my notebook. I don't have a good program at home for drawing schematics, so please excuse the crudeness of it.
Not shown are the bits where the N-channel MOSFETs are used to switch the main LEDs. That part is pretty straight forward, though. I hope this helps. If you build it, post up here; I'd love to see what somebody else does with it.
Depending on the color, max current on these kinds of LEDs can range from 700mA to 1500mA. You shouldn't have a problem finding FETs to handle that. Mine are rated for something like 18 amps!
Also, I am noticing I made an error on the diagram. The negative for the WT588d should be on the far left pin at the top, not the right. I'll try to get a fix up for that tonight when I get some time.
Yes, there is more than one LED (there are three) used to light up the blade in my project example. The way I accomplished changing colors was to use varying levels of Red, Green, and Blue light that mixed together in the blade. At a very basic level, this same method is used by TVs and such to create different colors for each pixel. That's why you'll notice I have the blue lines to the MOSFET gates all connected to PWM-capable pins on the Arduino.
You don't have to do it that way. To simplify the project and operate with a single LED for the main blade, you could drop say pins 5 and 6 and drive a single MOSFET and single LED for the main blade on pin 9. That way you could still have the ramp-up/ramp-down effect during power on/off. You would loose color change and flash-on-clash functionality (at least, you'd have to come up with another implementation, maybe pulse the output or something instead of changing colors), but it would be easier to code and use fewer components (also cheaper, more room in your hilt, etc).
For the sake of others who are interested and don't know how to write the code to drive the leds, are you going to release your lighting code ? I saw the link for the sound code.
What speakers did you use? (8ohm 0.5watt?)
How many db did you get? (It seems as loud as a smartphone on full volume)
On your schematic you didn't use any amplifier, right?
Since you nearly answered all component related questions, you should add the whole list to the first post if possible!
purgedsoul:
So this module can actually do gapless play back? Excellent!
Yes! Two ways to do it, even:
There is a "repeat" serial command that you can send. It will repeat whatever sound is played with no gaps. As long as there are no dead spots at the start or end of your sound files then it works great.
You can program the WT588d to play a list of up to something like 200 sounds when commanded. Sounds are played back-to-back with no gaps.
Would you be willing to share some of your code for the soundboard I started playing with it but can't figure out how to get it to repeat any suggestions would help
wildjack6:
Would you be willing to share some of your code for the soundboard I started playing with it but can't figure out how to get it to repeat any suggestions would help
What speakers did you use? (8ohm 0.5watt?)
How many db did you get? (It seems as loud as a smartphone on full volume)
On your schematic you didn't use any amplifier, right?
Since you nearly answered all component related questions, you should add the whole list to the first post if possible!
Thanks!
Right, no amplifier needed (although you could certainly add one if you wanted it louder and could find room for it). I don't have any equipment that would allow me to measure it in db, but it's loud enough for me. Smartphone on full volume is probably a pretty good comparison.
During my breadboarding, I used a very cheap 8 ohm 0.5W speaker that I harvested from a toy. It worked fine, but the sound quality was pretty terrible. Really you should be able to use any 8 ohm speaker with at least a 0.5W power rating. It all depends on your budget and what kind of sound you're looking for. I'll leave that discussion to the audiophiles.
wildjack6:
Thanks for the help I will try it out and see what I can get working totally new to programming so any help is appreciated
Glad I could help. Just be sure call the WT588D_Send_Command() function from somewhere outside your main loop, like when a button is pressed or something, otherwise you may get odd behavior.