Introduction: Plexi Bot: Wireless Robotic Arm
Hello all. Recently I have been working on a lot of robotic design and simulation at work. I needed a method of taking my work home with me, and seeing as I can’t carry a large six axis arm home in my briefcase; a solution had to be found. The following set of instructions is my initial design for a small three axis robot that can be used for simulation, small tasks, or just looking cool. This project uses a regular microcontroller, some small stepper motors, and some transistors. This project does not require any advanced equipment or in depth knowledge in robotics, all you need are some basic tools and a bit of work ethic.
The robot featured in the above picture is our final product. It is capable of rotating on three separate axis; rotation about its base, rotation at the base of the first arm, and rotation at the base of the second arm link. There are two levels of this robot, the first has a very basic controller, the second has a wireless controller and some more advanced controls. We will begin with the first design and then once that is finished it can be easily upgraded to the wireless version. The six buttons on the breadboard are use to control which joint is moving and in what direction is it moving. The robot can also be controlled using something called R-code. This code is similar to G-code for CNC, you specify which joint you are moving, the direction, and at what speed it is to move. This code is entered on the computer through a windows application included in these instructions.
So if I have captured your interest (which i hope i have) then I suggest you make every attempt to follow this Instructable and build this robot. Not only will you be able to automate the boring tasks in life but you will also emerge with a greater understanding of micro-Controllers and robotics.
Step 1: What You Will Need
There are several items that you will need to build this robot. All of them can be obtained at either a hardware store or some electronics supplier online.
3 -Small Gear head Steppers – Robot Shop – 6.99$
2 Square feet of plexi glass – salvaged
Bread board and electrical components - Digikey – 15.00$
16F877A controller - DigiKey – 5.00$
USB RS232 adapter – Ebay – 2.99$
Some screws - Anywhere
Netbook – Priceless
Wire strippers and needle nose pliers (always a must)
P.I.C. Programmer (Cana Kit is excellent)
Scroll saw or something to cut plexi or hard board (even an exacto knife if you are carful)
Wood glue and epoxy
Printer or a pencil and ruler
Drill (Doesn’t have to be a drill press, could be an old hand drill)
The details of the circuit work will be outlined in the circuit assembly section.
Step 2: Making the Parts: Step #1
Once you have attained all of the parts we are ready to start building. The first step is to create all of the individual parts needed for the body of the robot. Selecting of the material is key to how the robot looks, performs, and how long it takes to build. Some of the available selections are.
-Plexi glass (what I used)
-PCB or protoboard
I had used Plexi glass because I have lots of it and it looks cool. I believe the best choice would be to use PCB board. This stuff is light, strong, and easy to cut and drill. The prototype of this robot was build using foam board (it is easy to cut and strong).
#1. Print of the documents "PlexiBot_Print1" and "PlexiBot_Print2"
#2. Cutout all of the individual shapes and trace them onto whatever material you are using
#3. Cut the shapes out. If you are using plexi glass a scroll saw will work. If you are using foam board i recommend an exacto knife
#4. Review the about images so that you know how the robot goes together before assembling
Step 3: Assembling the Parts
Before you begin to assembly the motor make sure you have some speed set epoxy and some super glue (gloves also don’t hurt because it gets messy). If you look at the final image of the robot you will notice that it cannot be disassembled without breaking it. This shows that the motors cannot be inserted after the robot is assembled, so the motors are our first step. As you see in the above image we first must screw the motors to parts insert part numbers. It may help if you apply locktite to these nuts to prevent them from vibrating off. Then take parts insert parts and put the motor shafts in the holes as shown in the above image. Hold it firmly in place and apply some glue (epoxy) to the shaft and hole of the part, once this sets you will see how the robot arms will function.
Warning: If you apply to much glue and it spills down to where the shaft of the motor goes into the motor (above image) the motor may seize. If this happens remove the motor from the assembly and clean all glue of immediately.
Allow the motor assemblies to set before continuing. Assembling the remainder of the parts is done with some super glue and a lot of patience. The order of assembly is not critical after the motors, so use the above images and finish the assembly. Remember to not lock up the wires when you are assembling, it is pretty hard to do but still possible. (if you are a real go getter you could add leds in the robot base to make it light up)
After all that you should have a robot assembled and ready to wire up.
Step 4: Making the Circuit
To assemble the circuit you will need the following components, these are incredibly common and you should have no difficulty finding them from Digikey or any other suppliers.
(1.5) – Breadboards (I ran out of room on one so I used a half board)
(1) – 16F877A
(3) – ULN2803A transistor array (or if you like complicated use individual transistors)
(1) – 1k resistor
(1) – 4mhz oscillator
(2) – 22pf Capacitors
(∞) - Wire
(1) – 5v power supply (1A)
(A lot) – header Pins (can do without)
(6) – Push buttons
It may also help for you to make grouped jumper wires, these can be purchased but i enjoy making my own. The circuit must be wired up in the same way that is featured in the wiring drawings (files "PlexiBot_Wiring"). The photos of the bread boards can also be referenced for methods of cramming everything into such a small space.
The power supply i used was the charger for an old Sony camera. It is very likely that you have something lying around your shop or home that will work for power.
Step 5: The Micro-Controller and Its Program
The Mirco - Controller is the heart of this system, without it the robot would not even be able to function with the manual push buttons. If you are reading this and you still have no idea what a micro controller is or how to use them i suggest you try this book. It is where i started and am always referencing back to.
"Making PIC MircoControllers instruments and controllers" H.S.Sandhu
The PIC 16F877A is the controller i chose for this system. It is very versatile and has all the io's needed for a project like this. What did i use in the controller you might ask?
- One of the timers
-the on board eeprom
-The PWM function
-The Rx and Tx pins
For programming the controller i recommend the CanaKit programmer. It is compatible with PIC Kit 2 and has the ability to program from an eeprom device. The reliability of the programmer is also wonderful, i cant tell you how many times i have put the chip in backwards without killing it.
To program the micro-controller for this project you do not need to have any programming software. The only software you will need it PIC Kit2. This is the software to load the Hex file onto the controller.
If you are confused as to how to use this software i suggest that you try this link.
If you do want to modify and right your own programs i would suggest one of the following.
-Code Warrior (medium)
Step 6: Programming the Robot
This project comes with three diffrent code options, each option can be reprogrammed into the controller at any time (i hope to fuse these programs into one very soon).
Program #1. This program is the basic package it allows you to control the robot from the push buttons on the circuit board.
Program #2. For the autonomous motion seen in the first video this is the program you will need. It allows the computer to control the robot from a note pad file. (soon to be described)
Program #3. This package includes to programs. One for the robot and one for the Wireless remote. (Wireless remote described in future step).
The circuit set up can stay the same between all of these programs, the only thing you need to change is the program on the controller! When using these programs i suggest that you build them in order, it will save you a lot of debugging time.
For program #2 you will need a USB to RS232, or if you are lucky enough to have a serial port on your laptop a simple RS232 card will work (both feature in picture above). The circuit diagram describes how to hook the circuit up to one of these units.
Step 7: Installing the Program
The program that s included with this Instructable "PlexiBot_Controller" is a windows based program that works through a COM port. If you are confused by COM ports please visit the following:
Installing the program is very simple, it installs by running any of the two files included in the zip. Once this program is installed you can hook up the robot to the USB to RS232 connector. This is done as described in the circuit diagram, and if all else fails look at the pictures.
Some key notes about the program:
-This is the first version so i am working out alot of the bugs.
-If you are not careful sometimes the program can hang up your com port. If this happens be sure manualy close the COM port before continuing.
-Be sure the file path is correct and be sure that the file is a TXT
-The number of lines starts at zero so be sure to subtract 1 from the number of lines to read.
Step 8: How the Program Works
The core of the robot control is the text file. This file outlines how fast the robot will move "R4" and which joint will move how many steps "J1F200". The number entered after the joint command must be no greater that 254 due to memory limits.
N001 R4 J1F0 J2F0 J3F0 J1R0 J2R0 J3R0
Above is the standard form that the code must be written in. There must be only one set of codes per line. If a section of the code is left out the robot will not function properly.
Selection of the proper COM port is critical if you do not select the right one the robot will not receive its code. The COM port info can be found in the windows device manager. The file below is the code seen in the video at the beginning of this Instructable.
Step 9: Lets Get Wireless
If you have successfully built this robot and used both programs (button and Pc controller) then you are ready to build a wireless controller. To build it you will need the following
-7 resistors (1k to 10k or anything in between)
-2x16 LCD (will work without this)
-2 5k pots (10k will also work)
-5v power supply (battery pack)
-Set of wireless cards (ebay search: "RF module")
-2 22pf caps
When you have all of that you can build the circuit attached to this page. Once the circuit is built you will have to load to new programs into the main controller and the wireless one. The programs are attached below. Once the programs have been loaded you can uses the buttons to control the moment of the robotic arm. The LCD will also show what speed you are running at.
Step 10: Fini
Hopefully your robot is working well and you already have big plans to take over the world with it, or just have it make your coffee whatever the preference.
future plans for this robot include:
-upgrading the software on the PC to be more versatile
having on screen manual controls
robot studio interface
faster transmitting for less pause between steps
-creating a better stepper driver system.
-And best of all making new playgrounds and automation situations for the robot to tackel
Thank you all. Any questions? please ask.
We have a be nice policy.
Please be positive and constructive.