Accidentally a lightsaber

tl;dr

So you know how you have an idea for a project but you don’t quite how to execute it. I wanted to make an electronic glow stick using ws2812, I wasn’t sure how I was going to do the ws2812 part because normally they come on a PCB or in a 5050 SMD package. This is when I found the ws2811 8mm LED’s. Follow long with me on how I came to make a light saber and not an electronic glow stick

Hardware

  • Arduino pro mini
  • GX12 5pin socket
  • Power bank board
  • 18650 lipo battery
  • Rotary switch
  • Push button switch
  • Micro usb mount
  • 40mm PVC push fit pipe
  • Push fit pipe connectors and end caps

LED’s

To make this whole project work I needed to use ws2811, They work with ws2812 Libraries from adafruit. To mount the LED’s I used 2 solid core wire you find in UK mains twin and earth gray flat cable for the VCC and GND. Then all I did was connect up the data in and data out pins respectively. At first I ordered some 5 mm LED’s and made up a short 10cm long stripe because that’s about as long as a glow stick is.

My next problem to solve was what I was going to house the LED’s. I found some conduit adapter that would allow me to attach a pipe to an enclosure. The conduit adapter would take a 20mm diameter pipe so I found a clear acrylic pipe on eBay that was 20mm external diameter. I then used blanking end caps to seal up the other end.

Enclosure

Next up I needed an enclosure to house the battery and Arduino. I was going to get an expensive aluminum enclosure but then I had a brain wave, Why don’t I just use a bit of PVC pipe. This seamed like a great idea at the time but ended up not really saving me much money and made it more complicated to put together. I found that there are two types of PVC pipe, push fit and solvent weld. I was planning on using a mixer of push fit and solvent weld ends and attachments but I didn’t realise that the diameter is different for each. I ended up going with the push fit and gluing the end caps that the clear pipe attached to the PVC pipe. Also this is when I found out I had accidentally made a light saber instead of an electronic glow stick.

Power

For the power I just decided to go with a pound shop power bank that I striped down. I used a female micro usb mount adapter for charging and I also broke out the charging LED and mounted that above the usb mount

Connectors

So with using the PVC pipe I only had one end that was going to be flat, that was where I was going to put the charging usb port. I also needed some way of programming the arduino, I didn’t have enough space to add a second female micro USB port. I decided to switch to using a arduino pro mini instead of a arduino leonardo, This way I could use a FTDI board to program it. Why would this be any better you ask well that’s when I found the GX12 5pin socket. I had to make up a custom cable that went from the FTDI board to the female GX12 socket pictured below. I think it give a cool industrial look to the project

Mode selector

My only bug with WS2811/WS2812 LED’s is that they are really time sensitive and everyone uses delays in their libraries. This makes it a nightmare when you want to be able to switch between different patterns. I came up with a great idea to tackle this problem. On boot up I was going to get the arduino to check the status of a few different switches, so that depending on which switch was flicked would depend on what pattern mode the WS2811 were going to be in. My first idea was to use dip switches but then I decided to use a 4 position rotary switch because it could be panel mounted. The only down side to this is you need to power it off and on to change the mode.

Arduino files

Github – https://github.com/facelessloser/electronic_glowstick

Video

Advertisements

3 responses to “Accidentally a lightsaber

  1. Pingback: Accidentally making a Lightsaber instead of a Glowstick « Adafruit Industries – Makers, hackers, artists, designers and engineers!·

  2. Pingback: Accidentally making a Lightsaber instead of a Glowstick - HudsonWerks·

  3. Pingback: smart glasses (WS2812 edition) | Facelesstech·

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s