Back to Practical Assessments

Wilteq Arduino Uno Course - Practical assessment

Practical Task A: Extractor Fan Speed Selector

When: After Lesson 15  |  Time: Two 2-hour sessions: plan and wire in the first, finish, test and demonstrate in the second  |  Result: Competent / Not Yet Competent

Learner: ______________________________    Assessor: ______________________________    Date: ______________

The brief

A workshop extractor fan needs a speed button. The fan is represented by an LED driven with PWM, and a second LED shows when the fan is running. Each press of the button steps the fan OFF → LOW → HIGH and back to OFF. Every change of speed is printed on the Serial Monitor.

Each press of the button on D2 steps the fan OFF, LOW, HIGH and back to OFF; the fan LED on D6 runs at 0, 40 or 100 percent PWM and the running LED on D5 is on at LOW and HIGH

What your system must do

  • Push button on D2, wired to GND, with pinMode INPUT_PULLUP
  • Fan LED on D6 (PWM): OFF 0 %, LOW 40 % (analogWrite 102), HIGH 100 % (255)
  • Running LED on D5: on at LOW and HIGH, off at OFF
  • Each press steps OFF → LOW → HIGH → OFF. One press = one step: use the button code on this brief
  • Serial at 9600 baud prints one line per change, for example Fan: LOW (40%)

Conditions

  • Individual work. Show your plan sheet to the assessor before you wire.
  • Course notes, lesson sketches and Code Along 16.1-16.3 may be used. You must be able to explain your own sketch.
  • The assessor asks a few questions during the demonstration.

Kit

Uno, breadboard, 1 push button, 2 LEDs, 2 × 330 Ω resistors, jumper wires and oscilloscope.

Button code you may copy

A button bounces, so one press can look like several. Waiting 50 ms after every change hides the bounce. Nothing else has to happen at the same time in this task, so the short delay is fine.

// 1. At the top, with your other variables:
bool lastReading = HIGH;            // HIGH = not pressed

// 2. Inside loop():
bool reading = digitalRead(buttonPin);
if (reading != lastReading) {       // the button has just changed
  if (reading == LOW) {
    // just pressed - step to the next speed here
  }
  delay(50);                        // let the bounce die away
  lastReading = reading;
}

Evidence to submit

  1. The plan sheet on this brief (pins and speeds), initialled before wiring
  2. Your sketch (.ino)
  3. The test table on this brief, filled in
  4. A fault you found and fixed

Plan sheet: pins

Fill in before you wire. The assessor initials it.

PartUno pinResistor
Button
Fan LED
Running LED

Plan sheet: speeds

Fill in the empty columns before you wire.

Speed nowAfter one pressFan D6 (analogWrite)Running LED D5Serial line
OFF
LOW
HIGH

Test table

Run every test on your finished build. Write what you really saw, then Pass or Fail.

#TestExpectedObservedPass?
1Power on (reset)Fan off, running LED off, Serial: Fan: OFF (0%)
2Press onceFan dim, running LED on, one line: Fan: LOW (40%)
3Press againFan full, one line: Fan: HIGH (100%)
4Press againBack to OFF, one line
5Hold the button for 3 sOne step only, one line
6From OFF, press 10 times quicklyExactly 10 lines; ends at LOW
7Scope on D6 at LOWAbout 980 Hz, 40 % duty

A fault I found

Something that did not work at first, and how you found and fixed it.

What went wrongWhat I checkedHow I fixed it

Assessment criteria

Tick one box per criterion. ★ marks a critical criterion.

#CriterionCompetent whenNot yet competent ifCNYC
1Plan before wiringPin and speed tables filled in and shown to the assessor before wiring.Plan sheet missing, or filled in after wiring.
2★ Safe buildEach LED has a 330 Ω resistor; the button goes to GND; wiring matches the pin table.Any LED without a resistor, a short-circuit risk, or wiring that does not match the pin table.
3★ Button and speedsEach press steps OFF → LOW → HIGH → OFF with the right brightness and running LED; 10 quick presses give exactly 10 steps; holding gives one step.A wrong next speed, missed or double steps, or repeats while the button is held.
4Serial outputOne clear line per speed change, and nothing while the button is held.Missing, repeated or continuous output.
5TestingEvery row of the test table filled in with what really happened, including the scope reading, and one fault written up.Rows missing, the observed column copied from the expected column, or no fault written up.
6ExplanationExplains in own words how a press picks the next speed and why the 50 ms wait is there.Cannot explain how the sketch decides the speed.

How the result is decided

Assessor guidance

Feedback and reassessment

Criteria not yet met (numbers)
Feedback to the learner
Reassessment date

Sign-off

Result Competent     Not Yet Competent
Assessor signatureLearner signature