Project Weekly Progress Report

Project Title:
Microcontroller Implementation of a Small Robot Arm Controller

Week of:  February 22nd, 2000

Engineers:
Megan Bern and Ritesh Patel

Advisor’s Signature:  _________________

Grade:  _______

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


Objective:

        For the week of February 22nd, 2000, our objective was to test the digital filter code by interfacing the EMAC board with the previously designed and tested interface hardware.

Progress:

         The hardware to interface the potentiometer to the A/D shown in Figure 1 was tested with a sine wave.  The input to the hardware was a 5Vp-p, 1Hz sine wave.  This means the maximum voltage input to the hardware is 2.5V and the minimum is -2.5V.  The output therefore should be a 2.5Vp-p, 1Hz sine wave with a maximum voltage of 3.75V and a minimum voltage of 1.25V.  The input signal versus the output signal of the P-to-A/D hardware is shown in Figure 2.  This proves that the P-to-A/D interface hardware is working properly.
 
        The digital filter code was also tested again using the Keil PK51 software.  A sine wave with 1Vp-p, a DC offset of 500mV, and 20Hz was input into the A/D converter.  The output signal was 0.707 of the input signal.  The input signal versus the output signal is shown in Figure 3.  This proves the digital filter code is still working properly.
 

Figure 1:
Schematic for P-to-A/D conversion

     

Figure 2:
Input vs. Output for Sine Wave Test

Figure 3:
Digital Filter Input vs. Output

 


 
 

        Before we connected the hardware to the EMAC board, we investigated the A/D input impedance to see if there would be any impedance mismatching problems.  The specification sheets for the A/D found under H:\Datasheets\MicroPac535\m515.pdf (page 143) listed the following limit values for internal resistance and capacitance.  The sampling time used for the digital filter is ts=0.005s.  According to the equation, RASRC=9kW.  The internal resistance may not be a problem, but the input capacitance may cause the op-amp to oscillate.

 

         With these specifications in mind, the output of the hardware was connected to the input of the A/D converter on the EMAC board.  The previous test with the hardware was performed once again and the output of the P-to-A/D converter was displayed on the oscilloscope without the code running.  This is shown in Figure 4.  The output started to oscillate.
 

Figure 4:
Output of P to A/D Connected to A/D Input

 


 
 

         The specification sheets for the LMC6482 rail-to-rail were found at www.national.com/pf/LM/LMC6482.html#Datasheet.  The specifications indicate that the LMC6482 can typically directly drive a 100pF load with Vs=15V at unity gain without oscillating.  The unity gain follower is the most sensitive configuration.  This is the type of configuration being used.  This direct capacitive loading reduces the phase margin of op-amps.  The combination of the op-amp’s output impedance and the capacitive load induces phase lag.  This results in either an underdamped pulse response or oscillation as shown in Figure 4.

         The schematic shown in Figure 5 was suggested by the specification sheets for the LMC6482 to handle a 330pF load.  R2 and C1 serve to counteract the loss of phase margin by feeding forward the high frequency  component of the output signal back to the amplifiers inverting input, thereby preserving phase margin in the overall feedback loop.  The values of R2 and C1 are experimentally determined for the desired pulse response.

Figure 5:

         The CL is the A/D converter input capacitance which is 45pF.  The value of R1 is 100kW.  The value for C1 was chosen to be 0.01mF.  The value for R2 was experimentally chosen.  A value of 300W for R2 was chosen for the first test implementing the schematic shown in Figure 5..  The output of the P-to-A/D converter was displayed with the output connected to the input of the A/D converter.  This is shown in Figure 6.

Figure 6:
Input vs. Output of P-to-A/D connected to A/D input w/ R2=300W

 

         A second test using R2=45W was used for comparison.  The results for the second test are shown in Figure 7.

Figure 7:
Input vs. Output of P-to-A/D connected to A/D input w/ R2=45W

 

         Comparing Figure 6 and 7, the two different values of R2 gave the same output response.  The program for the digital filter was then ran, the output of the D/A was input into the D/A-to-Amp converter, and the output of the D/A-to-Amp converter was displayed.  The input signal was a 5Vp-p, 1Hz sine wave.  The output signal should also be a 5Vp-p, 1Hz sine wave.  This was done for both values of R2.  The outputs were the same.  This is shown in Figure 8.

Figure 8:
Input vs. Output of D/A-to-Amp w/ R2=45W and R2=300W

 

 
         Measuring the loss in gain of the output for both values of R2 would be hard to do with an input signal being a sine wave.  A DC input signal was used so measuring the loss in gain would be easier.  Figure 9 shows the input versus output of the D/A-to-Amp converter using 45W.  There is a loss in gain of 20mV.  This loss in gain corresponds to a loss of 3.6° of the robot arm.

        The 300W was then tested using a DC input signal.  The input versus output of the D/A-to-Amp converter is shown in Figure 10.  The output seems to same signal as the output.  This was verified using a FLUKE 45 Dual Display Multimeter (EQ-2203) to measure the input and output signals.  The results listed in Table 1 show a 0.0071V difference.  This is only a loss of 1.278° of the robot arm.  This value is better than the value for 45W, so R2=300W.

Table 1:

Input Signal = 2.9452V
 Output Signal = 2.9523V
 


Figure 9:
Input vs. Output of D/A-to-Amp w/ R2=45W

Figure 10:
Input vs. Output of D/A-to-Amp w/ R2=45W

 


Conclusion:

         We were prepared for any interfacing problems that would run into when connecting the P-to-A/D converter to the input of the A/D.  It is good to know of and fix these types of problems now instead of later on in the schedule.  Weeks 6-8 were supposed to be used to implement our menu system.  Instead we will implement the block diagram shown in Figure 11 in software so that when we do implement our menu system, we will have some values to display on the LCD.

Figure 11: