This project was developed as part of the 4th-year Computer Engineering curriculum at UniLaSalle Amiens. Our primary objective was to design and build a robust, end-to-end IoT monitoring solution — bridging the gap between physical signal acquisition and high-level cloud-based software processing.
In the field of embedded systems, hardware reliability is the foundation upon which any software's success depends. This project focuses on creating a professional-grade PCB shield for the Arduino MKR WAN 1310, ensuring stable data flow, secure wireless communication, and intuitive user interaction.
The result is a fully functional LoRaWAN-connected device that transmits real-time classroom events to The Things Network (TTN) and feeds a custom software dashboard.
- The Use Case: Smart Classroom Management
The concrete application of this system is **Smart Classroom Management**. The device acts as a physical controller for an educational environment, allowing a teacher or moderator to interact with a digital platform without touching a computer.
Tactile Interaction: Three physical buttons on the PCB each trigger a specific classroom action — for example, starting a poll, flagging a student's question, or toggling the session state.
Visual Status: Three integrated LEDs provide immediate local feedback, confirming that the action was registered and successfully transmitted to the network. This keeps the user synchronized with the software at all times.
Wireless Transmission: Every button press is encoded into a LoRaWAN payload and uplinked to TTN using OTAA, ensuring both security and reliability.
- A Dual-Pillar Engineering Approach
To achieve a production-ready system, we adopted a two-domain development strategy that reflects a real-world embedded systems workflow:
Hardware & Embedded Systems
We designed a custom PCB shield from scratch using KiCad, handling component selection, schematic capture, PCB layout, and low-level Arduino firmware development. Every design decision — from resistor values to pin assignment — was made with signal integrity, power budget, and firmware clarity in mind.
Software Solutions
We developed a dedicated software platform designed to ingest, decode, and visualize the data stream arriving from the hardware via TTN. The platform provides a real-time dashboard reflecting the classroom state as events come in.
Hardware- Design Overview
The PCB shield was designed entirely in KiCad, targeting three engineering priorities: signal integrity, low power consumption, and a minimal footprint compatible with the Arduino MKR form factor.
The shield connects to the Arduino MKR WAN 1310 via two 14-pin headers, providing power and GPIO access without any additional wiring
- Component Selection & Design Decisions
User Input — 3 Tactile Switches
Three momentary push buttons serve as the primary input interface. Each switch is connected to a dedicated digital GPIO pin and shares a common GND rail — a deliberate routing choice that reduces PCB trace complexity and simplifies the firmware's input polling logic.
Visual Feedback — 3 LEDs with Current-Limiting Resistors
Three LEDs (one per button) provide real-time visual confirmation of system events. Current-limiting resistors R1, R2, and R3 were set to 1 kΩ each.
At the Arduino MKR WAN 1310's 3.3V logic level, the resulting current per LED is: I = V / R = 3.3V / 1, 000Ω ≈ 3.3 mA
This value provides sufficient LED brightness for a classroom environment while remaining well within the MKR's per-pin GPIO current limit (7 mA typical, 10 mA absolute maximum). Total LED draw at full activation is approximately 9.9 mA — a negligible load on the power rail.
System Interconnectivity — 14-pin Headers
The board uses two 14-pin headers precisely mapped to the Arduino MKR WAN 1310 pinout. Pins 12, 13, and 14 were selected for both input and output functions. This symmetrical assignment creates a logical and predictable pin layout, making the firmware easier to read, debug, and extend.
- Pin Mapping
- 3D Model
The 3D model was generated directly within KiCad to validate the design prior to fabrication. The modelling phase served three specific objectives:
1. Dimensional validation : Confirming that the shield's header spacing and footprint exactly match the Arduino MKR WAN 1310.
2. Component clearance check : Ensuring no mechanical conflicts exist between through-hole components, headers, and the Arduino board beneath.
3. Assembly documentation : Providing a visual reference for component placement during soldering.
Architecture & Responsibilities
The firmware runs on the Arduino MKR WAN 1310 and acts as the first intelligent layer between the physical user and the TTN cloud platform. Its four core responsibilities are:
1. Button state polling : Continuously monitor the three GPIO input pins for state changes.
2. Payload encoding : On a detected button press, encode a compact LoRaWAN payload identifying the triggering button.
3.LoRaWAN uplink : Transmit the payload to TTN using the MKRWAN library over the EU868 frequency band.
4.Local feedback management : Drive the corresponding LED to confirm transmission success or signal a failure.
LoRaWAN Connectivity & OTAA Security
The device joins the LoRaWAN network using Over-the-Air Activation (OTAA). This authentication method was chosen over ABP (Activation By Personalisation) for its security properties:
- Mutual authentication between the end device and the network server at each join.
- Session key rotation on every join procedure, preventing replay attacks.
- AES-128 encrypted uplinks, ensuring payload confidentiality over the air.
The three required credentials (`appEUI`, `devEUI`, `appKey`) are stored in a separate `arduino_secrets.h` file that is excluded from version control.
Duty Cycle Compliance — EU868
The EU868 LoRaWAN band enforces a maximum 1% duty cycle on all transmissions. To comply with this regulation and to prevent gateway flooding, the firmware applies a mandatory 3-second guard delay after each uplink:
// EU868 duty cycle compliance — mandatory post-transmission guard
delay(3000);This guard also serves a practical UX function: it prevents accidental repeated transmissions from a sustained button press.
User Feedback Loop
The firmware implements a simple but effective local feedback mechanism:
- TX success → The LED corresponding to the pressed button lights up for a defined duration.
- TX failure → The same LED blinks in an error pattern, alerting the user that the message was not delivered.
This feedback loop gives the user real-time confidence in the system's network reliability without requiring access to the software dashboard.
Source Code
The full firmware source is available in the `firmware/` directory of the repository. It is built with the Arduino IDE and depends on the MKRWAN library (≥ v1.1.0)
ConclusionThis project successfully demonstrates a complete IoT pipeline — from a custom PCB design to a cloud-connected software platform — developed within the constraints of an academic engineering curriculum. The system is reliable, regulation-compliant, and deployable in a real classroom environment with minimal infrastructure requirements (a LoRaWAN gateway within range is sufficient).
The dual-pillar approach proved effective: hardware and software teams could develop independently thanks to the well-defined LoRaWAN payload contract as the interface boundary.













Comments