"The best way to learn embedded systems is not by reading code, but by making hardware respond."
A hands-on collection of sensor-based modules built during and beyond an Industrial Training in Embedded Systems & Internet of Things (IoT) — independently extended, structured, and documented as a reusable developer reference for microcontroller-based hardware interfacing.
This repository is a practical implementation archive that applies and extends the teachings from formal industrial training. Every module reflects real breadboarding, physical wiring, sensor calibration, and hardware-level debugging — not simulated environments, but actual hardware that blinked, measured, detected, transmitted, and communicated.
Rather than stopping at the training syllabus, each module was independently restructured and tested across two distinct microcontroller architectures — Arduino UNO R3 (Atmel AVR ATmega328P) and ESP32 Dev Module (Espressif Xtensa LX6 Dual-Core) — covering the full hardware transition from 8-bit AVR to 32-bit Xtensa with native Wi-Fi and Bluetooth support.
- Not just copied training code- independently implemented, practiced, debugged, and extended.
- Focuses on fundamentals + scalability across microcontroller platforms.
- Covers core sensors and actuators used in the industry.
- Demonstrates full microcontroller architecture transition: Arduino UNO (Atmel AVR ATmega328P, 8-bit, 16 MHz) → ESP32 (Espressif Xtensa LX6, 32-bit, 240 MHz, dual-core)
- Includes wireless IoT communication via Wi-Fi (IEEE 802.11 b/g/n) and Bluetooth (BT Classic + BLE 4.2).
- Structured like a reusable, modular developer library.
- Covers cloud integration for real-time remote data monitoring.
| Category | Tools / Technologies |
|---|---|
| Microcontrollers | Arduino UNO R3 (Atmel AVR ATmega328P), ESP32 Dev Module (Espressif Xtensa LX6) |
| Programming Language | Embedded C / Arduino Framework (C++ subset) |
| Serial Communication | UART — Universal Asynchronous Receiver-Transmitter |
| Bus Communication | I²C — Inter-Integrated Circuit (2-wire: SDA + SCL) |
| Signal Modulation | PWM — Pulse Width Modulation (duty cycle-based analog simulation) |
| Wireless Protocols | Wi-Fi (IEEE 802.11 b/g/n), Bluetooth Classic, BLE 4.2 |
| RFID Standard | MFRC522 — 13.56 MHz ISO/IEC 14443 Type A |
| IoT Cloud Platform | ThingSpeak (MathWorks) — RESTful HTTP API over TCP/IP |
| IDE / Toolchain | Arduino IDE (open source), Serial Monitor, AVR-GCC Compiler |
| Power Electronics | Transformer → Bridge Rectifier → Filter Capacitor → Linear Voltage Regulator (e.g., LM7805 IC) |
ArduinoCodes/
│
├── 1. ARDUINO UNO R3/ # Atmel AVR ATmega328P — 8-bit, 16 MHz
│ │
│ ├── LED/ # GPIO Digital Output — Light Emitting Diode
│ ├── LDR/ # ADC Analog Input — Light Dependent Resistor (Photoresistor)
│ ├── IR Sensor/ # Infrared Obstacle / Proximity Detection Module
│ ├── Hall Effect Sensor/ # Magnetic Field Detection — Digital/Analog Output
│ ├── Flame Sensor/ # IR-based Flame / Fire Detection Module
│ ├── Smoke Sensor/ # MQ-2 Gas & Smoke Detection (ADC + Threshold)
│ ├── Temperature Sensor/ # LM35 / DHT11 — Analog/Digital Temp + Humidity
│ ├── Ultrasonic Sensor/ # HC-SR04 — Distance Measurement via Time-of-Flight
│ ├── LCD_I2C/ # 16x2 LCD via I²C Bus (PCF8574 I/O Expander, Addr: 0x27)
│ ├── LCD_noI2C/ # 16x2 LCD via Parallel 4-bit / 8-bit Interface
│ ├── RFID/ # MFRC522 — 13.56 MHz SPI-based RFID Read/Write
│ ├── Motors/ # DC Motor via L298N H-Bridge Driver + PWM Speed Control
│ ├── RGB/ # RGB LED — Common Anode/Cathode PWM Color Mixing
│ ├── Switch/ # Digital Input — Push Button with Pull-up/Pull-down Logic
│ └── BlueTooth/ # HC-05 / HC-06 UART Bluetooth Serial Communication
│
└── 2. ESP32 DEV MODULE/ # Espressif Xtensa LX6 — 32-bit, 240 MHz, Dual-Core
│
├── (All Arduino UNO modules re-implemented with ESP32 GPIO, ADC, I²C, UART, PWM LEDC)
│
└── IoT/ # Internet of Things — Cloud & Wireless Extensions
├── WiFi_Connect/ # IEEE 802.11 b/g/n Station Mode — WPA2 Authentication
├── ThingSpeak_Upload/ # HTTP GET/POST to ThingSpeak REST API over TCP/IP
├── BLE_Server/ # Bluetooth Low Energy 4.2 — GATT Server Profile
└── Remote_Monitor/ # Real-time Sensor Dashboard via Cloud
- Breadboarding using jumper wires, resistors, diodes, capacitors, and passive RC filters
- Power supply design — Step-down transformer → Full-wave bridge rectifier → Filter capacitor → LM7805 linear voltage regulator IC → Regulated 5V DC output
- Digital signal processing (TTL logic — HIGH: 5V / LOW: 0V) vs. Analog signal processing (ADC — Analog to Digital Conversion, 10-bit on ATmega328P, 12-bit on ESP32)
- Multi-sensor calibration, threshold tuning, and real-time data acquisition
- Hardware–software interaction at peripheral register and abstraction layer levels
- Real-time debugging and live data streaming via Serial Monitor (UART at 9600 / 115200 baud)
- Applied wireless modules: Wi-Fi (Station + AP mode), Bluetooth Classic (SPP), BLE (GATT), RFID (SPI)
- Architecture comparison: ATmega328P (Harvard architecture, 8-bit AVR ISA) vs. ESP32 (Modified Harvard, 32-bit Xtensa LX6 ISA, FreeRTOS support)
- DC Motors via L298N H-Bridge Motor Driver IC (PWM-based speed control + direction control)
- LEDs and RGB LEDs (Common Anode / Common Cathode) with PWM duty cycle mixing
- Mechanical relays for AC load switching (230V AC devices — incandescent bulb, fluorescent tube light)
- Push-button switches with hardware debounce and software pull-up/pull-down logic
- I²C (Inter-Integrated Circuit) — 2-wire synchronous serial bus (SDA + SCL), used for 16x2 LCD via PCF8574 I/O expander (default address: 0x27), supports multi-device addressing
- UART (Universal Asynchronous Receiver-Transmitter) — Asynchronous serial communication for HC-05 Bluetooth module and Serial Monitor debugging (TTL logic, configurable baud rate)
- SPI (Serial Peripheral Interface) — 4-wire synchronous full-duplex bus (MOSI, MISO, SCK, SS) used for MFRC522 RFID module
- PWM (Pulse Width Modulation) — Duty cycle-based analog simulation for motor speed control, LED brightness, and RGB color mixing (ESP32 uses LEDC peripheral)
- Cloud data pipeline: Sensor → ADC/GPIO → ESP32 → Wi-Fi (IEEE 802.11) → Internet → ThingSpeak REST API (HTTP GET with API key) → Time-series data visualization
- Remote monitoring dashboard on ThingSpeak (MathWorks) with real-time field updates
- TCP/IP stack managed by ESP32 internal lwIP (lightweight IP) library
| Feature | Arduino UNO R3 | ESP32 Dev Module |
|---|---|---|
| Chip | Atmel ATmega328P | Espressif ESP32-WROOM-32 |
| Architecture | 8-bit AVR (Harvard) | 32-bit Xtensa LX6 (Modified Harvard) |
| Clock Speed | 16 MHz | Up to 240 MHz (Dual-Core) |
| Flash Memory | 32 KB | 4 MB |
| SRAM | 2 KB | 520 KB |
| ADC Resolution | 10-bit | 12-bit |
| Wi-Fi | None | IEEE 802.11 b/g/n |
| Bluetooth | None | BT Classic + BLE 4.2 |
| GPIO Pins | 14 Digital / 6 Analog | 34 Programmable GPIO |
| Operating Voltage | 5V | 3.3V |
| PWM Channels | 6 | 16 (LEDC peripheral) |
| I²C / SPI / UART | 1 / 1 / 1 | 2 / 4 / 3 |
| IoT Ready | None | Native |
This work builds upon the Industrial Training in Embedded Systems & Internet of Things (IoT), where foundational knowledge in microcontroller programming, sensor interfacing, and hardware communication protocols was established — and then independently extended into a structured, modular implementation library. Designed as both a personal learning archive and a practical reference for developers beginning their journey in embedded systems and IoT hardware development.