Arduino Lightsaber

FancyKiddo:
Is the .5 mA constant drain current on the mosfets not enough? I thought that meant that they would only allow .5mA through, which is well within the current allowance for the Luxeon LEDs, which are often rated for luminancy at 350mA and 700mA.

Your FETs won't limit the current. You have to do that with PWM in code or a resistor in wiring. Their rating only means what they can safely tolerate. If your FETs can only handle .5mA, you're going to blow them up trying to run 350 to 700mA through them.

Hey Kiddo

"3) You're fine to drive the VDD pin on the WT588D direct from your 3.7V battery. " - jakesoft

BUT if you are going PWM out of the WT it will be less volume than at 5v.

won't you need 5v for the Attiny85 anyways. All my Attiny85's use 5v.

http://www.ebay.com/itm/Digispark-Kickstarter-ATTINY85-Arduino-General-Micro-USB-Development-Board-/122144403075?hash=item1c705fae83:g:eEMAAOSwiYFXFL2q

it's prop season people!! who has a new lightsaber to showcase???!!!!
I'll have a DL44 blaster and a lightsaber very soon!

i got this in, monday
http://www.ebay.com/itm/331652536370?_trksid=p2057872.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT

The ATTINY84 works just fine at 3.2V.

I was hoping to have some nice PCBs to show off, but now my engraving tip just snapped. GREAT SADNESS.

billpealer:
it's prop season people!! who has a new lightsaber to showcase???!!!!

Well, duh. :wink:

What you see here is the Universal Saber Library in full effect. I built the sketch from the ground up using USaber.

JakeSoft:
Well, duh. :wink:

DIYino (Arduino) Saber - YouTube

What you see here is the Universal Saber Library in full effect. I built the sketch from the ground up using USaber.

wow.

tricks and nonsense indeed.

what is DIYino?? is that a thing?

so is that it? the ADXL, the WT sound player, all gone? now its this new SD card based thing and the other accelerometer? MPU thing? and a slew of .h files?

wow. so this new sauce is Jake/Proto/Nesk 's baby!?

is these even a clash sensor now? its all just code?

wow.

this is so transcended home brewing.

billpealer:
Hey Kiddo

"3) You're fine to drive the VDD pin on the WT588D direct from your 3.7V battery. " - jakesoft

BUT if you are going PWM out of the WT it will be less volume than at 5v.

won't you need 5v for the Attiny85 anyways. All my Attiny85's use 5v.

http://www.ebay.com/itm/Digispark-Kickstarter-ATTINY85-Arduino-General-Micro-USB-Development-Board-/122144403075?hash=item1c705fae83:g:eEMAAOSwiYFXFL2q

it's prop season people!! who has a new lightsaber to showcase???!!!!
I'll have a DL44 blaster and a lightsaber very soon!

i got this in, monday
http://www.ebay.com/itm/331652536370?_trksid=p2057872.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT

What, a DL44? Pics please and a tutorial! I've just finished my first blaster too (a Nerf conversion), I'm so curious about similar projects.

Also worth to check out (sorry for off topic): E11 arduino blaster

billpealer:
so is that it? the ADXL, the WT sound player, all gone? now its this new SD card based thing and the other accelerometer? MPU thing? and a slew of .h files?

Oh, heck no! It's not "gone", don't be silly. This is just one more option. I'm planning to have my next build feature one of Canobi's sheet cake boards with the WT for sound. There are pros and conns to each design. I'm all about exploring, experimenting, and learning. One contributing factor to even starting my Mk. II project in the first place was because I was a little bored with seeing the same 3 sound boards in 80% of the DIY sabers I read about. I wanted something different, more open, and more flexible, so here we are.

billpealer:
wow. so this new sauce is Jake/Proto/Nesk 's baby!?

Thanks! And yes, this saber is the result of collaboration between the 3 of us.

billpealer:
is these even a clash sensor now? its all just code?

Yeah. Neskweek was able to figure out how to detect clashes with the MPU alone, so no clash sensor needed. It's something I still want to explore with the ADXLs, but I am only one man who does this for a hobby.

billpealer:
this is so transcended home brewing.

Well, sort of, but you can still build a board yourself that does exactly the same thing by buying the component parts. Like me, Protonerd has made no attempt to hide what his board is made out of. Everything is a tradeoff. In this case, time and effort vs. ease of use and money. It's the same for Canobi's boards or really just about anything that you buy but could build yourself.

Protonerd:
Also worth to check out (sorry for off topic): E11 arduino blaster

I'm working on blaster fx :slight_smile:

I just did a test etch of it yesterday (measures just 25 x 22 mm). I used toner trasnfer, admittedly it came out a bit warped on one side and needs a little clean up so any subsequent boards will be made the using photo etch method (if it works out) but it'll suffice for a proto:

(Sorry Jake, won't happen again, I promise).....

Canobi:
I'm working on blaster fx :slight_smile:

...

(Sorry Jake, won't happen again, I promise).....

It's all good. :slight_smile:

Haha, I have some boards printed! SMD time!

so, not only am i a complete noob with arduino, even after reading this thread.... i am still not quite understanding a few things so here goes with the questions.

i have built a saber staff with RGB leds that i currently use a 100mAh buck puck with. in each end of the saber i have a 7.4v 18650 lion battery, 1000mAh buck puck and cree xp-e2 red green royal blue LED.

what i would like is the ability for the color mixing like you show but i dont need/want the sound.

so first, would i need to use the buck puck at all with the mosfet setup? second, how do i wire the mosfet in line with the led. as i said ive never used/heard of such a thing.

third, i was planning on using the adafruit pro trinket board in the 5v version. will this complicate thingsa at all?

i enjoy building my own sabers and would love to make my own sound boards eventually, but for now i just want to be able to perfect the color changing aspects.

thanks for the OP and diagrams included thus far.

Canobi:
To make routing on a one sided PCB a little more straightforward I may have to shuffle the pin list a bit.

As a small precaution I'm going to stick to the power rail setup as it is so the WT's GND reference won't need accounting for in code as it could be a pitfall for the unwary adventurer.

Out of interst, is the accent LED you're term for the FoC LED? I couldn't see a reference to it in the diagram and only count 3 fets.
[Hello Jake.
In your project, if I will be using a ledstring, could report what would be necessary to change?/quote]

I might of had a breakthrough in clash detection with only the ADXL335 (no clash sensor). Still in the prototype phase, but it shows promise. Take a look and let me know what you folks think.

Lately, I've been pondering on how random selection was achived in code as it would be useful for clash file playback. So I had a look round just now and found this little gem written by Grumpy-Mike.

Admittedly it is for an SD card but I daresay could it be modified to work with audio modules too:

char toPlay[11];     //  string array for file to play 00.WAV to 99999.WAV

// then pass this function a random in the range of the files you have
makeName(randNumber,0);  // generate file name in global array toPlay

void makeName(int number, int depth){  // generates a file name 0.WAV to 9999.WAV suppressing leading zeros
  if(number > 9) {
    makeName(number / 10, ++depth); // recursion
    depth--;
    number = number % 10;   // only have to deal with the next significant digit of the number
     }
  toPlay[indexToWrite] = (number & 0xf) | 0x30;
  indexToWrite++;
  if(depth > 0) return; // return if we have more levels of recursion to go
  else {  // finish off the string with the wave extesion
     toPlay[indexToWrite] = '.';
     toPlay[1+indexToWrite] = 'W';
     toPlay[2+indexToWrite] = 'A';
     toPlay[3+indexToWrite] = 'V';
     toPlay[4+indexToWrite] = '\0'; // terminator
     indexToWrite = 0; // reset pointer for next time we enter
  }
}

// Then play the file name
musicPlayer.startPlayingFile(toPlay);

Here's a link to the thread:

http://forum.arduino.cc/index.php?topic=424522.0

Canobi:
Lately, I've been pondering on how random selection was achived in code as it would be useful for clash file playback. So I had a look round just now and found this little gem written by Grumpy-Mike.

Admittedly it is for an SD card but I daresay could it be modified to work with audio modules too:

char toPlay[11];     //  string array for file to play 00.WAV to 99999.WAV

// then pass this function a random in the range of the files you have
makeName(randNumber,0);  // generate file name in global array toPlay

void makeName(int number, int depth){  // generates a file name 0.WAV to 9999.WAV suppressing leading zeros
  if(number > 9) {
    makeName(number / 10, ++depth); // recursion
    depth--;
    number = number % 10;  // only have to deal with the next significant digit of the number
    }
  toPlay[indexToWrite] = (number & 0xf) | 0x30;
  indexToWrite++;
  if(depth > 0) return; // return if we have more levels of recursion to go
  else {  // finish off the string with the wave extesion
    toPlay[indexToWrite] = '.';
    toPlay[1+indexToWrite] = 'W';
    toPlay[2+indexToWrite] = 'A';
    toPlay[3+indexToWrite] = 'V';
    toPlay[4+indexToWrite] = '\0'; // terminator
    indexToWrite = 0; // reset pointer for next time we enter
  }
}

// Then play the file name
musicPlayer.startPlayingFile(toPlay);




Here's a link to the thread:

http://forum.arduino.cc/index.php?topic=424522.0

Interesting, and I encourage any learning experience, but I'm wondering if you were aware this has already been solved in USaber for the WT588D and DFPlayer (DIYino) sound modules. The sound player API I defined already supports random playback of any sound type, clashes included.

JakeSoft:
Interesting, and I encourage any learning experience, but I'm wondering if you were aware this has already been solved in USaber for the WT588D and DFPlayer (DIYino) sound modules. The sound player API I defined already supports random playback of any sound type, clashes included.

Ah, no I didn't realise that, nice one Jake :slight_smile:

Just saw this while looking at other parts at frys and thought I'd share.

Not going to be a cheaper option, but possibly a smaller or more modular option.

That's just freaky, a new large drive model at work use similar wire/board to board connectors and I've been contemplating designing a similar system all this week after coming across them:

I've already found a source for these and was just working out my pin count when I thought I'd drop in to see how the thread was doing and saw the link you posted.

In much the same manner, I figured I could put all SMD on one board with the other reserved for anything that requires hand soldering.