Testers – what value add we provide?

As a tester what value add we provide? To answer this we need to answer few questions like
What is a business value of testing?
What is cost of quality?

Running tests by itself has no value add. Testing has value when it connects with some other goals or objective of the organization.
Some of the goals are listed below:

  1. Finding must-fix defects before release. This will reduce long term defect related cost.
  2. Finding less critical defects which have workaround. These workaround can be documented and reduce tech support and helpdesk cost.
  3. Reduce risk by running tests and giving confidence to delivery manager in releasing it to customer. This will give an assurance that the software will also pass the test on customer environments and probability of failure is less.

To measure the quantitative value add and efficiency of testing we need to look into Cost of Quality.

Cost of quality can be understood as cost of poor quality. Cost of quality shows that cost of poor quality is more and that good quality saves money. Cost of quality can be classified as

  1. Cost of prevention – Cost incurred to prevent bugs from happening. Example: training to development team.
  2. Cost of detection – Expense incurred in finding bugs and would include even if we do not find bugs. Examples: Test planning, design and execution etc.
  3. Cost of internal defects/failures – Expense incurred in re-work / bug fixing and expense of re-testing.
  4. Cost of external failures – Expenses we incurred because we did not found and removed all defects before release and there are defect leakages.

Spending effort on external failures are less if we spend more effort in defect prevention, detection and internal failures. It increases confidence that probability of external failures is less.

So it’s very clear that cost of quality is high if there is no internal testing. To phrase it correctly, no proper internal testing as you may argue that developers do testing. By Proper I mean complete end to end testing and not just unit level testing.

We clearly see that there is a need of testers and some value that testers can provide.
Also as a testers we should move out of our comfort zone and think ourselves as an independent advisor to customer and provide trusted advice to customer in terms of quality and quality improvement process.
Feel free to provide your thoughts on this.

 

How to connect 16*2 LCD display Arduino UNO

To Connect 16*2 LCD Display Arduino Uno we will use the previous project to capture temperature and display on console.

Parts required for the project:

  1. Arduino IDE to program the code and upload
  2. OneWire and DallasTemperatre library for the Arduino and DS18B20
  3. One DS18B20 digital temperature sensor
  4. Arduino UNO R3
  5. 16*2 LCD display
  6. Jumper wires
  7. Breadboard/PC/General purpose board
  8. Arduino UNO cable
  9. wires

Steps 1: Wiring Arduino and DS18B20

  • The wiring, of a 1-wire interface, is super simple.
  • The GND pin of the DS18B20 goes to GND on the Arduino. [black]
  • The Vdd pin of the DS18B20 goes to +5V on the Arduino. [red]
  • The Data pin of the DS18B20 goes to a (digital) pin of your choice on the Arduino, in this example I used Pin 7
  • Add a pull-up resistor of 4.7 KΩ. as shown in the schematic diagram. One end of resistor connecting Vdd and another end connecting data pin.

Step 2: Connecting the LCD display

  • VSS –> GND Arduino
  • VDP –> 5V Arduino
  • VO –> output potentiometer (potentiometer VCC -> 5V Arduino, potentiometer GND -> Arduino GND).
  • RS –> pin 12 Arduino
  • RW –> GND Arduino
  • E –> pin 11 Arduino
  • D4 –> pin 5 Arduino
  • D5 –> pin 4 Arduino
  • D6 –> pin 3 Arduino
  • D7 –> pin 2 Arduino
  • A –> 5V Arduino with 1.2 k resistor
  • K –> GND Arduino

 LCD display Arduino UNO breadboard diagram

Step 3: WRITING CODE AND UPLOADING

Machine generated alternative text: fritzing

#include<OneWire.h>
#include<DallasTemperature.h>
#include<LiquidCrystal.h>

// Data wire is plugged into digital pin2
#define ONE_WIRE_BUS 7
OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);
//LCD display pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
double temperature;
void setup(void)
{
 Serial.begin(9600);
 //Serial.println("Temperature Demo");
 sensors.begin();
 lcd.begin(16, 2);
 lcd.print("hello, WORLD");

}
void loop()
{
 sensors.requestTemperatures(); // send command to get temperatures
 delay(500);
 temperature= sensors.getTempCByIndex(0);
 delay(1000);
 lcd.display();
 lcd.setCursor(0, 1);
 lcd.print("Temp: ");
 lcd.setCursor(7, 1);
 lcd.print(temperature);
 lcd.print(" C");
 
}

LCD display Arduino UNO Schematic

Screenshot of the Project output

LCD display Arduino UNO project screenshot

How to Measure temperature with Arduino and DS18B20 sensor?

In this example project we will be combining an Arduino and DS18B20 sensor. The DS18B20 is also called 1-wire digital temperature sensor

Arduino and DS18B20 Temperature Sensor The DS18B20 comes in different forms and shapes, so you have plenty of choice when deciding which one works best for you. There are 3 variations available: 8-Pin SO (150 mils), 8-Pin µSOP, and 3-Pin TO-92.

I have used waterproof version as shown below.

ds18b20-waterproof

Note: DS18B20 is quite versatile. It can be powered through the data line (so called “parasite” mode, which requires only 2 wires versus 3 in normal mode), it operates in a 3.0V to 5.5V range, measures Temperatures from -55°C to +125°C (-67°F to +257°F) with and ±0.5°C Accuracy (from -10°C to +85°C). It converts a temperature in 750ms or less to a up to 12 bits value. Another cool feature is that you can connect up to 127 of these sensors in parallel, and read each individual temperature.

Things you need to get Arduino and DS18B20 sensor work:

  1. Arduino IDE to program the code and upload
  2. OneWire and DallasTemperatre library for the Arduino and DS18B20
  3. One DS18B20 digital temperature sensor
  4. Arduino UNO R3
  5. Jumper wires
  6. Breadboard/PC/General purpose board
  7. Arduino UNO cable

Below is the schematic diagram for the same.

Schemaic_arduino_ds18b20_temperature_sensor

 

 

Step 2: Installing and loading OneWire and DallasTemperature Library

Unzip the downloaded zip file. Make sure that folder name is OneWire, which contains the library. Drag it into the Library folder of Arduino IDE. Alternatively you can use Sketch-> Import Library -> Add Library option of Arduino IDE and select the Zip file.

Step3: Writing code and uploading

#include<OneWire.h>
#include<DallasTemperature.h>

// Data wire is plugged into digital pin2
#define ONE_WIRE_BUS 2

OneWire oneWire(ONE_WIRE_BUS);

DallasTemperature sensors(&oneWire);
void setup(void)
{
 Serial.begin(9600);
 Serial.println("Temperature Demo");
 sensors.begin();
}

void loop()
{
 Serial.print(" Fetching temperature...");
 sensors.requestTemperatures(); // send command to get temperatures
 Serial.println("Done..");
 Serial.println("Temperature is ");
 Serial.println(sensors.getTempCByIndex(0));
 delay(1000);
}


Output will be shown as follows:

Arduino DS18b20 - Output

Screenshot of the above example:

Arduino and a DS18B20 sensor 1

We can modify this to display it in LCD display. For details on how to display the temperature on LCD display visit my post How to connect 16*2 LCD display Arduino UNO

Servo Motor Control using Arduino

Following post will explain Servo motor control using Arduino UNO 3.

Servo motors have three wires: power, ground, and signal. The power wire is typically red, and should be connected to the 5V pin on the Arduino board. The ground wire is typically black or brown and should be connected to a ground pin on the board. The signal pin is typically yellow or orange and should be connected to pin 9 on the board.

The potentiometer should be wired so that its two outer pins are connected to power (+5V) and ground, and its middle pin is connected to analog input 0 on the board.

Figure 1 – Schematic Diagram

servomotor-arduino_bb

Figure 2- Circuit Diagram

servomotor-arduino_schem

 

 

Complie and upload the following code.

#include <Servo.h>
Servo myservo;  // create servo object to control a servo
int potpin = 0;  // analog pin used to connect the potentiometer
int val;    // variable to read the value from the analog pin

void setup() {
  myservo.attach(9);  
// attaches the servo on pin 9 to the servo object
}

void loop() {
 val = analogRead(potpin);   
 // reads the value of the   potentiometer (value between 0 and 1023)
 val = map(val, 0, 1023, 0, 180); 
 // scale it to use it with the  
 servo (value between 0 and 180)
 myservo.write(val); 
// sets the servo position   according to the scaled value
 delay(15);   
// waits for the servo to get there
}

Next we will see how to measure temperature using DS18B20.

 

How to test Arduino UNO

You have received your Arduino UNO and want to quickly verify and test arduino uno that it is in good condition or you want to write your first Arduino UNO program. To do so you need to follow the following steps:

  • Launch the Arduino IDE. If you have not installed, you can download from following site and install it.

https://www.arduino.cc/en/Main/Software

  • Connect the Arduino to USB port.
  • Write the following code to blink the on board LEDtest arduino uno 1
  • Compile and upload the code.
  • The on board LED should start blinking every second.