Introduction: Alexa-Enabled Death Star Lamp

About: Cogito ergo doleo.

Bring a snippet of the Dark Side to your living room with this unique voice-activated lamp. A functional work of art that is both useful and pleasing to look at. Switching on or off? All lamps do that! Changing brightness? Very common! But can yours do this? *cue to turn volume up for intro video*

Rad, innit? Besides that cool light-n-sound show, you can also ask Alexa to simply turn the lamp on/off, or choose a brightness setting between ten glow levels.

Impress your friends with the true power of the Dark Side!

Step 1: Overview

This project takes a popular IKEA lamp, automates its lighting / kinetic actions, and connects it to Amazon Alexa to enable voice control. The six components of this project, in order of undertaking, are:

  • Painting the lamp (Steps 2-6)
  • Building the circuit (Step 7)
  • Setting up Alexa (Step 8)
  • Installing the motor (Steps 9-11)
  • Constructing the brace (Step 12)
  • Assembling it all (Steps 13-16)

To keep the workload manageable, I have abstracted out the elements of backend software that parse Alexa messages and handle real-time communication. You only need to upload the Arduino sketch and set up the Alexa skill as described in this tutorial, and the voice-control should all happen out-of-the-box.

All relevant code can be found here. All STL models are measured out in mm. This is my first time writing an Instructable, so your comments and feedback are much appreciated!

Step 2: Fetch the Lamp

Head to your closest IKEA and get PS 2014 pendant lamp.

There will be a 14" version and a 20" one. Get the 14" with the white/copper variant. Upon unboxing, you'll find a white central frame, 10 copper arms and 40 white panels. Four panels go on each arm at the points marked in the picture. The following four rows thus emerge:

  • Small top panels
  • Large top-middle panels
  • Large bottom-middle panels
  • Small bottom panels

Attach the arms to the frame and label them with some masking tape. Also label the panels (but don't attach them yet). I labelled the arms from 0 to 9, and the panels from B0 to B9 and T0 to T9. Note that I used each panel number twice since the the design of rows 1 and 2 (like 3 and 4) is distinctive and the same label can be used. So for instance, the panels going on arm 7 would be T7 (small top), T7 (large top-middle), B7 (large bottom-middle) and B7 (small bottom).

Tedious? Yes. But all this labelling will get relevant later. So go ahead, label away!

Step 3: Paint Them Glossy Gray

Pick up some glossy gray paint. Get a couple of cans, you'll need them. I went with Rust-Oleum Gloss Winter Gray.

Lay down the panels (all 40 of them!) and spray them nice 'n even. Make sure you wear a mask. Even the Dark Side considers safety first! See mine for reference.

Leave panels out to dry overnight, then give them a second coating. Sweet!

Step 4: Tape Up the Trenches

Put all the panels back on the arms, but not all the way. Don't let them snap in. You'll be removing them again soon, and it takes some effort to remove a panel snapped in place.

Once done, use a reference Death Star image (like this one) to tape up all the "trenches and valleys" on the globe. These are the areas you wish to remain light gray, like the Equatorial trench and so on. It's a slow and repetitive process, but it will pay off greatly once you see the end result!

Also make sure to tape off a large circle in the top hemisphere. This is where the Superlaser design shall be traced out later. Just use something large and circular to mark a circle in masking tape. Then cut it out and stick it at roughly the same place as shown in the pictures.

Step 5: Paint in the Texture

Get a couple of cans of stone-textured gray paint. I went with Rust-Oleum Gray Stone finish.

Take off the panels and paint them up! A single coat with slower, slightly sustained spraying gave me just the right touch. Labels on the arms and panels will help you put the pieces in their right place in the design, but hold that for later.

Rip out the masking tape and viola, your Death Star panels are ready!

Step 6: Draw Out the Superlaser

Use a 3D printer to make a stencil for the Superlaser. I've attached the STL from my design.

Attach only the panels that have the Superlaser area back on the arms (only lightly, no snapping in yet), and tape them together from the other side. Stick the 3D printed stencil and use a black sharpie to trace out the concentric circles. Then make lines for the Superlaser's internal design using your reference Death Star image.

Congratulations, you are all done with the design bits!

Enough of the artsy stuff. Now let's get technical.

Step 7: Build the Circuit

You got a nicely painted globe and well functioning motor system, but this thing isn't gonna connect to Alexa itself! Let's make that circuit happen.

Use the Gerber files attached to order the PCB. I personally like to use OSH Park. If you don't want to deal with Gerber files, just order the board I've shared here.

While you wait for the board to arrive, pick up the components shown in the schematic:

Solder everything on as shown in the pictures. Use 4 thin screws to attach the SSR board to the PCB. Note that you will have to affix three short wires from the PCB to the SSR terminals.

If you want to verify the circuit, use the test code here. If all works well, you should see something like the video above.

Step 8: Connect It to the Cloud

There were so many parts to this project that I wanted to take the stress of backend software dev off your shoulders. There's still some configuration for Alexa that you have to do. And you'll need an Echo! If Amazon lets me launch this skill to the public - still under review - I'll update this step so you won't have to do the Alexa setup at all. But for now...

Go to Alexa Skills Kit Dev Console and hit Create Skill. Give it a name (which will also be your invocation name), and then choose "Custom" when selecting a model. In the skill's console, go to JSON Editor in the left-hand column and upload the skill's model file. Then under Endpoint, add this to the "Default Region" box: arn:aws:lambda:us-east-1:074765571920:function:alexa-deathstar.

Save it all, and enable the skill on your phone's Alexa app: Skills > Your Skills > Dev Skills > {Your new skill}. Now test all this by asking your Echo to set up your device: "Alexa, ask Death Star to initiate setup". Alexa should do its thing and give you an 8-digit number which will be the device ID of your lamp.

Did it work?!

Next, upload the DeathStarLamp.ino sketch to your MKR1000. Make sure you update your Wifi and device ID details on lines 30-32 before uploading. At this point, issuing a command to Alexa should change the voltage readings of the Arduino pins (see lines 11-15 for pin mapping). Use a multimeter to test!

NB: Once the device set up is complete, Alexa will process your commands assuming the MKR1000 is up and running. It's a one-way communication channel.

Step 9: Cut Away the Strings

To make the opening and closing of the lamp motor-driven, we need to get rid of the archaic string mechanism it comes with.

Snap out the string clamper, pulley cap and pulley marked in the pictures. Then unscrew the little screw beneath the pulley to take out the remaining structure cleanly. I put the screw back in afterwards, but this is not mandatory.

I found the little copper balls attached to the string-ends quite pretty. So I cut off the string and superglued the balls in the two (random) troughs marked on the white frame. Call them our Core Reactors! Luke, stay away...

Step 10: Print Out the Motor Mount

Print out the attached STL, measured out for a Nema 14 Round Stepper Motor and M3 socket cap screws. I soldered female terminals on the four motor wires, then tested the fit on the printed mount. Nuts needed as the holes of this particular stepper model are already threaded.

For attaching, I made a tiny pilot hole in the plastic using a heated iron, then used a 1/2" #5 self-tapping screw to fix the mount to the frame.

Step 11: Put in the Frame Plates and Rod

Print the plates from the two STL files, and press a 1/4"-20 hex nut into the top plate slot. No need for glue, the press-fit will be tight enough. Sandwich the 3-armed moving piece on the white frame in between the plates, and screw them using four 16mm M3 screws.

Then screw a 6-inch long 1/4" threaded rod through the hex nut, and attach it to the motor shaft using 1/4"-5mm Shaft Coupler.

Wanna test your setup? Supply the circuit with 12V, wait for the Arduino connect to the Wifi, and issue Alexa a command: "Alexa, ask Death Star to set glow to two".

If all works well, you should see something like the video above. Note that the video shown is missing the frame plates; I forgot to make a video after adding them. The plates make the whole mechanism much more reliable and secure.

Step 12: Build the Brace

I opted to build a wooden brace so one could hang the lamp from any wall. That way you aren't restricted to just the ceiling outlets.

Cut the 3 pieces of the brace out of 1.5" thick pine board. All pieces were kept 2" wide, and use the canopy (or ceiling cover) of the IKEA lamp to trace out the circular part. Further measurements annotated in the CAD rendering. Then drill the three holes in the circle as shown: middle one with a 3/8" bit, and the two side ones with a 5/32" bit.

Also drill out two 3/8" holes (for the power cable) and two 1/8" holes (for wall screws) at places marked in the picture.

Alright, time to paint (again)! Get an aerosol can each of white primer and dark red paint. I used these:

Coat the entire brace with the primer twice, with about an 8-hour gap between coats. Then use masking tape to seal in only the edges, and give the thing a couple of coats of red paint. Leave overnight to dry, then remove the masking tape. And your 2-tone wooden brace is ready!

Step 13: Put It All Together - Components

Get the 12VDC 1A power supply listed here.

I chose this option to keep the dimensions of the power supply within the brace's width. It brings everything together beautifully! Use four #6 x 3/8" self-tapping screws to affix the power supply and your circuit board to the inside of the brace's diagonal arm.

Pull the white cable and ground wire (attached to the lamp canopy) through the large middle hole, and put the two attachment screws that came with the lamp through the smaller side holes (but not all the way through). Then attach the round metallic plate to the screws using the groove arcs on it.

Step 14: Put It All Together - Motor Wires

Next, put a 2-feet long 4-wire cable through the main hole and then through the canopy hole. I like my wires all neatly managed, so I got this multicore cable.

Spread apart the four wires around the point where the cable passes through the canopy hole, and use the two tiny side-grooves on either side of the canopy hole to set the wires. This will allow the 4-cable wire to pass through the canopy without any drilling or modification, and you'll still be able to set the canopy plug in its original position. See pictures for a better idea.

Let a 6" length of white cable stick out from the canopy bottom, and about a 12" length of the 4-wire cable. Secure everything in place by pulling the canopy all the way to the top and screwing the end cap on the canopy plug.

Route the multicore through the top cable hole, and screw one end to the four terminals designated for the stepper on the circuit board. Make sure the right colored wire goes in the correct terminal as labelled on the board: K-black, G-green, R-red, B-blue. Connect the other end of the multicore to the corresponding colored wires of the stepper motor from Step 10.

Step 15: Put It All Together - Connections

Get an 18 AWG 3-wire cable that is long enough to go from the brace tip to the closest power outlet in your home. I got this one because it went well with the red-white color theme of the brace.

Route this power cable through the brace's two 3/8" cable holes. Then solder one end of the cable to the lamp wires sticking out of the brace's center hole. Use red plastic tape (or red heat sink) to secure the connections. Attach a 3-wire power plug to the other end of the power cable.

Now strip the cable at the portion around the SSR relay. Cut the hot wire (black, in this case) and fix the ends into the screw terminals of the relay board.

Also strip the cable around the area between the power supply and circuit, and put T-tap splices on the hot (black) and neutral (white) wires. Crimp corresponding male connectors to the end of power supply input wires, and connect them to the T-tap splices. This lets the 12VDC power supply get the AC input it requires without the need for a second power cable.

Finally, cut the output wires of the power supply short and screw them into the input power terminals of the circuit board. Plug the power cable into a wall outlet, and if all is done right, the Arduino's green PWR light should turn on!

Step 16: Hang It Up

You're all building the lamp. Now let's install it!

Use #8 x 2" wall anchors with #10 x 1-1/2" black cabinet screws to secure the brace to the wall. Then snap all the painted globe panels in their correct position, but leave out a couple at the bottom around the motor mount. Attach the completed globe to the bulb fixture frame (see IKEA manual for detail). I also used a small cable tie to align the multicore to the white cable.

Next, open up the lamp panels a little to ease the installation of the motor. This will give you some space to route the wires and work the screws. Use two M3 screws to attach the motor to the mount, and then attach the shaft coupler to the motor's axle.

Snap in the remaining panels from the bottom section, and you're all set!

Step 17: Start Playing!

Assuming you have registered and connected your circuit right, you should be able to plug in the lamp at this point and start issuing commands to Alexa! Go ahead, give it a try. Here are the actions you can invoke:

  • Switch on/off:Alexa, ask Death Star to turn on/off.
  • Brightness control:Alexa, ask Death Star to set glow to six.
  • Light-n-Sound show: Alexa, ask Death Star for full effects.

Keep in mind that {Death Star} should be replaced by whatever skill name you chose while setting up the Alexa skill. Here are a few more videos of the lamp in action.

Have fun introducing your friends to the glory of the Sith!

Space Challenge

Runner Up in the
Space Challenge

Microcontroller Contest

Participated in the
Microcontroller Contest