m i c r o c o n t r o l l e r


Connections

PORT A - A/D Converter

    Pin 0 - Potentiometer from Base Joint (range ~180 degrees)

    Pin 1 - Potentiometer from Shoulder Joint (range ~ 120 degrees)

    Pin 2 - Potentiometer from Elbow Joint (range ~ 135 degrees)

PORT B - Motor Control

    Pin 0 - Forward base output

    Pin 1 - Forward shoulder output

    Pin 2 - Forward elbow output

    Pin 3 - Forward gripper output

    Pin 4 - Gripper click sensor input

PORT C - Keypad / Motor Control hybrid

    Pins 0,1,2,3 - Keypad

    Pin 4 - Reverse base output, Keypad

    Pin 5 - Reverse shoulder output, Keypad

    Pin 6 - Reverse elbow output, Keypad

    Pin 7 - Reverse gripper output, Keypad

PORT D - LCD

 

Program

     The microcontroller's main role is to deal with controlling the various motors of the robotic arm, and it is the central element that connects the software world (Java3D Interface) to the physical world (the arm). 

     There are 2 implemented modes that the microcontroller program can run in:

     Mode 1)  Local/Manual Control - the keypad / LCD can be used to select the appropriate joint to move, the speed of the movement, and the angle with which to move it.  The joints will be moved as directed and stop at approximately the angle given.  The ADC reads in the trimpots of the joint being moved if it is an angle-determined joint (base, shoulder, or elbow), and PIN B4 reads in the switch on the gripper if the gripper is selected to be closed (so as to be able to clamp objects). 

     Mode 2)  GUI Control - the user manipulates the arm in Java3D and sets the arm at a desired position (in terms of the angles and status of the five joints), and then can transmit the info to the microcontroller for processing.  The microcontroller must be set to GUI mode to receive incoming position controls from the computer.

     There are a few other modes that were worked on but never got completed due to a lack of time and an underestimation of the difficulty in some areas.  These are:

     Mode 3)  Programming mode - the user creates, updates, and saves programs on the GUI controller, which basically consist of a set of positions for the arm to move in.  The microcontroller receives the program and performs the set of movements in the order specified.

     Mode 4)  Object Recognition mode - once a simple shaped object (ball) is placed in the view of the Quickcam, the object recognition code signals the GUI which incorporates the object into the graphical display.  The user can then manipulate the arm to grab the object and so forth.  The GUI could then signal the microcontroller of object in view.

     The possibilities with this kind of stuff is endless!