Arduino Lightsaber for/with LED string blade

Jes,
I changed the way I did embark librairies on github.
Can you re-download LSOS again and try to compile it again ?

I did made my Arduino IDE compile tests with v1.6.5 (due to compatibility requirements for Arduino Eclipse)

Also try before compiling to go to menu "Sketch->Include Libraries->Manage Libraries" to make sure they get recognized by Arduino IDE.

If it doesn't work again, can you please post full error message in private msg?

neskweek:
Thank you I corrected it

I'm a bit pieced off right now ... I burnt a led segment of my red blade... again ...

I can totally symphatize, I've also got my share of burnt/deattached/broken/justdimmerthantherest LEDs along the way. LED string sabers are for those committed to film accurate lightsaber feel, with lot of passion and patience.

jesjhoward:
Okay, I've got to be doing something wrong. I've tried compiling this on a different machine with a fresh install, and I get the same error. Let me run down what I'm doing so that you guys can point out what is probably a stupid mistake on my part, lol. Here we go:

The lightsaber OS .zip file is extracted to MyDocuments/Arduino/Lightsaber.

The contents of the Libraries folder from the .zip is copied to the libraries folder at MyDocuments/Arduino/libraries.

EEPROMEx-9.1.zip, LinkedList-master.zip, and OneButton-master.zip are extracted there as well.

The I2Cdev and MPU6050 folders are extracted from the i2cdevlib-master.zip to the same folder.

The Lightsaber.ino file is opened with the Arduino IDE 1.6.7.

I hit the Compile button and get the error.

Suggestions? Thanks, guys

I happened the same, the problem is the version of arduino, uninstall 1.6.7 and install the 1.6.5

paquitosoler:
I happened the same, the problem is the version of arduino, uninstall 1.6.7 and install the 1.6.5

Wonderfull ! Great to see you found the problem.
I'll added that as a requirement into README.md.
Thank you !

Protonerd:
I can totally symphatize, I've also got my share of burnt/deattached/broken/justdimmerthantherest LEDs along the way. LED string sabers are for those committed to film accurate lightsaber feel, with lot of passion and patience.

Yes... You've got to be motivated :wink:
Especially with the red ones. Those are really unforgiving.
(Note for later: DO USE your multimeter and don't rush it !!!)

Ok

There are some mosfet easier to find that the mosfet SI12304DS ?

neskweek:
Wonderfull ! Great to see you found the problem.
I'll added that as a requirement into README.md.
Thank you !Yes... You've got to be motivated :wink:
Especially with the red ones. Those are really unforgiving.
(Note for later: DO USE your multimeter and don't rush it !!!)

Ok I'm glad

There are some mosfet easier to find that the mosfet SI12304DS ?

I saw your previous messages but I'm really not the best person to answer :stuck_out_tongue:

The only thing I can tell is what I use are those : STP36NF06 but I really don't know if they optimaly suit this project.

paquitosoler:
Ok

There are some mosfet easier to find that the mosfet SI12304DS ?
Ok I'm glad

There are some mosfet easier to find that the mosfet SI12304DS ?

You need an n-channel mosfet with a Vgs between 1.5V and 3V. It shall be able to carry at least 2A, Rdson should be lower than say 100mOhms.

If you plan a breadboard I suggest to use a package which lends itself to being inserted into the breadboard slots like the TO-220. For the one going into the saber you can take a DIYino board if you are willing to wait. It has everything on a tiny board and believe me, every square mm/inch counts in a hilt.

This one is not bad

Comparable parts with legs, do a search for Vgs @ 2.5V parts
http://www.digikey.com/product-search/en/discrete-semiconductor-products/fets-single/1376381?k=aoi

Arduino IDE 1.6.7: uninstalled
Arduino IDE 1.6.5: installed
Compilation: SUCCESS!!

Thanks guys for all of the help... I thought I was losing my mind =] Karma all around!

I'm dying to get this to work as I've got the 6050, but I've also got a WT588d instead of the soundboard you're using in the LsOS (it just came in the mail actually). I'm terrified to piecemeal all this together at this point, because I've done so little programming/electrical work. I'm still waiting on my RGBw LED (Got an awesome little Cree XML star type with all 4 leds in the center; should be able to recycle my ultrasaber lens, heatsink, and housing) but I'm trying to figure out which MOSFETs to get, how to get everything balanced out.. how to even do the proper fade between colors I'm wanting.

...Man, I'm not gonna lie.. it's absolutely daunting to look at. (JakeSoft's stuff uses the wt588D but with an ADXL, and this uses the MPU-6050, but with a different soundboard... so confusing) But I've gotten all these parts and I'm just gonna have to get over that anxiety and just try. But any suggestions that you guys could give me on the remaining parts I need to get or how to hook these things up together, it would be amazing.

Here's what all I've got so far:

Pro Micro
wt588D-16p
MPU-6050
18020p (clash sensor.. just in case)

I've got a ton of resistors as well.

destructables:
Here's what all I've got so far:

Pro Micro
wt588D-16p
MPU-6050
18020p (clash sensor.. just in case)

I've got a ton of resistors as well.

I hope you got a programmer for the WT588D also.

JakeSoft:
I hope you got a programmer for the WT588D also.

...of course not. Trying to decide if I should buy the other one and see if anyone here wants to buy a spare 16p.. Or buy the programmer for just in case I get the bug to make more.

I bought this :

http://www.ebay.es/itm/151415089133?_trksid=p2057872.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT

Transistor IRF540 Mosfet 28A 100V 150W TO-220

it is valid?

with the library Wire Arduino implements the i2c communication on a4 a5 wire ports enables the internal pull up so the logical level rises to 5v creating incompatibilities with devices that have a logic high less than 5v .
to restore compatibility you must edit the file twi.c library wire:

line 75

// Activate internal pullups for twi .
digitalWrite ( SDA , 1 ) ;
digitalWrite ( SCL , 1 ) ;

comment like this:

// Activate internal pullups for twi .
// DigitalWrite ( SDA , 1 ) ;
// DigitalWrite ( SCL , 1 ) ;

launched the wire library

#include<Wire.h>
void setup()
{
Wire.begin();
}
void loop()
{
}

measured voltage should be 0V .
Thus you can feed MPU6050 with 5V and also use a mino pro 5v instead of a nano

sorry for English..

paquitosoler:
I bought this :

http://www.ebay.es/itm/151415089133?_trksid=p2057872.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT

Transistor IRF540 Mosfet 28A 100V 150W TO-220

it is valid?

IMHO is OK to use. But only for first breadboad, like neskweek's. Have a look at his board in his videos, very clean setup.

Protonerd, what kind of LEDs did you purchase for your strings? I'm looking for red ones that have a 45 degree viewing angle, but I'm not sure what the best mcd rating should be. I purchased 4000mcd straw hat LEDs that have a 120 degree viewing angle, but they're not bright at all...

Hey guys !
I thought it might interrest you:

I've contacted the company which make YX5200-24SS chip to know if they have any new documentation, since all I found on the net is incorrect or incomplete.
Here is their answer:
YX5200-24SS instruction manual v1.7

What ? You don't understand chinese ?

Me neither, but with some translator, the info it brings to light is much more closer from what I've found from my tests and I see some other functions I didn't tested yet.

To finish: don't bother with NORFLASH/FLASH write handling. The people who answer me told me that it's not supported by our device.

[EDIT]
Unfortunately, there's nothing much that will help to make gapless sound :frowning:
[EDIT2]
I've tried to manage sound via precise timings but it's not better. Looking at the datasheet the problem may come, as I thought earlier, from SDCard access time. Each time you launch a play command, dfplayer stops the previous track (stupid) search the new one on the SD, ans play it when found. It's short but long enough for the ear to catch.
As a consequence I stop my quest for gapless playing with this module.

You could have asked me as well for the manual. Although it seems you managed to "coerce" it out of them where I completely failed. I've got the same spec from the distributor company's representative lady, but that only after I placed an order for the chips. Maybe the mistake was I told them i was going to design it in?

But all credits to Google's translator, it really makes a good job of translating Chineese to English.

772pilot:
Protonerd, what kind of LEDs did you purchase for your strings? I'm looking for red ones that have a 45 degree viewing angle, but I'm not sure what the best mcd rating should be. I purchased 4000mcd straw hat LEDs that have a 120 degree viewing angle, but they're not bright at all...

For my red LED string blade I used these ones:
https://www.led-tech.de/de/Leuchtdioden/5mm-LEDs/Superbright-LED-LT-360_1_4.html

With 4000mcd they are crazy bright on their own, and you are going to chain up close to 100 of them. To be honest, since quite a portion of the light will be absorbed, you can take LED's with less mcd rating (but gut feeling tells me >1000mcd they shall be bright enough).
If you look at the viewing angle, the really bright ones have a narrow angle, 20 degree or below. That is the tradeoff. On the net you can find methods how to scatter the light better (like sanding the dome, or cutting it off), but I'm not convinced it's worth the effort.

While I cannot judge your red you bought, the reds I have kill your eyes if you are crazy enough to look at into the light directly. And do not forget: it will be not one led, but a whole dozen.

Finally I managed to fix my prototype saber and uploaded neskweeks' LSOS V1.0RC6.
My main intention was to test his swing detection, which was quite promising (what an understatement) based on the video posted.

As a reference I picked one of my other sabers with a commercial (and suberb!) sound board, that is the red one I start the video with.

Just after recording the video I recognized that I recently swapped my 3W speaker for a smaller and less loud one and the saber is barely audible at the distance (and the background noise of the street), so let me summarize what you might not hear:
the swing detection works awesome! I even risk the statement, that it's the best, most life-like swing detection I experienced so far.
Commercial saber cores work - based on when they fire a swing - on a simple grading of the acceleration. You can see from the video, that the red saber makes swing sounds even if the hilt is vehemently trusted back and fort. But large gestures are not always recognized.
With the LSOS swing detection there is no trigger on small but forceful gestures, and slow or weak, but wide gestures will also not trigger it (as a comparison, the Hasbro sabers have ball Switches which react on angles, no matter the acceleration). In the contrary wide and forceful gestures, i.e. real swings are always recognized, even in a chain i.e. if the saber is swirled.

BTW, you can also see lock-up, bolt deflect. Next time I try to record inside and/or maybe look for another speaker (I choose this one not to wake up the family).