Project Title:

Microcontroller Implementation of a Small Robot Arm Controller

Week of: April 4th, 2000

Engineers:

Megan Bern and Ritesh Patel

Advisor’s Signature: _________________

Grade: _______

=================================================================

Objective:

For the week of April 4th, 2000, the objectives were to investigate the P controller problem and continue with the menu system.

Progress:

The diagram shown in Fig. 1, which includes DC adjustments, was examined to find the problem with the P controller. We calculated the signals at different positions throughout the P controller to find the problem. Table 1 shows values throughout the P controller with the current output of the robot arm at 0° and input at 0V.

Figure 1: P Controller (DC/AC model)

Table 1: Scope values
     Scope = 0° (0V) = 00h
Scope1 = 0V = 00h
  Scope2 = 2.5V = 80h
         Scope3 = 4.4575V = E4h
Scope4 = -4.4575V
Scope5 = -13.915V

As you can see the results in Table 1, the value for Scope5 exceeds the power supply, therefore changes are needed. If we subtract 80h after the digital filter in the feedback loop, subtract 80h after the input, and then add 80h before the D/A converter after the summation, the scope values are as shown in Table 2.

Table 1: Scope values

Scope = 0° (0V) = 00h
Scope1 = 0V = 00h
Scope2 = 2.5V = 80h - 80h = 00h
Scope3 = 0V = 00h
Scope4 = 0V = 00h + 80h = 80h
Scope5 = 0V = 0°
This is the kind of response desired from the P controller. This creates a problem with negative numbers. To avoid using 2’s compliment, flags will be used to keep track of negative numbers. Two RAM locations, negi and negf, will be used to keep track if the input or feedback is negative. A 1 will represent a negative number and a 0 will represent a positive number in the RAM location. This creates four possibilities for the summation of the input signal and the feedback signal. The software, which is attached to this report, was written to consider all four possibilities and was ran and tested. The robot arm would move accordingly for a little over half of the range. When the arm was moved further to the right, the arm would move back to the desired position. When the arm was moved further to the left, the arm would not move back to the desired position.

We found that there are two cases within the controller that cause problems. When the input is a negative number and the feedback is positive, the error signal is a big negative number. Then that number is added to 80h. If the error signal is smaller than -80h, we are trying to send a negative number into the D/A. This cannot occur. The other case is when the input signal is positive and the feedback signal is negative. The error signal will be a big positive number. When this number is added to 80h, we get an even bigger positive number, which results in overflow.

This problem will be looked at in more detail next week.

Conclusion:

The problem with the P controller was investigated and improved. The robot arm was moving for the full range but not responding for half of the range when the robot arm was moved. The menu system is still being worked on. We are behind schedule. Here is the schedule for weeks 11 and 12.
 
 


Schedule for Weeks 10-12

Week 11 Modify/add to Menus/Testing/P controller

Week 12 Proportional-derivative Controller

                                                                                            home