_____ _____ ____  ____  
| ____| ____|  _ \|  _ \ 
|  _| |  _| | |_) | |_) |
| |___| |___|  __/|  __/ 
|_____|_____|_|   |_|

2024-25 Sem 2 Project: Binary Signal Detective

Introduction

Your objective is to figure out a secret 4-character code that has been encoded as an optical binary signal in the form of a flashing region of pixels in a video.

  1. Each of you has been assigned a unique 4-character code, which is encoded in your own individual video file.
  2. Build an optical detector circuit to measure the binary signal and display it on the oscilloscope.
  3. Analyse the signal on the oscilloscope to figure out your secret 4-character code.
  4. Check your code using the provided online validator.
  5. Upload a screenshot of the validator's confirmation message to Brightspace to secure a 100% grade for the project.
Binary Signal Detective Online Validator

Binary signal description

The following example signal encodes the word “Demo”:

An example signal recording of a 4-byte transmission

Note: To see the video for the example signal shown above, type the student number "C12345678" into the validator.

Instructions

Photodetector circuit

A suggested photodetector circuit is provided below.

Photodetector circuit diagram

Explanation

Note: Transistors Q1 and Q2 are connected as a so-called Darlington pair, which results in an overall current gain that is approximately equal to the product of the individual transistors’ current gains.

OPTIONAL: Alternative signal capture method using an Arduino

Note: If an oscilloscope is available, this part is not required. It is only included here in case anyone needs to complete the project without access to lab equipment.

The following Arduino code can be used to record a voltage signal on pin A0 and display the resulting waveform on the computer screen using the Serial Plotter tool in the Arduino IDE. An example signal is shown below.

//
// Signal viewer - written by Ted Burke - 17-Apr-2023
//

void setup()
{
  Serial.begin(9600); // open serial connection at 9600 bits/second
  Serial.println("\ngnd[V] Vdd[V] Vout[V]"); // signal labels
}

void loop()
{
  Serial.print("0.0 5.0 "); // print ground and supply voltages
  Serial.println(0.0048876 * analogRead(0)); // print signal voltage
  delay(25); // short delay to reduce sampling rate
}

An example of a 4-byte transmission captured using Arduino and displayed in Serial Plotter