intermediateChapter 33 of 4530 min

33. Steam Sensor

Use analog input to read the steam sensor; outcome: serial shows steam value (0–1023); breathing on the sensor or spraying water vapor raises the value.

This lesson uses: Arduino UNO R3 board, TinkerBlock TK65 Steam Sensor module, jumper wires (or breadboard). Use analog input to read the steam sensor; outcome: serial shows steam value (0–1023); breathing on the sensor or spraying water vapor raises the value.

1. Wiring

Connect TK65 Steam Sensor to Arduino:

  • GND → Arduino GND
  • VCC → Arduino 5V
  • SIGNAL → Arduino A0
  • NC leave unconnected

TK65 wiring diagram

2. New sketch

  1. Arduino IDE: File → New (or Ctrl/Cmd + N) to create a blank sketch
  2. Confirm board and port are selected (same as Lesson 01)
  3. Type the code below into the default setup() and loop() yourself

3. Program structure

Same as last lesson: two fixed blocks setup() and loop().

  • setup(): Start serial; runs once.
  • loop(): Keep repeating “read analog value → print to serial → wait → repeat”.

Breathe on the module or bring it near steam and the serial value will go up—upload and try.

4. Code to write

Type the code below into setup() and loop() (do not copy-paste; typing it yourself helps you remember):

lesson33.ino
// Steam sensor on A0; higher value = more steam/humidity
#define STEAM_PIN A0

void setup() {
  Serial.begin(9600);   // Baud 9600 for steam value
  Serial.println("Steam sensor program started");
}

void loop() {
  int val = analogRead(STEAM_PIN);   // Read A0, 0-1023
  Serial.print("Steam: ");
  Serial.println(val);   // Higher usually = more steam/humidity
  delay(200);   // Update every 200 ms
}
View on GitHub · workshop/33-steam-sensor/arduino/lesson33/lesson33.ino @ v1.13

Program notes

Overall idea: TK65 outputs an analog voltage that rises with water on its gold loops; A0 gives 0–1023. A dry board reads 0. Steam or breath only counts once it condenses into droplets on the loops: the board does not sense humidity in the air. Without calibration we only compare relative values.

CodeIn this lesson
analogRead(STEAM_PIN)Read A0; 0–1023 maps to sensor output; higher = more water on the loops

5. Hands-on

  1. After entering the code, click Verify (✓) to compile
  2. Click Upload (→) to upload to the board
  3. Open Serial Monitor (Tools → Serial Monitor, baud 9600)
  4. Watch serial: current steam value
  5. Breathe on the sensor or spray water vapor and see the value change

Expected result:

The TK65 on a baseplate, cabled to an Uno-format shield

Serial monitor, dry and then with a breath on the loops:

Steam sensor program started
Steam: 0
Steam: 0
...

Dry, it prints 0 or close to it. Breathe on the loops and the number jumps, then falls back over a few seconds as the fog clears. How high it goes depends on the breath and the room.

Note: TK57 Reflective Optical Sensor works similarly (optical detection); you can try it.

Proceed to Lesson 34.

Edit this page — content/guides/tinkerblock-workshop/33-steam-sensor.mdx

Community

Questions about this product

See what other owners have asked, and read their solutions.

Ask a question ↗

Steam Sensor

Loading discussions…

Discuss this article

Ask about this page. The answer stays here, on the page it belongs to, for whoever hits the same wall next.

Browse Projects and guides on the forum →