I was long impressed by BB8 and how it moves. When I then learnt that they made various working models for the film I set about figuring out how to build my own. After a lot of trial and error, misprints and expletives I settled on this design.
This is an easy to build Disney Star Wars BB8 inspired robot. It's controlled by an Arduino UNO over a bluetooth connection from your smartphone.
It's a very simple design, so I hope people can build it and add to it their own enhancements.
Step 1: Bill of Materials
List of items used in this project and where to find them:
■ Styrofoam Ball: http://amzn.to/2CgUr7j
■ Arduino Uno: http://amzn.to/2nSh1iv
■ Motor shield: http://amzn.to/2o1CRzj
■ HM10 Bluetooth model: http://amzn.to/2H8vDlR
■ Motor and wheel: http://amzn.to/2nVeofT
■ Magnets: http://amzn.to/2nY4U2y
■ Battery: http://amzn.to/2sqRJN8
■ Battery Holder (eBay):https://tinyurl.com/y9hwbhf2
■ Hycote White Primer: http://amzn.to/2Enelzp
■ Metallic Sharpies: http://amzn.to/2H69p3L
■ Set of Sharpies: http://amzn.to/2nUI7p7
Step 2: Creating BB8's Spherical Body.
First we need to print the two half spheres that make BB8's spherical body. The files for this and other parts mentioned later on in this instructable are available to download here on Thingiverse: https://www.thingiverse.com/thing:2749613 . I have also attached them to each step for your convenience.
You should print these with a detailed layer height. This will take some time to print but the smaller the layers the smoother the ball will be on both the inside and outside as the printer nears the top of the prints.
Once printed,remove the internal supports and then use some sand paper to smooth out any rough areas where the support material made contact with the print.
Step 3: Begin Assembly...
Print the main chassis file. Unlike the sphere halves this does not require any supports. We then need to use two small screws to fix an Arduino Uno as shown in the image.You don't need to screw all the way in, just enough to hold it in place.You could also use hot melt glue if you prefer.
Step 4: Let's Get Soldering (it's Easy!)
Solder a 16cm length of wire onto each of the two terminals on both of the DC motors.
The motors (in their housings) can then be attached to the internal chassis we were working on in the previous step. Pop the motor into position as shown in the images and then insert a cable tidy into the bottom hole in the side of the motor housing. As you push it through it will pop out the other side. You can then continue to pull it through then feed it back through the higher hole and then tie the zip tie.
Trim the spare piece off but don't discard it. Take the piece we just trimmer off and insert it into the hole at the far end of the motor which is nestled into the chassis. Push it in until it stops and then trim it flush.
Repeat the steps on the opposite of the chassis for the other motor.
Step 5: Solder (easy Again) Wires to the Motor Shield
We then require four male to female jumper wires (at least that is what I think they might be called - the type you would use on a breadboard). These will be soldered onto the following pins on the breadboard to allow us to connect the Bluetooth module later.
(If you have four different colour wires available I would use four separate colours and keep a note of which colour was soldered to which pin. This will make things a little easier later).
The first wire should be soldered to pin '1' on the motor shield.
The second wire should be soldered to pin '0' on the motor shield.
The third is soldered to a 3.3v pin.
The fourth and final is attached to ground. This can be pushed through the hole adjacent to the ground pin on the motor shield and soldered from the underside of the board.
Whilst we wait for the solder to cool slightly we can take the opportunity to add two additional cable tides around the back of the DC motors which encompass the wires we soldered to them. This is to help prevent an stress or movement from damaging the soldered connection.
We can now fit the motor shield onto the Arduino Uno. This is done by pushing the pins on the underside of the Motor Shield onto their corresponding female receptors on top of the Arduino board. Be careful to ensure that the pins are all aligned so that none risk being bent or damaged.
Step 6: Connect Motor Shield to the Motors
We can now connect the motors to the motor shield.At the moment the polarity is not important as we will correct this if required later in the Arduino code.
Take both the wires from one of the motors and attach them to the two terminals closest to where 'M2' is written on the board. The two wires on the other motor can similarly be attached to the two terminals closest to where 'M1' is written on the Motor Shield.
Step 7: Add Power Supply
For this stage you will need to add some hot melt glue or similar to the back of the battery holder and attach it to the chassis as shown in the images. It is important to ensure that the side where the wires leave the battery holder is facing the same side as the Arduino is mounted as we will be connecting the two together.
Take the wires from the battery holder and screw them to the power terminals on the Motor Shield. The positive (red) wire should be connected to the top most terminal, and the negative to the terminal below that.
Step 8: Add the Wheels
This is a very short step, you may have already done it.
Attach the wheels. :)
Step 9: Power and Upload the Code
Before we insert the batteries into the battery holder we need to remove the jumper that connects the power going to the terminals on the motor shield (in this case, our battery pack) to the Arduino. Don;t loose the little jumper as we will need to replace it after we have completed programming it.
Once you have done this, add four AA batteries to the battery holder and connect the Arduino to your PC with a USB cable.
Once this is complete you can upload the code to the Arduino. You can find the code here: http://diymachines.co.uk/?p=71
I'm not going to go into how to upload the code. There are plenty of tutorials that cover how to do this, both here on instructable and elsewhere on the internet.
Once the code has uploaded you can open the serial console windows in your Arduino IDE and send it some commands.
- Send 'F' - Asks it drive forwards.
- Send 'B' - To have it go backwards.
- 'L' - Turns it left.
- 'R' - Takes it to the right.
- 'S' or any other character - Stops it.
If when you ask your robot to drive forward the wheels turn in opposite directions we can make a change in the code to fix that. Head to line 45 and change the word 'BACKWARD' to 'FORWARD' (capitals is important - this is case sensitive). Then on line 53 change 'FORWARD' to 'BACKWARD'. Once you have made the changes don't forget to re-upload the code.
Once everything is behaving as it should you can disconnect the USB from the Arduino and replace the jumper which we removed earlier. You should now find that the battery back is powering both the motor shield and the Arduino. :)
Step 10: Bluetooth
Now to connect the HM10 bluetooth module.
Take a look at the attached graphic. If you took note of which colour wire you attached to which pin it should goes as follows:
- The wire attached to 3.3v should be connected to 'VCC'.
- The wire attached to Ground goes to 'GND'.
- The wire attached to pin 0 / Tx on the motor shield should connect to 'RXD' on the HM10.
- The wire attached to pin 1 /RX on the motor shield connects to 'TX' on the module.
It's important to note how the Arduino's talking pin 'TX' (for transmitting) is connected to the HM10's listening 'RX (for receiving) and vise versa.
If all goes to plan the LED on the Bluetooth module should begin to flash. This can now be tucked into its living place behind the Arduino but in front of the column.
Step 11: Connect Your Phone
On an iPhone or iPad's app store their is a free app available called 'HM10 Bluetooth Serial Lite'. I use this to connect to the Bluetooth module and then send the same serial commands we did earlier using the PC. 'F', 'B', 'L', 'R' and 'S'.
If you would like to create buttons on your phone to control it instead I found the pro verison 'HM10 Bluetooth Serial Pro' worked just fine for me.
I'm sure that there are plenty other apps available that will allow you to to send serial commands over the Bluetooth connection. I don't have an Android device so perhaps someone could recommend an app for other if they find one that works well. I would be grateful. :)
Step 12: Test Drive
You can now pop the chassis we have been assembling into one half of BB8's body, add the other half on top and temporarily join the two with some Sellotape (if the tongue and groove fitting is not enough to hold it together).
Take it for a test drive and admire your work so far.
(Without the head attache yet it is hard to keep track of which direction is forward - but this will get easier soon).
Step 13: Print the Heads Base
Print the file for head's base. Although it didn't really matter what colour we printed the main body, I would highly recommend printing this component in white.
Step 14: Attach Magnets to Chassis
Using hot melt glue, attach three 6x3mm Neodymium magnets to their respective places in the head of the chassis. You need to ensure that their north poles are all aligned. That is, they all need their poles to be facing the same direction.
Step 15: Attach Magnets to Head
We will use the magnets in the chassis we added in the previous step to help us align the magnets in the head.
First place the chassis down and on top of this add one half of BB8's body. On this lay two pieces of either tissue paper or loo paper.We can then take three additional Neodymium magnets and allow them to locate both their position and orientation (that is their south and north poles) above the three magnets below them in the head of the chassis.
Once they are in position add some hot melt glue to the top of them and position the printed base of BB8's head onto them trying your best to have each magnet land somewhere around the internal ring as pointed to in the images.
Let this cool, then you can remove it and gently remove the paper from the magnets. The paper can then be recycled as we no longer require it.
Step 16: Styrofoam Head
It's very important to keep the weight of the head as low as possible for it to work. I tried many different ways of printing the head but nothing I could design and print successfully was as light and convenient as Styrofoam.
So we will cut a 120mm Styrofoam sphere in half and later glue this to the base of the head.
The first time I tried to use a bread knife to cut the ball in half. For the most part it worked, but it made a lot of mess (which didn't make me very popular with the other half!) and left a very jagged edge. To solve this I designed a printable battery powered hot wire cutter. If you don't already have a hot wire cutter you can find how to make mine here on my YouTube channel: https://www.youtube.com/watch?v=l8lAdbMGkgU
However you choose to go about it, we need to cut the ball as precisely as we can in half.
Step 17: Add LED to Head
Begin by soldering an LED (I've chosen red) to a C2032 (the big coin like lithium battery) battery holder. You can then pass the LED through the hole in the base and glue the battery holder to the underside (the side with the magnets) of the printed head part.
On the other side, carefully bend the wires so the very front of the LED is inline with the edge of the printed part and then add some hot melt glue to keep it all in place.
Step 18: Join the Head and Styrofoam
If you need to, using a knife of similar make a notch in the Styrofoam ball to accommodate the LED.
Spread some Hot Melt glue around the perimeter of the printed part and attach the Styrofoam to it. Once it's cooled we can fill any gaps with Polyfilla or similar. Once the filler has dried, use some sand paper to blend it in with the rest of the head.
Step 19: Decorating the Head - Adding Colours
Start by covering the head with several coats of white acrylic paint. This help to blend in all the shades of white whilst also sealing the Styrofoam. If the Styrofoam beads are not sealed then they have a habit of absorbing other materials, swelling and then ruining the finish.
Using a pencil you can begin to sketch out the patterns. Do this lightly in case you make a mistake.
Then I used selection of both metallic and non-metallic sharpies to colour in the details. To help this remain more defined I also went back around the outside of the various marking with the pencil afterwards, this time I made a more deliberate mark.
Step 20: Decorating the Head - Adding Shape
For his antenna I cut off the end of a cheap plastic handled paint brush and then coloured it black with a sharpie (as I had non with black handles).
I then created a hole with a screwdriver to insert it into. Added a some glue to it end and inserted it into the hole we just made.
Next print the 'eye' and 'sensor' parts in black and attach them to the head with some hot melt glue.
Step 21: Decorate the Body.
Before we spray the two parts of the body it's a good idea to wipe their exterior with a slightly damp cloth to remove any plastic dust which might remain from sanding earlier. Once this is done and they have dried we can spray them with some white plastic primer.
I'm using some Hycote White Plastic Primer, you'll find a link to it in the BOM at the beginning of the article.Follow the instructions on the paint can and after you have covered it with several coats and allowed it to dry properly we can move onto the next step.
Use some masking tape to join the two halves of the body together whilst we decorate. If you use four pieces and space them evenly around the equator of the body it can be used to help space out the decals we will be drawing shortly.
BB8 has six large decals spaced equally around his body, one on the top, one on the bottom then four around his waist.
As with the head, you can use the template to trace the decals confidently onto his body. Once the outline is on you can use sharpies again to add the colour. Repeat this all the way around the body including and excluding various sections of the template to create all the unique shapes.
If you find that your are smudging your pencil outlines don't worry. I found it helped add to the weathered look of my robot.
As with the head, once I was done with colouring in one decal I re-outlined it more heavily in pencil to help define it with a clean edge. It also helps give it the paneled sheet metal effect.
If you're not sure what to draw you can have a look at my designs above or I would recommend searching the internet for images of BB8 to use as inspiration.
Step 22: Complete!
Well done. You've finished your BB8.
Please add your own enhancements or flourishes to it, you could even create BB9E if you changed the decoration stages and trimmed a bit of his head!