This is what we will make, a battery operated, wireless controlled robot buggy and a handheld controller. The radio link works as far as you can see the buggy and more.
Step 1: Hardware for the Handheld Controller
The handheld controller is really easy to make and doesn't even require wiring. The new ArduRF1 Arduino compatible controller from EzSBC has everything on board except a joystick. I got a joystick shield from eLabpeers
and it is shown in the photo above. The ArduRF1 is available from Tindie. The photo of the ArduRF1 shows how complete it is for making a wireless controller. There is a battery charger with a boost controller so that 5V shields can be used directly. The radio is included with the board and is soldered in place. All the normal Arduino IO pins are there in the standard place. The controller is really easy to make.
Step 2: Assemble the Controller
Look at the joystick shield and make sure the 3V/5V switch is in the 5V position. Simply plug the LiPo battery into the battery connector. Position the battery on top of the ArduRF1 and plug the Joystick shield on top of the ArduRF1. That's it! The photo above shows the LiPo neatly between the two boards. Plug the board into a USB cable so the LiPo can charge. In a little while we will load a sketch onto the board to transmit the position of the joystick to the robot buggy so it can move as you desire.
Step 3: The Buggy - 1 Mechanical
I got my buggy from eLabpeers. It comes with the acrylic body, two motors with a reduction gear box, an off switch, two wheels and the rear caster wheel.. The one I got (some time ago) is a little different from the new model. The new model is an improvement because it is much easier to assemble.
The chassis is very easy to assemble but it melts if you touch it with your soldering iron. Before you put the wheels on the motor is suggest you solder two wires to the motor. I have a bundle of wire that I bought on ebay for less than a $ and I soldered on black and one red one to each of the motors. I tested the connection so that the wheel moves the buggy forward when a positive voltage is applied to the red lead. If you don't do this then the joystick will be hard (or impossible) to use.
Follow the instructions that comes with the chassis until it looks like the photo. If you installed the on-off switch, now is a good time to remove it since we won't use it and it get in the way of the electronics.
I had a couple of 18650 cells and holders that I bought on eBay and I wired the two holders in series. I also soldered two of the breadboard wires to the battery holder wires. This is all the soldering we will do on this project.
Step 4: The Buggy 2 - Controller
For the controller we will use the ArduRF1s because it is complete and easily fits on a breadboard. The motor controller is an L293D IC. It has two complete H-bridges in the package so we only need one to drive both wheels. We will use the PWM output of the Arduino to control the speed of each wheel so we can steer the buggy.
Plug the ArduRF1s on a small breadboard so that the USB connecter sticks out over the edge of the breadboard. This makes sure there is room for the L293D on the breadboard. Now plug the L293D into the breadboard. Using the breadboard wires, wire the L293D to the ArduRF1s pins according to the schematic on the next page.
Step 5: Wiring the L293D
Follow the diagram closely leaving the motor connections for last. Where it says Pin 5 on the connection diagram, locate the pin marked D5 on the ArduRF1s and connect it to pin number 2 on the L293D. Do the same for all the connections that start with "PIN".
Connect the four ground pins of the L293D to the power strip of the breadboard that has the blue line next to it. Also connect one of the pins on the ArduRF1s marked 'Gnd' to the blue power strip.
Connect pin 16 of the L293D to the pin marked 3.3V on the ArduRF1s. This is the logic power supply of the L293D and we use the 3.3V regulator on the ArduRF1s to power the logic of the L293D.
Now move the breadboard to the buggy. I used double sided tape to fix the battery holders to the acrylic base. The double sided tape won't stick to the bottom of the breadboard so I used a piece of packing tape to tape one end of the breadboard to the acrylic base. The packing tape is transparent and invisible on the photographs.
Step 6: Breadboard on the Buggy
I put the batteries more or less on top of the wheels prevent the wheels from slipping. I put the breadboard on the open space on the acrylic base and connected the wires from the motors to the L293D. The two positive leads go pins 3 and pin 11 of the L293.
Before I brought the motor leads to the top of the buggy I tied a knot in the wires. The knots prevent you from stressing the connections to the motors. The two negative leads of the motors go to pin 6 and pin 14 of the L293D.
Now that the breadboard is on the buggy you can connect the batteries to the breadboard. Connect the negative terminal of the battery to the blue power strip on the breadboard. Connect the positive lead from the battery holders to the power strip on the breadboard with the red line next to it.
Connect the battery power to pin 8 of the L293D to power the motors from the battery. Everything is now connected.
Step 7: Programming the Joystick Controller
The ArduRF boards are all programmed as Arduino Uno's from the Arduino IDE. To program the controller, plug a USB cable into the USB socket. Program the xy.ino sketch into the joystick controller:
When you are done programming the joystick board, move the USB cable to the buggy and upload the Bot5Rx sketch to the ArduRF1s.
Step 8: Test Drive
All done! Now test drive you robot.