Automated LEGO X-Wing

1,471

11

2

Posted

Introduction: Automated LEGO X-Wing

We absolutely LOVE the new LEGO Star Wars sets that have come out over the last couple of years. They're well designed, fun to build, and look great. What would make them even more fun is if they also moved on their own!

We took an off the shelf LEGO X-Wing set and automated it so the wings open and close on their own. Even better, we added sound effects and lighting effects! But if that isn't enough we also added a motion sensor so that it would activate when someone walks by. Overall this project isn't overly difficult to do, but does take awhile and requires a healthy amount of random Technic LEGO parts to built the gear box area.

Step 1: Parts Needed

Electronics

LEGO

  • Poe's X-Wing Fighter (75102) or Resistance X-Wing Fighter (75149)
  • Small Beveled Gear
  • Large Gear
  • Size 12 Axel
  • Worm Gearbox
  • 2x4 With Holes
  • Various LEGO Technic Parts

If you need various LEGO Parts try using BrickOwl.com or Bricklink.com, though you can easily substitute parts you have for a lot of this project.

Step 2: Video Guide

We edited up a video guide on how to do this project as well. If you're not the kind of person who likes to read, this would be a handy resource.

Step 3: Build Your X-Wing

Build your LEGO X-Wing as normal.

Remove the launchers from the wings as they look weird.

Use either Poe's X-Wing Fighter set (75102) or the Resistance X-Wing Fighter (75149). They're the same model just different colors.

Step 4: Remove the Wings

Take off the rubber bands.

Pull the two pins that hold the wings onto the body.

Put the wings to the side.

Step 5: Remove the Bottom Pieces

Start removing pieces from the bottom of the X-Wing.

Keep going until you get to the internal gear box.

Pull off the small back "storage area".

Set all those pieces aside for later.

** We found it really helpful to use a LEGO Prying Tool (which comes with the X-Wing sets) to get the pieces off. Some of them can be on there pretty tight.

Step 6: Add the Bevel Gear

Insert a size 12 Axel through the back rear of the model.

Carefully, and with some luck, get a 1/2 Brush onto the end of the axel.

Lastly get the Bevel gear on.

Push the rod all the way in so that it connects with the other rod.

This is the most difficult part of the ENTIRE process. Remove more X-Wing parts if you need to.

Step 7: Rebuild the Bottom

Rebuild the entire bottom of your X-Wing. Refer to the box and original directions.

Step 8: Add Bushings to the Axel

You'll need 4 x Bushings, 3 x 1/2 Bushings, 1 x 2x4 Plate with holes, 1 x Large Gear.

Start by pushing one 1/2 Bush down to the end followed by two of the full bushing.

Add plate, which should stick on the back the X-Wing.

Then start with a 1/2 Bush, followed by two of the full sized Bushings, then the Gear, and lastly a 1/2 bushing.

Use an orange LEGO prying tool to push the parts into the X-Wing. If you pull the axel out you'll have to take apart the bottom all over again.

Our pictures are not 100% accurate to our description above. We described the order in which our final build used, which required us changing a couple things after we had originally taken photographs.

Step 9: Attach the Wings

Put the Wings back on the same way you took them off.

Attach the rubber bands as well.

Step 10: Built the Base and Supports

Use a large LEGO plate of some kind as your base. You'll need one with room for the gears on the back.

We used some tall 1x2x5 bricks (2454) to make supports. You can use whatever you want provided that it gives enough clearance for the wings and Servo.

Step 11: Build the Gearbox

We used a Gearbox for Worm Gear (6588) to translate motion from the Servo to the large gear. You'll need to build your own setup based on whatever LEGOs you have available.

You'll most likely have to fiddle around with everything to get your spacing correct. Use our pictures as a guide.

Step 12: Connect the Gearbox to the X-Wing

We added some 1x4 Technic bricks for the end of our size 12 Axel from the X-Wing to go into. Attach those to the Axel.

Place the X-Wing onto the base plate so that everything lines up.

This can be annoying. If everything doesn't line up, try again. Take it slow and easy.

Step 13: Build the Servo Attachment

We're using a 9G Continuous Rotation Servo with some laser cut acrylic adaptors. We include those in our kits, but we also have those files available for download.

Screw the Servo into a Servo Mount.

Press on the Horn.

Using a small gear, two 1/2 Bushings and some size two rods to create the horn adaptor.

Press a size 6 or 8 Axel and a full sized Bushing into the middle of the gear.

We used a couple of 1x4 Technic bricks and some 1x4 plates to space everything. You might need to use a different amount of plates.

Step 14: Connect the Servo and Gearbox

Pull the axel off the servo and push it into the worm gear in the gearbox.

Press the Bushing up next to the worm gear.

Connect everything to the Servo.

Adjust your pieces to get the spacing correct.

Step 15: Build the Robotics Board Platform

Use two 1x6 or 1x8 plates to create a small platform for the Robotics Board to sit on.

We need to do this since the board won't sit flush on the base plate. Feel free to do some fun designs of your own, just make sure Ground and Pin 11 are filled with a LEGO Stud.

Step 16: Add LEDs

Use two Crazy Circuits SMT LED boards to add lights to the bottom of your X-Wing. Make sure you're using Nylon Conductive Tape as regular tape will break as the wings move.

Place your boards on the bottom of each wing.

Run Conductive Tape from the Positive on one board to the other board.

Run Conductive Tape from the Negative on one board to the other board.

Don't cover up the spots where the supports that go from the X-Wing to your Base go.

Step 17: Connect LEDs to the Robotics Board

Connect your X-Wing back to the base.

Run Tape from Ground on the Robotics Board to the Ground on the LED Tape.

Run Tape from Pin 11 to the Positive LED Tape.

Since Conductive Tape is not reliably conductive on the bottom you'll want to fold over the end that connects to the LED Tape. Then tape that down with another piece of Tape.

We found it helpful to attach the lines of Tape BEFORE we reattached the X-Wing. We just cut really long lines of tape and left them hanging while we set the X-Wing on the base. After that we connected everything.

Step 18: Connect the Servo and Gearbox

Plug the Servo into the D3 Pin set.

Step 19: Connect the Range Finder

Reference the Diagram above for the next two steps.

Connect VCC to a 5V Pin.

Connect Trig to A4.

Connect Echo to A5.

Connect GND to a GND Pin.

Step 20: Connect the MP3 Player

Use the diagram again to help you out.

Connect GND to a GND Pin.

Connect VCC to a 5V Pin.

Connect TX to 5.

Connect RX to 6.

Online documentation for this board is weird. Trust us, this is the correct wiring.

Step 21: Find a Sound Clip

We grabbed our sound clip via a YouTube Video. You can use any sound file as long as it's a .WAV or .MP3. (We can't give you a sound clip for Copyright reasons.)

You'll want to use just one sound clip for our code. Once you find one put it on a micro SD card formatted in FAT.

Put the Micro SD Card into the MP3 Player.

Make sure you take note as to how long your clip is, as it will be quite helpful when modifying the code.

X-Wing sounds are great as well as some classic Star Wars music.

Step 22: Modify Your Code

If you've never used our Robotics Board before you'll need to read the user guide and install the right software and drivers.

You'll also need to grab and install the NewPing library as well.

New line. Open up your Arduino software and copy our code into a new project window.

Lines 30 & 31 control how long the Servo will move when opening and closing the wings. We find that 20000 ms is about right. You can change the time by changing those values.

Line 91 controls how long the Servo pauses to wait for your audio clip. Our Sound Clip is about 25 seconds so we have it set to 25000 MS.

The code has the LEDs come on once the wings open, then turn off once they're closed.

Step 23: Have Fun!

Attach some Speakers to the MP3 Player and run the code. (Powered Speakers with some Volume Control work best)

The Servo will sound horrible. Thats expected.

You'll most likely have to modify your code several times to get the timing correct.

You'll also most likely have to go back and modify your gearbox or servo holding areas. The strain may push things apart on you, so modify where necessary.

Share

    Recommendations

    • Science of Cooking

      Science of Cooking
    • Microcontroller Contest

      Microcontroller Contest
    • Spotless Contest

      Spotless Contest
    user

    We have a be nice policy.
    Please be positive and constructive.

    Tips

    Questions

    Comments