Embedded Systems Project - Bidirectional Wireless Communication Terminal
Embedded Systems Project
A complete bidirectional text terminal system built with Arduino microcontrollers, featuring multi-tap text input via a 4×3 matrix keypad, real-time display on 16×2 character LCDs, and wireless communication between two nodes. This project demonstrates a complete embedded system with user interface design, wireless communication protocols, and efficient firmware organization.
- Project Overview
- Key Features
- Code Structure
- Architecture
- Quick Start
- Documentation
- Tech Stack
- Hardware Requirements
- License
This repository documents a complete embedded system implementation: a bidirectional text terminal with wireless communication. The system has been designed with clear separation between UI logic and transport layers, making it easy to extend and modify.
The project emphasizes:
- Separation of Concerns: Clear boundaries between UI logic (keypad, LCD, buffers) and transport logic (IR/RF)
- Code Reusability: Shared core logic between IR v1 and HC-12 v2 implementations
- Protocol Validation: Strict filtering of received data to prevent message corruption
- Educational Value: Well-documented code and architecture for learning embedded systems
- Professional Structure: Clean, maintainable code suitable for portfolio demonstration
The current implementation supports:
- Two Transport Layers: IR (NEC protocol) and RF (HC-12 433 MHz)
- Bidirectional Communication: v2 HC-12 version allows both nodes to send/receive simultaneously
- Multi-tap Text Input: Old-school phone keypad-style input with 800ms timeout
- 32-Character Message Buffer: Real-time editing and transmission
- LCD Status Display: Dual-line display showing message and status information
|
|
At its core, the system has two roles: Sender and Receiver. The implementation varies by transport layer:
firmware/v1_ir_terminal/
├── sender_ir.ino # Sender Arduino code
└── receiver_ir.ino # Receiver Arduino code
- Two separate firmware files for sender and receiver
- Sender handles keypad input, message buffering, and IR transmission
- Receiver handles IR reception, message buffering, and LCD display
- Unidirectional communication (sender → receiver)
firmware/v2_hc12_terminal/
└── terminal_node_hc12.ino # Single code for both roles
- One symmetric firmware file that works for both nodes
- Same code handles both sending and receiving simultaneously
- Bidirectional communication (either node can send/receive)
- Each Arduino runs the same firmware image
Note: Despite the different file organization, both implementations share the same core logic:
- Keypad scanning and multi-tap input
- Message buffer management
- LCD rendering and status display
- Only the transport layer (IR vs RF) differs
📸 Photo Placeholder: System block diagram showing sender/receiver roles and data flow
🎥 Video Placeholder: Quick demo showing v1 IR transmission from sender to receiver, then v2 HC-12 bidirectional communication
The WireLessText Terminal consists of two Arduino-based nodes that communicate wirelessly:
- v1 (IR): Uses infrared LEDs and receivers with NEC protocol (unidirectional: sender → receiver)
- v2 (HC-12): Uses HC-12 433 MHz RF transceiver modules (bidirectional: either node ↔ either node)
Both versions share the same core functionality: multi-tap text input, message buffering, LCD display, and character-by-character wireless transmission.
┌─────────────────────────────────┐
│ Arduino Node (Single) │
│ │
│ ┌──────────┐ ┌───────────┐ │
│ │ 4×3 │ │ 16×2 │ │
│ │ Keypad │──▶│ LCD │ │
│ └──────────┘ └───────────┘ │
│ │ ▲ │
│ ▼ │ │
│ ┌──────────────────────────┐ │
│ │ Core UI Logic │ │
│ │ - Keypad scanning │ │
│ │ - Multi-tap input │ │
│ │ - Message buffer │ │
│ │ - LCD rendering │ │
│ └──────────────────────────┘ │
│ │ │ │
│ ▼ ▼ │
│ ┌──────────────────────────┐ │
│ │ Transport Abstraction │ │
│ │ - sendChar() │ │
│ │ - receiveChar() │ │
│ └──────────────────────────┘ │
│ │ │ │
│ ▼ ▼ │
│ ┌──────────┐ ┌──────────┐ │
│ │ IR/RF │ │ IR/RF │ │
│ │ Transmit │ │ Receive │ │
│ └──────────┘ └──────────┘ │
└─────────────────────────────────┘
📸 Diagram Placeholder: Higher-resolution block diagram showing data flow between components
For detailed architecture documentation, see docs/architecture.md.
- Assemble two Arduino boards (Uno/Nano) with components listed in
hardware/bom.md - Follow the wiring diagram in
hardware/wiring_ir_v1.md📸 Photo Placeholder: Complete wired sender Arduino with keypad, LCD, and IR LED 📸 Photo Placeholder: Complete wired receiver Arduino with LCD and IR receiver 📸 Photo Placeholder: Close-up of IR LED connection with resistor
- One Arduino becomes the sender (IR LED on pin 9)
- One Arduino becomes the receiver (IR receiver on pin 9)
- Install Arduino IDE (1.8.x or later)
- Install required libraries via Library Manager:
IRremote(by Armin Joachimsmeyer or similar)LiquidCrystal(built-in)
- Upload firmware:
- Open
firmware/v1_ir_terminal/sender_ir.inoand upload to sender Arduino - Open
firmware/v1_ir_terminal/receiver_ir.inoand upload to receiver Arduino
- Open
- Power both Arduinos
- On the sender, type using the keypad (multi-tap input)
📸 Photo Placeholder: LCD showing message being typed with preview character 📸 Photo Placeholder: Status line showing "TX:'A'" after character commit
- Messages appear on both LCDs as they are sent/received
📸 Photo Placeholder: Side-by-side view of sender and receiver LCDs showing synchronized messages 🎥 Video Placeholder: Real-time demo of typing on sender and message appearing on receiver LCD
- Assemble two Arduino boards (Uno/Nano) with components listed in
hardware/bom.md - Follow the wiring diagram in
hardware/wiring_hc12_v2.md📸 Photo Placeholder: Complete wired node with keypad, LCD, and HC-12 module 📸 Photo Placeholder: Close-up of HC-12 voltage divider circuit (2.2kΩ + 3.3kΩ resistors) 📸 Photo Placeholder: HC-12 module with antenna connected
- Important: Use a voltage divider on the HC-12 RX line (HC-12 operates at 3.3V logic, Arduino outputs 5V)
- See
hardware/wiring_hc12_v2.mdfor voltage divider circuit
- See
- Each Arduino needs one HC-12 module (symmetric design)
- Install Arduino IDE (1.8.x or later)
- Required libraries (all built-in):
LiquidCrystalSoftwareSerial
- Upload firmware:
- Open
firmware/v2_hc12_terminal/terminal_node_hc12.inoand upload to both Arduinos
- Open
- Power both Arduinos
- Either node can send/receive messages (fully bidirectional)
📸 Photo Placeholder: Two nodes showing messages typed simultaneously on both 📸 Photo Placeholder: LCD showing "RX:'A' Ln:03" status when receiving
- Type on either keypad to send messages to the other node
🎥 Video Placeholder: Demo showing bidirectional communication - typing on Node A appears on Node B, and vice versa
| Document | Description |
|---|---|
| Architecture | System overview, block diagrams, design decisions, and extension points |
| Pinout | Complete pin assignments for both IR v1 and HC-12 v2 versions |
| Protocol | Communication protocol specifications (IR NEC and HC-12 serial) |
| UI Behavior | User interface details, key mappings, multi-tap behavior, and status messages |
| Wiring (IR v1) | Step-by-step wiring instructions for IR v1 implementation |
| Wiring (HC-12 v2) | Step-by-step wiring instructions for HC-12 v2 implementation |
| BOM | Complete bill of materials with component specifications |
| Component | Version/Details |
|---|---|
| Arduino IDE | 1.8.x or later |
| IRremote Library | For v1 only (NEC protocol support) |
| LiquidCrystal Library | Built-in (LCD display) |
| SoftwareSerial Library | Built-in (for v2 HC-12) |
| Component | Specification |
|---|---|
| Arduino Board | Uno or Nano (ATmega328P, 5V) |
| LCD Display | 16×2 character LCD (HD44780 compatible) |
| Keypad | 4×3 matrix keypad (12 keys) |
| IR LED (v1) | 940 nm, 5 mm (with 220Ω resistor) |
| IR Receiver (v1) | VS1838B, TSOP4838, or similar (38 kHz) |
| HC-12 Module (v2) | 433 MHz RF transceiver (with voltage divider) |
For complete hardware requirements, see hardware/bom.md.
Core Components:
- 1× Arduino Uno or Nano (5V)
- 1× 16×2 Character LCD (HD44780 compatible)
- 1× 4×3 Matrix Keypad
- 1× 10 kΩ Potentiometer (LCD contrast)
IR v1 Additional:
- Sender: 1× IR LED (940 nm) + 220Ω resistor
- Receiver: 1× IR Receiver Module (VS1838B or similar)
HC-12 v2 Additional:
- 1× HC-12 433 MHz RF Module
- 2× 2.2 kΩ resistors (voltage divider R1)
- 2× 3.3 kΩ resistors (voltage divider R2)
- Antenna (17.3 cm wire or SMA antenna)
Estimated Cost: $15-30 per node (varies by supplier and version)
📸 Photo Placeholder: Spread of all components laid out on a white background (Arduino, LCD, keypad, IR LED/receiver or HC-12, resistors, wires)
For detailed component specifications and suppliers, see hardware/bom.md.
This project is provided as-is for educational and portfolio purposes.
License: MIT (see LICENSE file if available)
This project demonstrates embedded systems design principles including:
- User interface design for embedded systems
- Wireless communication protocols (IR and RF)
- Firmware organization and code reusability
- Protocol validation and error handling
- Real-time system design with non-blocking algorithms