Introduction: Bluetooth Controlled Rover (BB8)
This instructable is my first so don't be too hard on me. Anways this instructable will be based on an arduino, hc-06 bluetooth module and an android phone. You may have seen something similar to what I have just explained and in fact this actually isn't an original project.
I used all sorts of ideas from ASCAS, Jrbedard, Bigdog1971, and NamedJohnny. I combined all of their BB8 or rover projects into one while also adding a few modifications of my own both in the hardware and the software. You can also check out their tutorials if you want to, but I guarantee you mine is both the cheapest and the easiest to build (unless you already own a 3d printer - in that case us Jrbedards tutorial).
All that put aside, there is just one more thing before we get to building. The way I have built this project allows you to unlock your imagination and maker skills to build something besides what I have shown you. In fact that is the reason BB8 is in parentheses in the title - "Bluetooth controlled rover (BB8)"- It is because you don't need to build a BB8. I have divided this project into two halves. The electronics and the BB8. Use the electronics, but use your imagination to create something besides a BB8. The power to do whatever you want with this project is in your hands.
Before that gets too deep, lets actually start. So... cue the materials!
Once more thing before we cue the materials. You will probably see, throughout this instructable a lot of "if you need extra help, look at this" or "if you aren't experienced, look at this". Don't worry about this, I'm not saying you can't do it. I just added all of those extras because when I was looking over my own instructable none of it made sense to me, which is why I added everything.
Step 1: The Materials
So as I mentioned above, the project is divided up into two parts, so in coordination with that the materials will be divided up the same way. Also as I mentioned, what you do with the materials (especially the BB8 part) is up to you.
- Arduino Uno (R3 is fine) *
- Adafruit motorshield* (I used the motorshield V2.3 in my instructable, but make sure to buy the one I linked, NOT THE V2.3!!! - you'll see why later) I will be drilling this in your head in the coming steps, but as long as you bought the motorshield that was hyperlinked your good!
- HC-06 bluetooth module*
- Motors (x2) (Select one of the 12 volt options) *
- 12 volt Battery pack*
- snap connector (you can probably find these even cheaper, but I've provided a link just in case)*
- wires Male to female(if necessary)
I have hyperlinked all the materials listed above. Wires should come with the bluetooth module and motors (which are the only things needed for connection, but if not use the link for wires that I had provided.
- 10x10x2 styrofoam board (will be needed even if you are not building BB8 - will be used for platforming)*
- Solder* (you can get any type of solder you want - I just hyperlinked the first one I found on amazon)
- Breadboard (same message as with the solder - except you most likely won't use a breadboard in this project)
- Wire to upload arduino code* (you can get any size you like, but I find that longer is better)
- Adafruit motorshield stacking Headers*
Tools: (I haven't hyperlinked any of these as most of you probably have these items - if you don't have these items its a pretty easy task getting your hands these items anyhow)
- Soldering iron*
- Nuts and bolts**
*Necessary for the build
**Not entirely necessary but good to have
***Only necessary if your are building the BB8 part with me
Step 2: ELECTRONICS
Now that we have got all of our materials together lets start with the electronics, as this part, no matter what you are building, will remain consistent throughout most peoples builds. Of course you can make your own small little modifications, but for the most part it will remain the same.
To start off grab your arduino and adafruit motorshield as these two are both the most crucial elements to the build as well as the two we'll be starting off with. Of course everything is crucial to the build as without the wires we wouldn't be able to connect anything or without the motor we wouldn't be able to have any actual rover-like movement. What I meant by the statement is that these two are sort of the brains of the operation and without them none of the other parts would be able to cooperate so seamlessly.
Step 3: Arduino+Adafruit Motorshield+Stacking Headers
To start this off we'll need to build our brain. So start by taking the motorshield and the stacking headers and following either my instructions or the detailed instructions provided here towards the bottom of the page. They are both very alike.
Step1: Start by taking the stacking headers and soldering them into the holes where the pins that attatch into the arduino are.
Step 2: Once everything is soldered neatly, simply stack the motorshield over the arduino to create a sandwich of electronics. It is almost like a simple equation, Arduino+Adafruit motorshield+Stacking headers=Brains of the operation!
The steps can be reversed as well, if you find that to be easier.
IMPORTANT!!! Also you might realize that I have a different motorshield than you. That is because I had you buy the V1 of this motorshield. Why? You may be wondering. This is because the version of the motorshield I told you to buy is an older model, but it is what the code I provided is made for. If you bought the V2.3 which I have you will need to modify the code for the V2.3 which is why I had you buy this version rather than mine. It makes the whole coding process simpler, faster, and I don't need to explain any of the modifications.
Step 4: Prep the Motors
Now that we have the "brain" down lets build our motors. When I say build I don't mean actually buildthe motors, but if you are using the motors I suggested we have to nail down the wheels, and shaft, while also attatching the wires.
Step 1: After taking things out of the plastic bag (which took a lot of effort - at least for me) attach the golden-ish shaft to the motors shaft. Once that is done you will see a bag with screws, use the two tiny black screws and put them inside the holes that are on either side of the golden-ish shaft. This may take a few tries as getting the aim to put the tiny screws inside the tiny hole is a difficult task. Once your done with that, tighten the screws with the screwdriver that was given with the motor. Once it is tightened well enough, your ready for the next step.
Step 2: Attaching the wheel is pretty self-explanatory. Just put the wheel on to the shaft. It's as easy as putting a square peg in a square hole (A square hole? - tell me what it is actually called in the comments). Anyway once that is complete screw in the given metal screw. The wheel and shaft should now be securely placed on the motor.
Step 3: Now take the six wires given and put the white attachment into the white holder. It should be pretty self-explanatory. You might be wondering what we will do with all 6 wires, but in fact we are only using the red and black wires or the + and - wires. The other four are used for the CPR encoder which we have no use for, at least in this project.
Now that you've built one motor.... its time to do it again! Do this same exact thing on the other motor and we'll be ready for the next major step.
If my writing is just nonsense to you, the picture(s) given above will probably help you a little more.
Step 5: Screwdriver for Adafruit Motorshields Terminals
Finding a screwdriver that can fit inside the motorshields' blue terminals is hard in itself, but to have one that actually works is even harder, so to build a makeshift one, I suggest using the headers that came with the motorshield. Not the stacking headers, but the regular ones. If they didn't come with your motorshield, because as I mentioned countless times before I have a different motorshield than you (which is all for the better).. If they didn't come with your motorshield, then you may have to buy them, and I'll provide a link to them here.
Step 1: Break apart a set of 2 regular headers
Step 2: Make them small enough to fit inside by compressing them together
Step 3: You've built the makeshift screwdriver! Now just use it.
It generally works, but if you would like to get a more professional screwdriver I suggest buying one made for the motorshield.
You can also check the video below to see both how to use the screwdriver and how helpful the screwdriver is.
Step 6: Putting It All Together
Now that we have everything prepped and ready to go, its time to put it together. While this may seem like a daunting task it is no harder than putting together a lego set with an instruction manual. Following the picture above will be helpful or if you want a more detailed explanation look at the steps I have provided below. Unless you know exactly how to connect everything I suggest looking at the steps below. This picture is mainly for reference.
For the more experienced though, this picture will probably be all it takes to understand how to put everything together
Step 7: Power It Up
First things first. We need to put some power into our rover so take a snap connector and your adafruit motorshield/arduino stack and we'll be set.
Step 1: Take the red and black wires of the snap connector and put them in their respective terminals. Look at the picture above for reference or look at the picture a step before this one that shows the whole thing*.
Step 2: Once they are placed in the terminals they will probably keep coming out, so to prevent that we need to screw them in. Use either your makeshift screwdriver or an actual one and screw these wires in.
Step 3: Take the twelve volt battery holder/pack (whatever you want to call it), and snap it on. Don't put the batteries in just yet (even though the picture shows it with batteries inside)
Now that we have our main power supplier we can move on to the motors.
*From now on we'll be calling this the MAIN PICTURE or if I get bored of writing MAIN PICTURE, I'll write MP
Also, just to let you know, all of the interconnections for both motorshields will be the same, or at least similar in a worst-case scenario. The only difference is the coding, which, again, is made easier on the motorshield I had you buy.
Step 8: Time to Platform
Before we connect the motors or do anything else we need a proper platform for our electronics to rest on. Good thing I had you buy that styrofoam board, am I right?
In the middle of the board leave enough room to put your styrofoam balls for the BB8. If the BB8's not your thing, make your own mods so that the placements work for you.
Place the adafruit motorshield somewhere towards the front middle. Place the battery pack right near it. Now as we go along more things will be added such as the motors, bluetooth module, etc. Place them in a way that you think is right.
As always check the pictures above for any clarifications. You might notice the excess of wires in the picture but don't worry about those, just look at where the motorshield and battery pack have been placed.
Step 9: Add the Motors
Now that we have the platform complete we can add on other stuff. In this case, by other stuff I mean the motors. On both sides of the platform either glue down or nail down the motors. Since I didn't have nails that fit through the motor (either too small or too big), I glued the black plastic part down to the styrofoam.
Once both motors are glued in position follow these steps:
Step 1: Take the motor closest to the M1 (or motor 1) terminal and connect the wires as seen in the MAIN PICTURE
Step 2: Only connect the red and black wires as those are the positive and negative wires that supply power to the motors.
Step 3: The rest as mentioned before are for the CPR encoder and can be left to the side, no need to worry about them.
Step 4: Now take the motor closest to M3 (or motor 3) terminal and connect the wires the same way (as seen in the main picture. The same rule applies, the CPR encoder wires don't need to be connected.
- If in the end, when the program is uploaded the motors don't work properly try switching around the wires
If it looks similar to the pictures above or the MAIN PICTURE then you got this step correct, and we're ready to connect the next and last piece of hardware.
Step 10: Bluetooth Module Connections
This is the final piece before we start programming and probably one of the more tedious interconnections. Of course that shouldn't imply that it is extremely hard as although it is more tedious compared to the other fairly easy connections this one requires a slight boost in brain capacity or brain power. Although not by a huge margin.
Step 1: Put the female side of the wires on the bluetooth modules connectors.
Step 2: Once you have the four wires on the four slots of the bluetooth module, its time to wire them to the arduino/motorshield stack
- Tx of bluetooth module - Rx of Arduino*
- Rx of bluetooth module - Tx of Arduino*
- GND of bluetooth module - GND of Arduino*
- VCC (3.3-6 V) of bluetooth module - 5 V of Arduino*
*By arduino I mean the stacking headers on the motorshield - just putting that out there to prevent any confusion
The MAIN PICTURE doesn't do you any favors with this specific wiring, if you have any questions be sure to let me know
Now we're done with all the wiring and our rover should look somewhat like either the MAIN PICTURE or the finished picture I've put above (minus the batteries). Since the hardware is now complete we shall march forward ... to the programming!
Step 11: Programming the Rover
As I have mentioned countless times before, We're done with the hardware!
Also, this is where your motorshield comes in. This is where you realize that it was a good thing you bought the cheaper, older motorshield rather than the V 2.3. All you need to do is download a zip file and upload the code it can't be said any easier than that. For the V 2.3 on the other, you would have to go through what I went through which is the tedious process of modding the code till you finally get it right. So as you can see I did you a favor. You can thank me now. No, I'm just kidding, but hopefully the motorshield I recommended will be helpful for you as you complete this step. The only reason I have been mentioning this so much is because I didn't want anyone to get confused as to why I have a different motorshield than them.
So lets get on to programming, but before we do that, I'd like to thank BIGDOG1981 for this code.
Before we do anything make sure you have the Arduino programming software, the software that allows you to program your arduino. If you don't have it downloaded on your computer, go to this link and quickly download it so we can complete the rest of the project.
Once the software is downloaded go to this github link: https://github.com/Arduinobymyself/ArduinoRoverBot As I mentioned before a lot of this code was made by BIGDOG1981, so again I would like to thank him.
Anyways once at the link follow these next few steps. If you know how to upload a code that involves adafruit libraries and such, these next few steps can be skipped.
Step 1: Once at the main page you'll see something near the top right-ish area that says "Clone or Download". Click on it, and you will be given two options. Click on "Download ZIP"
Step 2: Open the Zip File towards the bottom of the page and once you are at either Finder or File explorer (depending on the operating system, Windows or Mac), click on ArduinoRoverBot-master. You will be directed to a new page with 3 options. Click on Arduino_Rover_Bluetooth_V5.ino.
Step 3: You will probably be redirected to the Arduino software that you either just downloaded or you had downloaded in the past. If you aren't redirected that means you probably didn't download the software, or it didn't get downloaded properly. Either way download it again.
Step 4: Don't upload the code just yet though as we still need to download the adafruit motorshield libraries. You can download them here: https://learn.adafruit.com/adafruit-motor-shield-v...
Step 5: Once everything is set Click Verify on the Arduino IDE. If it says "compiled" that means the code is good to go and you can upload it.
Step 6: Make sure that pins 0 and 1 or TX and RX are not connected as that will cause harm during the upload.
Step 7: Take your a male to b male usb cable and plug it from your computer to your arduino in their respective slots. Once thats done click upload, it should take a few moments and your code will be put onto the arduino.
Your done! In the next step we'll begin testing the rover.
Step 12: Testing
Once the code is uploaded you can now put batteries into your battery pack and snap the connector. Both the HC-06 bluetooth module (Red) and the Motorshield (Green) should be glowing with their respective LED colors.
Download the android app on your phone. If you own iOS devices only, this won't work, but check Amazon for cheap android phones as there are quite a few. I found one for just 20$ .
Here is the link to that: https://www.amazon.com/Motorola-Android-Prepaid-Mi...
The app is called Arduino Bluetooth RC car and I've provided a link to it over here.
To test it out click on the settings icon and click search for bluetooth connections
Once the bluetooth module receives the call the LED should turn from red to green. Once that is complete, start testing it out and if it works as intended your done!
We have built the rover!
If the bluetooth module doesn't glow red at all that means the code needs some modification as this code was built for adafruit motorshield V1. If you need any help be sure to ask in the comments.
As I mentioned before I have modified the code but I haven't put the modifications in instructions as that would just make it confusing for you and take me a lot of time. I also don't know how to upload a file to github, so my code is obviously not up there. So again feel free to ask questions in the comment section.
Step 13: BB8
Now this my friends is either where we part or where we continue. Remember towards the beginning when I said "you can do whatever you want with this". Well this is that part. You no longer need to continue with these steps. Maybe you can build a car, maybe you can put this at the bottom of a scooter so you can control the scooter via bluetooth. Its all up to your imagination.
Or if you want you can continue to build the BB8 with me but your going to need to get the 2 styrofoam balls that I mentioned the materials.
Lets get cracking.
Also before we continue, the rest of this tutorial is mainly arts and crafts, no longer will we be needing any electronics.
Step 14: Crafting the BB8
While the first steps were relatively easy, these next few steps - although only involving arts and crafts - are much harder.
So although I will provide instructions, you can look at this guys instructions, or do it yourself.
The next few steps will provide (mostly) detailed instructions on the crafts part of the BB8. If you are not building a BB8 and instead are using the electronics for something such as - as I mentioned many times already - a car, then you will not need these next steps and you can use your creative juices to figure it out on your own.
For my BB8 builders I also encourage you to use your creative juices and mainly use my instructions as a guideline.
Anyways lets get started.
Step 15: Prepping the Styrofoam
Get your two styrofoam balls (the 10 inch and the 6 inch one), or if you went cheaper, the 8 inch and the 5 inch one.
Either size, this step still applies to both of them. With the smaller ball (6 inch or 5 inch) we're going to need to cut it in half, or if your one step ahead of me you may have already bought a half-ball, which means you can skip this step. Look at the pictures above for reference.
Once you have the 6 inch ball cut into a half, sand down the imperfections on both balls, as there a lot, especially in this type of styrofoam. Once it isn't quite as rough anymore you can move on.
IMPORTANT!! The "How BB8 should look as of now" picture is just showing how both the pieces put together might look. Make sure not to glue the 6 inch ball to the 10 inch ball yet, that picture was just for reference. Keep the balls separate.
Step 16: Draw the Head and Body Shapes
As you know BB8 has a vast array of circles and other shapes on his body. To start of, we will draw the circles. To do that use something that is already circular, in my case I used a bowl. Make sure to use something that is in proper proportion with the BB8 and its shapes. I used a skinnier cup for the inner circle.
Once I got all 5 circle shapes down, using some pictures of google images I drew some of my own designs. In the end it still looked like BB8, so as long as that happens, do whatever you want. In fact in most of them I didn't draw any designs at all, I just free painted (which we will do in the next step) till it looked nice.
For the BB8s eye and head part I used a similar idea. Except considering the head is smaller I used things like cups and vials rather than bowls and plates. I obviously didn't draw every detail, but if you would like to, go ahead.
You can see the head picture above (you'll know its the had because it is the half circle one), and if your drawing looks like BB8s head we're ready to start painting.
Step 17: Paint the Body and Head
For the body I used gray and orange paints, and for the head I used gray orange and black. If you would like to whitewash it while making the balls smoother you can do that, but I decided not to because of my lack of white paint and... laziness. It will definitely make it look nicer, in the end. You know what they say.. "its the little things".
Once you have your orange, gray, black, and possibly white paints, put them on some sort of a paper plate and use that as a palette. Make sure you have a cup of water and a couple of different paint brushes for both intricate details and painting big areas.
The first picture is the body and although you only see one circle there are other yet to be painted (at least at the time the picture was taken) circles around the body. Also that one circle only showcases one design that BB8 has and in fact BB8 is made of multiple designs. Check out more pictures on google to see both colors and design.
The second picture, which by now you have probably figured out, is the head. You will probably notice that not everything is on point, and there is not all the detail that there could have been, but overall it still looks like a BB8. Again, check out pictures on google for reference. They really help.
Step 18: Attach Everything Together
Now we have all our parts completely done, they're just, as I mentioned, in parts. So to take the parts and make them something great we're going to need to attatch them!
To attatch the head to the body use some sort of adhesive. I used glue, specifically gorilla glue, to glue the had down, but you can use whatever you like
To attatch the whole head+body combo onto the base with the electronics we're going to use the empty space that we left in the middle to do this. Stick some (2-4) nails from underneath till they poke out significantly. Then simply attatch the BB8 on top a lot like when we attatched the motorshield on top of the arduino. Now your done!
Step 19: THE END
Now that we are done with both the electronics and the BB8 it means we are done with the whole thing. Give yourself a pat on the back and start riding this BB8 using the app. Check out my video above too! I tried to give the video an action movie vibe, if you would like a video that showcases the BB8's movement ask in the comments below and I will be sure to upload one soon. The reason I haven't done this is due to the fact that I'll probably need someone to help me film while I'm controlling. In fact I already tried to do this, but as you can probably imagine controlling in one hand, while filming in the other is quite hard.
Although it isn't a full 1:1 ratio BB8 it is about half the size of the actual BB8, which is pretty good especially for the relatively cheap price we have built it at. I think around a 100$? Show me your versions of the BB8 or other stuff - as I mentioned as an example, cars - below.
Also if you liked this project, enjoyed building it, and enjoyed the finished project, be sure to vote for me in the Remix contest and the first time authors contest.
Thanks a lot! If your really into building BB8 stuff be sure to check out ASCAS's instructable or if your going on a much larger scale check out BB8 builders club, I also used their ideas as some inspiration.
Hope you enjoyed this instructable!
dan du made it!