When: After Lesson 24 | Time: Two 2-hour sessions: plan, wire and calibrate in the first, finish and demonstrate in the second | Result: Competent / Not Yet Competent
An electronics cabinet must warn when it overheats. Build a monitor that measures temperature with a thermistor, shows it on the I2C LCD and sounds an alarm through a transistor. The alarm switches on at 30.0 °C and only switches off again when the temperature has fallen to 28.0 °C, so it does not flicker on and off at the threshold. If the sensor is broken or unplugged, the alarm must sound.
What your system must do
Thermistor divider on A0: 10 kΩ from 5 V to A0, thermistor from A0 to GND
Temperature on LCD row 1 to 0.1 °C, using the readCelsius() function on this brief
Calibrate against a reference thermometer at two points (ice pack and room air). If the error is more than 1 °C, add an offset in code
Alarm ON at 30.0 °C or above; OFF only at 28.0 °C or below
Alarm on D8: red LED and 5 V buzzer switched by an NPN transistor with a 1 kΩ base resistor - never straight from a pin
Broken sensor (A0 reads 0 or 1023): the LCD shows SENSOR FAULT and the alarm turns on
LCD row 2 shows NORMAL, ALARM or SENSOR FAULT, padded with spaces so no old letters are left
Update at least once a second. A delay(500) at the end of loop() is fine
Conditions
Individual work. Show your plan sheet, including the transistor drawing, before you wire.
Warm the sensor with your hand and cool it with a sealed ice pack. No flames, soldering irons or heat guns.
Course notes, lesson sketches and Code Along 16.5-16.7 may be used. You must be able to explain your own sketch.
Kit
Uno, breadboard, 10 kΩ NTC thermistor, 10 kΩ resistor, I2C 16x2 LCD, red LED and 330 Ω resistor, 5 V buzzer, NPN transistor (for example BC337) and 1 kΩ resistor, reference thermometer.
Temperature function you may copy
The Beta equation from the thermistor lesson. Put it below loop(). Check for 0 or 1023 first: only call it when the sensor is working.
// Turns the A0 reading into degrees C.
// 3950 is the B value - change it if your thermistor's datasheet says otherwise.
float readCelsius(int raw) {
float resistance = 10000.0 / (1023.0 / raw - 1.0); // thermistor in ohms
float invT = 1.0 / 298.15 + log(resistance / 10000.0) / 3950.0;
return 1.0 / invT - 273.15; // kelvin to C
}
Evidence to submit
The plan sheet on this brief (pins and alarm circuit), initialled before wiring
Your sketch (.ino)
The calibration table on this brief, filled in
The test table on this brief, filled in
A fault you found and fixed
Plan sheet: pins
Fill in before you wire. The assessor initials it.
Part
Uno pin
Notes
Thermistor divider
LCD SDA
LCD SCL
Alarm transistor (base resistor)
Plan sheet: alarm circuit
Draw it before you wire: D8, the 1 kΩ base resistor, the NPN transistor, the buzzer, the red LED and its resistor, +5 V and GND.
Calibration table
Hold the reference thermometer next to the thermistor and wait until both readings settle.
Condition
Reference °C
Displayed °C
Error (displayed - reference)
Ice pack
Room air
Test table
Run every test on your finished build. Write what you really saw, then Pass or Fail.
#
Test
Expected
Observed
Pass?
1
Room temperature (below 28 °C)
Temperature shown, NORMAL, alarm off
2
Warm the sensor past 30.0 °C
ALARM, buzzer and red LED on
3
Let it cool to about 29 °C
Still ALARM (between the thresholds)
4
Let it cool below 28.0 °C
NORMAL, alarm off
5
Unplug the thermistor
SENSOR FAULT, alarm on within 2 s
6
Plug it back in
Temperature shown again
A fault I found
Something that did not work at first, and how you found and fixed it.
What went wrong
What I checked
How I fixed it
Assessment criteria
Tick one box per criterion. ★ marks a critical criterion.
#
Criterion
Competent when
Not yet competent if
C
NYC
1
Plan before wiring
Pin table and alarm circuit drawing shown to the assessor before wiring.
Plan sheet missing, or done after wiring.
2
★ Safe alarm drive
Buzzer and LED switched by the transistor with a 1 kΩ base resistor; the LED has its own resistor; common GND.
Buzzer on an I/O pin, base resistor missing, or unsafe wiring.
3
Temperature and display
LCD shows °C to 0.1; two calibration points recorded and within ±1.0 °C (after any offset); both LCD rows clean in every state.
No calibration, an error over ±1.0 °C left uncorrected, or garbled LCD text.
4
★ Two thresholds
Alarm switches on at 30.0 °C and stays on until 28.0 °C.
One threshold only, flickering near 30 °C, or the wrong levels.
5
★ Broken sensor
Unplugging the thermistor shows SENSOR FAULT and turns the alarm on within 2 s.
A false temperature is shown, or the alarm stays off.
6
Testing and explanation
Every row of the test table filled in with what really happened, one fault written up, and can explain why there are two thresholds.
Rows missing or copied, no fault written up, or cannot explain the two thresholds.
How the result is decided
Each criterion is marked Competent (C) or Not Yet Competent (NYC) on the evidence seen. There are no partial marks.
The overall result is Competent only when every criterion is Competent.
Critical criteria (marked ★) cover safety and the core purpose of the task. They cannot be made up by strong work elsewhere.
A Not Yet Competent result lists the criteria still to meet, written feedback and a reassessment date.
One reassessment is offered, normally in the next buffer session. Only the criteria marked NYC are reassessed.
Assessor guidance
Check the transistor drawing and the wiring before a buzzer is connected.
Unplug the thermistor yourself during the demonstration to check the broken-sensor alarm.
Watch the alarm while the temperature falls from 30 °C to 28 °C - it must stay on throughout.
Suggested questions: Why two thresholds? Why must a broken sensor sound the alarm?