MCU Examples.com
PIC Microcontroller Project Examples, free source codes and resources collection.


Channel positioned TV antenna

Testing and Validation

In order to identify whether the product is in working condition and performs all the required functions. The product was tested by the following phases.

Test Plan

1 Test if the pulses are given to the stepper motor appropriately
2 Test clockwise rotation of the motor
3 Test anticlockwise rotation of the motor
4 Determine whether a position is saved Recalling a particular position

System testing

Initially determining whether the rotation of the motor was sound is important as this would ensure that any rotation of the motor would not be a problem in the stages to follow. This was done by connecting four LED’s and simulating the code. Simulating the steps using the LED’s following are the areas which consideration was given to ensure optimal function;

  • If the required pulse was given to the stepper motor without missing any pulses and unnecessary delays
  • If the pulses stop once button which is pressed is released without going through the full pulse cycle.
  • Once the button is released the pulse would stop at a random position and to avoid any unnecessary movement of the stepper motor, determining whether the next pulse begins from the next LED rather than the first LED was also important.

This was done without considering whether the rotation was clockwise or anticlockwise. Once phase one of testing was complete the stepper motor and potentiometer was connected and the necessary buttons assigned for both clockwise and anticlockwise which was button 1 and 3. Following were areas of concern for testing phase 2 and 3;

  • The rotation of the motor was in the required direction once the necessary button was pressed.

Once the rotation of the stepper motor was tested, the next phase was to determine the current position using A/D conversion from the voltage value obtained from the potentiometer in order to saved the binary value to the EEPROM . Following was the area of concern

  • Once the necessary button is pressed the current position is saved to required EEPROM address (which was determined using MPLAB).

After completion of phase 4 testing, phase 5 testing was to determine whether the save positions in phase 4 could be recalled. Following was the area of concern;

  • Once the necessary recall button is pressed the stepper motor should rotate in the direction which gives the shortest length.
  • Once the required position is reached the rotation of the motor should stop.

During prototype testing errors were identified and they were rectified by using the debugger mode of MPLAB using the ICD 2.0