pH sensor

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

pH sensor

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. What does a pH sensor measure?
A How acidic or alkaline a liquid is
B How hot or cold a liquid is
2. A pH sensor is an input device or an output device?
A Output device
B Input device
3. Which data does a pH sensor send to the computer?
A A pH value
B A moisture percentage
4. Which system would use a pH sensor to check that the water is safe for fish?
A A fish tank
B A burglar alarm
5. Which use of a pH sensor is correct?
A Counting how many cars pass a junction
B Testing soil to see if it is too acidic for crops

Match the Pairs

Draw a line connecting each item on the left to its match on the right.

Left columnRight column
1pH sensor AIF pH < 6.5 THEN sound_alarm()
2pH value = 3 BA pH sensor measures how acidic or alkaline a liquid is, not its temperature. A temperature sensor measures temperature.
3A pH sensor in a fish tank keeps the water safe for the fish by checking the pH value CA pH of 7 is neutral, not strongly acidic. Strongly acidic liquids have a pH close to 0.
4A pH sensor in soil testing lets a farmer know if the soil is too acidic or alkaline for crops DThe liquid is strongly acidic, because it is well below 7 on the pH scale
5A pH sensor measures the temperature of a liquid EIF soilPH > 7.5 THEN display("Too alkaline")
6IF pH = 7 THEN print("Strongly acidic") FAn input device that measures how acidic or alkaline a liquid is and sends the pH value to a computer

Definitions

pH sensor

Fill in the Blanks

Complete each line of code by filling in the missing parts.

1.
phValue ← INPUT FROM phSensor IF phValue _ 7 THEN OUTPUT "Acidic"
2.
IF phValue _ 7 THEN OUTPUT "Alkaline" ENDIF
3.
phValue ← _____ FROM phSensor OUTPUT phValue
4.
__ phValue < 6.5 THEN OUTPUT "Fish tank too acidic" ENDIF
5.
CONSTANT neutral ← _ IF phValue = neutral THEN OUTPUT "Neutral"

Spot the Error

Shade in the letter of the line that contains an error.

Question 1
A OUTPUT ph TO phSensor
B IF ph < 7 THEN
C OUTPUT "Acidic"
D ENDIF
Question 2
A ph ← READ_SENSOR(phSensor)
B IF ph < 7 THEN
C OUTPUT "Alkaline"
D ENDIF
Question 3
A ph ← READ_SENSOR(tempSensor)
B IF ph < 6.5 THEN
C OUTPUT "Tank too acidic"
D ENDIF
Question 4
A REPEAT
B ph ← READ_SENSOR(phSensor)
C OUTPUT ph
D ENDIF
Question 5
A ph ← READ_SENSOR(phSensor)
B IF ph < 5.5
C OUTPUT "Soil too acidic"
D ENDIF

Answer Key

pH sensor
Section A: Quick Questions
Q1
A — How acidic or alkaline a liquid is
Q2
B — Input device
Q3
A — A pH value
Q4
A — A fish tank
Q5
B — Testing soil to see if it is too acidic for crops
Section B: Match the Pairs
Q1
pH sensor → An input device that measures how acidic or alkaline a liquid is and sends the pH value to a computer
Q2
pH value = 3 → The liquid is strongly acidic, because it is well below 7 on the pH scale
Q3
A pH sensor in a fish tank keeps the water safe for the fish by checking the pH value → IF pH < 6.5 THEN sound_alarm()
Q4
A pH sensor in soil testing lets a farmer know if the soil is too acidic or alkaline for crops → IF soilPH > 7.5 THEN display("Too alkaline")
Q5
A pH sensor measures the temperature of a liquid → A pH sensor measures how acidic or alkaline a liquid is, not its temperature. A temperature sensor measures temperature.
Q6
IF pH = 7 THEN print("Strongly acidic") → A pH of 7 is neutral, not strongly acidic. Strongly acidic liquids have a pH close to 0.
Section C: Definitions
Q1
pH sensor — An input device that measures how acidic or alkaline a liquid is on the pH scale and sends the pH value to a computer. Used in water treatment, fish tanks, soil testing and food production.
Section D: Fill in the Blanks
Q1
phValue ← INPUT FROM phSensor IF phValue < 7 THEN OUTPUT "Acidic"
Q2
IF phValue > 7 THEN OUTPUT "Alkaline" ENDIF
Q3
phValue ← INPUT FROM phSensor OUTPUT phValue
Q4
IF phValue < 6.5 THEN OUTPUT "Fish tank too acidic" ENDIF
Q5
CONSTANT neutral ← 7 IF phValue = neutral THEN OUTPUT "Neutral"
Section E: Spot the Error
Q1
A — A pH sensor is an input device. It sends the pH value to the computer, so the data must be read FROM the sensor, not output TO it. The line should be INPUT ph FROM phSensor.
Q2
B — Alkaline liquids have a pH above 7. The test must be ph > 7, otherwise acidic liquids would be reported as alkaline.
Q3
A — The fish tank pH value must come from the pH sensor. A temperature sensor measures heat, not acidity. It should be READ_SENSOR(phSensor).
Q4
D — A REPEAT loop that keeps reading the water treatment pH sensor must finish with UNTIL and a condition. ENDIF belongs to an IF statement. It should be UNTIL shutdown = TRUE.
Q5
B — Every IF statement needs THEN after the condition. The soil pH check should be IF ph < 5.5 THEN.