Some friends and I are building a smaller scaled R2-D2 and we're wondering what device to use to control it wirelessy* from a controller. Should we use a wireless transceiver or a Bluetooth shield? The R2-D2 is just going to drive around, spin its head and light up.
Do you have any sort of wireless controller already?
How do you want to control it? Do you want a joystick?
If you want to control it with a tablet or smartphone then something like a HC-05 module would be great. If you want a single joystick then a wireless Wii Nunchuck is a good option (it's one of my favorite robot controllers). I also like PlayStation 2 controllers for controlling robots.
If the robot will be used indoors, then you could control it with a TV remote. You just need an IR receiver.
We do not have a wireless controller already but I don't think it would be too hard to make? What's the easiest thing to do?
We'd probably drive it using tank controls with 2 joysticks. Only one person in our group has an android device that we could use as a phone controller so that might be off the table unless it makes the controlling process easier...
Ok I've done a bit of research and I think we should get a bluetooth one. All I need to find now is one that can communicate with a phone or can communicate with another bluetooth shield in the case that we make a controller.
RamboPenguin:
We do not have a wireless controller already but I don't think it would be too hard to make? What's the easiest thing to do?
Easiest would probably be using a wireless game controller like a Wii Nunchuk or a PlayStation 2 controller. This why you only need code running on a single microcontroller.
RamboPenguin:
We'd probably drive it using tank controls with 2 joysticks.
Steering a robot with two joysticks gets old pretty fast. It's really convenient to be able to control a robot with one hand. This is a big reason I like the Wii Nunchuk so much.
RamboPenguin:
Only one person in our group has an android device that we could use as a phone controller so that might be off the table unless it makes the controlling process easier...
Controlling a robot with a smartphone is popular because it's convenient not because the robot is easier to control this way. I think robots are easier to control with real joysticks.
RamboPenguin:
Ok I've done a bit of research and I think we should get a bluetooth one. All I need to find now is one that can communicate with a phone or can communicate with another bluetooth shield in the case that we make a controller.
Most Bluetooth modules should be able to communicate with a smartphone. If you want to use communicate between two Bluetooth modules you need at least one module capable of acting as the master device. This module from ElectroDragon.com can be either a master or slave and the HC-05 modules can be either master or slave.
If you use two Bluetooth modules, you'll need a second microcontroller for the controller. The microcontroller would read the joystick positions and send the necessary data to the robot.
Here are some threads at RobotRebels.org you may find interesting.
Asking about wireless PlayStation 2 controllers.
Review of cheap wireless PlayStation 2 controller purchased off ebay. I don't like these controllers much but they might work for your purposes.
Review of a wireless Wii Nunchuk. As I mentioned, I really like the Nunchuk as a robot controller. (I've used a Nunchuk to control a RC helicopter.)
http://store.redbearlab.com/products/bleshield
Can this one ^ do the same things as this one?
http://www.electrodragon.com/product/edpa-bluetooth-module/
Which one would be better if we built our own controller and which one would be better if we used a pre-existing controller like a ps3 controller?
RamboPenguin:
http://store.redbearlab.com/products/bleshieldCan this one ^ do the same things as this one?
Those two devices are very different from one another.
Bluetooth Low Energy (BLE) is a very different protocol from the "normal" Bluetooth. Not all smartphones can use BLE. If you don't know if your smartphone has BLE capability you should probably use normal Bluetooth.
If you want to use Bluetooth with a 5V Arduino, I recommend using a HC-05 on a board which includes the needed level shifting like this one.
If an item being ordered from China is really inexpensive, it's a good idea to order one more than you need in case you get a dud. I think some would consider the HC-05 modules cheap enough to order one extra as a precaution against getting one which doesn't work.
RamboPenguin:
Which one would be better if we built our own controller and which one would be better if we used a pre-existing controller like a ps3 controller?
When asking what would be "better" it's helpful to specify in what why you want it "better". Better for learning electronics? Better for precision control? Better for carrying it in your pocket? Better for getting the project done quickly?
One really nice thing about making your own controller is you can get telemetry back from the robot. The robot can send data about its battery condition and other data from its sensors which can be displayed on the controller.
Another nice thing about making your own controller is you have a lot of flexibility in the type of inputs you can use. For example, I think this joystick is really cool.
I used this joystick and a small $5 OLED display with my CNC router controller.
Another DIY controller project used a wired PS2 controller with a 4.3" touchscreen.
Making your own controller allows you to use all sorts of devices as input and output. The big downside to this is it takes a lot of time to write a program to read from all these inputs and to control all the outputs.
Depending on the complexity of the robot and the controller, the controller could take you more time to program than it will take to program the robot. Making your own controller could easily double the time required to complete the project.
You'll likely have your robot up and running much sooner if you used a ready made wireless controller.
I've never used a PS3 controller. I don't think it can be used easily with a microcontroller. I believe it requires a USB host device. I listed some of the controllers which are relatively easy to use with a microcontroller in an earlier post. A GameCube controller could be added to the list of controllers which can interface with a microcontroller easily. I have not used these controllers with an Arduino but I believe there are libraries to make doing so relatively easy. I've used all the controllers I listed with a different microcontroller.
Ok, I think we'll probably use a pre-existing controller instead of making our own. What kind of Bluetooth hardware do we need to accomplish that. We already have an arduino uno microcontroller so we'd use whatever game controller that would be the most compatible with that.
How easy is it to configure a game controller for wireless control over an arduino robot? Have you ever done that.
RamboPenguin:
Ok, I think we'll probably use a pre-existing controller instead of making our own. What kind of Bluetooth hardware do we need to accomplish that.
You don't need any Bluetooth hardware if you're going to use a wireless game controller. The transmitter is part of the controller and the receiver connects with the Arduino. The receiver is included with the wireless controller.
RamboPenguin:
How easy is it to configure a game controller for wireless control over an arduino robot? Have you ever done that.
I have never used a game controller with an Arduino. I've used a PlayStation 2 controller, Wii Nunchuk and a GameCube controller with a Propeller Microcontroller.
You might want to look for examples of using one of these three controllers with an Arduino Uno. If you decide to use one of the three controllers I mentioned, I'll try to help you get it working with the Arduino Uno. I'm interested in trying these controllers with an Arduino anyway and I'll be happy to start with whichever controller you decide to use.
There are likely other game controllers which can be used with an Arduino Uno but the three I mentioned I have on hand and I'd be willing to help you figure out how to use them if you need/want me to. I also have a Wii Classic controller. I haven't used it with a microcontroller yet but if you decided to use a Wii Classic, I'd be willing to help get it working with an Arduino.
As I said, I haven't used any of these with an Arduino. Hopefully you can find some examples of these controllers being used with an Arduino to figure out which would be a good candidate for your application.
If you post more links, it would be helpful if you used the "Insert a link" (to the left of the x squared icon). You can also enter URL tags manually. To see how the tags are used, just quote a post which has hypertext links. The URL tags will be visible from within the quoted text.
Ok, Thanks so much for all the help. We might take you up on your offer to help with a wireless controller later on but for now I think'll we'll make an autonomous robot first.
Our current part list:
Arduino uno
5 servos
wires
leds
transistors
ultrasonic sensor
breadboard
wheels
power supply of some kind
3D printed parts for the frame and most of everything else
timing belt for head spinning action
Is that everything we would need for an autonomous robot or did I overlook a crucial component?
thanks
You are very light on sensors for an autonomous robot. The "radio control" idea is actually much easier to do. An autonomous robot has to interpret the world it can see with its sensors and then perform actions based on that input. What do you want it to do? Just spin its head when someone comes in range of the ultrasonic sensor? That's about the maximum that can easily be achieved with that parts list.
Yah I see what you're saying. We aren't planning on it being autonomous forever. We are building this for a school project so there's a due date and we just want to make sure we'll even have enough time to build the thing and put in some simple programming. If that's all the ultrasonic sensor does then that might just be the way it is.
If the radio control is in fact easier.... Could you post a link to instructions to build one? And more importantly how to program it? This is our first big arduino project so bear with us as we ask a lot of questions XD.
RamboPenguin:
Is that everything we would need for an autonomous robot or did I overlook a crucial component?
thanks
I agree with MorganS about remote control being easier than autonomous.
I don't know of any remote control Arduino examples using controllers we've discussed. I haven't looked for them.
If there's a library to make interfacing with a game controller relatively simple, I'm sure I could help you knock out some code to convert the controller input into CR servo commands.
Are the wheels going to be used with the servos? If so, how will they be connected? There are wheels designed to connect directly to servos but you need to make sure you get the right kind of servo so the wheel will connect properly. Different brands of servos use different numbers of splines.
It's not hard to convert normal servos to CR servos after you've done it a few times. Opening a servo for the first time to make the conversion can be very intimidating. Depending your mechanical and electronics skills, you might want to purchase servos which have already been converted.
There are even CR micro servos you can buy but my erco says they're not very good.
What kind of LEDs do you plan to purchase? How do you want to use them? There are lots of really cool LED options nowadays. Which sort of LEDs to purchase isn't as simple of a decision as it had once been.
The power supply for a robot is not a minor detail. Servos and motors draw a lot of current and rechargeable batteries are generally better than alkaline batteries at delivering higher currents.
I use LiPo packs in most of my robots but NiMH is also a good option for a land based robot. If you use 4 or 5 NiMH cells, you can power your servos without a regulator between the batteries and the servos. It's always nice when you don't have to regulate power to servos or motors since regulators cost money, waste some of the power and take up valuable space.