Go Down

Topic: Arduino Lightsaber (Read 392434 times) previous topic - next topic

Protonerd

No problems, always happy to help. jbkuma is the man who really helped me in the beginning, he always has clear and concise information.

Love those brewboards, they save so much time and if your hilt is long or wide, then they work perfectly.

In the near future, I will post random build pics on my personal Facebook build page,  so others can look at it. Nothing glamorous, but it's just there as extra reference for people.
That would be absolutely awesome, we could use some FB coverage, FX-SaberOS evolved into an open-source brand which helped a lot of people make their lightsaber dream come true for an unbeatable low price, let us now show how excellent it is by posting pics/videos of home brew sabers!!!

IiN

Hello guys, I'm trying to assembly and code my own lightsaber using Arduino. I am good at programming but have only basic electronic knowledge and need some help. My plan is to use a Cree RGBW led module to illuminate the blade, the problem is, I can only get the red led to shine at accepatble brightness. The other 3 leds light up but pale in comparison.

This is the circuit I'm using for testing (only RGB are shown, but connections for the white LED are exactly the same)


For each color I'm using a a TIP122 transistor, connected to the Arduino, through the base, using a 4.7 KOhm resistor. As a result, when the relative pin on the Arduino is high, I measure (without the led module) 3 V and 1 A between the collector and the positive of the batteries which will power the led. Which is pretty much what I desired and ideal I guess? The result however is that (connecting the led module) the red led shines brightly, the others don't.

Voltages for leds, from the specification are: red 2.25~2.6 V, green 3.3~3.9 V, blue 3.1~3.7 V, white 3.1~3.7 V. Maximum Drive Current: 1 A. So maybe the voltage is too low for the other colors to shine as brightly? But the fact is that I tried also using 4.5 V instead of 3 to power the leds, and they are still dimmer than the red at 3 V. While connecting them directly to the power supply (3 V) they all shine super brightly instead.

Measuring the voltage and the current while the led module is connected I get around 3 V for all colors, but 0.1 A for the Red and much lower results (more than 10 times smaller) for green, blue and white.

I tried swapping transistors/cables/pins/everything in any possible way. Nothing changes.
I tried adding multiple transistors in parallel. Voltage stays the same, current doubles and also the light emitted by the led. The problem is, just to match the red I would have to use 10 transistors for each other color. Doesn't seem viable. Also, haven't seen anyone fitting so many transistors into their lightsaber, so I must be doing definitely something wrong. The problem is, I don't know what...

Help :smiley-cry:

Protonerd

Are you sure you followed the instructions and used MOSFETs? It seems from your description that you use bipolar transistors instead, which might require a different kind of driving scheme. Please swap your transistors for logic level nMOS transistors and you will be good to go.

IiN

Are you sure you followed the instructions and used MOSFETs? It seems from your description that you use bipolar transistors instead, which might require a different kind of driving scheme. Please swap your transistors for logic level nMOS transistors and you will be good to go.
Can you suggest me a model of MOSFET to be sure it will work?

Andong

Hello guys. Hoping for an advice from expierenced lightsaber builders on a PC tube for a blade. There are basically 2 types I can buy, regular one with flat surface inside(thats what i've been using so far) and there is another type with corrugated surface inside...claimed to better diffuse light. Keen to try it but wondering if anyone already used second type and knows for sure if it's better or worse in terms of a lightsaber blade.

jenga67

Can you suggest me a model of MOSFET to be sure it will work?
Hi,

I use IRF530N, they always worked fine for me.

JakeSoft

Hello guys. Hoping for an advice from expierenced lightsaber builders on a PC tube for a blade. There are basically 2 types I can buy, regular one with flat surface inside(thats what i've been using so far) and there is another type with corrugated surface inside...claimed to better diffuse light. Keen to try it but wondering if anyone already used second type and knows for sure if it's better or worse in terms of a lightsaber blade.
Most people just use the smooth surface and put in something to diffuse the light (like clear gift wrap). This corrugated interior surface sounds interesting, though. It could actually be a cool effect, but I think you'd be exploring new territory there.

Messiahlad

Hello guys. Hoping for an advice from expierenced lightsaber builders on a PC tube for a blade. There are basically 2 types I can buy, regular one with flat surface inside(thats what i've been using so far) and there is another type with corrugated surface inside...claimed to better diffuse light. Keen to try it but wondering if anyone already used second type and knows for sure if it's better or worse in terms of a lightsaber blade.
Hello,

I have bought a lightsaber blade with the faceted surface (lengthwise) rather than the traditional round ones we normally use and it was terrible. It just didn't diffuse the light correctly, resulting in a dim, dull blade.

I've never seen corrugated before though. Can you post a link to the product you are asking about?

Andong

Hello,

I have bought a lightsaber blade with the faceted surface (lengthwise) rather than the traditional round ones we normally use and it was terrible. It just didn't diffuse the light correctly, resulting in a dim, dull blade.

I've never seen corrugated before though. Can you post a link to the product you are asking about?
Maybe I'm wrong with the naming and it's actually called faceted. Added photo of this type

Bipe

#1434
Feb 13, 2019, 04:08 am Last Edit: Feb 13, 2019, 04:09 am by Bipe
Has anyone tried the DFRobot Beetle?  I picked one up for a thermal detonator I'm working on.  At half the size of the Nano, it might work great in a lightsaber.  It uses an atmega32u4, instead of the atmega328p.

Links:
https://www.dfrobot.com/product-1075.html
https://www.dfrobot.com/wiki/index.php/Beetle_SKU:DFR0282

JakeSoft

Has anyone tried the DFRobot Beetle?  I picked one up for a thermal detonator I'm working on.  At half the size of the Nano, it might work great in a lightsaber.  It uses an atmega32u4, instead of the atmega328p.

Links:
https://www.dfrobot.com/product-1075.html
https://www.dfrobot.com/wiki/index.php/Beetle_SKU:DFR0282
That looks like a good one to try. So small!

JakeSoft

#1436
Feb 13, 2019, 04:42 am Last Edit: Feb 13, 2019, 04:42 am by JakeSoft
As a thank you to long-time DIYino and Arduino Saber supporters, I have made a free version of the STREAM system available for users of DIYino Prime V1 and Home-brew equivalents (Nano + DFPlayer + MPU6050). (Stardust V3 versions are coming soon.) Both RGB in-hilt LEDs and Pixel blade versions are available to try.

This is a work-in-progress, but has passed alpha testing.

You can download for free here:
https://github.com/JakeS0ft/STREAM/tree/Version1.5_WIP

Presently all features are enabled and working except multi-font support.

A free sound font and all the files you'll need for your SD card are part of the download (see SDCard directory). A special version of my sound font converter tool is also included in the download. This tool can convert any Plecter font to STREAM format. (See SoundConverter directory.) The sound font converter tool's presets are already set to what STREAM expects (correct number of swings, clashes, etc.), so you should not have to touch them. Just select your Plecter font folder, a destination folder to put the converted files, and then convert. Easy!

Note to Mac users: All development and testing was done on Windows 10. The GUI is java-based so in theory it should work on Mac, however the included firmware loader will probably not work. For now Windows 10 is the only officially supported operating system.

Messiahlad

As a thank you to long-time DIYino and Arduino Saber supporters, I have made a free version of the STREAM system available for users of DIYino Prime V1 and Home-brew equivalents (Nano + DFPlayer + MPU6050). (Stardust V3 versions are coming soon.) Both RGB in-hilt LEDs and Pixel blade versions are available to try.

This is a work-in-progress, but has passed alpha testing.

You can download for free here:
https://github.com/JakeS0ft/STREAM/tree/Version1.5_WIP

Presently all features are enabled and working except multi-font support.

A free sound font and all the files you'll need for your SD card are part of the download (see SDCard directory). A special version of my sound font converter tool is also included in the download. This tool can convert any Plecter font to STREAM format. (See SoundConverter directory.) The sound font converter tool's presets are already set to what STREAM expects (correct number of swings, clashes, etc.), so you should not have to touch them. Just select your Plecter font folder, a destination folder to put the converted files, and then convert. Easy!

Note to Mac users: All development and testing was done on Windows 10. The GUI is java-based so in theory it should work on Mac, however the included firmware loader will probably not work. For now Windows 10 is the only officially supported operating system.

Very much appreciated Jake,

I was looking forward to trying it out since you first gave us a preview of your works. Very excited to play with it.

mikyt

Hi everyone!
First of all, thanks for the inspiring amount of information contained in this thread, you guys have been doing an amazing job!

I'm joining the ranks of those building their own lightsaber, and I have the circuit mostly done, quite similarly to how many of you guys have done it (Arduino Pro Mini 3.3v, adxl335, wt588d-u controlled with a 1-wire configuration, RGB LED controlled via 3 MOSFETs, one 18650 battery with TP-4056 protection/charging circuit). The software is mostly based on Jakesoft's USaber library.

Everything works nicely as long as I test the components one by one (in a configuration Arduino + component). And it still works when I put everything together, as long as I power the wt588-u via USB from my PC.
But as soon as I power the wt588-u with the same battery as the rest of the circuit, a lot of noise starts to appear on the readings of the adxl335, continuously triggering false swings and clashes, even if the sensor is perfectly still.

Note that when I say I power the wt588-u with a battery, I mean I tried every possible way of powering it I could think of:
* 3.3v on VCC and VDD from the arduino
* 3.3v on VCC and VDD from a dc-dc converter
* 5v on VDD via a step-up converter
* 5v on VDD-USB via a step-up converter
* USB cable, from the battery via a step-up converter with USB out.

Notice that I have tried two differernt adxl355 and two different wt588-u, so it is not an issue of a single component.

Also, simply adjusting the thresholds does not work, because the false readings I get when I turn on the sound are higher than what is detected as a the strongest swing when the sound is off: I would have to hit the sensor very hard to get any reading at all, at those levels.

At this point I am seriously considering switching to a different sensor, or a different audio player, but I'd rather avoid it if at all possible, given that it would likely take a couple months for them to be delivered.

Has any of you experienced anything similar and do you guys have any suggestion on how to get stable readings from the sensor?

JakeSoft

But as soon as I power the wt588-u with the same battery as the rest of the circuit, a lot of noise starts to appear on the readings of the adxl335, continuously triggering false swings and clashes, even if the sensor is perfectly still.

Has any of you experienced anything similar and do you guys have any suggestion on how to get stable readings from the sensor?
Welcome!

Your setup sounds very similar to what I used for my Mk. III saber. The only difference is that I used the 16-pin version of the WT588D. I did not experience the same issue you describe, however I seem to recall others saying they have. Maybe I just got lucky. What kind of battery are you using?

One  possibility is that you have an EMI problem with the power to your ADXL335 where having the sound active is introducing noise and causing your readings to go crazy.  To test this, try adjusting the volume of the sound to a really low number while monitoring your sensor and see if the readings level out. (use the SetVolume() function on the WT588DSoundPlayer). If the readings become stable at low volume, you may need to introduce a decoupling capacitor somewhere in your circuit to smooth out power delivery. 

Go Up