Skip to the content
2 layers57 × 58 mmProyectoSE, the printed circuit board in 3D

This project demonstrates a full-cycle embedded development process: Requirements Engineering → SysML Architecture → Hardware Design (PCB) → Firmware Implementation.

Size
57 × 58 mm
Copper layers
2
Thickness
1.6 mm
Parts
18
Nets
32
Pads
62
Tracks, vias
97, 0
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
18 Jan 2026
Updated
18 Jan 2026

Overview

ProyectoSE is an open-source printed circuit board by AlvaroPintado, from the AlvaroPintado/SmartLamp repository on GitHub. It is a 2-layer board of 57 × 58 mm with 18 parts on 32 nets, routed with 97 tracks and 0 vias.

It is built around the L7805. Its parts include 10 connectors, 4 capacitors, 2 ICs, 1 resistor and 1 crystal. It belongs with the PIC boards of this library.

Main components

1

README

README.md

SmartLamp: Embedded Environmental Control System

SmartLamp is a comprehensive embedded system designed to monitor study environments and automate lighting and ventilation. It integrates analog and digital sensors with real-time actuation, communicating via a custom UART protocol to a PC interface.

This project demonstrates a full-cycle embedded development process: Requirements Engineering → SysML Architecture → Hardware Design (PCB) → Firmware Implementation.


Key Features

  • Real-time Environmental Monitoring:
    • Noise Level: Analog sampling via microphone (categorized as Low/Medium/High) using Timer 0 interrupts.
    • Air Quality: CO2 and TVOC monitoring via iAQ-Core (I2C).
    • Lighting: Ambient light sensing (Lux) via VEML7700 (I2C).
    • Climate: Temperature and Humidity acquisition (Analog Sensors).
  • Intelligent Actuation:
    • Smart Lighting: Addressable RGB LED strip (SK9822) controlled via Software SPI (Bit-banging).
    • Active Cooling: DC Fan speed control via Hardware PWM (Timer 2).
  • Connectivity:
    • Robust UART communication protocol (9600 baud) with CRC checksums for data integrity.
    • Command-based interface for remote control and telemetry.

Tech Stack & Tools

  • Microcontroller: Microchip PIC16F886 (8-bit, 20MHz External Oscillator).
  • Firmware Development: C Language, MPLAB X IDE, XC8 Compiler.
  • Hardware Design: KiCad (Schematics & PCB Layout).
  • System Modeling: Eclipse Papyrus (SysML for Block/Activity diagrams).
  • Protocols Implemented: I2C (MSSP), SPI (Bit-banged), UART (EUSART), PWM (CCP1), ADC.

Repository Structure

The project follows a structured engineering workflow separating development artifacts, documentation, and datasheets.

text
SmartLamp/
├── Desarrollo/                    # Main Development Directory
│   ├── KiCad/                     # Hardware Design Source
│   │   ├── ProyectoSE.kicad_sch      # Electronic Schematics
│   │   └── ProyectoSE.kicad_pcb      # PCB Layout
│   │   
│   ├── MPLAB/                     # Firmware Source Code
│   │   ├── Code/                  # Application Logic
│   │   │   ├── main.c                # Main Loop & Interrupt Service Routines
│   │   │   └── [Test Files].c        # Unit tests for subsystems
│   │   │
│   │   └── Functions/             # Hardware Abstraction Layer (HAL)
│   │       ├── adc-v1.c/h            # Analog-to-Digital Converter Driver
│   │       ├── i2c-v2.c/h            # I2C Protocol Driver (Hardware MSSP)
│   │       ├── pwm-v1.c/h            # PWM Driver (Timer 2 + CCP)
│   │       ├── spi-master-v1.c/h     # SPI Driver (Software Implementation)
│   │       └── uart-v1.c/h           # UART Driver (Circular Buffer logic)
│   │
│   └── Papyrus/                   # System Architecture Models (UML/SysML)
│
├── Imde-comp/                     # PC Interface Software (Component)
├── Hojas técnicas-20251026/       # Component Datasheets (Sensors/MCU)
└── Documentación/                     # Project Documentation

System Architecture

1. Firmware Architecture (HAL Approach)

The firmware is designed with modularity in mind. The main.c handles the high-level business logic and state management, while the Functions/ folder contains reusable drivers that abstract the PIC16F886 hardware registers.

  • Interrupt-Driven Sampling: Noise levels are sampled every 5ms using Timer 0 (TMR0) interrupts to ensure non-blocking operation.
  • State Machine: The UART receiver utilizes a Finite State Machine (FSM) to parse incoming frames byte-by-byte, preventing buffer overflows and handling packet fragmentation.

2. Hardware Design (KiCad)

The hardware includes signal conditioning for analog sensors and logic level translation for the communication bus.

  • I2C Bus: Pull-up resistors configured for 100kHz standard mode.
  • Power: Regulated 5V rail for logic and separate rail for inductive loads (Fan).

Communication Protocol

Communication between the SmartLamp and the PC is handled via a binary protocol with the following frame structure:

HeaderLengthCommandPayloadCRC (Dummy)
0xAA1 Byte1 ByteN Bytes2 Bytes

Command Examples:

  • 0x04: Set Fan Speed (Payload: 0-100%).
  • 0x05: Set LED Color (Payload: R, G, B, Intensity).
  • 0x02: Read CO2 Level (Response: ppm).

Setup & Installation

Prerequisites

  • MPLAB X IDE (v5.xx or higher).
  • XC8 Compiler.
  • KiCad (v6.0 or higher) for hardware viewing.

Build Instructions

  1. Clone the repository:
    bash
    git clone [https://github.com/aghidalgo04/SmartLamp.git](https://github.com/aghidalgo04/SmartLamp.git)
  2. Open MPLAB X IDE and import the project from Desarrollo/MPLAB.
  3. Ensure the device is set to PIC16F886 and the toolchain to XC8.
  4. Build the project (Production > Build Project).
  5. Flash the .hex file using a PICkit 3/4 programmer.

Parts

18
QtyValueFootprintReferences
4iMountingHole:MountingHole_4mm_PadJ7, J8, J9, J10
20.33uFCapacitor_THT:C_Disc_D6.0mm_W4.4mm_P5.00mmC3, C4
222pFCapacitor_THT:C_Disc_D7.5mm_W5.0mm_P10.00mmC1, C2
1Conn_01x05Connector_PinHeader_2.54mm:PinHeader_1x05_P2.54mm_VerticalJ2
1Crystal 20MHzCrystal:Crystal_HC49-U_VerticalY1
1I2CConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJ6
1L7805Package_TO_SOT_THT:TO-220-3_VerticalU2
1PIC16F886-IPPackage_DIP:DIP-28_W7.62mmU1
1R_USResistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P7.62mm_HorizontalR1
1SPIConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJ5
1Screw_Terminal_01x02TerminalBlock_Phoenix:TerminalBlock_Phoenix_MKDS-1,5-2-5.08_1x02_P5.08mm_HorizontalJ1
1USARTConnector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalJ3
1iConnector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_VerticalJ4

Similar boards

  • 2 layers40.6 × 110 mmEuropi surface mount, the printed circuit board in 3D

    Europi surface mount

    Allen-Synthesis/EuroPi

    EuroPi: A reprogrammable Eurorack module based on the Raspberry Pi Pico

    92 parts584CC0-1.0
  • 2 layers132.1 × 45.7 mmIPoS, the printed circuit board in 3D

    IPoS

    peterheinrich/InternetOverSpaghetti

    Transmitting IP packages over a pair of spaghetti thus demonstrating how media independent IP really is.

    42 parts342
  • 2 layers59.7 × 57.5 mmFunBox, the printed circuit board in 3D

    FunBox

    GuitarML/FunBox

    Stereo guitar pedal platform using Daisy Seed.

    61 parts289MIT
  • 2 layers90.8 × 35.6 mmERCF easy brd, the printed circuit board in 3D

    ERCF easy brd

    Tircown/ERCF-easy-brd

    More informations on how to reset for flashing:\ https://wiki.seeedstudio.com/Seeeduino-XIAO/#enter-bootloader-mode

    28 parts195GPL-3.0
  • 2 layers111.3 × 106.4 mmSuper Sixteen v1, the printed circuit board in 3D

    Super Sixteen v1

    matthewcieplak/super-sixteen

    Code and schematics for the Super Sixteen Eurorack sequencer

    141 parts171
  • 2 layers91.4 × 71.1 mmPico w rover, the printed circuit board in 3D

    Pico w rover

    NikodemBartnik/Mini-Mars-Rover

    Educational robotic platform made to look like a mini mars rover

    20 parts143MIT
  • 2 layers144.1 × 182.2 mmSHVC CPU-01, the printed circuit board in 3D

    SHVC CPU-01

    starlightk7/OpenSFC

    OSHW Reproduction Parts related to the Super Famicom / Super Nintendo game console

    498 parts114CERN-OHL-S-2.0
  • 2 layers106.1 × 155 mmMotherboard, the printed circuit board in 3D

    Motherboard

    Redherring32/OpenTendo-TopLoader

    An Open Source HardWare (OSHW) recreation of the 1993 toploading NES motherboard (Also known as NES-101)

    84 parts94

Questions

How big is the ProyectoSE PCB?

It measures 57 × 58 mm and has 2 copper layers, 1.6 mm thick.

What parts does the ProyectoSE use?

18 parts, built around the L7805. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the ProyectoSE KiCad files?

From the AlvaroPintado/SmartLamp repository on GitHub, at the commit this page was made from: the board is Desarrollo/KiCad/ProyectoSE.kicad_pcb and its schematic Desarrollo/KiCad/ProyectoSE.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the ProyectoSE design in my own project?

Its repository states no licence, so its author keeps all rights: ask AlvaroPintado before reusing the design.