Introduction: Halloween Star Wars X-Wing With Operational R2-D2

About: I’m a dad who was trained as a theoretical physicist, became an engineer, and now just try to do cool projects for my daughter to get her interested in STEM.

Every Halloween I try to one-up my prior build. My daughter, my wife, and my family know that once September rolls around, I have Halloween on the brain. We spent a few cycles this Summer thinking about what the build would be. I needed to do something more challenging than last year's Sesame Street Monster Foodie Truck. This year had to incorporate more electronics, use materials I have never worked with before, and finally be easily detachable in order to store it easily in the off season.

My daughter has never seen Star Wars. But, we listen to all the John Williams music in the car on the way to school. She knows who Yoda is, Darth Vader, Luke Skywalker, Princess Leia, Chewbacca, and Rey. She even does some pretty good impressions! (I'm so proud) I was planting the seed for what I wanted to do early. :) It came as no surprise to anyone that we would do something Star Wars related, and I settled on an X-Wing build.

My past several Instructables have been rather unique builds. Unique in that I haven't seen a lot of people do them on the Internet. I like that I had more original creations and I think that won me brownie points with most. With the X-Wing, however, a LOT of people have done this before to various degrees of fidelity. One dude in Russia even built a lifesize replica. Though admirable, that was out of scope. I once again had to do something that had a footprint which fit onto the Radio Flyer wagon (as all my builds do) but this time, it had to have some special sauce. The centerpiece would be a functioning R2-D2 dome with lights, sounds, and dynamic motion. Let's get to work. I'll walk you through my thought process.

Supplies

  • Radio Flyer Wagon
  • Raspberry Pi 4 (RPi4)
  • DigiAmp+ hat for the RPi4
  • Arduino Uno and Pro Mini
  • Teecees R2D2 light set
  • Lots of LEDs and jumper wires
  • Several breadboards
  • Passive speakers (rated for about 35-40 W)
  • Plywood (various thicknesses: 1/8", 3/4")
  • Rigid purple insulation foam
  • Drill battery
  • Motor controller board
  • Continuous servo winch motor
  • Arcade buttons
  • LCD
  • USB keypad
  • Plexiglass

Step 1: The Plan

I really just like to dive in and do stuff, and that is a bad habit. The right thing to do is to stop and think about the goals of the build, the requirements of the build, and how the latter feeds into the former. I feel like that's what Mark Rober would say (since he is who I want to be when I grow up) and therefore, I wanted to put on my big boy pants and start to plan away.

I used Google Docs and began to list all the things I wanted to accomplish. This list evolved over the weeks. Some items moved off it, others made it on. An example is shown in the images. I'll provide a little context on some of these items.

  • I wanted to have a cool cockpit for my kiddo. It had to have the buttons to do cool stuff, some method of dealing with the music, and an image of the ranging display as Luke sees in his X-Wing when he's trying to bomb the Death Star
  • I originally wanted to have the wings open and close with a button push
  • I actually spent quite a few cycles on this and realized this would require me to spend more money then I wanted to. Additionally, I couldn't settle on a good approach
  • After a few conversations with my wife, we decided this would be out of scope. The investment of time wasn't worth the capability
  • I've seen a few dads on the Internet use the rigid purple insulation foam for various projects for their kids. I felt this would be a good excuse for me to do the same and also serve the purpose of reducing the weight
  • Because I'm running out of room to store all my builds, this had to be disassembled/reassembled easily
  • Wings had to tear down
  • Nose cone had to be removable
  • I wanted to power everything from a cordless drill battery
  • Finally, R2-D2 had to be dynamic
  • He had to rotate, make noises, and flash his lights
  • This was really, really hard, but in this case the investment of time was completely worth the capability

Step 2: The Design

I'm a perfectionist. I wanted my creation to be as realistic as the dude from Russia's. But, I really had to fight the urge to make it perfect because at the end of the day, it wasn't meant to be an exact replica. I needed to think about what are the recognizable features that needed to be there vs what I could still pull up and down a street with a little kid riding in it.

Things that had to appear:

  • R2D2
  • The foils (the wings that make the X) and the guns on the wings
  • The red/yellow "racing" stripes on the nose cone
  • A cockpit with a canopy that open and closed
  • The 4 engines

I scoured the Internet for pictures figuring out distinctive features and set out to work

Step 3: Starting the Build

As a busy working parent, I have limited time each day to dedicate. I don't really get to start until 8:30pm most nights and could only work for about <= 2.5 hours or so until it was finally time to pack it in for the evening. The weekends didn't offer much reprieve, so in order to fit more time in, I basically had to stay up later or take a couple of days off work to just build.

I started by getting a 4 ft by 8 ft sheet of plywood and cut it to a length of around 6 ft and width of 3 ft and attached it on top of some two-by-fours I had lying around which were arranged to fit into the Radio Flyer wagon (just like all my other builds). I then asked my kiddo to sit on the plywood so I could get some rough estimates of where her feet would go so I knew where to put the back section, the start of the node, the door etc.

Given that I wanted the nose cone to be detachable, it still had to attach onto something, so that's what I set out to build first. I basically took some additional pieces of plywood and attached them vertically to make the nose section. I made it big enough so I could put an old Aiwa speaker in there to play music once the electronics were wired up. Once that was secure, it was easy for me to figure out where the control panel would go relative to where my daughter would sit.

Knowing also where my daughter would sit helped inform the location of the back section that would host R2D2 and the wings. This back section is essentially a giant box that would have a rear door access, and it would be a little higher than the height of my daughter (while sitting). I had to make sure R2D2 could freely spin at the top, securely hold whatever I was going to use for the engines, and of course support the wings. (Full disclosure: I had absolutely NO idea how I was going to make the wings stay open. I wracked my brains over this for some time and I think I honestly got lucky with my ultimate choice -- which I'll write more about later). I also wanted to put my remaining Aiwa speaker in there so I had as best to surround sound as possible :)

Step 4: Making R2D2's Dome

This step was as rewarding as it was frustrating. It turns out there is this entire online community of folks (the Astromech community) that build real life droids. They have online forums where you can ask questions and learn about the process. If one wants to no kidding do it, then you're ordering custom pieces of laser cut aluminium which are expensive. It's especially expensive if your droid is not meant to have full capability due to time/budget constraints (as is my case). The other end of the spectrum is to custom make your own dome. I initially pursued this route.

I looked online for how to do this. Some folks were doing really cool builds with 3D printed parts. Though I have a 3D printer, I'm still no expert and it wasn't large enough to allow me to print the sizes I needed. Other folks were making domes out of papier-mache with an additional layer of fiberglass cloth/resin to harden it. I found on YouTube one person that did this successfully for BB-8 so I followed his model as best as I could.

It became clear pretty quickly this was going to be no easy task and quite time consuming. It made me glad I started on 1 September, but I was still feeling nervous about completing it in time. As seen in the pictures, after the fiberglass cloth/resin hardened, I started filling in the divots with drywall spackle and sanding. This was going to be time-consuming, because I still had irregularly shaped spots remaining which would have to be refilled, dried out, sanded, repeat.

Knowing this was not getting done anytime soon, I also was looking for a solution for R2's lights. He typically has 5 sets of lights around his dome and I wanted to replicate that as much as possible. Again, my first attempt was to turn to the Astromech community and they did indeed have a solution for this. You can order the Teecees Light Set for $35 USD and if you also download the associated bill of materials (BOM), then you can buy all the other pieces needed to make it work. Let me take a sec and review the pros/cons of this approach:

  • Pros:
  • After I ordered it, there was no comment about shipping time. I reached out to the help desk and asked if they had a delivery estimate and I also told them I was trying to get them well before Halloween so I had enough time to install and test. The guy wrote back right away and made sure they were in my hands within 3 days. Awesome customer service!
  • The brains behind it is an Arduino Pro Mini (which is a little hard to get these days) and sketches already exist that I swear-to-god just worked out of the box with zero modifications required from me, the user. This never happens in real life
  • It's super realistic when it's done and looks great. I received lots of compliments about this.
  • There's an online community of people who can answer your questions
  • The price point is far cheaper than anything I could have done as a substitute
  • Cons:
  • You have to solder ALL the lights yourself. This honestly took me about 3 weeks off/on. I'm sure a really experienced person could do this in a couple of days but I'm not that guy
  • The BOM told me which LEDs to buy from Amazon, but it felt like these were still not the right sizes for 3 out of the 5 boards. The spacing between lights was ridiculously small and mine became crowded and irregularly placed. It actually didn't matter at the end of the day when it was installed, but I was worried it wasn't going to work out all that well.
  • I found the instructions a bit incomplete. It felt like I had to infer certain steps since I wasn't told them

Overall, I would do it again and buy the Teecees set. Definitely worth it, again, if you have the time.

Step 5: Lady Luck Intervenes

Each year when I'm doing a build, I somehow fall into Lady Luck's field-of-regard and she throws me a bone. This year I had it happen 2 times. :)

  • Unbelievable Story #1: I'm pretty sure my wife and in-laws were reserving their judgment about my homemade dome as not to discourage me. Nonetheless, one weekday, my wife is at a local farm/ice-cream stand for a work event. People are standing around shooting-the-breeze and some of her colleagues have come to anticipate my Halloween builds, so they ask her what I'm up to this year. She begins to explain it and a lot of smiles emerge on people's faces. One person, a relatively new hire, already knew all about the AstroMech community and had even intended on building his own R2D2 droid. Furthermore, he had actually printed ALL the dome parts which ended up sitting in a box in his apartment due to losing interest and realizing this wasn't going to happen. So, he kindly offered them up and said "Do you want them?" Wha-Wha-Wha????? We offered money, an exchange of parts for booze, anything to make it a fair-er trade. He rejected all those offers and instead said he just wanted someone to use them and enjoy them. When he heard this was for my daughter at Halloween, it was a done deal.


  • Unbelievable Story #2: Part of the design is making R2 spin. I knew what I wanted to do and roughly the footprint of it, but I didn't have a motor in mind or even a design yet. And it was the beginning of October. I was at work, informally chatting with a colleague and showing him the dome pieces that basically fell into my lap, and told him about what I wanted R2 to do. After I finish, he tells me to come to his office because he thinks he can help. After digging around for 5-10 minutes he pulls out these two continuous servo winch motors AND it magically already has the exact type of mount I needed. I honestly just had to plug the three wire connections into a motor controller board, mount the thing, and I'd be done. Holy cow!!

Honestly, I was super grateful to these two guys for helping me. Anyone who says they do anything purely on their own is a liar. :) It reminds me of the ending scene in "My Cousin Vinny", where Marisa Tomei chastises Joe Pesci when he laments having to ask for help to win the case :)

Step 6: Assembling the Dome

With the dome pieces in hand, it was a simple act for my wife to figure out what pieces went where (my 3D spatial reasoning is terrible). Once we knew the correct order, we superglued all the pieces together, with additional support provided by binder clips while it dried overnight.

Some folks, the purists, will fill the dome with wood filler (or drywall mud), sand, and repeat this process as many times as needed so the seams disappear. If I weren't constrained by time, this would have been my approach, but I had to go for the "good enough" approach. :)

At this point it was time to paint everything. Again, the purists have identified the exact colors one needs. R2's non-aluminum colored parts are actually a blueish-purple. A few YouTube folks identified the exact blueish-purple. I, again, ain't got time for that. I went to Home Depot and bought an aluminum colored spray paint followed by a close-enough high glass blue spray paint. I applied a couple of coats and then super glued the loose pieces to the dome.

Lastly, I had to install the lights. Not straightforward. There have been iterations on the dome designs one can 3D print. Later versions have holes and spaces to accept screws in the right places. My dome design didn't, but I wasn't complaining since someone very graciously gave me the dome. I basically hacked together a solution with drilling a couple of holes, but I think what I'll end up doing now, is use some kind of mastic glue one can use for PCBs.

With all pieces installed, I supplied power to the Arduino, uploaded the sketch and it worked! Boom!!

Step 7: Continuing the Chassis Build

With the dome taken care of, I had to look back to the rest of the chassis. I still didn't have a plan with how to hold the wings in place, but I could take care of other pieces. I was able to build the nose cone out of rigid foam on the sides, 1/8" plywood on the top, and random pieces of long wood that went down the entire length on the inside so as to provide some backbones to the nose cone. This would be attached to the base via velcro so I could easily take it on/off.

The sides of the X-wing (originally made with 1/2" plywood) would also be supplemented with 2" rigid foam. On one side would be the door that my daughter could use to get in/out of the X-wing, so I had to take that into account when installing the foam.

The next big item was the canopy/cockpit. I had some extra pieces of wood lying around as well as plexiglass. The idea would be to install plexiglass in the front and on the top (since I only had enough left over to do that) and then frame out the canopy as best as I could. There's not much to write in terms of instructions since I kind of made it up as I went along. I'm also not great (yet) with how to figure out the proper angles I need cut to make pieces fit seamlessly. So I kind of winged it (pun intended) until I got something I liked. I strengthened the joints with glue, screws, and some brackets. Finally, I applied a few coats of aluminum paint and then attached everything to the chassis via 3 hinges so it could easily open and close.

Now, it was time to tackle the wings. I had cut the proper slots to accept the wings. The wings themselves were made from yet again 2" rigid foam (to keep it light) sandwiched by two pieces of 1/8" plywood. Everything was glued together via Loctite foam glue. Once they were inserted into the slots, I needed a way of keeping them at the appropriate angles. To do this, I cut out 8 triangular blocks that had their hypotenuse at the "right" angle (pun intended again). These would be attached right below the top slots (2 per slot), and right above the bottom slots (2 per slot), so that when a wing would slide in, the ramps would act as a guide to keep the wings at the correct angles. The bottom wings were easy to stay in place since gravity was helping me with that problem. To help gravity a little more, I added some velcro to the bottom ramps/wings so I could be sure they remained in place well enough.

For the top pieces, I settled on doing two things. The first is I used some bungee cords to tie the wing around the ramps at one spot. The second, is I installed screws at locations below the bottom slot and stretched another bungee cord that hooked onto these screws and held the edge of the wing to the ramp. It actually worked out quite well. If my description was a little confusing, hopefully the pictures (last one) make it clearer.

For the engines I found some thin metal ducting at Home Depot which was relatively inexpensive. I attached those to the chassis via magnets. It made for easy installation and removal.

Last but not least were the guns on the wing tips. If I wanted to be true to form, I would have built it up a bit more than I did. Truth be told, I was nearing the big day and I didn't have a ton of time. The biggest constraint I had was it had to be pretty light so it wouldn't push the top wings out of place. The easiest thing I could think of were to use 4 cut pieces of electrical PVC (1/2" diameter) and then the blasters at the tips were made from some glow-in-the-dark tridents my wife found at the dollar store. Overall, not exactly what I wanted, but as we all know: perfection is the enemy of good-enough!

Step 8: The License Plate

For the past few years, my wife has been awesome at desiging a cool license plate for the build. Since we live in Massachusetts, she takes the traditional border design and adds cools pics and features to it to make it fun and special. This year I was presented a manila folder full of options; it's one of my favorite parts. I settled on choosing the "STARWRZ" one as shown in the pic. All I had to do was fashion a 1/8" plywood backing, plexiglass front, and wooden border which was painted aluminum. I was quite happy with how this came out and it say prominently in the rear for all to see as it moved by you and blew your mind!!

Step 9: The Code and Electronics

Continuing the tradition, I was able to reuse code from previous years, but there were some deficiencies I wanted to remedy. The code used in the past felt a bit buggy. Pressing the arcade buttons didn't always feel as responsive when using built in RaspberryPi (RPi) GPIO functions. This could easily be due to user error, but I wanted to use this as a learning opportunity to do something different and better.

I had two pieces of code to effectively write. One was for the RPi (Python code) that did all of the button control logic, music, and LCD logic. The second was for the Arduino in the back that controlled the motor spinning R2's dome. I split it out this way since the motor was in the back and I didn't have to run more wires to the front (because I'm lazy).

After several iterations, I found what worked best for the Python portion was to use the threading module for the first time. I was also excited by this because I had never used it before so I get to add it to my toolkit. Once I broke out the LCD, keypad, and each arcade button into a separate thread, the code really started to be more robust.

The control panel was pretty fun to make. It would have 4 parts:

  1. 4 arcade buttons to press: one to make R2D2 sounds, one to make gun sounds, one to make engine sounds, one to make R2D2 spin (in retrospect I should have had a single button do the R2 movements and sounds)
  2. A HUD (heads up display) that Luke had in his X-Wing as he flies to blowup the Death Star
  3. An LCD at the top which says the words "Target Range" with a counter that counts down from 10000m and loops through again when it reaches zero.
  4. An external USB keypad that my daughter can control the music. Here's what the keys did
  • key 8: raises volume
  • key 2: lowers volume
  • key 6: next song
  • key 4: previous song
  • key 5: pause/resume
  • key enter: play
  • key 0: stop
  • key 7: loop through songs automatically without waiting for user

The one HUGE issue I was having, however, was with the keypad. This for whatever reason is just not easy to pull in and use via Python. I tried 3 different approaches:

  • keyboard module: decided a big, fat, NO to this because it required sudo to use and the differences between the user/root profiles were too big for me to want to tackle
  • sshkeyboard module: did not work the way the API advertised so I abandoned this pretty quickly
  • evdev module: this worked extremely well, had a simple API, and got me where I needed to be in no time flat

The Arduino sketch was fairly easy to implement. I borrowed some code from online to setup the skeleton (when a user pushes a button) and then modified it for my own Padawan purposes. Both pieces of code can be found on my repo.

Another cool feature was running most of the electronics off my cordless drill battery. I could do this because the DigiAmp+ hat for my RPi can accept anywhere from 12-24V of input voltage, and my batter was at 19.2V. The hat then in turn supplies power to the RPi. My ultimate goal was to then step down the voltage to 9V and run it to the Arduino Uno in the back as well as have another branching point which steps it down to 6V for the motor controller for R2. I did experiment with doing this, but I burned out a motor (which I hopefully can fix) during experimentation, so after that and given time, I pivoted to Plan B and just used a few more batteries than I had planned on.

The last thing to do was to mount the RPi, Arduino, motor controllers, and run wires everywhere. It actually kind of looked impressive when it was fully installed. Almost like I knew what I was doing :)

Actual last point: The scrutinizing viewer may look at my X-Wing and among other things say "yo Smigs, where's the nose cap?" Good question. I started to make it and then realized because this was sitting on a wagon, how would I pull it then? So....no nose cap :)

Step 10: Finishing Up

Just about at the end! Needed to paint and add all the little details to bring it to life. These consisted of:

  • Painting everything white first
  • Painting the red racing stripes down each side of the X-Wing
  • Painting the yellow racing stripe down the top of the nose cone
  • Painting a few details on the wings via online pics
  • Installing USB powered lights all around the nose cone and canopy. This was done because there weren't a ton of places for bigger lights to be installed like in previous builds
  • Glue lights to the back of the engines

With all these done it was time to wrap up this year's build. It was certainly a slog doing this for two months nearly every day, but this was challenging and interesting the whole way through. Seeing Rey's excitement when it was done and it was show time made the late nights, and days of little sleep, all worth it!

Halloween night was magical!! I think the adults were way more excited than the kids :) I was ok with that. My daughter had fun walking next to it, pushing the buttons, sitting in it, getting the compliments -- all of it. I was proud, and happy, and feeling grateful about all the help I had along the way to make it a success. I'm already looking forward to next year!

May the Force be with you!

Halloween Contest

Second Prize in the
Halloween Contest