A collection of embedded systems and digital design projects focused on Raspberry Pi hardware interfacing, sensor communication, MQTT-based networking, GPIO/PWM control, FPGA-based digital logic, and SystemVerilog hardware design.
This repository demonstrates practical cyber-physical systems development across the full stack: physical sensors, embedded software, communication protocols, networked data publishing, remote device control, digital logic, state machines, and FPGA-to-Raspberry Pi hardware communication.
Cyber-physical systems connect computation, sensing, communication, and physical-world behavior. This repository documents a series of projects built around that idea using Raspberry Pi, Python, I2C, SPI, MQTT, GPIO/PWM, SystemVerilog, Vivado, and the Basys3 FPGA.
The projects begin with Raspberry Pi setup and remote development, then move into sensor driver development, real-time sensor publishing, remote LED control, combinational logic, arithmetic logic design, finite state machines, and FPGA-to-Raspberry Pi SPI communication.
This repository was cleaned and reorganized from private coursework into a public portfolio project to better show embedded systems, hardware-software integration, and digital design skills.
- Build reliable embedded systems using Raspberry Pi and external hardware
- Interface with sensors using I2C and SPI communication protocols
- Convert raw sensor register data into usable physical measurements
- Publish live sensor data over MQTT for remote monitoring
- Control physical outputs using GPIO and PWM
- Design and verify digital hardware using SystemVerilog
- Implement combinational and sequential logic circuits
- Build finite state machines for real-world control systems
- Connect FPGA logic with external embedded devices
- Practice structured embedded development using Git and GitHub
| Area | Description |
|---|---|
| Embedded Linux | Raspberry Pi setup, SSH access, command-line development, and Git workflow |
| Sensor Interfacing | Low-level communication with pressure, temperature, and accelerometer sensors |
| I2C Communication | Register-level driver development for the LPS331AP pressure/temperature sensor |
| SPI Communication | Register-level accelerometer communication and FPGA-to-Raspberry Pi SPI transfer |
| MQTT Networking | Publishing sensor data and subscribing to remote control messages |
| GPIO / PWM Control | LED control using duty cycle and frequency updates |
| Digital Logic | Decoder, demultiplexer, ALU, counter, and combinational logic design |
| Sequential Logic | Flip-flops, registers, state retention, and clocked hardware behavior |
| Finite State Machines | Elevator controller design using state-based control logic |
| FPGA Integration | Basys3 hardware demonstrations, switches, LEDs, buttons, and 7-segment displays |
cyber-physical-systems-projects/
│
├── project-00-raspberry-pi-setup-and-git/
│ └── Raspberry Pi setup, SSH workflow, and GitHub development workflow
│
├── project-01-lps331ap-i2c-pressure-temperature-sensor/
│ └── I2C driver for pressure and temperature measurements
│
├── project-02-adxl343-spi-accelerometer/
│ └── SPI driver for 3-axis acceleration data acquisition
│
├── project-03-mqtt-sensor-network-node/
│ └── MQTT-connected sensor node for publishing live sensor data
│
├── project-04-mqtt-led-control/
│ └── Remote LED control using MQTT, GPIO, and PWM
│
├── project-05-systemverilog-3-to-8-demultiplexer/
│ └── Decoder-based 3-to-8 demultiplexer with SystemVerilog testbenches
│
├── project-06-systemverilog-8-bit-arithmetic-logic-unit/
│ └── 8-bit ALU supporting arithmetic, logic, carry, and overflow behavior
│
├── project-07-systemverilog-2-bit-saturating-counter/
│ └── SystemVerilog RTL design and verification of a 2-bit saturating counter
│
├── project-08-systemverilog-elevator-control-state-machine/
│ └── 4-floor elevator controller using FSM logic and 7-segment display output
│
├── project-09-basys3-raspberry-pi-spi-interface/
│ └── SPI communication link between a Basys3 FPGA and Raspberry Pi
│
└── README.md
This project establishes the development foundation for the rest of the repository. It focuses on setting up a Raspberry Pi, enabling SSH-based remote access, configuring wireless networking, and using Git/GitHub for version control.
- Connected to a Raspberry Pi using SSH
- Configured a remote embedded development workflow
- Practiced repository cloning, commits, pushes, and pulls
- Established a repeatable workflow for later hardware projects
- Raspberry Pi setup
- Linux command-line usage
- SSH remote development
- Git and GitHub workflow
This project implements a Python driver for the LPS331AP pressure and temperature sensor using I2C communication on a Raspberry Pi.
- Communicated with the sensor using the
smbuslibrary - Verified the device using the
WHOAMIregister - Configured sensor control registers
- Read raw pressure and temperature values from sensor registers
- Converted raw binary data into physical units
- I2C communication
- Register-level sensor configuration
- Embedded Python development
- Raw data conversion
- Hardware-software integration
This project develops a Python-based SPI driver for the ADXL343 accelerometer. The system reads X, Y, and Z acceleration values from the sensor and converts the raw register data into usable acceleration measurements.
- Communicated with the accelerometer using the
spidevlibrary - Configured SPI mode for device communication
- Verified the sensor using the
DEVIDregister - Enabled measurement mode
- Read and converted X, Y, and Z acceleration data
- SPI communication
- Binary data handling
- Sensor driver development
- Multi-axis data acquisition
- Embedded Python programming
This project combines pressure, temperature, and acceleration sensing into a network-connected MQTT sensor node. The Raspberry Pi publishes live sensor data to a broker at fixed time intervals.
- Integrated LPS331AP pressure/temperature data
- Integrated ADXL343 accelerometer data
- Published sensor readings using MQTT
- Sent data to structured MQTT topics
- Built a simple remote monitoring pipeline
sensors/<id>/temperature
sensors/<id>/pressure
sensors/<id>/accel/x
sensors/<id>/accel/y
sensors/<id>/accel/z
- MQTT publish/subscribe architecture
- Networked embedded systems
- Real-time sensor data streaming
- Sensor integration
- Cyber-physical system communication
This project extends the MQTT sensor node by adding remote LED control through GPIO and PWM. The Raspberry Pi subscribes to MQTT control topics and updates LED behavior based on incoming messages.
- Developed a custom LED driver
- Controlled LED duty cycle using PWM
- Updated LED frequency dynamically
- Subscribed to MQTT control topics
- Combined sensing, publishing, and actuation in one system
sensors/<id>/led/duty
sensors/<id>/led/frequency
- GPIO control
- PWM signal generation
- MQTT subscriptions
- Remote actuator control
- Embedded systems integration
This project implements a 3-to-8 decoder and uses it as a submodule to build a 3-to-8 demultiplexer in SystemVerilog. The design demonstrates combinational logic, one-hot decoding, module instantiation, enable-controlled output routing, and testbench-based verification.
- Designed a 3-to-8 decoder using Boolean logic
- Built a 3-to-8 demultiplexer using the decoder as a submodule
- Used internal wires to connect decoder outputs to demultiplexer logic
- Gated demultiplexer outputs using an enable signal
- Verified all decoder and demultiplexer input combinations with testbenches
- SystemVerilog combinational logic
- Boolean expression design
- Decoder implementation
- Demultiplexer implementation
- Module instantiation
- Testbench tasks
- Assertion-based verification
- FPGA-oriented digital design
This project implements an 8-bit Arithmetic Logic Unit (ALU) in SystemVerilog. The ALU performs arithmetic and logical operations on two 8-bit operands and produces an 8-bit result, an unsigned carry flag, and a signed overflow flag.
- Designed an 8-bit ALU using SystemVerilog
- Implemented arithmetic operations including addition and subtraction
- Implemented logical operations including AND, OR, NOT, and XOR
- Added transfer and zero-test operations
- Used a 4-bit select signal to control ALU behavior
- Detected unsigned carry for arithmetic operations
- Detected signed overflow for addition and subtraction
- Verified ALU behavior using a dedicated testbench
Select s |
Operation | Result |
|---|---|---|
1110 |
AND | r = a & b |
1101 |
OR | `r = a |
1100 |
NOT | r = ~a |
1011 |
XOR | r = a ^ b |
1010 |
Addition | r = a + b |
1001 |
Subtraction | r = a - b |
1000 |
Transfer | r = a |
0111 |
Test | r = (a == 0) |
- ALU design
- Arithmetic logic implementation
- Bitwise logic operations
- Carry detection
- Signed overflow detection
always_combdesigncasestatement operation selection- Testbench development
- Digital hardware verification
This project transitions from embedded software into digital hardware design. It implements a 2-bit saturating counter in SystemVerilog and verifies its behavior using a testbench.
The counter increments and decrements based on an input signal but saturates at its limits instead of overflowing or underflowing.
- Counts from
0to3 - Saturates at
3when incremented past the maximum value - Saturates at
0when decremented past the minimum value - Supports reset, enable, and direction control signals
- SystemVerilog RTL design
- Sequential logic design
always_ffimplementation- Testbench development
- Assertion-based verification
- FPGA-oriented design practices
This project implements a 4-floor elevator simulator using SystemVerilog. The design uses a finite state machine to control elevator movement, door behavior, floor selection, and visual output on the Basys3 FPGA 7-segment displays.
- Designed a finite state machine for a 4-floor elevator system
- Handled floor request button inputs
- Stored the first requested floor until the elevator reached it
- Ignored additional requests while servicing the current request
- Reset the elevator to floor 1 with the door open
- Created a 7-segment display driver for floor and door visualization
- Used active-low display logic for the Basys3 board
- Verified the elevator controller and display driver using testbenches
Floor Request
│
▼
Store Destination
│
▼
Close Door
│
▼
Move Up or Down
│
▼
Arrive at Requested Floor
│
▼
Open Door
- Finite state machine design
- Sequential logic implementation
- State-based output control
- Reset handling
- Input request handling
- 7-segment display driving
- Active-low logic design
- SystemVerilog
always_ffandalways_comb - FPGA-oriented control system design
- Simulation-based verification
This project implements a Serial Peripheral Interface (SPI) communication link between a Basys3 FPGA and a Raspberry Pi. The Raspberry Pi acts as the SPI master, while the Basys3 FPGA acts as the SPI slave.
The design allows the Raspberry Pi to read switch values from the Basys3 and write LED values back to the FPGA using a simple SPI-based register interface.
- Implemented an SPI slave interface in SystemVerilog
- Captured incoming
MOSIdata on the rising edge ofSCLK - Updated outgoing
MISOdata on the falling edge ofSCLK - Converted serial SPI data into 8-bit parallel data
- Built a controller interface for reading switches and writing LEDs
- Implemented a register-mapped read/write interface
- Connected Raspberry Pi SPI communication to Basys3 FPGA hardware
| Address | Mapping | Access Type |
|---|---|---|
7'h00 |
chip_id |
Read-only |
7'h01 |
switches[7:0] |
Read-only |
7'h02 |
switches[15:8] |
Read-only |
7'h03 |
leds[7:0] |
Read/write |
7'h04 |
leds[15:8] |
Read/write |
- SPI slave interface design
- Serial-to-parallel data conversion
- Parallel-to-serial data transmission
- Edge-sensitive signal handling
- FPGA register interface design
- Address decoding
- Read/write transaction handling
- Raspberry Pi to FPGA communication
- Basys3 switch and LED integration
- Hardware/software co-design
Physical Sensors / Outputs
│
▼
Raspberry Pi GPIO / I2C / SPI Interfaces
│
▼
Python Sensor Drivers and Control Logic
│
▼
MQTT Publish / Subscribe Communication
│
▼
Remote Monitoring and Remote Device Control
SystemVerilog RTL
│
▼
Simulation and Testbench Verification
│
▼
Vivado Synthesis / FPGA Implementation
│
▼
Basys3 Hardware Demonstration
Raspberry Pi SPI Master
│
▼
SPI Signals: SCLK, MOSI, MISO, SS
│
▼
Basys3 SPI Slave Interface
│
▼
Controller Register Interface
│
├── Read Switches
├── Write LEDs
└── Return Chip ID
- Python
- SystemVerilog
- Raspberry Pi 3B
- LPS331AP pressure/temperature sensor
- ADXL343 accelerometer
- LED circuit
- Basys3 FPGA
- 7-segment displays
- Switches and pushbuttons
- I2C
- SPI
- MQTT
- GPIO
- PWM
smbusspidevpaho-mqtt- Vivado
- Git / GitHub
- Linux command line
- FPGA simulation tools
- Embedded Python development
- Raspberry Pi hardware interfacing
- Sensor driver design
- I2C and SPI protocol implementation
- Low-level register manipulation
- MQTT-based network communication
- Real-time sensor data publishing
- GPIO and PWM control
- Remote actuator control
- Hardware-software integration
- SystemVerilog RTL design
- Combinational logic design
- Sequential logic design
- Finite state machine design
- ALU design
- SPI slave interface design
- Testbench development
- Assertion-based verification
- FPGA-oriented system design
- Cyber-physical systems architecture
This repository shows the foundation of cyber-physical systems engineering: connecting software to real hardware, reading physical data from sensors, transmitting that data over a network, and controlling outputs remotely.
It also connects embedded systems with digital hardware design. The Raspberry Pi projects demonstrate software-driven interaction with physical sensors and actuators, while the SystemVerilog projects demonstrate hardware-level logic design, state machines, FPGA communication, and digital verification.
Together, these projects demonstrate practical experience with the kinds of systems used in robotics, IoT, automation, embedded platforms, intelligent devices, and FPGA-based hardware systems.
Jaiden Medina
Computer Engineering @ Indiana University
Accelerated M.S. in Intelligent Systems Engineering
- GitHub: jfmedina05
- Portfolio: www.jaidenmedina.com
- LinkedIn: jaiden-medina