This project explores an innovative approach to data communication using light signals. By leveraging STM development boards, we demonstrate a seamless embedded system-to-embedded system messaging system. The core objective is to transmit analog data - specifically, readings from an onboard potentiometer (POT) sampled via an ADCโfrom a Transmitter (Sensor Node - SN) to a Receiver (Central Node - CN).
- ๐ Push-button-triggered data sampling
- ๐ก GPIO-based data transmission using the โBit-Bangโ method
- ๐ก Custom Light-of-Things (LoT) Message Protocol with parity checks
- โก Real-time error detection and correction mechanisms
- ๐ Continuous listening mode at the receiver for improved responsiveness
- ๐ LCD display for real-time decoded data output
The system consists of:
-
๐ค Transmitter (Sensor Node - SN)
- Equipped with an ADC to sample an onboard POT
- Transmits the sampled data as a binary message using light pulses (LED)
- Implements the LoT Message Protocol for structured message transmission
- Includes a checkpoint mechanism to track transmitted samples
-
๐ฅ Receiver (Central Node - CN)
- Continuously listens for incoming light-based binary messages
- Decodes the received data and displays it on an LCD
- Implements error detection via parity checks
- Compares received samples with checkpoint messages to ensure data integrity
The LoT protocol defines two types of messages:
Transmits sampled ADC values from the Transmitter to the Receiver.
- ๐ข Start-of-Text (SOT) [1-bit] - LED ON for 1s
- ๐ต Message Identifier [1-bit] - LED OFF for 1s (Data Message)
- ๐ Data Packet [16-bit] - Represents ADC value; LED ON (1) / OFF (0) for 500ms
- โ Even Parity Bit [1-bit] - Used for error detection
- ๐ด End-of-Text (EOT) [1-bit] - LED blinks rapidly for 1s
Ensures message reliability by tracking sent/received samples.
- ๐ข Start-of-Text (SOT) [1-bit] - LED ON for 1s
- ๐ก Message Identifier [1-bit] - LED ON for 1s (Checkpoint Message)
- ๐ Checkpoint Packet [16-bit] - Represents sample count
- โ Even Parity Bit [1-bit] - Ensures data integrity
- ๐ด End-of-Text (EOT) [1-bit] - LED blinks rapidly for 1s
- โ Parity Bit Check - Detects single-bit errors within data packets
- ๐ Checkpoint Message Verification - Compares expected vs. received samples
- If mismatch โ LED blinks rapidly for 2s (๐จ Error Alert)
- If match โ LED remains ON for 2s (โ Success)
- ๐ง GPIO โBit-Bangโ Method: Direct GPIO manipulation for binary serial transmission over light signals.
- ๐ Continuous Listening Mode: The Receiver remains in an always-on state for dynamic responsiveness.
- โ Parity Bit Addition: Enhances error detection beyond just missing messages.
- ๐ LCD Display Output: Provides real-time data visualisation.
๐ Light-Based Messaging Project
โโโ ๐ Receiver_Code/ # Contains the Receiver (CN) implementation
โโโ ๐ Sender_Code/ # Contains the Transmitter (SN) implementation
โโโ ๐ EEE3096S 2023 CS Project Report WLLCAS004 MKKBOI005 MBWMAT002.pdf
โ
Real-time data exchange between embedded systems.
โ
Error detection & correction ensures reliability.
โ
Simple yet effective light-based communication.
โ
Adaptable for various IoT and sensor-based applications.
- Implement ๐ Light-Dependent Resistors (LDRs) for more sophisticated optical reception.
- Improve โฑ๏ธ timing accuracy with hardware-based PWM signals.
- Enhance ๐ data rate and efficiency by optimising transmission protocols.