Arduino Lightsaber for/with LED string blade

In fact it's louder than any other lightsaber electronics I have (and I have some high ends) :slight_smile: up to the point that for just playing with it you will have the urge to pull down the volume to around 2/3 (code 20 from 32).

So far I tried both 8Ohm/2W (TCSS bass Speaker) and a locally sourced 4Ohm/3W, I cannot hear the difference (am I going deef?), so it can deal with both loads.

BTW, I watched again your MKII Video, especally the part with the configuration. Wow, now that I made mine, the sheer programming elegance you brought in into your saber just astonishes me...I see who is the software expert, software-wise my implementation is like a stone age club in comparison. Did you use the EEPROM to save the setting?

Thanks Protonerd for your answer...the idea is build something with component found here...(in the bestcase scenario..ja..)
by the way, i wanna know, if i use an arduino mp3 modulo...like Wtv020, do you think it is not work?
Sorry, but i am nooby in arduino, and i am still learning, and i dont understand why, only 2 or 3 player ( the MP3-TF-16P,or the WT588D can be work..
GReats!! and thanks!

Protonerd:
BTW, I watched again your MKII Video, especally the part with the configuration.

Protonerd:
Wow, now that I made mine, the sheer programming elegance you brought in into your saber just astonishes me...I see who is the software expert, software-wise my implementation is like a stone age club in comparison. Did you use the EEPROM to save the setting?

Thanks for the compliment, although I think I may have overdone it. The project has become so big that I moved to developing it in Eclipse because it was too hard to manage in the basic Arduino IDE. Also I think I've pushed the RAM limit of the Pro Mini with the features I'm trying to add in for the Mk. IV system. If I change something trivial, it causes what looks like memory corruption issues or outright crashes. I'm going to have to go back and do a lot of optimizing some of the not-so-elegant portions of the code before I can add anything else, or move to a chip with more RAM.

Hihi, cool, you know how hard it was for me to find out why even changing the most unermarkable piece of code caused a totally unexpected behaviour from the saber at a totally different location... it took weeks before it occured to me that probably the system ran out of memory for the dynamic variables. So now I know that in the current state anything I add have to be preceeded by optimizing something else. So Memory IS a great problem with the small boards and only experience is going to tell you that!

@tanakabuki: I do not want to discourage you to use other mp3 players, on the contrary by all means please try them and tell us your findings! This is how I also started and I needed to spend quite a time to go through 3 different mp3 players before I put down my coin beside the mp3-tn-16p. Now with JakeSoft's solution we have currently 2 proven mp3 modules and I would love to see more diversity here. And one more thing: the more people searching for certain features the higher the chance that a commercial solution will de developed for it.

Thanks for the recommendation for the LED circuit.
I'm still waiting for the MOSFET , Arduino and sound module .
but I'm done "led string" (1 cable for V+ and five for mosfet-gnd)

Still not add the light diffuser but I have already tried the brightness with 7.4V
It goes great

Wow, impressive brightness. I take you used green LED's (from the background color, because the string is so bright the camera shows only a glowing white). Greens are anyway the brightest of all LED colors.

How do you lock the LED segments in place? Do you use a stiffener? Or wrap them all in foil/shrink tube?

sorry for answer late...

In the image... only the leds appear in the image.

for the creation of the string i used a similar metod of "Hampton's Hand-Crafted Lightsabers" channel.

But i change a little for make your circuit. I turn led for connect serial: if a string have 16 leds (8+8) in the middle for make the serial conection i solder de V- of the 8º Led to the V+ of the 9º Led.

Next, I Cut the V- of the 9º Led and i use that new space to solder the cable... that cable its directly going to the mosfet. Repeat the process in all strings. If you make 5 strings you have:

5 cables for V-
1 "special" for V+... I use only a cable but i cut it many times for using less space.... conecting the V+ when it have the 7.4V with the next string

i would like to know how you achieved gapless playback with the DFPlayer mini? I am trying to create a similar build and I am having trouble with gaps when transitioning from a swing or clash back to idle hum.

Hi,

Generally speaking the DFPlayer can transit from one sound file to another without any discernable gap. That is already a big advantage which many other MP3 players do not have!

Gapless playback you can do the 1. professional hard way or the 2. practical easy way.

1.: you have to keep track how long each track is and make sure in your code that you start the next sound just a bit earlier. Most high-end commercial saber electronics do it like that.

2.: while 1 is possible but hard to program, I choose another way. I simply extended the hum and copied the him to all other sound files. For a full sound font it takes about 5 minutes of work, well worth the effort. Since the hum will not stop aftter a few hundred ms, you have plenty of time to start a new sound.

So its definitely easier to add the hum to each sound bite, thanks for the pro tip. Next question, do you play the files from the root of the sd card, mp3 folder, or numbered folders? I think I'm getting playback gaps when trying play files from the folders, but its pretty close if not gapless when playing from the root. Did you notice anything similar? Also I'm wondering if file format makes in difference. I'm currently using wav files but now I'm curious if mp3 would make any difference in the folders.

Good news.
Now I have all electronic materials.
Here is my progress

Hello everyone .... first of all congratulations for your projects.

Even I'm starting to build a lightsaber following your instructions ... but I have a little doubt.

Having never run so many LEDs together ... I would understand if it is better to place the load resistors for LEDs, or not.

The leds I bought, are the Straw Hat 5mm red (1,8-2,2v and about 30ma ... STRAWHAT STRAW HAT 180gradi 100 LED ROSSI 5000mcd 5mm + RESISTENZE A2C25.A2C48 | eBay).

Wanting to create a series-parallel LED string consists of 6 groups of 8+8 leds ... My calculations say that I need 6 resistors 18R 1w.

They are so necessary, given the low value ???

I have seen some schemes around, and often these resistors are not mentioned.

Attaching any two schemes ... do you think is correct?

Thanks so much

integra386.. i dont know but... you are making a blade with 96 leds?

Protonerd can you post the code you used for acelerometer?
i make the sound work (blade on and off sound) but with the acelerometer... T.T

Chivontekai ... Yes ... 96 leds

integra386, good luck!

As to the 96 leds, why not, I also have integrated 6x3x5=90 in my red blade and 6x2x8=96 in my blue blade.

As to the resistors or not: for a red blade with serial II. technic (2 LEDs in series), you need the resistors, otherwise you will have a very narrow band to control your transistors -> effects will be less spectacular. Not to mention that not all small transistors can tolerate the power dissipated over them.
Better is to use a serial III. setup, then you do not need the resistors. 2.2V*3=6.6V, you only need to dissipate max. 8.2V-6.6V=1.6V over the MOSFET. If you insist on the serial II., then you need the resistors.

BTW, looking at your schematics, please do not forget the pull-down resistors from transistor gate to GND, otherwise you will have floating gate and you cannot control switch on/off (all LEDs will always be somehow in a random on state).

Protonerd thanks for the reply .... then I will make from 96 to 90 LED ... 6 x ( 3 x 5 ) .

I updated again the scheme ... now should be correct .

Thumbs up!

How do you intend to interlink the LEDs?

I will use the Makoto's tecnique but I will use a small jig to bend the LED's leads, created with 3D printer.

Add ...

Meanwhile I got the DFPlayer and I started to " play" with the sounds.

@integra386: I dig your jig, awesome, you are really in for a professional lightsaber!
I used the same arm buddies method to link the LED's, mostly using household utensils instead of a jig, see my old thread here:

@chivotenkai: I like the video, good start for an ignition/retraction.
As for the accelerometer, I use a very easy scheme. Simply read out in every loop turn the raw values for acceleration and gyro:

accelgyro.getMotion6(&ax, &ay, &az, &gx, &gy, &gz);

Then I take the absolute value of the accelero values, take the largest one and using simple "if"statements compare it to some defined threshold.

if ((abs(ax) > 1000 or abs(ay) > 1000 or (az) > 1000)) {}

Update: I set out to explore new ways to make the saber look even more "alive". In the course of this the first modification I made was to connect the SPK- and SPK+ to one input of the Arduino each. Then in the software in each cycle the code samples the sound being played and adjusts the LED drives according to the rythm.

Looks great and saves a lot of code, because I can leave it up to the music to control the flicker instead of writing an own flicker algorithm (which also looks great, but why bother...I'm a lazy guy!)

Here is the result. Please look at the wall, that will mirror the flicker much better than the blade, which is simply too bright for the camera.