Post on 24-Apr-2020
Obstacle Recognition System for the Blind
TEST PLAN
November 27, 2013
ECE 411Homework 6
Prepared byPrachi Pai Asnodkar
Padmashree PatilThuy Tran
Sarita L. Tellez Sanchez
1 | P a g e
Table of Contents
Case study: Obstacle Recognition System for the Blind...............................................................................3
I. Acceptance Testing...............................................................................................................................3
II. Integration Testing...............................................................................................................................4
III. Unit Testing........................................................................................................................................8
IV. Functional Testing.............................................................................................................................11
V. Appendix............................................................................................................................................14
2 | P a g e
Case study: Obstacle Recognition System for the Blind
Objective
When the user is facing an obstacle, the system should vibrate within 1-meter range from it. The system should increase its intensity of vibration as the distance decreases.
This case study explores test cases for the acceptance, integration, unit and functional testing related to this requirement. The development of the test cases follows the proper order of test case development. That means acceptance tests are developing in conjunction with the requirements, integration tests are constructed during the system design, and unit tests are constructed during the system build.
I. Acceptance Testing
A step -by- step acceptance test case for the Obstacle Recognition system
We start by constructing an acceptance test case to verify that the system can achieve the stated requirements. A number of tests would need to be built, and we create a test only for the first engineering requirement. A test could be performed by having someone facing the obstacle and moving towards it.
Table 1:A step -by- step acceptance test case for the Obstacle Recognition System
Test Writer: Prachi PaiTest Case Name: Obstacle recognition System acceptance test #1 Test ID #: Distance-AT-01Description: Checks the engineering requirement. The
system must vibrate within 1meter from an obstacle, while the user is facing it.
Type: Black box
Tester informationName of tester: Thuy Tran Date:
Hardware Version: 1.0 Time:Setup: System should be completely power ON and within 1 meter from an obstacle
Step
Action Expected result PassFail
N/A
Comments
1 Write program for a LCD to monitor the distance from an obstacle.
The LCD should give the accurate distance that it is from the user to the obstacle
3 | P a g e
2
Person wearing the device and walk toward an obstacle
Vibration motor will start vibrating when the person is in 1meter range from the obstacle
II. Integration Testing
From the Level 1 diagram of our project, it was determined that our device involves six different modules as shown in figure below. Four are main components which provide a separate and distinct functionality towards the overall project and two are power supplies.
The four main components of the project are: 1. The Ultrasonic Sensor: it detects if the user is in the range of obstacle or not2. Atmeg-328P Microprocessor: The Atmeg-328P is the control unit of the entire system3. Vibration Motor: gives feedback to the user in the form of vibrations of varying intensity
based on the distance between the obstacle and user.4. LCD (Liquid Crystal Display): Display the distance value at which the user is within an
obstacle. The LCD is designed for testing purposes
From this diagram it is clearly noticeable the interaction that exist from the microcontroller to the other modules of the system. Therefore the integration test will examine which combination are must likely to create problems in our design.
4 | P a g e
Table 2: A step -by- step integration test case for the Ultrasonic module HC- SR04 with Atmeg 328P
Test Writer: Padmashree PatilTest Case Name: Ultrasonic Sensor with Atmega328P Test ID #: IT_#1Description: Check engineering requirements: The ultrasonic
sensor should have 95% of accuracy in sensing obstacles as far as 1 meter.
Type: White box
Tester informationName of tester: Sarita Tellez Date:
Hardware Version: 1.0 Time:Setup: 5V Supply pin is connected to 5V supply
Trigger Pulse Input pin is connected to an Atmega328p I/O Echo Pulse Output pin is connected to an Atmega328p I/O 0V Ground pin is connected to ground Another Atmega328p I/O is connected to an LED
Step
Action Expected result PassFail
N/A
Comments
1Place an object within 1 meter of sensor
LED should turn on
2
Place an object more than 1 meter away from sensor
LED should turn off
This test case explains that the ultrasonic sensor should be able to detect an object within one meter and also it should be active as long as the device is powered on.
Table 3: A step -by- step integration test case for the Vibration motor with Atmeg 328P
Test Writer: Thuy TranTest Case Name: 310-101 Vibration Motor with Atmega 328P Test ID #: IT_#2Description: Check that the motor vibrates with different
intensities Type: White box
Tester informationName of tester: Prachi Pai Date:
Hardware Version: 1.0 Time:Setup: The vibration motor power pin is connected to a Pulse Width
Modulation pin of the Atmega 328P The vibration motor ground pin is connected to ground
Step
Action Expected result PassFail
N/A
Comments
1 Set an intensity value in the
Motor should vibrate according to the intensity. We know that Vout =
5 | P a g e
PWM function. The intensity value is a number from 0-255.
intensity/255 * 5 volts. For the intensity value we pick, we can calculate what the expected voltage at the PWM pin is and check that pin with a voltage meter.
2 Increase the intensity value
Motor should vibrate faster. Voltage at the motor pin should change accordingly.
3 Decrease the intensity value
Motor should vibrate slower. Voltage at the motor pin should change accordingly.
This test case explains that the vibration motor should vibrate at different intensities depending on the power given to it. The speed of the motor should change based on the PWM.
Table 4: A step -by- step integration test case for the Ultrasonic Sensor with Vibration motor and Atmeg 328P
Test Writer: Sarita TellezTest Case Name: Ultrasonic Sensor with Atmega328P and
Vibration MotorTest ID #: IT_#3
Description: Check engineering requirements: Increase the intensity of the vibration based on the proximity of an obstacle
Type: White box
Tester informationName of tester: Padmashree Patil Date:
Hardware Version: 1.0 Time:Setup: Ultrasonic Sensor 5V Supply pin is connected to 5V supply
Trigger Pulse Input pin is connected to an Atmega328p I/O Echo Pulse Output pin is connected to an Atmega328p I/O Ultrasonic sensor 0V Ground pin is connected to ground The vibration motor power pin is connected to a Pulse Width
Modulation pin of the Atmega 328P The vibration motor ground pin is connected to ground
Step
Action Expected result PassFail
N/A
Comments
1Place an object within 1 meter of ultrasonic sensor
Motor should vibrate
2
Place an object more than 1 meter away from ultrasonic sensor
Motor should not vibrate
3
Move object closer and closer to the ultrasonic sensor within 1 meter
Motor should vibrate faster
4 Move object farther and farther from the
Motor should vibrate slower
6 | P a g e
ultrasonic sensor within 1 meter
This test case explains that vibration motor should vibrate when the ultrasonic sensor senses an object that is placed 1 meter away from it. The intensity of the motor should increase when the object is getting closer to the sensor.
Table 5: A step -by- step integration test case for the LCD with Atmega 328P
Test Writer: Prachi PaiTest Case Name: The LCD with Atmega328P Test ID #: IT_#3Description: Check engineering requirements: Have an LCD
that displays the distance values. This will be used for debugging process
Type: White box
Tester informationName of tester: Thuy Tran Date:
Hardware Version: 1.0 Time:Setup: LCD 5V supply pin is connected to 5V supply
Three control pins of LCD including Enable, Read/Write, Reset are connected to Atmega328p I/O pins
Four pins of LCD data pins are connected to the Atmega328p I/O pins
Step
Action Expected result PassFail
N/A
Comments
1
Send a symbol lowercase “a” from microcontroller to LCD
A symbol “a” is displayed on the LCD
2
Send a uppercase symbol “A” from microcontroller to LCD
A symbol “A” is displayed on the LCD
3
Send a number “2” from microcontroller to LCD
A number “2” is displayed on the LCD
4
Send a sentence from microcontroller to LCD
A number “Hello world” is displayed on the LCD
4 Change voltage in pin 2 of LCD
The contrast of LCD is changed
This test case explains that LCD should display all symbols according to data transferred from Atmega328P
7 | P a g e
III. Unit Testing
The unit test is developed from the components chosen for the device. The units are selected so that the resulting system can meet the engineering requirements. Each of the components listed above needs to be considered as a candidate for unit testing.
Table 6: Matrix unit test for the voltage regulator
Test Writer: Padmashree Patil Test Case Name: Voltage regulator Test ID #: UX_#1Description: Check engineering requirements: Use a 9volt
battery as power supply and use a voltage regulator to output 5Volts for the components in the device.
Type: White box
Tester informationName of tester: Sarita Tellez Date:
Hardware Version: 1.0 Time:Setup: 9V Supply pin is connected to the input pin of LM7805 IC through a
1N4001 diode 0V Ground pin is connected to ground pin of LM7805 IC Add capacitors from the input and output of LM7085 to ground Connect a LED and a resistor from the output of LM7805 to ground
Step
Action Expected result PassFail
N/A
Comments
1 Turn on power 9V
The LED is lightedThe output of the LM7805 IC is 5V
It is clear from this test case that voltage regulator should get 9V power supply as an input and give regulated 5V dc voltage as an output. An LED will light up as a result that voltage is going through the components.
Table 7: Matrix Unit test for the Ultrasonic module HC-SR04
Test Writer: Thuy TranTest Case Name: Ultrasonic Sensor Test ID #: UX_#2Description: Check the ultrasonic sensor Sense objects in
front of itType: White box
Tester informationName of tester: Prachi Pai Date:
Hardware Version: 1.0 Time:Setup: 5V Supply pin is connected to 5V supply
Trigger Pulse Input pin is connected to a 10us pulse Echo Pulse Output pin is connected to an oscilloscope 0V Ground pin is connected to ground
Step
Action Expected result PassFail
N/A
Comments
8 | P a g e
1Place an object in front of the sensor
A pulse of 150us to 25ms will show in the oscilloscope depending on the distance that acquires
This test makes sure that the ultrasonic sensor is detecting obstacles that are in front of it
Table 8: Matrix Unit test for Atmega 328P
Test Writer: Sarita TellezTest Case Name: Atmega328P Test ID #: UX_#3Description: Verify that the Atmega 328p returns correct
output to the different componentsType: Black box
Tester informationName of tester: Padmashree Patil Date:
Hardware Version: 1.0 Time:Setup: Ultrasonic Sensor 5V Supply pin is connected to 5V supply
Trigger Pulse Input pin is connected to an Atmega328p I/O Echo Pulse Output pin is connected to an Atmega328p I/O Ultrasonic sensor 0V Ground pin is connected to ground The vibration motor power pin is connected to a Pulse Width
Modulation pin of the Atmega 328P The vibration motor ground pin is connected to ground Three control pins of LCD including Enable, Read/Write, Reset are
connected to Atmega328p I/O pins Four pins of LCD data pins are connected to the Atmega328p I/O pins
Step
Action Expected result PassFail
N/A
Comments
1Place an object within 1 meter of ultrasonic sensor
Motor should vibrate
2
Place an object more than 1 meter away from ultrasonic sensor
Motor should not vibrate
3
Move object closer and closer to the ultrasonic sensor within 1 meter
Motor should vibrate faster
4
Move object farther and farther from the ultrasonic sensor within 1 meter
Motor should vibrate slower
5
Send a symbol lowercase “a” from microcontroller to LCD
A symbol “a” is displayed on the LCD
9 | P a g e
Table 9: Matrix unit test for the LCD
Test Writer: Prachi PaiTest Case Name: LCD Test ID
#:UX_#4
Description: Check that the LCD displays a desired data Type: White boxTester information
Name of tester: Thuy Tran Date:Hardware Version: 1.0 Time:Setup: LCD 5V supply pin is connected to 5V supply
Three control pins of LCD including Enable, Read/Write, Reset are connected to Atmega328p I/O pins
Four pins of LCD data pins are connected to the Atmega328p I/O pins
Step
Action Expected result PassFail
N/A
Comments
1
Send a symbol lowercase “a” from microcontroller to LCD
A symbol “a” is displayed on the LCD
2
Send a uppercase symbol “A” from microcontroller to LCD
A symbol “A” is displayed on the LCD
3
Send a number “2” from microcontroller to LCD
A number “2” is displayed on the LCD
4
Send a sentence from microcontroller to LCD
A number “Hello world” is displayed on the LCD
5 Change voltage in pin 2 of LCD
The contrast of LCD is changed
10 | P a g e
Table 10: Matrix Unit test for the Vibration motor
Test Writer: Padmashree PatilTest Case Name: 310-101 Vibration Motor Test ID #: UX_#5Description: Check that the vibration motor vibrates after
giving different voltages Type: White box
Tester informationName of tester: Sarita Tellez Date:
Hardware Version: 1.0 Time:Setup: The vibration motor power pin is connected to a Pulse Width
Modulation pin of the Atmega 328P The vibration motor ground pin is connected to ground
Step
Action Expected result PassFail
N/A
Comments
1
Apply voltage from 2.5 to 3.8DC to the vibration motor
Motor should vibrate according to the intensity. We know that Vout = intensity/255 * 5 volts. For the intensity value we pick, we can calculate what the expected voltage at the PWM pin is and check that pin with a voltage meter.
2 Increase the intensity value
Motor should vibrate faster. Voltage at the motor pin should change accordingly.
3 Decrease the intensity value
Motor should vibrate slower. Voltage at the motor pin should change accordingly.
IV. Functional Testing
Table 11: Functional Requirement for the voltage regulator
Model Voltage Regulator
Input 9V DC.
Output 5V DC.
Functionality Convert 9V from the battery to 5V to supply each component on the circuit
Test UX_#1
Table 12: Functional Requirement for the Ultrasonic module HC-SR04
11 | P a g e
Model Ultrasonic Sensor
Input - 5V DC- Environment (Objects): Objects that are within 5 feet from the user- Signal: 10us control signal from the Atmega 328
Output Pulse: The sensor will go high for 150us to 25ms depending on the distance that acquires
Functionality Detects objects in front of the user within 5 feet
Test UX_#2
Table 13: Functional Requirement for the Atmega 328P
Model Atmega 328
Input - 5V DC- 0 to 5V DC pulse from 150us to 25ms
Output - PWM signal that goes to the motor vibrator- 10us pulse that goes to the ultrasonic sensor - Distance data value that goes to the LCD display
Functionality Obtain data from the ultrasonic sensor and convert it to PWM signals that drive the motor vibrator
Test UX_#3
12 | P a g e
Model LCD Display
Input - 5V DC- PD4-PD7: Digital display lines. Distance value
Output - Distance value displayed
Functionality Display distance value from the objects to the user
Test UX_#4
Table 15: Functional Requirement for the Vibration motor
Model Vibration Motor
Input - 5V DC- PWM Signals from 0 to 5 V
Output - Feedback (Vibration): Pulse vibrations with different intensities
Functionality Converts the information obtained with the sensor into vibration pulses to inform the user that is closer to an object
Test UX_#5
V. Appendix
E N G I NEE R IN G REQUIREMENTS
The device must:
13 | P a g e
Sense objects within at least 1m of range Vibrate when the object is as far as 1 meter from an obstacle Have a vibration motor Have an ultrasonic sensor to sense distance Have a microcontroller Fit on two layer PCB Be assembled by hand by each member of the group Be tested for acceptable working characteristics
The device should:
Be designed in EagleCAD Have an LCD that displays the distance values. This will be used for debugging process Use a 9volt battery as power supply and use a voltage regulator to output 5Volts for the
components in the device. Be operational within an enclosed packaging Be manufactured on a PCB with dimensions of 10x7 cm Have at least a 95% of accuracy in sensing the obstacle at the farthest distance (1 meter) Operate in the temperature range of 0O C to approximately 50O C Increase the intensity of the vibration based on the proximity of an obstacle Fit the following safety standards:
o The device should not hurt a person while they are wearing ito The device should not have exposed internal circuitry
The device might:
Have a comfortable and good-looking package Announce with sound for warning if the user is closer to an object
14 | P a g e