<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="/feeds/rss-style.xsl"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>Mathew Galuszka</title>
        <link>https://mathewgaluszka.ca/</link>
        <description>Mechatronics/Biomedical Engineering Student</description>
        <lastBuildDate>Mon, 16 Nov 2026 16:20:38 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>Astro Chiri Feed Generator</generator>
        <language>en-US</language>
        <copyright>Copyright © 2026 Mathew Galuszka</copyright>
        <atom:link href="https://mathewgaluszka.ca/rss.xml" rel="self" type="application/rss+xml"/>
        <item>
            <title><![CDATA[Jukebox Robot Arm]]></title>
            <link>https://mathewgaluszka.ca/jukebox-robot-arm</link>
            <guid isPermaLink="false">https://mathewgaluszka.ca/jukebox-robot-arm</guid>
            <pubDate>Thu, 01 Jan 1970 00:00:00 GMT</pubDate>
            <description><![CDATA[As an avid vinyl collector, I always wanted a jukebox to automatically play through my collection. However, most jukeboxes can’t play 12-inch records, and the ones that do are either known for damagin...]]></description>
            <content:encoded><![CDATA[<p>As an avid vinyl collector, I always wanted a jukebox to automatically play through my collection. However, most jukeboxes can’t play 12-inch records, and the ones that do are either known for damaging the records inside or are well into a 5-digit price range.</p>
<p>So I made my own.</p>
<figure>
  
  <figcaption>Robot arm working through a pick and place action.</figcaption>
</figure>
<h2>Scope</h2>
<p>This project was a massive undertaking as I wanted this to be a one-of-a-kind system built from scratch, incorporating everything that I have learned through my studies and work experience. I went all the way back to basics, working through initial R&amp;D and pulling on knowledge of industrial automation tech to determine the best approach for this project. I started by defining scope and outlining required capabilities, such as payload, speed, and accuracy. Since records are light at around 200g, robot strength and payload were a low concern, and while having an ultra fast robot would be cool, it’s a secondary target that can be dialed in later provided the robot actuators were powerful enough. From the beginning, I knew my biggest problem was going to be accuracy since these records need to be placed on a peg with a 7mm diameter. To make sure the robot could reliably place a record down, I set an accuracy target of <strong>+/- 2mm</strong> on the entire arm. This meant for any given position in range, the robot must be within 2mm of its target position. On top of robot capabilities, I also decided that vacuum suction was going to be the best method of picking a record up. By only interacting with the label on the disk, rather than the edge of the disk, I greatly reduced the risk of scratching the record.</p>
<table>
  <thead>
    <tr>
      <th>Tech Stack</th>
    </tr>
    <tr>
      <th>Electrical</th>
      <th>Mechanical</th>
      <th>Software</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>STM32 Microcontroller</td>
      <td>Custom Designed Arm</td>
      <td>Embedded C Firmware</td>
    </tr>
    <tr>
      <td>Custom Shield PCB</td>
      <td>PETG/PA6-GF 3D Prints</td>
      <td>PyQT6 Desktop App</td>
    </tr>
    <tr>
      <td>TMC2209 Drivers</td>
      <td>SCARA Arm Base</td>
      <td>Fully Onboard Control</td>
    </tr>
    <tr>
      <td>Incremental Encoders</td>
      <td>Differential End Effector</td>
      <td>Inverse Kinematics</td>
    </tr>
    <tr>
      <td>Current Sense Homing</td>
      <td>Vacuum Pick/Place</td>
      <td>S-Curve Trajectory</td>
    </tr>
    <tr>
      <td>Int/Ext UART COM</td>
      <td>Off-Shelf Integration</td>
      <td>Python Math Tests</td>
    </tr>
  </tbody>
</table>
<h2>Initial Electrical Tests</h2>
<p>With scope defined, I started by planning out the overall electrical/software tech stack, and the first concrete decision I made was that closed-loop motion was a necessity. This means that the robot will always be able to track its current position and ensure that it will not crash and damage a record. From the decided control method, I looked at closed-loop actuation options, and the one that checked all the boxes while still making financial sense was to use NEMA17 stepper motors with TMC2209 motor drivers with incremental encoders tracking joint angles. These stepper motors move a fixed distance/angle for every step pulse given to the motor driver, so by changing the frequency of the step pulses, the motor will rotate at the speed you want. This would all be tracked by the encoder, which feeds a signal back to the microcontroller that tells it how far it has moved. As for the microcontroller, I settled on an STM32 board as it was capable of the milli/microsecond level timing constraints required for embedded robot control code, while also having features that would make motor and encoder signals much easier to work with. With an initial outline complete, I created a test bench to verify that the tech stack would be capable of the +/- 2mm goal that I set. This arm featured only 2 joints, and the goal was to see how far the arm would stray from its commanded position during a linear move.</p>
<figure>
  
  <figcaption>Prototype arm accuracy test. Result: Success, avg. 0.43mm deviation between commanded and actual.</figcaption>
</figure>
<p>This early prototype showed that the accuracy required would be achievable. The average error between commanded and actual position was 0.43mm, with a peak hitting 1.42mm, well within the +/- 2mm target that was set. This was a crucial step of this project, as this solidified that the electrical sub-system would be capable of executing the commands I needed, and it gave me the confidence required to design the whole mechanical arm.</p>
<h2>Mechanical Build and Manufacturing</h2>
<p>Following the electrical bench test, next steps were to build out the rest of the arm. I first set out by figuring out the working area required and defining joint sections. I wanted the arm to be able to fold up into the cabinet, out of sight and inconspicuous when not in use. When commanded, it would unfold out of the cabinet and work through the pick and place procedure before folding back in. I landed on a SCARA arm style with a differential wrist at the end. The prismatic (linear) joint would move the arm in and out of the cabinet, and the SCARA revolute joints would contribute to the main working area. The differential wrist at the end of the SCARA arm would then be responsible for correctly orienting the record as it is picked and placed. With a general joint layout, next I determined how many motors/encoders would be on each joint, as well as what gearboxes/reduction systems would be required for the motors to output enough torque to hold the record.</p>
<p><img src="https://mathewgaluszka.ca/images/armcadss.png" alt="Full arm CAD model. Orange: Prismatic (J2), Green/Blue: SCARA (J3/J4), Purple:  Wrist (J5/J6)" /></p>
<p>From a design standpoint, I attempted to use standard off-the-shelf bearings, aluminum extrusion, and fasteners where I could, as this greatly reduced design time and would yield a much more rigid assembly than to make the entire arm 100% 3D printed. I then bridged the gap between the off-the-shelf components and what I needed with 3D printed assemblies and brackets. The majority of the assembly was designed around the use of standard PETG, a strong, durable, and impact resistant material that is very easy to print compared to some of the high end (and much more expensive) engineering grade filaments. In areas where I needed more strength, I stepped up to PA6-GF, or glass filled nylon. This stuff is much more durable for meshing gears and comes with the added bonus of being self-lubricating.</p>
<p><img src="https://mathewgaluszka.ca/images/J3gearbox.jpg" alt="Multi-material internals of J3 gearbox. Black structure: PETG, Brown gears: PA6-GF" /></p>
<p>I worked my way through all the joints individually, designing and validating each one as a stepping stone. Like with the electrical tests, accuracy and rigidity were the keys to a successful arm. Each one went through multiple iterations on their own, narrowing down individual fit and function to make sure it stood up to the stresses it would regularly see, and then even more iterations when integrated into the arm as a whole. Each joint was also electrically tested with the test bench setup to ensure smooth operation. Eventually, the full arm was manufactured and ready for full-scale integration into the cabinet, but before that, I needed to clean up the mess of wiring sitting on the desk.</p>
<figure>
  
  <figcaption>Full arm bench test with breadboarded circuit and on-hand drivers.</figcaption>
</figure>
<h2>Custom Shield PCB</h2>
<p>To aid in packaging and to reduce the mess of wires, I wanted to design a custom PCB that would deal with the majority of incoming/outgoing signals and power delivery requirements. However, instead of jumping the gun and making a whole board, I first started by making my own mini TMC2209 driver modules to test out the circuitry. These mini modules could interface with the Nucleo board via a breadboard and was utilized in the video above for those tests. I was happy with the result, but there were a couple of things that I noted to change for the bigger board such as heat dissipation due to the high current application and some minor component placement notes.</p>
<p><img src="https://mathewgaluszka.ca/images/minidriver.jpg" alt="Custom mini TMC2209 stepper motor driver" /></p>
<p>Moving onto the bigger PCB, this one would act as a shield for the Nucleo F446RE microcontroller I was using, and was responsible for powering 8 TMC2209 stepper drivers, 4 incremental encoders, and the controls for the vacuum pump. Power delivery consisted of 12V input routed to the stepper drivers, as well as regulators that stepped it down to 5V and 3V3 lines for the encoders and microcontroller respectively. The biggest constraint on this board by far was space, as I had just shy of 150 components that needed to be placed on a 70mmx70mm form factor, and this ended up being one of the most densely packed boards I have designed.</p>
<p><img src="https://mathewgaluszka.ca/images/pcblayout.png" alt="PCB layout for custom shield" /></p>
<p>After the design was complete and I received the board, I assembled it myself with a hot plate and hot air gun and began permanently wiring the arm. This included sleeving all the wires to prevent abrasion and wear, and tying everything to the arm itself so a stray wire loom wouldn’t knock a record in the cabinet.</p>
<p><img src="https://mathewgaluszka.ca/images/fullarmtestbench.jpg" alt="Arm fully wired on bench with custom shield" /></p>
<h2>Software and Controls System</h2>
<p>With the arm wired, the next problem was developing the embedded C firmware required to command it all together in sync. The first problem was getting it to repeatably move to a consistent position, which was accomplished through StallGuard homing. This is a special feature on the TMC2209 motor drivers, where essentially, you can controllably crash the robot into a known reference surface and the driver will output a signal when it feels the motor stall out. This tells the microcontroller exactly where the arm is and the angle it is at within about half of a degree.</p>
<figure class="control-flow">
  <div class="control-flow__steps">
    <div class="control-flow__step">Home Procedure<span>Robot utilizes StallGuard to calibrate encoders to a known position/angle</span></div>
    <div class="control-flow__step">End Position<span>End position set by internal command or user specified position</span></div>
    <div class="control-flow__step">Inverse Kinematics<span>Finds joint angles for setpoint positions reached during the move</span></div>
    <div class="control-flow__step">S-Curve<span>Figures out when to reach the inbetween positions to limit speed/acceleration/jerk</span></div>
    <div class="control-flow__step">PI loop<span>Compares actual position to setpoint position and commands motors to shrink the difference </span></div>
    <div class="control-flow__step">Vacuum<span>Turns vacuum on/off to pick/place record at certain known positions</span></div>
  </div>
</figure>
<p>Once homed and the position of the arm is known, the robot can then be controlled either by each individual joint or positioned in global space through a process called inverse kinematics. Inverse kinematics is a bunch of math that converts x/y/z coordinates from a global coordinate system into joint angles required for the robot to reach that position. If we have a point in global space that we want the arm to reach, we can solve for all the joint angles for each position as we move through that space. This, alongside a S-Curve trajectory planner that slowly ramps the arm speed up and down so there isn’t jerky motion, gives us target angle setpoints across the whole move. Finally, we utilize a PI controller that calculates the error between the target setpoints and the actual arm position and controls the motor accordingly to shrink that error. This calculation occurs every millisecond, so the robot is constantly evaluating how close it is to its target setpoint and attempting to bring itself as close to it as it can.</p>
<p><img src="https://mathewgaluszka.ca/images/controlpanel.png" alt="Windows control panel for the arm" /></p>
<p>On top of the firmware, I also built a Python-based control panel to test the arm and bring it up. All communication between the panel and the robot is through a custom UART ASCII command interface. This panel outputs nice to knows such as current mode, joint home status, current joint angles, and TMC2209 driver status. It also allows the user to manually jog the robot arm at certain speeds, home the arm, move the arm to given joint angles, complete synchronized moves, and even run through whole pick and place sequences in a singular command.</p>
<h2>Current Progress And Next Steps</h2>
<p>Even though most of the design work is done, there are still some remaining integrations that need to be made. The main one is the doors of the cabinet, which I am currently working on implementing linear actuators to open and close them. I also want to create a proper user interface other than the python control panel, and that is something I am working on alongside the SmartHome Stained Glass Lamps as I am modifying a Wii remote into a smart home controller to be able to control both projects. Overall though, I am incredibly happy with the current progress and it is a joy to see the arm in action moving my disks around. For more technical details, as well as access to all of the mechanical, electrical, and software source files to dig through, you can find them at the Github Repo linked at the top of the page.</p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SmartHome Stained Glass Lamp]]></title>
            <link>https://mathewgaluszka.ca/smarthome-stained-glass-lamp</link>
            <guid isPermaLink="false">https://mathewgaluszka.ca/smarthome-stained-glass-lamp</guid>
            <pubDate>Thu, 01 Jan 1970 00:00:00 GMT</pubDate>
            <description><![CDATA[I have always loved niche art mediums, one of those being stained glass. However, getting custom pieces made can be quite costly. So when I came across youtube tutorials of how to make stained glass p...]]></description>
            <content:encoded><![CDATA[<p>I have always loved niche art mediums, one of those being stained glass. However, getting custom pieces made can be quite costly. So when I came across youtube tutorials of how to make stained glass pieces for relatively cheap and without crazy expensive tools, I decided to give it a shot with my own engineering twist to it, and its turned into a hobby I quite enjoy.</p>
<h2>Design and Fabrication Process</h2>
<p>I first start out by creating a rough 2D sketch of how I want the panes to look in CAD software. This lets me see how all the lines flow into one another, and once I have a panel design set, I can tile it into 3D space to see if I like the proportions of the lamp as a whole.</p>
<p><img src="https://mathewgaluszka.ca/images/lampcad.jpg" alt="CAD design of the first lamp I made" /></p>
<p>Once I am happy with the overall design, I use a cricut machine to cut out stickers of the pattern, which I can then stick to my glass pieces to aid in cutting them out.</p>
<p><img src="https://mathewgaluszka.ca/images/glassstickers.jpg" alt="Layout of all sticker pieces" /></p>
<p>Of course, glass cutting can be a finicky thing, and not every cut goes to plan. I had to deviate from the original drawing since I did not have enough glass, but I did manage to salvage the piece as a whole, pivoting to a white tip piece instead of the pink. I utilized a 3D printed panel form to line everything up and ensure that all the glass pieces were cut and grinded to the correct size.</p>
<p><img src="https://mathewgaluszka.ca/images/panelform.jpg" alt="3D printed form to layout individual panels" /></p>
<p>After confirming fit, each piece is cleaned thoroughly and wrapped with a copper foil tape. This allows me to then solder everything together once everything is back and aligned in the form.</p>
<p><img src="https://mathewgaluszka.ca/images/finishedpanels.jpg" alt="Completed panels" /></p>
<p>I then 3D print another jig to align everything in 3D space, and I then solder all the panels together.</p>
<p><img src="https://mathewgaluszka.ca/images/3djig.jpg" alt="Panels aligned in 3D jig" /></p>
<p>With the shade done and final dimensions are known, I designed a lamp base in CAD and 3D printed that as well, routing the cables and light socket internally so that you wouldnt be able to see it. I printed this out of a special PLA that looks like metal once it is fully printed, and the effect turned out pretty nice. I also put in a Phillips Hue bulb, so I can control the lamp from my phone. I am also working on converting a Wii remote into a smart home remote so that I dont have to rely on my phone, and can instead have a physical controller for this and all future lamps I make, one of which is already in the works.</p>
<p><img src="https://mathewgaluszka.ca/images/tuliplamp.png" alt="Upcoming lamp design" /></p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Robotic Operating Healthcare Buddy]]></title>
            <link>https://mathewgaluszka.ca/rohb</link>
            <guid isPermaLink="false">https://mathewgaluszka.ca/rohb</guid>
            <pubDate>Thu, 01 Jan 1970 00:00:00 GMT</pubDate>
            <description><![CDATA[Hospital staff spend a lot of their shift on repetitive logistics: moving equipment, delivering items, and clearing meal trays. Every minute spent on these tasks is a minute not spent on patient care....]]></description>
            <content:encoded><![CDATA[<p>Hospital staff spend a lot of their shift on repetitive logistics: moving equipment, delivering items, and clearing meal trays. Every minute spent on these tasks is a minute not spent on patient care. Our team worked through the design process to create a compact, quiet, autonomous robotic aid to take over some of this workload. This project required a prototype for one of the sub-systems, so we focused on one of its core tasks: collecting meal trays from tables and repositioning them to a common area.</p>
<h2>The Problem</h2>
<p>Nurses and support staff handle tray retrieval many times a day, and a missed or delayed pickup adds to their workload and can disrupt the ward. We wanted a robot that could do this reliably without getting in the way of patients, visitors, or staff.</p>
<h2>Design Inputs</h2>
<p>We defined 13 design inputs, each traced to a user requirement and tagged as either a performance or a design characteristic. Where possible they were backed by research and set as measurable, verifiable targets. The main ones were:</p>
<ul>
<li>Function: complete 2–3 hospital tasks multiple times a day, and accept and hold up to 5 trays through a receptacle</li>
<li>Non-disruptive operation: no louder than 65 dB (normal conversation level), with high-contrast colours such as blue and orange for easy recognition</li>
<li>Compact footprint: no larger than 0.5 m × 0.5 m × 1 m, about half the minimum standard door width</li>
<li>Mobility: stainless steel or nylon castors with polyurethane wheels that can cross small bumps like cables and door sills</li>
<li>Perception and navigation: a camera vision system with image and text recognition (for trays, beds, carts, IV stands, room numbers), combined with GPS and onboard vision for pathfinding within 10 m</li>
<li>Power: DC drive motors able to output 30 kgF to move equipment, and batteries for 10 hours of continuous runtime</li>
<li>Data security: encryption and authentication protocols to comply with PIPEDA and HIPAA</li>
<li>Hygiene and maintenance: a non-porous, easily disinfected outer shell (UHMWPE), and a design that can be disassembled with common tools using off-the-shelf parts</li>
</ul>
<h2>Design Review</h2>
<p>At Design Review, feedback from our supervisors pushed the design in a few clear directions:</p>
<ul>
<li>Room recognition: the robot should read room numbers to know where it is, which led to a dedicated requirement and a more specific vision input.</li>
<li>Task focus: we narrowed the scope to two concrete tasks.</li>
<li>Justification: design choices needed citations and research behind them, so we added sources for the major ones.</li>
<li>Verifiability: we replaced vague goals with metrics (5 trays, 30 kgF, 10 hours).</li>
<li>Traceability: we added a legend separating performance from design characteristics.</li>
</ul>
<h2>Risk Analysis (FMEA)</h2>
<p>We catalogued failure modes across the robot’s functions, scoring each on severity and probability to get a risk number. One of the highest risk items was damage occuring to nearby equipment during the grab process. Lower-risk items included grabbing the wrong item, hazards from the robot’s size in hallways, and dropped food. The grab system was one of the top risks and the top-weighted design input, so that is how we decided that our prototype would center around verifying and validating the design.</p>
<p><img src="https://mathewgaluszka.ca/images/fmea.png" alt="FMEA table for the robot as a whole" /></p>
<h2>Prototype</h2>
<p>For the prototype, we utilized PVC tubing for the overall structure. Linear motion was accomplished with stepper motors powering lead screws, with the tray bounded by linear motion rods to keep it all in line. Another stepper motor was used to drive the extension arm that pulled the meal tray into the robot body. Since this was a short 4 month project, a complete vision system was not in scope, so we utilized limit switches to determine the position of the robot at its travel endpoints. C Firmware was built on a STM32 Discovery board that featured a touchscreen, allowing for user input for the prototype.</p>
<figure>
  
  <figcaption>Prototype working through the tray grab process.</figcaption>
</figure>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Pace++]]></title>
            <link>https://mathewgaluszka.ca/pace-plus-plus</link>
            <guid isPermaLink="false">https://mathewgaluszka.ca/pace-plus-plus</guid>
            <pubDate>Thu, 01 Jan 1970 00:00:00 GMT</pubDate>
            <description><![CDATA[Pace++ is a simulated pacemaker system built to visually and functionally represent the features of modern pacemakers today, strictly following Boston Scientific specifications. It features 8 unique p...]]></description>
            <content:encoded><![CDATA[<p>Pace++ is a simulated pacemaker system built to visually and functionally represent the features of modern pacemakers today, strictly following Boston Scientific specifications. It features 8 unique pacing modes, real-time ECG plotting, encrypted local data storage, and serial communication with a K64F / STM32 hardware board.</p>
<h2>Pacemaker Modeling with Simulink</h2>
<p>Central to modelling our pacemaker’s functionality was the use of MATLAB Simulink, which allowed us to generate code iteratively and quickly flash our code into our board. Through user-set parameters, our Simulink code allow for pacing of both the atrium and ventricle alongside rate adaptive pacing with a in-built accelerometer. All important user-set data and electrocardiogram data was framed. The resulting packet was sent through a micro-usb to the device controller monitor.</p>
<p><img src="https://mathewgaluszka.ca/images/Simulink1.jpg" alt="Simulink Stateflow Diagram" /></p>
<h2>Device Controller Monitor (DCM)</h2>
<p>Through python’s tkinter, we created a secure interface that allows for the modification of the pacemaker. Our GUI allows for:</p>
<ul>
<li>Real-time display of the simulated heartbeat</li>
<li>Patient data to be saved and modified</li>
<li>Encryption of patient data</li>
<li>Serial communication to the K64F board</li>
</ul>
<p><img src="https://mathewgaluszka.ca/images/EgramScreen1.png" alt="Electrocardiogram Display Screen" /></p>
<h2>Validation</h2>
<p>To test and validate our pacemaker mode function, we employed Heartview, a McMaster created cardiac simulation tool that was pre-flashed onto our board.</p>
]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Walk N’Roll]]></title>
            <link>https://mathewgaluszka.ca/walk-n-roll</link>
            <guid isPermaLink="false">https://mathewgaluszka.ca/walk-n-roll</guid>
            <pubDate>Thu, 01 Jan 1970 00:00:00 GMT</pubDate>
            <description><![CDATA[For our final project of 4 in my first year design project course, we had the opportunity to meet members of the community, listen and learn about their day to day life with chronic illness and build ...]]></description>
            <content:encoded><![CDATA[<p>For our final project of 4 in my first year design project course, we had the opportunity to meet members of the community, listen and learn about their day to day life with chronic illness and build a device based around their needs. As a part of this 2 month project, we met Kevin, who required a mobility aid that bridged the gap between conventional walkers and wheelchairs, as he was right on the cusp of requiring both but didnt want to have to travel around with two seperate devices. Following a couple of design reviews, we ended up coming up with an idea for a 2 in 1 convertible walker and wheelchair that could be transitioned between the two options, alowing for greater mobility when he wanted it and extra support when needed.</p>
<p><img src="https://mathewgaluszka.ca/images/cardboard.png" alt="Early cardboard protoype, wheels would swing out and around to the rear" /></p>
<p>Once we had a concept, I took on the fabrication of the full-scale model. Because it had to be built off-campus, this was a large part of the project, and my background in carpentry let me carry the design through to a working prototype. Building at full scale taught me how much a design has to account for real materials, tolerances, and assembly constraints, and it confirmed the value of physical prototyping for testing ideas.</p>
<div class="image-row">
  <figure>
    <img src="https://mathewgaluszka.ca/images/walkermode.png" alt="Walker mode" />
    <figcaption>Walker mode</figcaption>
  </figure>
  <figure>
    <img src="https://mathewgaluszka.ca/images/wheelchairmode.png" alt="Wheelchair mode" />
    <figcaption>Wheelchair mode</figcaption>
  </figure>
</div>
<p>For a 2 month project, all of us were thrilled with the work that we put in and were very happy with the final product. Out of all of the projects completed during this design project course, we were one of four teams that had the honour of presenting our project at the IBioMed Design Showcase, which you can read about in the link to the McMaster Article.</p>
]]></content:encoded>
        </item>
    </channel>
</rss>