Marko Buha

Software Engineering Master's student with an array of experiences in embedded software development

Self-portrait

Autonomous Parking System

One-tenth scale car. On top is a Krisdonia power bank, under that is an NVIDIA Jetson TX2, under that is a VESC output controller, and towards the front is a ZED stereo camera.

Image is of the car that was used for the capstone project.

From September 2024 to April 2025, I completed a capstone project in a group of 5 to make a system to autonomously park a 1/10th scale car. The McMaster Centre for Software Certification provided the car, and we implemented the software.

We developed the system using ROS nodes coded in Python and C++.

We also conducted a hazard analysis.

Fault tree analysis. All gates are or gates. Top-level hazard is injury to people or material damages. Second level: excessive forces experienced. Third level: collision with vehicle or pedestrian or obstacle, or changing velocity too quickly. Fourth level, under collision with vehicle or pedestrian or obstacle: vehicle failing to stop before other vehicle or pedestrian or obstacle, or vehicle deviating from safe path. Fifth level under vehicle failing to stop before other vehicle or pedestrian or obstacle: other vehicle/pedestrian cuts in front of vehicle, vehicle traveling too fast, or vehicle reacts too slowly. Sixth level under vehicle travelling too fast: brake failure, caused by H1a, H1c, or H1d, or software failure, caused by H3, or H6. Sixth level, under vehicle reacts too slowly, high latency in changing actuator output, caused by H6. Fifth level, under vehicle deviating from safe path: unsafe control system output, steering failure, caused by H1b, or other vehicle/pedestrian suddenly occupies path, caused by H5. Sixth level, under unsafe control system output: incorrect sensor output, or software error, caused by H3. Seventh level, under incorrect sensor output: sensor failure, caused by H2, environmental factors (e.g. lighting conditions), caused by H4, or high latency in responding to new environment changes, caused by H7. Fourth level, under changing velocity too quickly: software causes, or mechanical causes, caused by H1a, H1c, or H1d. Fifth level, under software causes: software error, or motor output not accounting for environment conditions, caused by H7.

Mitigation Strategies

  • H1 (Actuator Failures):
    • Monitor actuator feedback for anomalies
    • Design fail-safe mechanisms (e.g., default to neutral position)
    • Schedule regular maintenance checks
  • H2 (Sensor Failures):
    • Implement sensor fusion (i.e. using data from multiple sensors) to cross-validate data (FR9)
    • Monitor sensor status and perform regular self-checks
    • Continually check for sensor data that is outside of the possible range
    • Transition to a safe state and alert operator in case of failure
    • Utilize precise localization and mapping
  • H3 (Software Errors):
    • Follow rigorous development practices, including code reviews and testing
    • Implement exception handling and watchdog timers
    • Use formal verification methods where applicable
    • Define a safe operational range
  • H4 (Environmental Factors):
    • Calibrate sensors for different conditions
    • Use sensors less affected by environmental changes (e.g., radar instead of optical) (FR9)
    • Implement adaptive algorithms to adjust to sensor input variability
    • Use feedback-based control
  • H5 (Human Interference):
    • Add tamper-detection mechanisms and operator alerts
    • Move out of the way of other drivers and pedestrians
  • H6 (Latency Factors):
    • Optimize algorithms for real-time performance by reducing computational complexity
    • Use hardware acceleration (e.g., GPUs or FPGAs) for intensive tasks like image processing
    • Implement load-balancing mechanisms to distribute processing tasks dynamically
  • H7 (Adjusting to Changes in Environmental Factors):
    • Implement continuous environment scanning to detect and adapt to real-time changes
    • Use machine learning models with active learning ability that dynamically update maps based on detected changes (FR1)
    • Implement geofencing to keep the vehicle within operational boundaries

Research Assistant

Visualization of an electrical power system.

Image is a visualization of a power system made using the package.

Developed in Python, this package abstracts the simulation of 2 different kinds of power systems, one frequently used in North America, one frequently used in Europe, into a common interface

Dynamic Fan Controller

Microcontroller.

Image is of the microcontroller used and shows the ports that were used.

In March 2023, I worked with 2 classmates for a class lab to develop a dynamic fan controller for a lab. We used an STM microcontroller to link up the fan and temperature sensor. By coding the microcontroller in C to output a PWM signal with a longer duty cycle in response to a higher sensed temperature, we were able to create a closed feedback control system.

One of the main challenges was parsing through the dense documentation (consisting of thousands of pages) to figure out which pins could be used for sensor inputs and outputs. Using STM32CubeMX and documentation, we were able to discover pin selections that would offer needed support (ex. PWM out, analog in) and not conflict with pins used by the screen or other microcontroller systems. This also required adjusting code in the configuration files to ensure everything was properly set up for our use case.

By working together and effectively subdividing tasks, we were able to achieve a perfect mark in the lab.

Stepper Motor ASIP

Diagram. PC sends address to instruction memory which sends 2 bits into the Register File and 6 bits to the decoder. Register File selects from the instruction memory output, outputs position to Operand 1 Mux, delay to the Delay Counter, and R0 to Branch Logic and Operand 1 Mux. Operand 1 Mux picks between PC, R0, output from register file, and position. Operand 2 mux picks between output from register file, immediate operand from Immediate Extractor, and the numbers 1 and 2. ALU operates on Operand 1 and Operand 2 Mux. ALU returns to the PC and a Result Mux that selects between that and 0 and sends result to data input of Register File. Immediate Extractor takes 5 bits from Instruction Memory and outputs Immediate.

In March and April 2024, I worked with a classmate for a class lab to develop an application-specific instruction set processor (ASIP) to control a stepper motor. The main goal was to implement a set of Assembly instructions that could be used do the control, with different control modes possible such as full and half stepping.

First, we created Verilog code for each of the individual hardware components required to implement the ASIP. Then, we individually tested each component using Quartus Prime’s simulation tools. With each hardware component now verified, we could then design an FSM by determining the values of the signals sent to various hardware components. Then, this FSM was implemented in Verilog. With the hardware and FSM components both done, the whole system could be implemented on a Cyclone V FPGA.

Instruction set. First, BR, 1 0 0 5-bit immediate. Second, BRZ, 1 0 1 5-bit immediate. Third, ADDI, 0 0 0 3-bit immediate 2-bit register. Fourth, SUBI, 0 0 1 3-bit immediate 2-bit register. Fifth, SR0, 0 1 0 0 4-bit immediate. Sixth, SRH0, 0 1 0 1 4-bit immediate. Seventh, CLR, 0 1 1 0 0 0 2-bit register. Eighth, MOV, 0 1 1 1 2-bit destination register 2-bit source register. Ninth, MOVA, 1 1 0 0 0 0 2-bit register. Tenth, MOVR, 1 1 0 0 0 1 2-bit register. Eleventh, MOVRHS, 1 1 0 0 1 0 2-bit register. 12th, pause, 1 1 1 1 1 1 1 1

BR is branch, BRZ is branch if R0 is zero, SR is set lower bits, SRH is set higher bits, MOV is move contents into a register, MOVR is move the motor by full stepping, MOVRHS is move the motor by half-stepping.

Finite State Machine for 7 Segment Display

Breadboard with 7 IC chips and a seven-segment display.

In December 2022, I individually designed a finite state machine using sequential logic to cycle a 7-segment display through my student number. I then built it with a teammate.

This was a wonderful opportunity to apply my k-mapping, state transition table, and other digital logic design skills learned in class to create an optimized design. The design takes advantage of logical gates, a decoder, and JK flip-flops. Specifically, the circuit was run through a decoder, which converted the binary representation of the number into the segments that needed to be lit up.

In addition, I learned how to debug circuits. For example, while building the circuit, I encountered an issue where a 3 was output instead of a 1. Upon further investigation, I realized that the bits responsible for both 2 and 1 were on (adding to 3). From there, I was able to backtrack and identify an error in how the inputs to the 2 bit were wired up.

CAD Remote Control Car

Sports car made with Autodesk Inventor CAD software.

Car Drawings

Report

RoboMaster

Robot.

I programmed in C on the McMaster RoboMaster Team. The McMaster RoboMaster Team allowed me to develop skills in a small team environment by programming autonomous robots. I enjoy small team environments like this one as I get to take advantage of the individual strengths of various teammates to contribute on the team. Working on a team like this to solve problems in robotics and embedded systems is something I would like to do during my career. In particular, I did the following:

  • Coded a robot on an STM32 MCU in C to randomly vary spinning speed, reducing projectile impacts
  • Developed efficient C code to aim a projectile launcher in real time based on computer vision output

Online Voting Program

UI. On top, there is a filtered list of voters. In the middle, there is the ability to create a new vote by entering the voter's name and vote. On the bottom are the current results.

GitHub

Developed in Java for the 2021 McMaster Engineering Competition, this platform allows a user to vote in an election to allow for online voting. Future improvements could include investing security options to ensure the platform is secure.

Markbook

Introduction page to the software, showing the data format and allowing the user to enter a number to go deal with a certain course, or calculate a student's average across their courses.

GitHub

This project was completed in June 2021 and coded in C#.

I also completed a logbook to document my daily progress as part of this project.

Hopper Dispensing Mechanism

A mechanism. The mechanism consists of two rods, one between a linear actuator and the other rod, and one between the surface the linear actuator is mounted on and a wheel. The wheel touches the hopper bin.