The main objective of this project was to develop simple controllers that can be implemented using either a PIC or with an ELVIS board in order to establish the transfer of data communication between the various elements of the robot which include the sensors, actuators and control platforms.
This project comprises two major aims which are the design of a method for sensing the angles and to design a controller to move the arm.
Control systems are integral components of most modern day robotic systems. Their use allows the system to perform its task quickly and efficiently whilst allowing them to adapt to external forces. The goal of the project is to design one or more simple control systems that can be implemented on a PIC microcontroller to control the movement of a mechanical robot arm. This system will then be used as a demonstration piece to show second year students taking the Control Systems 1 course a physical example of a working control system in action.
Objectives
Research and purchase an electronic robot arm
Research, specify and mount appropriate proprioceptive sensors for the arm.
Design a means of interfacing the robot arm's actuators and sensors to the PIC microcontroller and provide a user interface to the system.
Calculate the correct forward and inverse kinematic equations for enable the arm.
Develop simple P or PI controllers implemented on the microcontroller that will enable the arm to process the inputs from the sensors, and output the correct response to the actuators.
Outcomes
Time was spent visiting many different shops and websites to find an acceptable robot arm that was within the budget parameters.
Research was conducted into different proprioceptive sensing systems such as position transducers, use of timers and accelerometers.
Accelerometers were chosen due to their light-weight, variable accuracy and the fact that it does not hamper the movement of each of the joints.
The I/O board that was constructed as part of coursework in the first year and university designed breakout boards were used to create the interface due to the students' familiarity with them.
Background reading was done on the topic of robotic kinematics and extensive notes were taken during the student's robotics lectures.
The final objective is still in progress at the time of writing this summary.
Conclusion
There were several obstacles that were encountered in this project. The project would have benefitted from a deeper knowledge of the finer points of modelling robotic systems. As such the outcome has been somewhat limited. To date the project has not reached completion but much has knowledge has been acquired in progressing the work.
Introduction
This report on the Control of a Mechanical Robotic Arm provides a summary of the work that has been undertaken during this academic year. The content of the document discusses the individual aspects of the system and how they will each work together.
Project Overview
Control systems are an important aspect of most modern day robotic systems. Their use allows the robot to perform its task quickly and efficiently whilst allowing it to adapt to external forces. The brief that was given when the project was issued was to build a demonstration piece that would use simple controller systems that can be implemented on a suitable control platform in order to demonstrate their operation to 2nd year Electrical and Electronic Engineering students.
Objectives
There are several objectives that needed to be completed in this project. The first was to research, purchase and build and simple robot arm that would be the foundation on which to build the project. As the only electrical equipment that the arm comes with is its actuators, an appropriate sensing system would need to be specified and mounted to enable the arm to output a position for each of its links. With these objectives completed, an interface would need to be designed to enable a control platform to communicate with the sensors and actuators. Lastly simple controllers need to be designed and encoded into a suitable programming language to be programmed onto the control platform. The final product will be a robot arm that can move its end-effector along a single vertical plane with the ability to vary the gains for each aspect of the controller to demonstrate the system with stable and unstable gains.
Scope
There are three distinct areas of interest within this project. These are the mechanical, the electronic and the programming components. The mechanical component is the robot arm. The electronic section consists of the control platform (in this project, the PIC18F4520 will be used) and the circuits that are used to interface it with the sensing and actuation systems and the user interface. For programming the control platform the MPLAB IDE software and the C18 'C' compiler provided by MicroChip will be used. The programming will be done in 'C' as opposed to assembly language as the commands are simple and easy-to-use in the system development; however, these are slightly less efficient. The program will be required to process both the current position of the arm as well as the required position of the arm and perform the control equation to drive the actuators to move it into the new position.
Literature Review
2. 1 The Robot Arm
Robots can be classified into two different categories. There are those with a fixed base which are defined as a robot manipulator and those with a mobile base, a mobile robot.
The structure of the robot manipulator consists of a sequence of rigid bodies (which will be referred to as links from here on) connected together by pivoting joints. A robot manipulator can be characterised as "an arm that ensures mobility, a wrist that confers dexterity and an end-effector that performs the task required of the robot" (Siciliano, Sciavicco, Villani, & Oriolo, 2009).
Robotic component parts consist of:
The arm can consist of at least one link and joint but there are usually more.
The wrist can consist of up to 3 small links and revolute joints in order to achieve maximum dexterity.
Finally the end-effector which can be anything that is needed for the task the manipulator has been designed to do. This can range from a gripper to a paint sprayer.
There are five classifications of robot manipulator that are defined by the type and sequence of its degrees of freedom (DoFs). These are Cartesian, cylindrical, spherical, SCARA (selective compliance assembly robot arm) and anthropomorphic.
The Cartesian
The Cartesian arm operates using up to three prismatic (which means that the joints move in straight lines) joints that are at 90 degrees to each other. This structure allows for strong mechanical stiffness and consistent accuracy when positioning the wrist within the working area. This however comes at a compromise of having low dexterity due to the joints being prismatic.
There are two different configurations for different approaches. The standard configuration shown below in Error: Reference source not found allows for the end-effector to approach the object from the side to move it, whereas the gantry configuration shown in Figure 2 (overleaf) enables an approach from overhead.
Figure 1 Standard Cartesian Manipulator [1]
Figure 2 Gantry configuration for the Cartesian Manipulator [2]
As expected from its category, the position of its end effector can be expressed in a simple (x, y, z) fashion which allows for relative ease in programming.
Cylindrical manipulators
Cylindrical manipulators operate on a similar principle as Cartesian manipulators with the exception that the joint mounted to the robot's base is a revolute type instead of prismatic. This gives us the co-ordinates (r, φ, h) with r representing the distance of the end-effector from the base, φ representing the angle of orientation of the base and h, the height of the horizontal joint from the base. An example of a cylindrical manipulator is shown below in Figure 3.
Figure 3 Cylindrical Manipulator [3]
Spherical manipulators
Spherical manipulators are similar in design to the cylindrical manipulator but the vertically moving prismatic joint is replaced with a revolute type. The robot therefore will use the spherical coordinate system of (r, θ, φ) with r again being the distance of the end-effector from the base, and with θ and φ being the vertical and horizontal orientations of the end-effector respectively. This arrangement can be seen in Figure 4.
Figure 4 Spherical manipulator
The SCARA
The SCARA manipulator consists of two revolute joints and a prismatic joint arranged as shown in Figure 5. This manipulator design has a similar workspace to the cylindrical manipulator, however its design allows the end-effector to pick and place objects whilst being able to move around and obstructions that may be in the way.
Figure 5 SCARA manipulator [4]
Anthropomorphic manipulator
The final category of manipulators is the anthropomorphic manipulator. This is realised using three revolute joints for horizontal rotation, an elevation joint attached to the base that acts as a shoulder in a human arm and a third 'elbow' joint to give the manipulator reach. Figure 6 shows the physical arrangement of this manipulator.
Figure 6 Anthropomorphic manipulator [5]
Actuators and motion control
Electrical motors are often used as final control element in systems where either he position or speed is being controlled. There are three different types of motor, DC motors, AC motors and stepper motors. This project primarily focuses on controlling an arm with a DC motor.
DC Motor
This type of motor is an output transducer that will convert dc electrical energy into mechanical rotary motion. This is caused by the result of placing a freely rotating loop of wire in a magnetic field. When a current is passed through the wire, a mechanical force is experienced in the direction that can be found using Fleming's Left-hand rule. The magnitude of the force can be calculated using the following formula:
Where: F = Mechanical Force (Newtons)
B = Magnetic Flux Density
I = Current (Amps)
L = length of conductor (wire) in magnetic field (m)
Motion Control
Control of a DC motor is typically done using an H-bridge circuit, shown in Figure 7. The circuit is commonly used with devices that cannot source enough current to drive the motor itself. If switches S1 and S4 are closed, current will flow across the motor from left to right and will cause the motor to rotate in one direction. If these switches are opened again and switches S2 and S3 are closed, the current will reverse its direction of flow and will therefore reverse the direction of the motor's rotation. In the case that either S1 and S2 or S3 and S4 are closed, no current will flow and the motor will brake.
Figure 7 Simple H-bridge arrangement
As an electronic circuit, the H-bridge is represented by the circuit shown in Figure 8 below. The transistor network works in the same way to the simple H-bridge above. The gates connected to points A and B are connected to the digital output of a microcontroller. Due to these connections, there are 4 different combinations of inputs and therefore 4 possible outcomes for the circuit with bi- directional control of the motor being possible.
Figure 8 Transistor Network H-bridge
A is 'HIGH' and B is 'LOW'. This turns on Q1 and Q4 causing current to flow across the motor from the left terminal resulting in the motor rotating clockwise.
A is 'LOW' and B is 'HIGH'. This turns on Q2 and Q3 causing current to flow across the motor from the right terminal resulting in the motor rotating counter-clockwise.
A is 'LOW' and B is 'LOW'. This turns on Q3 and Q4; this places both the motor terminals at 0V, causing the motor to break.
A is 'HIGH' and B is 'HIGH'. This turns on Q1 and Q2; this places both the motor terminals at 5V, causing the motor to break.
Sensors
A sensor is an input transducer that converts physical phenomena (measurand) from the environment into a recordable signal that can be processed by a controller. This signal is typically a voltage or a current signal [6] . Without the use of sensors, it is difficult to design a control system for the robot to enable it to move efficiently. Below is a list of example measurands that can be sensed:
Acceleration
Linear/angular position
Temperature
Pressure
Liquid level
In this project, the robot manipulator is using position sensors to determine the angle of each of its joints with respect to the horizontal to calculate the distance of the end-effector from its fixed base. These sensors are mounted along the links in positions were they will not obstruct its movement.
Method
3. 1 Introduction
This section of the report details with the steps that were undertaken to realize the main objective of the project. It is split into three sections, the arm, the electronics and the software.
The arm section will focus on the selection process, dimensions and calculations of the kinematic equations that will be used.
The electronics section will discuss the sensors, motor drive board, Input/Output board, the breakout board and the microcontroller.
The software has been designed to home the robot on initial start up, read new coordinates and new gains of each of the controllers, control the external peripherals and perform the algorithm for the PI controller.
3. 2. Selection of arm and kinematics
The component parts of this project had to be purchased from a relatively small defined budget of £70.00. In choosing the robot arm the biggest constraint was balancing the cost of the arm with the cost of the sensors that would be used to determine its position.
From research that was conducted across numerous sites on the internet, two robot arms were source that did not exceed more than 55% of the allowable budget. These were the 'Build Your Own Robot Arm Kit' and the 'Robotic Arm Trainer Kit'. Both were of similar quality with the same number of degrees of freedom so the deciding factor was heavily influenced by the constraints of the budget, hence the most economic arm was chosen for the project.
As mentioned in the progress report, the arm chosen was the Build Your Own Robot Arm kit which is an anthropomorphic type manipulator. Knowing this and the co-ordinate system used with these types of manipulators, it is possible to calculate the kinematic equations for the arm. As was mentioned in the objectives section of the report (Appendix A), the aim is to design controllers to enable a robot arm that can move its end-effector along a single vertical plane. Therefore we treat the arm as a 2-link planar arm. This means the arm has 2 moving links and it moves the end-effector along a single plane.
φ
{x,y}
P
l2
l1
θ2
θ1
θ2
Figure 9 Simple Representation of 2-link planar arm
Figure 9 on the previous page shows a simple representation of the 2-link planar robot arm that the controllers will be designed for. The position of its end-effector can be represented as an {x, y} coordinate, using this and the length of each of the links l1 and l2, we can calculate the inverse kinematic equations for this type of arm as follows:
Knowing the values of P, l1, l2 and the cosine rule we can calculate φ:
Therefore,
Using φ, we can calculate θ1 and θ2 using the sine rule
therefore,
and therefore,
As shown in the diagram above, y is being set to equal 0 so that the trajectory that the arm moves along keeps the end-effector at the same height as the fixed base joint. Therefore the inverse kinematic equations become:
and
Below are photos parts of the robot arm that were taken during its assembly.
Figure 10 Joint gearbox being assembled
Figure 11 Completed gearbox
Figure 12 Assembled robot arm
3.3 Electronics
Choice of Sensors
It was decided at the beginning of the project that the most efficient method of sensing the robot's surroundings was to sense the angles of each of the robot's joints. As mentioned in the progress report (APPENDIX A), research was conducted into the different methods of sensing angles. The following solutions were considered:
Potentiometers/Rotary Encoders
Accelerometers
Timing of period of motor operation
Gyroscopes
The advantages and disadvantages for each of these methods can be found in detail in the Progress Report section 2. 2 (APPENDIX A).
From these methods it is worth noting that no one method was more efficient than another and all have their own latencies attached to them. In each case some form of signal conditioning is required to convert the digital values that are read into the microcontroller into usable numbers for the control equations.
Of these methods, the use of gyroscopes was quickly discounted due the cost of the individual sensors. It was decided to not use potentiometers as, although feasible due to the low cost of potentiometers, mounting them on the kit arm would have proven to be difficult and they would have caused an obstruction to the movement of the arm. The same problem would encountered with rotary encoders as the gearboxes that are used by each of the joints are built to contain only the gears and motor therefore the encoder would need to be mounted externally and would have caused obstructions.
The method of timing the duration of operation of each motor movement period was initially appealing as no extra hardware would have been needed but unfortunately this would have made for an open-loop control system and, therefore, was not fit for moving the end-effector along its trajectory. This left the option of accelerometers as the best method of sensing the angles.
The accelerometer that is being used in the project is the Freescale Semiconductor MMA7260Q Three Axis Low-g Micromachined Accelerometer. The device uses a two capacitive sensing cells and a signal conditioning ASIC (application-specific integrated circuit) in a single integrated circuit (IC) package. The device can be modelled as set of capacitive plates attached to a moveable mass that is situated between two fixed plates which make up the second plate for the moveable set to form two back-to-back capacitors. As the accelerometer moves, the mass will also move causing the attached plates to move closer to one of the fixed plates and the same distance away from the other. The change in the distance between the fixed and movable plates can be calculated to be the acceleration. This can be shown in Figure 13 on the next page.
The ASIC measures the capacitance for each set of plates and determines the distance moved using the formula:
Where: C = capacitance, F
A = area of the plate, m2
ε = dielectric constant, Fm-1
D = distance between the two plates, m
The signal is also conditions the signal and outputs a voltage proportional to the acceleration measured.
Figure 13 Simplified Model of Accelerometer
When at rest, the Earth's gravity will cause a positive 1g (where g is the acceleration due to gravity) output from the accelerometer and so therefore will output voltage between 1. 485V and 1. 815V when sitting flat and horizontally (VOFFSET) depending on the supply voltage at the VDD pin. This can be used to calculate the angle of the device when it is placed on an increasing incline at a fixed point in time.
The accelerometer outputs a voltage at an angle of θ degrees that can be calculated using the following formula:
Where: VOUT = Accelerometer output, V
VOFFSET= Accelerometer 0g offset, V
ΔV/Δg = Sensitivity, Vg-1
α = Angle of tilt
Therefore the angle of tilt can be calculated using the following equation:
Figure 14 below shows the angle that is being calculated using this formula.
Figure 14 Diagram showing example of tilt angle for an accelerometer
Figure 15 Recommended connection diagram for accelerometer
Figure 15 represents a schematic diagram showing the connections that need to be made from the accelerometer to microcontroller.
A simple test was performed for both accelerometers to ensure correct operation of the sensor and the correct understanding of the calculations involved. The test involved taking readings of the output voltages of the XOUT pins at 0 and +/- 60 degrees. The results of this test and the calculations can be found in section 4.1 of this report.
Microcontroller
A microcontroller is a "self-contained computer-on-a-chip". It consists of simple processor, instruction and data memory, and Input/Output peripherals that enable it to interface with its external environment [7] .
MicroChip Technologies Inc manufactures a series of microcontrollers with varying numbers of input/output pins such as the PIC18F4520. This particular controller is being used as it has a large memory size for storing long complex programs and also has a pair of Capture, Compare and Pulse-Width-Modulation (PWM) modules which are collectively known as CCP modules. These modules will be used to drive the motors in the H-bridge circuit mentioned in the next sub- section of this report. Figure 16 below shows the layout of the pins on the PIC18F4520
Figure 16 Pin diagram of PIC18F4420 and PIC18F4520
Another reason for using this particular microcontroller is the first year students were presented with this particular microcontroller as mentioned earlier in the report. Therefore it is being used as the control platform for the project due to the students' familiarity with the device.
The schematic layout for the Microcontroller board being used in the project can be found in Appendix D. Table 1 on the next page shows which pins will and how be used in this project.
Table 1 PIC18F4520 pin usage
PORT
PINS
USAGE
PORT A
RA0
Switch 8
RA1
Switch 7
RA2
Switch 6
RA3
Switch 5
RA5
Push-Button 1
PORT B
RB1
Sensor 1
RB2
Push-Button 2
RB4
Sensor 2
PORT C
RC1
Motor 2
RC2
Motor 1
PORT D
RD2
Activate sensors
RD6
Enable H-bridge channel 1
RD7
Enable H-bridge channel 2
PORT E
RE0
Potentiometer
Figure 17 on the next page shows the PIC microcontroller that is being used in this project mounted onto its microcontroller board.
Figure 17 PIC18F4520 microcontroller
Motor Driver Board
The motor drive board consists of a L293D H-bridge IC and 74LS04N Hex Inverter IC set up using the arrangement show in Figure 18.
Figure Connection Diagram for Motor Drive Board
This arrangement enables the microcontroller to drive the motors without trying to source current beyond its capabilities. Figures and show the VeroDes layout for the motor driver board connected as in and a picture of the circuit assembled on strip board respectively.
Figure VeroDes layout for the motor drive board, (left) the top view, (right) the copper view
Figure Assembled Motor Drive Board
Input/output board
Built by the students in the first year, the Input/Output (I/O) board contains a host of peripherals that can be used in this project and as such will be used as part of the user interface with the project. The students' familiarity with this piece of equipment is also an additional advantage for when the finished product is used as a test piece. The schematic layout can be found in appendix F.
shows the assembled I/O board used in the project. Clearly visible are the switches, push buttons and potentiometer dial that will be used within the program.
Figure I/O board designed by University of Manchester
Breakout Board
The breakout board acts as another part of the interface, allowing access to individual pins to enable connection of the control outputs to the sensors and motor drive board and the inputs from the sensors to the correct analogue-to- digital converter (ADC) pins. The schematic diagram for this piece of hardware can be found in appendix G and an assembled breakout board can be seen in below.
Figure Breakout board
Software and Programming
The final section of the robot implementation is the programming. The students have been taught to program in both a high level language (C) and a low level language (assembly). It has been decided to program the robot in C as the language is simple, easy-to-use and easily understood with appropriate commenting.
The program will have 5 sequential sections that it will run through. Once this has occurred the program will return to the second section to repeat for every subsequent cycle. The sections are:
The start up cycle
Reading of new coordinates.
Reading of new gains for each of the controllers.
Activation of the CCP modules for PWM operation and activation of the sensors.
Algorithm for the PI controllers.
Start up cycle
This section of code activates the accelerometers to find out what position the joints had been left in last time it was used and returns each one to a pre-defined home position by activating each motor in turn until the angles match.
Reading new coordinates
In this section of the program, the microcontroller reads the value of the 4 least significant switches (the switches on the right hand side when looking at the I/O board) and using a table, calculates the new position in centimetres from the base of the robot arm. Then using the inverse kinematic equation defined earlier in section 3. 2, the microcontroller will calculate the new angles that each joint will need to move to.
Reading of new gains for each controller
Section 3 of the program, activates the ADC and upon the user pressing the button PB2 on the breakout board will take a reading of the converter register and store it as a gain. The process is repeated several more times to record the remaining gains before advancing to the next stage. Whilst in this stage, by pressing the other button, marked PB1, the microcontroller will use whatever value was last stored in the register from a previous cycle.
Activating the CCP modules and sensors
Section 4 activates the PWM function of the CCP modules and sets the duty cycle to 50%. The output voltage across the motors can be calculated by the equation:
Where: Vo = Average voltage applied to motor, V
D1 = duty cycle
Vd = supply voltage, V
Therefore at a duty cycle of 50%, the average voltage across the motor is 0V.
The second task that is done in this section is to reactivate the accelerometers.
Controlling the actuators
The program that is being implemented creates two PI controllers, one for each motor that is moving. shows a microcontroller implementation of a closed-loop controller.
Figure Basic closed-loop control diagram [8]
When implementing a digital controller, the signal output by the sensor needs to be sampled at discrete instances of time. The algorithm for doing this is as follows: (algorithm taken from (Astrom & Hagglund, 1995))
Wait for clock interrupt
Read analogue input
Compute control signal
Set analogue output
Update control variables
Go to 1
The control signal that is being used by the program is as follows:
actuatorNOutput = Kpn*Pn+Kin*In
Where: n - number of the control system for the corresponding motor
Kpn - proportional gain value for controller n
Pn - the error between the required angle the joint needs to be at, A and the current angle of the joint, B. Calculated by Pn = B - A
Kin - integral gain value for the controller n
In - the accumulative error made over a certain time period. For example if at time t1 the error is A, at time t2 the error is B and time t3 the error is C. In = A/t1 + B/t2 + C/t3
(Palmisano)
This value is rounded to the nearest whole integer and is then conditioned using the following lines of code (taken from code found in appendix for controller 1):
if(actuator1Output > 511)
//if above 127 set to full forward
{
actuator1Output = 511;
}
if(actuator1Output < -511)
//if below -127 set to full reverse
{
actuator1Output = -511;
}
SetDCPWM1(actuator1Output+511);
It can be seen in this code that if the output value from the PI controller is either greater than +511 or less than -511, it will set the value to exactly +511 or -511 respectively. This ensures that the value that is sent to PWM duty cycle function SetDCPWMn(int duty cycle) is incremented by 511 and guarantees the value cannot breach its lower and upper limits of 0 and 1024 respectively.
When the PI controller's output is at the extreme values, the motor will be full on in either the forward or reverse direction. This makes sense as if the error is that great; the joint is a long distance from its set point and can therefore advance towards it at its fastest rate.
As the sensor readings are taken alternately, there is a very short delay between each time the sensors are read. This can lead to slight oscillations that will take a long time to disappear. To get around this issue, the controller program has a few lines of code as follows:
if(P1 <= 0. 000001)
{
P1 = 0;
}
These lines of code will give the controller a tolerable error band.
3. 4. 6 Pseudo-code
Below is a flow diagram showing a rough outline of the sequence of commands that are being followed by the microcontroller to control the movement of the robot arm.
Activate accelerometers
Read switches for new coordinates and calculate new joint angle set points
User inputs value onto switches
Is gainSet = 4
Set gainSet = 0
switch (gainSet)
case 0: set Kp1 from pot
case 1: set Kp2 from pot
case 2: set Ki1 from pot
case 3; set Ki2 from pot
Increment gainSet
Activate PWM function of CCP modules and set duty cycle to 50%
Y
N
START
Robot to 'home' position
Read value of acclerometer1 & calculate angle
Read value of acclerometer2 & calculate angle
Calculate error for proportional term, P1
Calculate error for proportional term, P2
Calculate accumulative error for integral term, I1
Calculate accumulative error for integral term, I1
actuator1Output = Kp1*P1 + Ki1*I1
actuator2Output = Kp2*P2 + Ki2*I2
Output response to motor 1
Output response to motor 2
P1 = 0?
P2 = 0?
P2 = 0?
P1 = 0?
Turn off all peripherals
Y
Y
Y
Y
N
N
N
N
Results
4.1 Results from accelerometer test
Accelerometer 1
Accelerometer 2
VCC (V)
3.3
3.3
Voltage at measured angle (Volts)
00 (VOFFSET)
1.74
1.55
-600 (V+60)
1.04
0.86
+450 (V-60)
2.29
2.15
Δ+ = V+60-V0 (Volts)
-0.72
-0.69
Δ- = V0-V-60 (Volts)
0.55
0.60
Sensitivity (mV/g)
800
800
Acceleration
Δ+
-0.9g
-0.86g
Δ-
0.69g
0.75g
-0.9
-0.86
0.69
0.75
-64.160
-59.320
43.60
48.590
From the results it can be seen that the calculated angles are out by upto +/-50. This can most likely be attributed to neither accelerometer being at exactly 00 when the VOFFSET measurement was taken. None the less, the calculated angles from the accelerometers are still reasonable close to the measured ones that were taken in the test.
The robot
The construction of the robot arm's hardware components was all successfully completed. The gearboxes that are required to rotate the moving links of the arm all rotate smoothly without sticking. below shows the completed arm connected to the motor drive board and breakout board interface, which is in turn connected to the microcontroller and I/O board.
Figure Robot arm assembled and connected to microcontroller and interface
The electronic circuits were also built successfully by following the schematic diagram provided by the University of Manchester for the breakout board and the VeroDes plot shown in . The motor drive board was able to drive the actuators in the gearbox in full forwards direction when the enable and channel A pins were set to logic 'HIGH'. When the channel A pin was set to logic 'LOW', the H-bridge correctly switched the direction of current flow across the motor and caused it to drive in full reverse.
However, at this point in time, the project is not completely functional. The program will follow the flow chart as shown in section 3.4.6 but will not yet drive the motors in the required fashion. The cause of this problem could be either software, hardware or a combination of both. However, it is being assumed that once this issue has been dealt with, the robot will move between its current position and the new coordinates quickly and efficiently.
Conclusion & Recommendations
5. 1 Achievements
The electronic aspects of the robot have been completed successfully. With the appropriate stimulus on the logic pins of the motor drive board, the actuators will move in a speedy and smooth fashion. However, there is still an unresolved problem with the program involving driving the actuators in a bi-directional mode using the PWM function of the CCP modules. Aside from this, the other aspects of the program all work.
The microcontroller will still take the correct readings from its input peripherals and perform the calculations correctly to determine the new angles the arm needs to be in and perform the PI controller algorithm for each controller.
On a personal note, much has been learned in all areas of this project's production.
Limitations
The project has encountered a number of difficulties throughout the duration of the year. These issues have included:
Understanding of robotics
This project was started with only a basic understanding of some simple robotic concepts. As such initial progress was slow to begin with as knowledge had to be gained. Therefore the project has evolved with acquisition of more knowledge.
Instabilities
The robot would appear to have inherent instabilities.
In theory, the design whilst being basic appeared to be sound; however, in practice, difficulties have arisen in maintaining a uniform motor speed.
The motors will successfully drive in one direction, but at only one speed. The reasons for this could be many but the main presumption is there maybe an error in the circuit design which is not easy to deduce.