Guided physical computing, beginning with the Arduino Starter Kit Classroom Pack

Arduino Uno R3

Isolate a digital signal with the 4N35

Send a digital state through light inside the 4N35 while keeping two low-voltage circuits electrically separate.

CSTA 2026 mapping candidatesNot reviewed by CSTA
MS-SYS-HW-30Systems & SecurityMS-PRO-TR-19Programming

Students will

  • Identify the 4N35 input LED and output phototransistor pins
  • Transfer a digital state without a shared signal wire
  • Explain why connecting the two circuit grounds defeats the isolation demonstration

Evidence of success

  • A pin-labeled 4N35 circuit record
  • The receiver repeatedly detects the sender's changing state
  • The student identifies that the two grounds remain unconnected in the isolation demonstration

Hardware

  • Two Arduino Uno R3 boards from separate Starter Kits
  • 4N35 optocoupler
  • 220 Ω input resistor
  • 10 kΩ output pull-up resistor
  • Two breadboards and jumper wires
  • Two independently reviewed low-voltage supplies

Prerequisites

  • Read a reliable active-low input
  • Build a protected LED output
  • Plan and verify power for a load

Before class

  • Verify the exact 4N35 notch orientation and pinout from the manufacturer datasheet
  • Prepare two independently powered, low-voltage circuits
  • Keep this as an advanced supervised extension; do not introduce mains or other hazardous voltages

Reviewed connection map

Two-board optocoupler handoff

Sender D8 + resistorDrives the 4N35 input LED
4N35 light barrierTransfers state without a direct signal wire
Receiver D8 INPUT_PULLUPReads the isolated transistor output
Separate groundsRemain unconnected for the isolation demonstration
  1. Build and test the sender and receiver sides separately using the exact 4N35 pinout.
  2. Use the reviewed current-limiting resistor on the input LED.
  3. Keep sender and receiver grounds separate in the isolation demonstration.

Build and test

  1. 01Label the input-side anode and cathode and the output-side collector and emitter from the 4N35 datasheet
  2. 02With both supplies disconnected, wire the sender D8 through 220 Ω to the optocoupler input LED
  3. 03On the separate receiver, wire the output phototransistor with a 10 kΩ pull-up and read the collector at D8
  4. 04Keep the sender and receiver grounds separate, upload the role-selected sketch to each Uno, and observe the active-low received state
  5. 05Document which connections cross the isolation boundary and verify that only light inside the 4N35 carries the signal

Read before uploading

Annotated Arduino sketch

const bool THIS_BOARD_IS_SENDER = true;
const int SIGNAL_PIN = 8;
unsigned long lastChange = 0;
bool state = LOW;

void setup() {
  pinMode(SIGNAL_PIN, THIS_BOARD_IS_SENDER ? OUTPUT : INPUT_PULLUP);
  Serial.begin(9600);
}

void loop() {
  if (THIS_BOARD_IS_SENDER) {
    if (millis() - lastChange >= 1000) {
      lastChange = millis();
      state = !state;
      digitalWrite(SIGNAL_PIN, state);
    }
  } else {
    bool lightReceived = digitalRead(SIGNAL_PIN) == LOW;
    Serial.println(lightReceived ? "signal" : "no signal");
    delay(100);
  }
}

Optional engineering record

Record evidence from this lesson

Choose the prompts that help students explain predictions, evidence, debugging, and transfer. Saving creates a new entry in this browser’s Rudi notebook.

Record your thinking — optional4 prompts

Use these prompts if they help students capture evidence, decisions, or questions. You do not need to complete every prompt or create an entry at every step.

Nothing is saved until you choose this button.

Troubleshooting

The receiver never changes

Disconnect both supplies and verify 4N35 orientation, input LED polarity and resistor, collector/emitter pins, receiver pull-up, and the selected sketch role.

The receiver logic appears reversed

Treat the pulled-up collector as active LOW: light in the optocoupler pulls the receiver input toward GND.

The two circuits share a ground through another cable

Stop and review the complete power arrangement; use independently reviewed supplies if the goal is to demonstrate electrical isolation.

2026 middle school standards

Potential CSTA connections

Not reviewed by CSTA

These are evidence-based crosswalk candidates for curriculum review—not a claim of official alignment.

MS-SYS-HW-30

Examine differences between computing systems based on user needs, system requirements, and potential societal, environmental, and ethical impacts.

Students compare directly connected and optically isolated signal systems against a stated requirement.

Lesson evidence: Two-side system diagram
MS-PRO-TR-19

Use systematic strategies to test, refine, and document changes to a computing technology to meet the intended purpose.

Students isolate variables, compare observed behavior with the intended purpose, and document a revision.

Lesson evidence: Isolation and signal test
View the official 2026 CSTA standardsStandard text: Computer Science Teachers Association (2026), CC BY-NC-SA 4.0.

Supporting concepts

component-boards · floating-inputs · power-and-signals

Sources and review

Arduino Uno R3 documentationArduino Projects Book · CC BY-NC-SA 3.0onsemi 4N35 datasheet

Starting point, not verified curriculum. Review the actual hardware, circuit, code, power requirements, and classroom conditions.

After teaching this lesson

Make one bounded change—or connect the skill to a project.