Go Down

Topic: rgb ledstring lightsaber (Read 619 times) previous topic - next topic

racemaniac

Dec 19, 2015, 11:54 am Last Edit: Dec 19, 2015, 12:21 pm by racemaniac
I see there's already someone else with an arduino based lightsaber, but here's mine:
https://www.youtube.com/watch?v=l2rgkSTRw_s

I did cheat a bit, instead of a regular arduino, it uses a maple mini (72Mhz, 128kb flash, 20kb ram), but the arduino environment was ported to it, so it's programmed using the arduino toolchain. The extra speed made it easier to control the ledstrips, and the extra memory means i could easily store the sounds it currently has in the flash memory :).
it uses ws2812b ledstrips for the lights (and i diffused them with some white foil, so irl you see the leds a bit, but it still looks very well)
and put a tda2003 amp and an 8bit dac and a speaker in the bottom to get some sound :).
Glad i got it working well enough as the 7th movie is released :).

And some pictures of it:
http://users.telenet.be/racemaniac/Saber/hilt.jpg
http://users.telenet.be/racemaniac/Saber/hilt2.jpg
http://users.telenet.be/racemaniac/Saber/saber.jpg

prince_x2

I can't see leds when it's lightening, pretty sweet :)

racemaniac

I can't see leds when it's lightening, pretty sweet :)
it's also the camera masking it, but irl it still looks pretty good :). you can see the leds a bit, but i managed to diffuse it pretty wel :).i wish i could have found a polycarbonate tube that was also diffuse, but i simply could't find any shop selling them :(.

flyingangel

Hi!

I want to make a LED-stripe Lightsaber too, and so I try to collect as much information as possible.

So, here is my question: Do you have two stripes back-to-back or three stripes in a triangle in the tube? Do you have a picture of the stripes without the tube?

greetings, Robert

racemaniac

#4
Dec 20, 2015, 12:38 pm Last Edit: Dec 21, 2015, 12:08 am by racemaniac
Hi!

I want to make a LED-stripe Lightsaber too, and so I try to collect as much information as possible.

So, here is my question: Do you have two stripes back-to-back or three stripes in a triangle in the tube? Do you have a picture of the stripes without the tube?

greetings, Robert
i went with 2 strips back to back, and diffused them with milk white foil for windows taped directly to them, then a layer of bubblewrap (mostly transparent, and very soft :) ),and then wrapped them in very thin white cloth (i cut up an overall to protect your clothes while painting) to do some more diffusing. Here are some pictures of the result:
wrapped ledstring
Top of the ledstring, with a bit of just the ledstrings with the white foil around them sticking out
For me the biggest challenge was diffusing it properly without loosing too much brightness, and without it being ugly. I started out with just the white foil, but 2 layers of it already starts dimming it a lot, and no matter what you do, you'll see the seams of where the foil starts/stops. So then i noticed this painters overall i had with very thin cloth, which i could easily do 3-4 layers of, without dimming too much, diffusing pretty wel, and the seams are barely noticable :).

And the strips themselves are ws2812b strips with 60 leds per meter. The 144 leds per would probably be even more awesome (but are relatively expensive).
I was also worried about thermal issues, but i tested this setup on full white (and a 4.2v power supply, the highest voltage my 18650 battery can have) for 15 minutes, and it started to get hot, but held up very well :) (if i had 144leds per meter strips, i would expect getting issues using them at full power).
Ow, and another "pro tip" XD. When i did the weekend of experimenting on diffusing them, i ended up making sure every layer is properly connected to every other layer :p. Nothing more annoying that trying to pull out your ledstring from the tube, the layers not coming out perfectly together, meaning you can start over making the entire diffusing assembly XD

To save on needed components, i'm driving everything directly from the battery. Tested the ws2812 strips on various voltages, and below 3.4 volt, you see them really degrading, white not being that white anymore etc.. and ofcourse as the voltage lowers, they get a bit dimmer, but just hooking them directly to my lithium ion battery really worked surprisingly well :).

After some more googling today, i discovered there exists spray paint for frosting glass, i'm going to see if i can find any, and frost the polycarbonate tube i have, and that should make it even better :).

*edited, i forgot that there also was a layer of bubblewrap around the leds :)

Protonerd

I simply love this idea, I think I'm going to order that LED string preatty soon myself. I've been keeping a lookaout for such a string for quite a long time now, this one you picked sounds like the best one by far.

I red in the description that each LED can be controlled individually. How is that done? How many signals you you need for that? Would an Arduino Nano be capable of handling the complexity?

racemaniac

#6
Dec 31, 2015, 08:34 am Last Edit: Dec 31, 2015, 08:47 am by racemaniac
I simply love this idea, I think I'm going to order that LED string preatty soon myself. I've been keeping a lookaout for such a string for quite a long time now, this one you picked sounds like the best one by far.

I red in the description that each LED can be controlled individually. How is that done? How many signals you you need for that? Would an Arduino Nano be capable of handling the complexity?
I used this site as a good source of how to control the leds: Neopixel timing
You need to be able to send a signal that is high for only about 450nanoseconds (+-100), which is the critical part in your code for the timing. I used a slightly more powerful microcontroller than arduino to have some more room to play with, but as is documented on that site, even with a normal arduino you can perfectly control them :).

flyingangel

#7
Jan 01, 2016, 12:51 pm Last Edit: Jan 01, 2016, 01:00 pm by flyingangel
Hi!

There is a realy great library, if you want to use an easy code on your Arduino: FastLED

I use this library for my projects and its realy easy to control hundreds of LEDs in one string.

racemaniac

#8
Jan 04, 2016, 05:32 pm Last Edit: Jan 04, 2016, 05:32 pm by racemaniac
Hi!

There is a realy great library, if you want to use an easy code on your Arduino: FastLED

I use this library for my projects and its realy easy to control hundreds of LEDs in one string.
I came across that library, but the protocol is so simple i decided to just do my own implementation :). It also gives me greater flexibility in multitasking on the microcontroller while sending data to the leds.
the only hard thing about the protocol is the timing of the 0/1 bit, but it isn't that hard to solve :).
I used the following article as a basis of how i should handle the timing, and that made it very easy to both play sound & control the leds at the same time: Neopixel timing

Protonerd

I came across that library, but the protocol is so simple i decided to just do my own implementation :). It also gives me greater flexibility in multitasking on the microcontroller while sending data to the leds.
the only hard thing about the protocol is the timing of the 0/1 bit, but it isn't that hard to solve :).
I used the following article as a basis of how i should handle the timing, and that made it very easy to both play sound & control the leds at the same time: Neopixel timing
You picked my curiosity, I quickly ordered my string, with 60 LEDs/m (WS2812B). It's amazing, I used the link you've sent for the low level control algorithm and I could come up with ignition/retraction in no time! I also used the more complex library for the delight of my kids.

It really might become the string of choice for LED string sabers. As I see now:

PROS:
- RGB (Just Great!)
- the control algorithm is awful fast! You can reprogram 100+ LEDs controlling 3 colors in what feels like no time!
- there is no need for power transistors to drive the LEDs
- it's specified for 5V, but I tried, connecting the shift register to Arduino digital output you can go down as low as 2.2V with the supply of the string. Of course that low only RED will come out nice. But with 3.7V all 3 LED types reach their highest brightness, which is a boon since most sabers use 3.7V rechargable batteries.
- I haven't tried to combat with it, but the strings look pretty durable.

CONS:
- even though there is only ~1cm of gap between the LEDs, they face outwards, I tried with every method to diffuse it available to me (and I have my nice collection of LED string sabers, all self-made), but I still see the individual LEDs. But I have some ideas I still want to try. I think wrapping too many layers will impact the brightness, I will try to glue a reflecting material inbetween the LEDs, so that the refrected light gets reflected back from the gaps between the LEDs.
- that 5V. Well not exactly a CON, but I was wondering how a RED having ~2V of threshold can withstand 5V. So I tried with a bench power supply. Appearently they have put in protection diodes, which will simply open up if the LEDs are subjected to too much voltage, i.e. if you go up to 5V really, most of the power will go through not the LEDs but the protection circuits. You can see quite well that for instance a standalone blue light at 4V consumes around 20-30mA/LED, but if you go above it (which is approximately the Vmax of the blue LEDs), the current will increase exponentially but the brightness does not. So keep the voltage down to below 4V at best.

racemaniac

You picked my curiosity, I quickly ordered my string, with 60 LEDs/m (WS2812B). It's amazing, I used the link you've sent for the low level control algorithm and I could come up with ignition/retraction in no time! I also used the more complex library for the delight of my kids.

It really might become the string of choice for LED string sabers. As I see now:

PROS:
- RGB (Just Great!)
- the control algorithm is awful fast! You can reprogram 100+ LEDs controlling 3 colors in what feels like no time!
- there is no need for power transistors to drive the LEDs
- it's specified for 5V, but I tried, connecting the shift register to Arduino digital output you can go down as low as 2.2V with the supply of the string. Of course that low only RED will come out nice. But with 3.7V all 3 LED types reach their highest brightness, which is a boon since most sabers use 3.7V rechargable batteries.
- I haven't tried to combat with it, but the strings look pretty durable.

CONS:
- even though there is only ~1cm of gap between the LEDs, they face outwards, I tried with every method to diffuse it available to me (and I have my nice collection of LED string sabers, all self-made), but I still see the individual LEDs. But I have some ideas I still want to try. I think wrapping too many layers will impact the brightness, I will try to glue a reflecting material inbetween the LEDs, so that the refrected light gets reflected back from the gaps between the LEDs.
- that 5V. Well not exactly a CON, but I was wondering how a RED having ~2V of threshold can withstand 5V. So I tried with a bench power supply. Appearently they have put in protection diodes, which will simply open up if the LEDs are subjected to too much voltage, i.e. if you go up to 5V really, most of the power will go through not the LEDs but the protection circuits. You can see quite well that for instance a standalone blue light at 4V consumes around 20-30mA/LED, but if you go above it (which is approximately the Vmax of the blue LEDs), the current will increase exponentially but the brightness does not. So keep the voltage down to below 4V at best.
Glad you also liked experimenting with them XD.
And indeed, the diffusing is hard, at the cost of some brightness i put quite a few layers of diffusing cloth, and it worked pretty well, but i'm also still looking for alternatives :). I'm going to have a go at making my polycarbonate milk white by applying some acetone on it, i'm curious what the result will be XD.
If you find any other good ways of diffusing, i'm al ears XD.
And i didn't test them at 5V yet, but when testing them from 4.2V -> 3.2V (aka the max/min voltages of my lithium-ion battery) i indeed noticed that at first the brightness didn't even change as i lowered the voltage, now hearing how it works, i'm not amazed :). It does make them awesome to just directly connect to the battery, and not worry about getting 5V or having to do special current control :).

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy