UChip Lightsaber - “May the Force Be With You”

272

2

Have you ever dreamed of being a Jedi or Sith of the Star Wars universe, swinging a powerful Lightsaber to support your own side? Whatever the answer might be, here it is: How to make a DIY Lightsaber with µChip

First, let me specify that I intend to make a low cost, scaled and portable Lightsaber, closer to a “Lightdagger” rather than the full size Lightsaber you typically see in the Star Wars movies. I want to take advantage from the compact size of µChip to make an ultrathin Lightsaber, with tremble effects (which I can also use as outdoor light in case of necessity).

Since µChip features a DC/DC buck converter capable of delivering up to 1A current at 5V or 3.3V, I will power my dagger directly from the micro‑USB connector on µChip, while connecting the LEDs to the generated VEXT pin. Thus, I only need to connect a micro-USB cable to program/power the Lightsaber and I can choose whether to give 3.3V or 5V to the connected LED strip.

I use a WS2812B LED strip as light source. It has a series of WS2812B ICs, which integrate 3 LEDs (RGB) and a driver. A specific (but well known) serial protocol must be used to drive the ICs and you can find it here. There are different strips, each characterized by different LED density and package. 100 LEDs/m and packaging IP30 fits perfectly for this project. The high LED density guarantees that the Lightsaber will be bright enough, while the package is the one without any silicon protection such that it fits inside the tube I use as the frame for my Lightsaber.

The frame I use for my project is a recycled antistatic IC tube; it is compact and transparent, besides it perfectly fits both the light source (WS2812B strip) and the controller (µChip), protecting all the components while giving rigidity to the dagger.

I used packaging foam as light diffuser; mine comes from the packaging of an LCD monitor.

Finally, as power source, any power bank that delivers at least 1A will do the job.

Here are the simple steps to build the Lightsaber.

Step 1: Preparing the Frame

Create a hole in the antistatic IC tube in order to prevent uChip from sliding inside the tube when you connect the micro USB cable. The hole should be located at about 3 cm from the end of the tube.

Then, insert a plastic pin (you can recycle the plastic pin that came with the tube to hold the ICs).

Step 2: Cut the LEDs Strip to the Right Length

Measure the number of LEDs required by fitting the strip inside the IC tube, then cut at the right length.

Remember that you need an odd total number of LEDs in order to create a symmetrical on/off effect.

Step 3: Solder the LEDs Strip to UChip

Connect the wires as shown in the picture:

µChip pin_16 -> Diode Anode

Diode Cathode -> strip +5V

µChip pin_8 -> strip GND

µChip pin_2 (or any other available GPIO) -> strip DIN

The wire length should beadequate: not to short (so that you can easily pull out uChip, if needed), not to long, otherwise you won’t be able to put uChip inside the tube.

The diode **might** be omitted, as in most cases the led strip will work too. Its function is to reduce the power supply voltage at the LED strip, so that its high logic level is within 3.3V specifications.

Step 4: Complete the Frame Structure

Fit everything inside the tube. Nothing easier! Be careful when bending the wires!

Wrap the opaque (but semi-transparent) packaging foam around the tube. This will diffuse the light generated by the LEDs. Use some tape to fix it to the antistatic IC tube.

Step 5: Program With Arduino IDE

Load µChip with the attached sketch “LightSaber.ino”.

I borrowed part of the flickering code from Mad Gyver awesome project.

Step 6: Power Up and Enjoy!

Connect the power supply through the micro-USB cable (I used a powerbank) and enjoy
your Jedi / Sith weapon
!!

You can modify the code to add an extra button that allows you to change the powering up/down sequence and timings.

Credits:

Some of the source code has been inspired by the amazing Instructables project of Mad Gyver

FastLED library is used to control the RGB LEDs.

Share

    Recommendations

    • Frozen Treats Challenge

      Frozen Treats Challenge
    • Backyard Contest

      Backyard Contest
    • Colors of the Rainbow Contest

      Colors of the Rainbow Contest

    2 Discussions