Mimicking The Human Arm Robotic elbow with friction control for enhanced rehabilitation robot testing Bachelor degree project report in electrical engineering Benjamin Sahari, Josef Borlinic, Hjalmar Engberg Pramling, Henrik Aspgren DEPARTMENT OF ELECTRICAL ENGINEERING CHALMERS UNIVERSITY OF TECHNOLOGY Gothenburg, Sweden 2025 www.chalmers.se www.chalmers.se Bachelor degree project report 2025 Mimicking The Human Arm Robotic elbow with friction control for enhanced rehabilitation robot testing Benjamin Sahari, Josef Borlinic, Hjalmar Engberg Pramling, Henrik Aspgren Department of Electrical Engineering Chalmers University of Technology Gothenburg, Sweden 2025 Mimicking The Human Arm Robotic elbow with friction control for enhanced rehabilitation robot testing Benjamin Sahari, Josef Borlinic, Hjalmar Engberg Pramling, Henrik Aspgren © Benjamin Sahari, Josef Borlinic, Hjalmar Engberg Pramling, Henrik Aspgren, 2025. Supervisor: Fabian Just, Chalmers Examiner: Emmanuel Dean, Chalmers Bachelor degree project report 2025 Department of Electrical Engineering Chalmers University of Technology SE-412 96 Gothenburg Sweden Typeset in LATEX, template by Kyriaki Antoniadou-Plytaria Gothenburg, Sweden 2025 ii Abstract This project developed a functional robotic elbow prototype to support research in move- ment rehabilitation. Our goal was to create an affordable, open platform that could sim- ulate both natural elbow motion and impaired movement patterns like spasticity while meeting basic safety requirements for rehabilitation applications. The prototype combines 3D printed components with off-the-shelf mechanical parts, in- cluding a bicycle disc brake system for adjustable resistance. We used PLA and PETG thermoplastics for most structural elements, with aluminium for high-stress components. The system is controlled by an Arduino-based circuit that manages a stepper motor and braking mechanism, allowing precise movement regulation. Key challenges we addressed include designing a compact joint mechanism, integrat- ing the brake system in a limited space and solving voltage compatibility issues between components. The final prototype can generate a sufficient breaking torque to simulate resistance patterns seen in neurological conditions. Beyond the technical implementation, we considered critical societal aspects like cost barriers in rehabilitation technology and the ethical implications of robotic systems in healthcare. The total project cost remained under 5,000 SEK, demonstrating that func- tional rehabilitation prototypes can be developed with modest budgets. This work provides a foundation for future development in accessible rehabilitation tech- nology. The open design allows for improvements like additional joints or more sophis- ticated control systems, while the modular approach enables adaptation for different research or clinical needs. iii Acknowledgements First and foremost, we sincerely thank our supervisors Emmanuel Dean and Fabian Just, for their expert guidance, constructive feedback and unwavering support throughout this project. Their insights and encouragement were crucial in shaping our research. We are also sincerely grateful to Vaishnavi Ravi for her valuable support in ordering the products from our shopping list, which helped us address key logistical needs. We would like to extend a special acknowledgment to CASE Lab at the Chalmers Uni- versity of Technology for its outstanding supervision, facilities and collaborative environ- ment. The lab’s resources and expertise significantly contributed to the success of our thesis. We also want to thank the faculty and staff at Chalmers for having an atmosphere of innovation and academic excellence. We are deeply grateful to our classmates, friends and families for their unwavering patience, endless motivation and steadfast belief in us throughout this journey. iv Contents 1 Introduction 1 1.1 Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.2 Problem description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.3 Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 2 Theory 3 2.1 Anatomy of the arm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2.2 Elbow joint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.2.1 Revolute joint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.3 Force and torque . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.4 Brake disc system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.4.1 Brake disc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.4.2 Integration in robotic systems . . . . . . . . . . . . . . . . . . . . 7 2.5 3D printing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.6 Embedded system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.6.1 Stepper motor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.6.2 Motor driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.6.3 Microcontroller . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.6.4 Slide potentiometer . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.6.5 Breadboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 3 Methods 13 3.1 Mechanical structure overview . . . . . . . . . . . . . . . . . . . . . . . . 15 3.2 Force and torque measurement . . . . . . . . . . . . . . . . . . . . . . . . 15 3.3 Hardware design and electronics . . . . . . . . . . . . . . . . . . . . . . . 16 3.3.1 Motor and circuit setup . . . . . . . . . . . . . . . . . . . . . . . 17 3.3.2 Microcontroller . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 3.3.3 Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 3.3.4 Assembly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 3.3.5 Testing and calibration . . . . . . . . . . . . . . . . . . . . . . . . 21 4 Results 22 4.1 Mechanical structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 4.1.1 Shoulder mount . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 4.1.2 Arm segments: upper and lower arm . . . . . . . . . . . . . . . . 23 4.1.3 Elbow joint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 4.2 Brake system performance . . . . . . . . . . . . . . . . . . . . . . . . . . 26 4.3 Motor coupling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 v Contents 4.4 Motor control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 4.4.1 Analog control via slide potentiometer . . . . . . . . . . . . . . . 27 4.4.2 Digital control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 4.5 Final assembly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 5 Discussion 29 5.1 Technical reflections on the mechanical design . . . . . . . . . . . . . . . 29 5.2 Control strategies and microcontroller choice . . . . . . . . . . . . . . . . 29 5.3 System evaluation and limitations . . . . . . . . . . . . . . . . . . . . . . 30 5.4 Societal implications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 5.5 Societal integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 5.6 Advantages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 5.7 Alternative approaches and further upgrades . . . . . . . . . . . . . . . . 33 5.7.1 Variable muscle stiffness . . . . . . . . . . . . . . . . . . . . . . . 33 5.7.2 Elbow joint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 5.7.3 Brake system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 5.7.3.1 Potential alternative brakes . . . . . . . . . . . . . . . . 34 5.7.3.2 Application of alternative brake systems . . . . . . . . . 35 5.7.3.3 Conclusion of the brake system . . . . . . . . . . . . . . 35 5.7.4 Closed-loop feedback mechanism . . . . . . . . . . . . . . . . . . 35 5.8 Ethical considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 5.9 Valuable lessons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 5.10 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 6 Contribution 39 A Appendix II Appendix A: Arduino code "3 programs" . . . . . . . . . . . . . . . . . . . . . II Appendix B: Arduino code "Slide pot" . . . . . . . . . . . . . . . . . . . . . . IV vi 1 Introduction Neurological disorders affect one-third of the world’s population annually, with stroke being the leading cause of long-term disability among these patients. Consequently, pa- tients afflicted with motor impairments and spasticity undergo intensive rehabilitation exercises that are physically draining and unsustainable [1]. Since conventional therapy resources are outpaced by the current needs of the physically impaired, the public health sector is shifting towards robot-assisted rehabilitation techniques [2]. These robotic sys- tems are designed as wearable exoskeletons that support repetitive, high-intensity and task-specific therapies. Thus, these devices provide a scalable solution that reduces the long-term burden on healthcare facilities. In recent years, the implementation of the Medical Device Regulation (MDR 2017/745) alongside other regulatory amendments in the European Union has resulted in more strin- gent evaluation for exoskeleton clinical trials [3]. These heightened standards underscore the need for prototypes that can accurately simulate human biomechanics before clinical trials. Our work addresses this need by developing a robotic arm system. This system is designed to function as a validation framework for safety assessments under controlled conditions as well as a developmental platform for enhancing other robotic systems. Our system is designed to benchmark exoskeleton performance in diverse rehabilitation scenar- ios by replicating typical and impaired movement patterns. Moreover, it meets modern safety and efficacy standards by supporting iterative developmental techniques and con- trol enhancement strategies. In conclusion, our work aims to accelerate the transition of medical-grade robotic systems from lab settings to clinical trials in a safe manner. 1.1 Purpose This project aims to develop a cost-effective robotic elbow prototype to advance research in post-stroke rehabilitation therapy. Our primary objective is to demonstrate that func- tional exoskeleton components can be created using accessible materials and affordable technologies. Rather than pursuing a commercially refined product, the focus is on replicating core functionality: a robotic joint simulating natural movement with adjustable resistance and rapid braking. These capabilities are essential for studying neurological conditions treated with exoskeletons, like spasticity where patients experience involuntary muscle contractions and impaired motor control. 1 1. Introduction The prototype will intentionally be designed as an open platform, providing a foundation for future enhancements such as advanced sensors, improved actuation, or integration with additional muscle contractions. By maintaining simplicity and modularity, we aim to empower researchers and educators with limited resources to contribute to rehabilitation technology development. This work represents an initial step toward easier access to robotic rehabilitation tools across academic and clinical settings. 1.2 Problem description Despite their therapeutic potential, robotic exoskeletons face significant development challenges due to inadequate preclinical testing solutions. Current robotic simulators cannot accurately reproduce the complex dynamics of human joints, particularly the variable resistance and stiffness patterns characteristic of neurological conditions. This Limitation hinders the reliable validation of exoskeleton control systems and safety mech- anisms before human trials. Existing test platforms fall into two problematic categories: oversimplified mechanical rigs that lack physiological accuracy or prohibitively complex systems requiring special- ized expertise and infrastructure. Neither approach satisfies the need for a practical yet bio-mechanically realistic testing platform capable of simulating both normal and im- paired movement. Our project addresses these shortcomings through a robotic elbow prototype emphasizing three key features: adjustable resistance to simulate pathological tremors and spasticity, real-time responsiveness for replicating voluntary and reflexive motions and modular ar- chitecture supporting future functional expansions. The design explicitly targets reha- bilitation and replication of a human arm, where accurate simulation of impaired motor control is crucial for developing effective therapies. 1.3 Scope This project will cover the full development cycle of a functional robotic elbow proto- type, focusing on joint mechanics, braking implementation and control integration. The mechanical design emphasizes essential biomechanical function with minimal anatomical complexity, using a single-degree-of-freedom joint and an adjustable friction brake. The electronic system integrates motor control and Arduino compatibility for research versa- tility. Key exclusions include multi-joint coordination and biological muscle modeling, allowing focused innovation on elbow-specific functionality. Fabrication employs accessible man- ufacturing techniques, primarily three-dimensional (3D) printing with PETG or PLA plastic and Laser-cut aluminium components are selected for their optimal balance of durability, weight and production efficiency. With a 5,000 SEK budget, component selec- tion prioritizes research utility over aesthetic refinement. All design files and documen- tation will be openly available to encourage further development and adaptation by the research community. 2 2 Theory This chapter presents the foundational principles governing the design and operation of a robotic arm mimicking the human elbow joint, bridging biomechanics, mechanical engi- neering and embedded control systems. The design integrates revolute joints for hinge-like motion and friction-based braking systems for controlled deceleration. Electromechani- cal components, including a stepper motor and a slide potentiometer, enable open-loop position control via a microcontroller. Additive manufacturing (3D printing) supports rapid prototyping of structural parts, with material selection (PLA/PETG) balancing strength, flexibility and thermal stability. 2.1 Anatomy of the arm The human arm is divided into three primary regions: the brachium (upper arm), ante- brachium (forearm) and carpus (hand). The skeletal framework of the brachium and ante-brachium region consists of the humerus, radius and ulna; see Figure 2.1 below. These three bones provide vital support for complex motor functions by interacting at four key joints: the humeroulnar joint, humeroradial joint, proximal and distal radio- ulnar joints [4]. The proximal and distal radio-ulnar joints are located between the radius and the ulna and are responsible for pronation (outward rotation) and supination (inward rotation) [4]. These two joints are not in the scope of this project and will not be considered, but will be crucial in further project development. On the other hand, the humeroulnar joint and humeroradial joint (elbow joint) facilitate flexion and extension of the forearm, which is driven by the coordinated action of specific muscle groups [4]. 3 2. Theory Figure 2.1: An illustration of the anatomy of the human arm [5] Muscles in the upper arm (biceps brachii and brachialis) and radial side of the forearm (brachioradialis) contract, which pulls the forearm towards the upper arm, resulting in flexion. Similarly, when the triceps brachii located in the upper arm contracts, it straight- ens the upper arm, causing extension at the elbow joint [4]. This joint, which governs a single degree of freedom, acts as a kinematic bridge between the shoulder and hand. This joint’s simplicity in hinge action makes its biomechanics easily replicable with higher control strategies in robot-assisted exoskeletons. Therefore, the elbow joint was focused on in this project, as its simplicity and role as a kinematic bridge between the shoulder and hand enable clinicians to assess and improve patients’ motor function in a controlled manner. 2.2 Elbow joint This section examines the kinematic and structural requirements for replicating a human elbow joint in a robotic or prosthetic system. The design must account for: 4 2. Theory • Degrees of freedom: The elbow operates as a one-dimensional freedom hinge joint that permits flexion and extension. • Anthropometric dimensions: Proportional scaling of upper and lower arm seg- ments following biomechanical standards. • Motion control: Integration of braking mechanisms for rotation regulation. • Actuation methodology: Observation of antagonist/agonist muscle pairs. 2.2.1 Revolute joint Revolute joints, commonly known as hinge joints, are mechanical components that enable rotation around a single fixed axis while restricting all other movements. An illustration of the joint is shown in Figure 2.2. Unlike spherical joints (which allow multi-directional rotation) or prismatic joints (which allow only linear sliding), revolute joints excel in applications requiring controlled, hinge-like motion [6]. This makes them ideal for repli- cating natural movements such as elbow or knee flexion, where stability in only one plane is essential. Figure 2.2: Image of a revolute joint and its single axis rotation [7]. The design of a revolute joint consists of: a stationary base and a rotating element, usually cylindrically formed as a shaft or a pin. This simple yet effective design ensures smooth flexion and extension while preventing unwanted lateral or torsional movement. When properly engineered with high-quality materials and optimal load distribution, revolute joints offer exceptional durability and low wear over time. In robotics and prosthetic limbs, revolute joints are widely used to mimic human joint mechanics, particularly in elbows, knees and fingers. Their predictable, single-axis rota- tion makes them well-suited for repetitive tasks like lifting or gripping. Revolute joints can also play a critical role in orthopedic implants, such as elbow replacement systems [8]. These implants often incorporate a hinged mechanism connecting the upper and lower arm bones, restoring essential flexion and extension for patients with arthritis or injuries. 5 2. Theory 2.3 Force and torque Force (F) is calculated by multiplying the mass of an object (m) by the gravitational acceleration (a); F = m · a (2.1) Torque τ which is also called moment of force is a measure of how much a force causes an object to rotate about an axis. It is calculated by multiplying the force vector by the position vector (r); τ = F · r (2.2) 2.4 Brake disc system Brake discs are a proven friction-based solution for controlling motion in robotic elbow joints [9]. Their working principles are straightforward, but implementing them effectively in robotic systems requires careful attention to space constraints, heat management and force distribution. Unlike simpler braking methods, disc systems offer high torque ca- pacity and reliability, which are key advantages for robotics applications where precision and durability matter. Figure 2.3: Illustration of a brake disc system where the red part is the clamp of the brake [10]. 2.4.1 Brake disc The braking torque (T ) generated by a disc brake system is given by: T = µ · F · R (2.3) where: • µ = Coefficient of friction between the brake pad and disc, • F = Clamping force applied by the caliper (in Newtons), • R = Effective radius (distance from the center of rotation to the pad contact point, in meters). 6 2. Theory The equation shows that a larger radius (R) increases torque for the same clamping force, and a smaller radius requires a higher clamping force to achieve the same stopping power. The friction coefficient µ exhibits a strong dependence on both disc material composition and operating temperature. For example: • Cast iron maintains relatively stable friction characteristics across typical operating temperatures [11]. • Carbon and ceramic composites require elevated temperatures to reach optimal friction performance [12]. While secondary factors like thermal management, pad compatibility and environmental conditions influence the overall design, the primary engineering parameters remain: • The disc material’s friction properties (µ) • The effective braking radius (R) The aforementioned parameters enable optimisation of brake system’s performance in engineering applications. 2.4.2 Integration in robotic systems Disc brakes function similarly to bicycle or automotive brakes. A metal rotor rotates with the elbow joint, and when braking is initiated, a caliper compresses the brake pads against the rotor disc. The resulting friction decelerates the motion, with the stopping force proportional to the applied pressure. This design provides a robust and dependable braking system but requires more space and could generate significant heat under inten- sive use. In robotic arms, the disc attaches to the elbow’s rotational axis while the caliper mounts to the arm frame. This setup ensures rapid and high-force braking, making it suitable for industrial applications involving heavy payloads and abrupt stops. However, integrating the disc and caliper within the dimensions of a humanoid arm’s limited space presents challenges, and thermal dissipation must be addressed for high-frequency braking scenar- ios. 2.5 3D printing 3D printing is utilized to fabricate structural components of robot-assisted rehabilitation systems. The printing technique employed in this project is Fused Deposition Modelling (FDM), wherein a thermoplastic filament is extruded through a heated nozzle onto a heated print bed one layer at a time [13]. This filament is melted just above its glass transition temperature to enable its initial bonding with the previous layer, followed by solidification upon cooling. Since the printing bed is heated, it minimizes warping and improves layer adhesion during the printing process. Warping refers to undesirable lifting or curling during the process of printing. The printer’s nozzle diameter can be adjusted from 0.4 mm to 0.8 mm to control the res- olution and printing speed [13]. For instance, a bigger nozzle increases printing speed but 7 2. Theory reduces its resolution. The choice of material in this project was guided by the trade-off between mechanical strength, environmental resistance and printability to ensure reliable performance of the assembled prototype. Thus, two thermoplastic filaments were consid- ered: poly-lactic acid (PLA) and polyethene terephthalate glycol (PETG). While PLA is commonly used in 3D printing due to its cost-effectiveness and high-quality prints, it has limited flexibility and low resistance to UV, as well as temperature. Contrastingly, PETG filament offers greater flexibility, relatively higher UV and temperature resistance, but presents a higher risk of wrapping and yields a lower-quality end product [14]. 2.6 Embedded system The stepper motor, motor driver, slide potentiometer and microcontroller form the core of this project’s open-loop control system. The Arduino Nano ESP32 microcontroller processes linear position feedback from the slide potentiometer and provides an output signal to the motor driver, which controls the stepper motor. The stepper motor’s driver input (e.g., step pulses and direction signals) can be manually adjusted by changing the linear position on the slide potentiometer, which gives greater control over the resistive force on the joint. The 3D printed mechanical components, fabricated from PLA or PETG filament, can house the electronics while providing structural support. 2.6.1 Stepper motor A stepper motor is a brushless DC motor which is designed to rotate in angular steps instead of continuous motion; see Figure below 2.4. It comprises three components, in- cluding a stator, rotor and output shaft. The stator is a stationary component containing multiple electromagnetic windings arranged in phases [15]. A motor driver energizes these windings in the desired sequence. As a result of this sequence, a rotating magnetic field is created that incrementally pulls the rotor into alignment, producing a stepwise motion. This rotor is mechanically linked to the output shaft and transmits rotation to the load with high positional precision. Figure 2.4: Picture of a stepper motor [16]. The torque a stepper motor generates is regulated by the current supplied to its electro- magnetic windings. Higher alternating current corresponds to a higher torque, enabling the motor to handle larger mechanical loads. In contrast, the rate at which the phase windings are energized governs the rotational speed of the motor. Therefore, applying a 8 2. Theory higher voltage will lead to a faster energy build-up in the windings, resulting in higher angular rotation of the rotor and output shaft. The current and voltage received by the stepper motor are regulated by a motor driver, which interprets control signals. As a result, the component can provide accurate and repeatable braking actuation. 2.6.2 Motor driver A motor driver is an interface circuit that enables intercommunication between lower- power mechanical units and higher-power electric motors [17]. This circuit first inter- prets control signals and then modulates the current and voltage transmitted to the coils present in the mechanical unit. Additionally, it prevents thermal shutdown by preventing overcurrent and power regulation. Commonly employed motor drivers in robot-assisted systems include A4988 and DRV8825; see Figure 2.5 2.5. This is because they feature micro stepping capabilities which essentially divide each step into smaller increments, resulting in smoother and more precise motor motion [17]. Figure 2.5: Picture of a motor driver [18]. A motor driver can be integrated as an interface between a microcontroller and a stepper motor. This driver receives step and directional signals from the microcontroller. The received signals are then translated into controlled excitation of the windings in the stepper motor [17]. This enables precise control of the position of the rotor, translating to a precisely controlled braking response. Moreover, it also protects the stepper motor from overheating by supporting a configuration that essentially limits the transmitted current. The presence of on-board jumpers in the interface circuit can be used to adjust the motor driver’s micro-stepping settings. Doing so allows fine-tuning the smoothness of the rotor’s position without modifying the control code. 2.6.3 Microcontroller A microcontroller is a compact integrated circuit designed to perform specific control functions within embedded systems. This circuit comprises a core processor, memory and programmable input/output (I/O) peripherals integrated on a single chip [19]. A microcontroller operates by gathering inputs and temporarily storing them in its data memory. The processor then processes these inputs and executes corresponding control actions based on a user-defined program. 9 2. Theory Arduino Nano ESP32 is usually used as the central control unit of an embedded sys- tem in early prototypes; see Figure 2.6 below. Figure 2.6: Image of an Arduino Nano ESP32 [20]. This microcontroller and its ESP32 circuit are the hardware components that are designed for embedded projects, specifically where space, connectivity and power efficiency matter [21]. It offers integrated Wi-Fi, Bluetooth, Internet of Things, edge computing and is connected with the corresponding software through the Arduino platform. Additionally, this open-source electronic platform focuses on the simplicity of the interference between the Arduino IDE software and the ESP32 microcontroller. Moreover, the Arduino plat- form supports user-friendly development and enables advanced control strategies through relevant software libraries. 2.6.4 Slide potentiometer Commonly referred to as a slide pot, this component is a variable resistor that adjusts the output voltage according to the linear position of a pin that slides along and is in contact with a resistive track [22]; see Figure 2.7. 10 2. Theory Figure 2.7: Picture of a slide potentiometer [23]. It functions as an analogue input device that produces a continuous range of voltages corresponding to the position of the slider. This output is then interpreted by the mi- crocontroller’s analogue-to-digital (ADC) converter. Slide pots are often used in user interfaces where certain parameters need to be controlled manually in real-time. This is because these components have a simple linear motion and a tactile interface. 2.6.5 Breadboard A breadboard is a reusable platform that allows quick assembly and testing of multiple electronic circuits without the need for soldering. It consists of a grid of conductive strips encased in an insulating plastic base [24]; see Figure 2.8 below. Figure 2.8: Illustration of how a breadboard can look like [25]. The grid layout allows various electronic units and jumper wires to be interconnected in different configurations. A breadboard is especially useful during the early develop- ment stages of an embedded system. This is because it offers ample room for circuit 11 2. Theory modifications, debugging and testing different components. In this project, a standard breadboard is used to integrate all the electronic subsystems, including a microcontroller, a motor driver and a slide potentiometer. This modular setup enables a seamless testing platform of all analogue and digital inputs and makes any modifications in the wiring layout swift and easy. 12 13 3. Methods 3 Methods This project followed a typical engineering approach as shown in the block diagram 3.1, in which aspects such as mechanical prototyping, electronics integration, and experimental validation were combined. All the practical part of the project was carried out at CASE lab at Chalmers University, where the team has been supplied with essential tools to carry out the project (3D printers, laser cutters, electronics workstations, etc.). The workflow included the following stages: A starting research and project scoping, then hardware and the assembling of a purchasing list. Therefore, integration of software and electronics with hardware. Lastly, system assembly, and subsequent testing and adjustments. After the re- search phase, CAD modeling was used to visualize and ensure compatibility in terms of design. Due to the lack of mechanical components on affiliated websites, the team relied mainly on 3D printing with careful evaluation of material choices, printing positions, and durability. The Arduino systems served as a bridge used in motor controls and circuit setup, yet practical challenges were a constant guest, for example, non-compatible con- nectors were found at CASE lab for the purchase stepper motor, where the team handled such obstacles by desoldering, soldering and making mechanical modifi- cations. Across all stages of the workflow, the team focused on adaptability as a key response to the multiple challenges that had risen. while keeping a documentation of the major issues that will be presented in the following chapter. Such documentation helped the team keep track of progress ensuring enhanced results. Figure 3.1: Milestones of the methodology 14 3. Methods Now let’s look at the mechanical design of the prototype. Our goal here was to create a structure that feels biomechanically realistic while staying simple enough to iterate on.” The prototype consists of four main parts: a shoulder mount, upper arm, lower arm, and the elbow joint itself — all based on human arm proportions. Most parts were 3D printed using PLA to save weight and cost. But for high-stress components like the motor coupling, we switched to PETG for better durability. Aluminium was used where we needed stiffness — like the internal support profile and brake mount. “Everything was designed to be modular so we could easily swap or upgrade parts. And we kept the structure hollow so there’d be room for future components like sensors or actuators. 3.1 Mechanical structure overview The prototype mainly design-orientation was to mimic the key functional components of the human arm, especially the elbow joint. Anatomically, the system consists of: the shoulder mount, the upper and lower arm segments, and the elbow joint. The full me- chanical structure can be seen in Figure4.20. The three components were the result of an iterative series of CAD models and were manufactured using 3D printing. Almost all components were 3D printed in PLA plastic, except for the component that connected the motor to the brake system (motor coupling), which was printed in PETG due to its high durability and flexibility under mechanical stress. Fortunately, CASE-lab provided multiple printing options. The design prioritized aspects such as modularity, strength, and compatibility to elec- tronic subsystems and the controlling hardware system, while maintaining realistic pro- portions of an average human arm. Furthermore, components were developed to support both passive and active mechanical elements, with regard to future updates such as joint stiffness control. 3.2 Force and torque measurement After several meetings to decide whether to 3D print or purchase a brake system (see Section 3.3 for details), the team selected a mechanical bicycle brake incorporated into the elbow joint. To calculate the torque required to engage the brake, a test was conducted by manually pulling the brake cable using the force gauge with a monitor featuring the weight in kilograms, which was then converted to force using: F = m · g (3.1) g = 9.81 m/s2 (3.2) 15 3. Methods Later on, by using the torque formula and post measuring that the cable was pulling at point 3.5 cm from the joint’s center: τ = F · r (3.3) 3.3 Hardware design and electronics CAD modeling was at the core of the development of mechanical structure. The first prototype was envisioned as a joint with a disc positioned at the elbow for future inte- gration of the brake system. The team’s initial prototype was bulky. hence, a series of an iterative remodeling the prototype into more of a compact yet functional shape was done in stages, while maintaining a balance between mechanical performance and aesthetics. A time-consuming, yet critical point that team battled with was the point in evaluating which parts to add the purchasing-list and which parts to 3D print. Especially, when it came to deciding upon the brake system. To carry on, the team conducted research on various brake systems, such as hydraulic, magnetic, and mechanical. In order to estab- lish an understanding of the available options on the market, and select what would be a suitable solution for the joint, a field study was carried out to several bike stores, where the team discussed and decided on purchasing a mechanical brake system. Although the team had difficulty finding an option listed on Chalmers-affiliated websites, yet they proceeded with the purchase with personal funds. After identifying a suitable brake system, the team remodeled the joint to a slimmer and compatible version that could accommodate the brake system. Therefore, the caliper of the brake system was bolted onto the joint using heat-set inserts. Lastly, the metal brake cable connected to the motor shaft by using a custom made coupling. In the course of electronics integration, several unexpected challenges arose. An issue was the lack of compatible connectors for the purchased motor, which used JST-VH terminals. Although CASE offers a variety of cables and connectors, none were a good direct fit. Fortunately, CASE offers a well-equipped-soldering station. Following the safety protocols, the team desoldered the pre-installed connector, to solder wires directly onto the motor terminals, enabling future installation of the Arduino control system. A separate integration challenge involved mechanically attaching the stepper motor to brake cable- and thus to the brake system for movement regulation. The shape of the motor shaft was not directly compatible with the metallic brake cable, which required a highly wear-resistant material that is capable to take on motor forces durably. Henceforth, the team evaluated manufacturing a metallic coupling in order to get durable and robust results, due to metal’s stiffness and durability when it comes to mechanical stress. That said, CASE lab focus more on 3D printing than metallic manufacturing which would require a water-jet or sand-cutting machinery. Lastly, the team made two plans: • Plan A: Design and 3D print a compatible plastic coupling, taking into considera- tion several ways of making the part stronger. Instead of the e-PLA plastic used throughout the rest of the arm, the coupling was printed in PETG. Printing the part laying flat on the bed is not optimal because of the way the filament extrusions are stacked along the axis where the coupling will face the most amount of stress. Consequently, the part is turned 45◦ in both the x and y-axis when printed. Lastly, 16 3. Methods walls of the print in default mode usually are 2-3 layers, which was increased up to 5 layers, see figure 4.19. • Plan B: in case the previous plan didn’t succeed. A part of the team visited FUSE lab at Chalmers, seeking assistance for fabricating the motor coupling using metal instead of plastics. This plan is not something that the team could excute, due the lack of access to FUSE labs. As the final point, plan A yielded positive results and the 3D printed coupling could successfully withstand mechanical stress, which made it an effective solution for force transmission between the stepper motor and the brake system. 3.3.1 Motor and circuit setup Having decided on the required amount of torque needed for the task. The next aspect to consider is the type of motor to choose and the characteristics which are beneficial for our task. First, a brushless motor was considered. However, the prices for motors with the required torque were in the 4000 sek price range, and the motor is capable of inputs with 180◦ of precision which is not enough for our task. Servomotors could be a possibility, but since we did not need high speeds, simplicity is preferable. The stepper motor was deemed to be the most suitable. The stepper motor can be controlled within a few degrees, it has a strong holding torque which is useful when we want to apply constant friction. Finally, it is also the most affordable at around 1000 sek for motor and motor driver. Moving on to power supply, since Arduino and motor driver have different requirements when it comes to current and voltage, CASE lab provided us with two different power suppliers. As shown in the following figure 3.2. The team provided the motor-driver with a current up to 2 A and 24 V, for the microcontroller the current was delivered up to 0.32 A and 6 V. Later, to ensure consistency in voltage reference and potential differences, the grounds of both power suppliers were to be connected to the same ground. As a response to a reservation the team had regarding powering the microcontroller with USB could lead to different grounds levels 17 3. Methods Figure 3.2: Electrical Schematic of the Motor and Control Circuit Furthermore, the microcontroller was connected to a breadboard, where the same ground connection was extended. Three digital outputs from the microcontroller were routed to the breadboard to carry later on the motor-driver: • An enable pin, to turn the motor on/off, • A direction pin, for clockwise/counter-clockwise direction of the movement, • A PWM pin, pulse control. Proceeding with wiring and logic levels, another challenge was taken on, since the micro- controller outputs 3.3 V signals and the motor driver requires 5 V input signals, a level converter was used to shift the logic levels safely from 3.3 V to 5 V. Due to the fact that such converter includes internal pull-up resistors that protect the circuit from voltage shifts by stabilizing them. 3.3.2 Microcontroller After several discussions and consulting CASE lab employees, the team selected the Arduino Nano ESP32 microcontroller due to: prior experience in integrating Arduino using the Arduino IDE, its compact form, and dual voltage support ( 3.3 V and 5 V). ESP32 played a crucial role in the circuit setup. Although in early phases using ROS for advanced level control was considered, yet the simplicity of the Arduino environment made the ESP32 a suitable choice. Connect to ESP32 digital outputs (D2. D3, and D5), real-time digital signals were 18 3. Methods provided, which were later canalized into commands for the step motor such as enabling, direction, and stepping, respectively. 3.3.3 Code The code snippets below outline the main key functions that were used to for motor control logic. The full code can be found in appendix. Note The oscillationMode function first checks that mode 1 is enabled, then changes the speed to a lower constant. Lastly the last bit of code checks wheter the arm is at targetPosition 0 or maxsteps and moves the motor to the opposite side. Oscillation Mode Function void oscillationMode() { // Ensure this function only runs in mode 1 if (currentMode != ’1’) return; Serial.println("Mode: Oscillation"); // Set to a slower speed for oscillation myStepper.setMaxSpeed(minSpeed); if (myStepper.currentPosition() == 0) { targetPosition = maxSteps; // Move to 45 degrees } else if (myStepper.currentPosition() == maxSteps) { targetPosition = 0; // Move back to 0 degrees } myStepper.moveTo(targetPosition); } Step-by-Step Mode Function The stepByStepMode function also checks that it is in the correct mode and changes the speed to suit the task. Later it makes sure to go to 0 degrees before stepping, then steps are made with 1s delay. The rest of the code makes sure that the function can be cancelled with another function call at any time. 19 3. Methods Step-by-Step Mode Function void stepByStepMode() { // Ensure this function only runs in mode 2 if (currentMode != ’2’) return; Serial.println("Mode: Step-by-Step"); // Set to a slow speed for precise stepping myStepper.setMaxSpeed(minSpeed); unsigned long currentTime = millis(); if (myStepper.currentPosition() != 0 && myStepper.distanceToGo() ... ... == 0) { targetPosition = 0; // Ensure starting at 0 degrees myStepper.moveTo(targetPosition); } else if (myStepper.distanceToGo() == 0 && (currentTime - ... ...lastStepTime >= stepInterval)) { targetPosition = myStepper.currentPosition() + 1; // Move one step myStepper.moveTo(targetPosition); lastStepTime = currentTime; // Update the last step time } } Custom Mapping Function The custom mapping function was made to alleviate the nonlinear output of the slide pot. Custom Mapping Function // Custom mapping function to handle non-linear potentiometer behavior int customMap(int value) { if (value <= 120) { return map(value, 0, 120, 0, 8); // Map first segment } else if (value <= 600) { return map(value, 121, 600, 9, 16); // Map second segment } else { return map(value, 601, 1023, 17, 25); // Map third segment } } 3.3.4 Assembly The mechanical structure and the electronic components to control movement were as- sembled together in CASE. The electronics (ESP32, motor driver, level converter, and breadboard) were mounted with adhesive and screws onto a plywood baseplate, which has a centered custom-cut placeholder for the aluminum profile. Consequently, electrical components were connected to the stepper motor by routing the wiring alongside the aluminum profile. Such organized setup showed to be time-saving and effective later on to do troubleshooting and debugging the circuit when needed. 20 3. Methods For the brake system and its caliper, the joint prototype was developed and custom-made to be compatible with this specific caliper. Once the final version elbow joint was printed, the caliper was mounted securely to the joint using heat-set inserts embedded in the PLA structure. 3.3.5 Testing and calibration Following integration and assembly, the system underwent rounds of testing and iterative calibration. The purpose of this task was to validate the ability to brake, to demon- strate smooth motor control and tn ensure that mechanical structure remained reliable throughout the range-of-motion. Testing phase was demonstrated in two septate setups: • First setup was analog-input-based: by implementing a slide-potentiometer for real- time adjustment of both speed and direction of the stepper-motor. The analog signal was registered/read continuously by using analogRead() function in the Ar- duino script. Therefore, an adjustment on the delay between the motor steps was made based on the slide’s position. • The second setup was based on digital inputs; predefined digital commands were scripted using the function turndegree(), then executed in the loop()method, en- suring continuous and reliable motion commands at a decided speed and angles. To view the entire scripts of both setups view 3.3.3 for specific code snippets or the ap- pendix for full code scripts. An observation was made during testing, a mismatch between the weight of the forearm and the static friction of the internal components of the joint (such as disc and pin). To tackle this, an aluminum piece wrapped in bubble wrap was inserted to the hollow structure of the forearm, which brought smoothness between the braking force and the gravitational pull of the lower arm, enhancing the life-likeness of the motion and one step closer to dynamic equilibrium. As a final touch, two additional re-adjustments were executed on the motor coupling to enhance the overall motion of the braking the movement: • Re-aligning the the coupling, the motor shaft, and the brake caliper ensuring par- allelism for less disruptive and smooth motion. • For the coupling, a hole was drilled on one side of the coupling for the brake cable to go through, enhacing the dynamic unity of the motion. To enhance the overall motion of the braking momentum, two additional adjustments were made on motor coupling attachment. The first was a hole was made thought the coupling allowing the cable brake to go through the body of the attachment, ensuring stability and dynamic unity when it comes to motion or brake. The second adjustment was a mechanical fine-turn ensuring alignment of the brake caliper, the motor, and the coupling that the brake system is connected to. 21 4 Results In this chapter the project presents its outcomes such as design, prototype development, calculations of the force, torque and testing, electronics integration and the results of testing process which presented in the Methods chapter. 4.1 Mechanical structure The finalization mechanical structure post several iterative designs. The final build in figure4.20 is considered the result of the assemblement of the mechanical components integrated with the electronics. 4.1.1 Shoulder mount The designed shoulder mount perfectly fits the aluminum profile from above, while sup- porting the stepper motor in a built-in shelf and mounting the upper limb via a mechanical linkage Figure 4.1: Should mount, aluminum profile placement Figure 4.2: Shoulder mount, motor placement 22 4. Results 4.1.2 Arm segments: upper and lower arm Hollow rectangular blocks were printed to fit onto positive ends of the elbow joint and to fit electronics in further along. The upper arm, 4.3 and lower arm, 4.4 were made slightly different lengths to account for real life measurements. Figure 4.3: Upper arm Figure 4.4: Lower arm 4.1.3 Elbow joint The elbow joint consists of two pieces with free rotation around an axis. These pieces were constructed as CAD models and then printed using filament based 3D printing. The assembly consists of upper link, which connects to the upper arm (lower link in figures) the lower link, a cylindrical pin which joins the links together, finally there’s a thin brake disk in between the links to allow for braking. There is also a placeholder disk brake seen on the upper link. These 4 parts will be present in every version going forward. The first three revisions can be seen in 4.5, 4.6 and 4.7. The change to make the links broader was to cover the brake disk over safety concerns. The new design worsened the range of motion severely which was improved in V3 but not completely resolved by rounding out the corners on the upper link. However the biggest problem with these designs is that the placeholder brake calipers turn out to not be realistic and the actual brake would be alot bigger. 23 4. Results Figure 4.5: Prototype V1 Figure 4.6: Prototype V2 Figure 4.7: Prototype V3 At this stage the disk brake had been decided and delivered which meant that taking precise measurements and fitting the brake onto the joint would be possible. In 4.8 a first attempt was made to mount the brake without much consideration of other aspects like size. The fit was rough and there was also the problem that currently the parts are not attached to each other in any way that would make it possible to grip the disk and make the joint lock in place. In 4.9 a keyhole slot was added to the pin which would resolve this issue, further fitting took place and the model was cleaned up from unnecessary elements. Finally in 4.10 the mounting brackets were made larger and put at an angle. Figure 4.8: Prototype V4 Figure 4.9: Prototype V5 Figure 4.10: Prototype V6 4.11 shows the final design of the joint along with all the components in 4.12, 4.13, 4.14 and 4.15. The design meets all the requirements. The size is comparable to that of a real 24 4. Results elbow joint, the brake fits well on the mount and there is room for electronics such as an encoder. Finally the keyhole design of the pin allows the lower link to move together with the brake disk to allow for control of the joint. The inside of brake mount also serves to stop hyper extension of the arm. Figure 4.11: Prototype V7 Final. Figure 4.12: Upper link final design Figure 4.13: Lower link final design Figure 4.14: Pin fi- nal design Figure 4.15: Brake disk final design 25 4. Results 4.2 Brake system performance The result of the measurements was calculated to be approximately 70 N. Later on, by using the torque formula and post measuring that the cable was pulling at point 3.5 cm from the joint’s center: τ = F · r = 70 · 0.035 = 2.45Nm (4.1) To verify the results, we conducted an ad- ditional measurement test using a a mo- ment wrench and costumed 3D printed that made the wrench compatible with brake system 4.16. Unfortunately the wrench is not able to measure forces below 5 N but at least it verified that the force was below 5 N, which matches the earlier result with a marginal. Figure 4.16: Torque Wrench Mount 4.3 Motor coupling The motor coupling was first constructed with a small hole throughout the design to hold the coupling onto the motor pin. However this proved to be unnecessary as the friction alone was enough to hold it in place. To hold the wire in place more volume was needed to enable melting threaded fittings into the mount. Additionally the wire was eventually fed through a small drilled hole on the opposite side of where its located in V1 to further aid in holding the wire in place. Finally in 4.19 the slice of the coupling is shown, notice how the filament extrusions are made so that the will not ever be perpendicular to the exerted force. Figure 4.17: Motor cou- pling V1 Figure 4.18: Motor cou- pling V2 Figure 4.19: Motor cou- pling V2 sliced 26 4. Results 4.4 Motor control 4.4.1 Analog control via slide potentiometer The product was first meant to be controlled using a slide pot. The pot however proved to be difficult. The slide pot was non-linear which was handled using a custom map. The pot also picked up alot of noise, which was was handled with a low-pass filter however the signal was still noisy which made it unsuitable for fine control. adding a video 4.4.2 Digital control To ensure signal integrity 3 digitally controlled programs were made. • oscillation: Movement from 0◦-45◦ at 25 steps per second or 0.5Hz. • stepByStep: Movement, 1 step at a time with 1s delay • rapidBackAndForth: Movement from 0◦-45◦ at 1000 steps per second. Aiming to accelerate at 16000step/s2. The resulting frequency turns out to be 20Hz. 4.5 Final assembly The final assembly of the product can be seen in the video: Youtube link The video demo includes all three modes; oscillation, stepByStep and rapidBackAndForth as well as the slidepot functionality. Below is figures of the resulting product. Figure 4.20: Final as- sembly Figure 4.21: Final as- sembly closeup Figure 4.22: Final as- sembly brake 27 https://www.youtube.com/watch?v=l8KDgYGFoOE&ab_channel=HjalmarEngbergPramling 4. Results Figure 4.23: Final assembly electronics 28 5 Discussion 5.1 Technical reflections on the mechanical design Modularity was the core behind the product design. Since the product consisted of mul- tiple components, it was helpful that the components are removable or can be adjusted independently. This made product upgrade, assemblement, testing and troubleshooting effective. The material used for 3D printing most parts was PLA due it’s relatively lower costs com- pared to other material, availability at CASE and stiffness. However, the motor coupling that connected the motor to the brake cable needed to withstand repeated mechanical stress and friction; for this, we changed the default settings of the 3D printing such as: a greater percentage of infill, the angle of printing and used PETG instead of PLA 4.19. In doing so, the performance of the coupling was effective and no signs of visible deformation were noticed. Once we launched testing and calibration, it became clear the mismatch of the weight of the forearm and sum of the internal static friction of the brake disc and its surrounding, the mismatch presented itself by disruption of a smooth movements. By adding weight was enough to generate downward force, in order to overcome the static friction force, enhancing the overall smoothness of the motion. The layout of the circuit setups on a the plywood base-plate allowed a stable mounting solution, while maintaining an organized and accessible wiring in case of troubleshooting and debugging. To add on that, cables were routed alongside the the aluminum profile, exactly as blood vessels that supply the human arm with blood, the wires supplied the prototype with an electrical current. 5.2 Control strategies and microcontroller choice Since time was insufficient to implement a closed loop control system an open one was opted for. First, the motor was controlled using a slide pot which is an adjustable re- sistance. This only caused more issues however. The b10k adjustable pot was very nonlinear. 70% of the output signal was given by the last 10% of the distance of the pot. Therefore, a custom mapping was implemented to counteract this fact. Another issue with the slide pot was that it seemed to pick up a lot of unwanted noise. A low-pass filter was implemented which did improve the signal integrity considerably. Lastly, a deadband was integrated to reduce noise; however the control was still very choppy and bad. Therefore, the team opted for using a digital signal instead. 29 5. Discussion 3 programs were created that sought to showcase the different capabilities of the prod- uct. oscillationMode() features a slow oscillation to display the smooth movement of the stepper motor. 1/16th step was used throughout to maximize precision and smooth- ness. stepBystepMode() aimed to show the granularity of the stepper motor. Finally, the rapidBackandForthMode() sought to display the quickness of the motor. The Arduino Nano ESP32 was chosen for a couple reasons; the microcontroller has a small form-factor which is beneficial for fitting electronics in small places out of sight which was an ambition. The Arduino Nano also has PWM capable pins which was nec- essary to control the motor driver properly. Lastly, since a closed loop control system was planned for the microcontroller also needed to be computationally quick enough for this task. 5.3 System evaluation and limitations The fact that static friction was way higher than the dynamic one, meant that as soon as the brake let go of the arm when lowering brake power, the arm would always free fall. To achieve a slow fall, the system would need velocity feedback of the arm and adjust the braking force to current speed and angle relative to gravity. This is the biggest drawback of having a open loop system. 30 5. Discussion 5.4 Societal implications Notwithstanding the numerous applications of robot-assisted exoskeletons, the associated societal consequences of such systems extend well beyond their technical solutions. Some key social considerations that need to be considered while developing and deploying such robotic systems, specifically a model similar to the prototype developed in this project, are listed below. Accessibility and afforadbility: High production costs can be incurred during the de- velopment of robotic exoskeletons which restricts access to less affluent institutions and individuals leading to inequity inavailability of these technologies to the low- and middle- income population. Through this project, we aim to prioritize the usage of cost-effective materials like PETG, PLA and easily available open-source hardware. This ensures that under-resourced organizations can easily replicate and adapt our platform. Stigma: Persistent societal stigma might deter individuals from adopting robot-assisted rehabilitation technologies. This can be countered by adopting an aesthetic that closely resembles human anatomy. While our prototype does not fully mimic the aesthetics of a human arm, it provides a versatile platform to experiment with different ways to make these systems discreet and dignified in appearance. Doing so will increase user acceptance by reducing the psychological distress caused by concerns of societal alienation. 5.5 Societal integration The real-world implementation of robot-assisted rehabilitation technologies, such as the prototype designed in this project, requires strategic incorporation into the existing in- frastructure of the healthcare system. Thus, transitioning from lab to practice requires a design that is technically and economically scalable, seamlessly integrates into current infrastructure, and can adapt to future changes. In this section, we discuss a potential strategy that can be employed for the effective deployment of the prototype in rehabili- tation centers. The first step must be clinical validation of the prototype in a controlled setting. This can be achieved by organizing pilot programs in partnership with public rehabilitation and physiotherapy departments. These programs can involve supervised therapeutic protocol testing, safety and reliability monitoring, quantitative performance evaluation and user feedback from both clinicians and patients. Data gathered from these programs can then be analyzed by clinical experts to improve the system’s mechanical interface and user experience further. Accompanying the device with well-structured and detailed technical documentation, including training protocols, device manual and numerous troubleshooting guides, will ensure consistent and safe usage of the device by clinicians and individuals. Additionally, training workshops can be organized both in person at rehabilitation centers and digitally to help technicians, doctors and therapists understand the safe usage of the device in a supervised setting and also different ways in which the system can be adapted for spe- 31 5. Discussion cific therapeutic needs. Standardization of device mechanisms is essential to supporting industry-grade communication protocols like I2C and UART.. Implementing these steps ensures that the device can be easily integrated into diverse research, clinical applications and commercial setups with minimal reconfiguration. Acquiring compliance and safety certifications for the device is vital to meet current and future regulatory expectations. This can be done by acquiring proof via certifications that the device adheres to core design standards of ISO 13485 for quality management and IEC 60601 for safety in medical electrical equipment. This will build trust in the safety of the system within the medical community, ensuring broader adoption of the robot-assisted rehabilitation system. Finally, collecting and monitoring post-deployment user feedback at regular intervals can provide necessary data for the incorporation of system upgrades, which would ultimately enhance user satisfaction. 5.6 Advantages Evaluating the advantages of a developed technology is important to identify specific real-world contexts where it can be most effective. The current strengths of our robotic system simulating a human elbow joint are listed below. Engineering simplicity: While developing this system, we were able to achieve a balance between a simple design and effective biomechanical functionality. This was done by incorporating a simple single-degree-of-freedom framework, which captured the funda- mental motion of a human elbow. Therapeutic Adaptability: The modular design of our prototype enables clinicians to adjust and vary its braking strength and joint resistance, which is essential during re- habilitation therapy. This feature can also be used to increase or decrease the level of difficulty during therapy to improve the patient’s recovery rate. Velocity-dependent resistance simulation: Using a bicycle disc brake system in our pro- totype enables the implementation of adjustable friction that can be tuned in real-time to mimic velocity-dependent stiffness observed in joints of post-stroke patients. Existing pre-clinical platforms are unable to provide this feature that reproduces spasticity-like resistance profiles. Control flexibility: Embedding an ESP32-based microcontroller imparts the feature of dual-core processing and integrated wireless connectivity. This imparts the possibility of integration with other remote monitoring platforms like real-time performance dash- boards, which are currently limited to expensive robot-assisted rehabilitation equipment. Affordability: The major strength of the prototype is its low fabrication cost and repro- ducibility. This was achieved by using affordable components like thermoplastics and aluminium and adopting accessible production methods like 3D printing. Moreover, we were able to support widespread adoption and replicability by other researchers by provid- ing open access to all documentation of this project, ranging from design files to software 32 5. Discussion code. 5.7 Alternative approaches and further upgrades The current prototype successfully simulates the core functionalities of a human elbow joint through a flexible and integrated system framework. Nevertheless, alternative design configurations might have the potential to enhance its performance efficiency either by expanding its control capabilities or optimizing its mechanical footprint. In this section, we propose a series of potential upgrades to address the limitations identified during the testing of the prototype. These include a bevel gear-driven elbow joint, alternative brak- ing systems and variable resistance control strategies. These options were selected based on emerging research trends within rehabilitation engineering without compromising on the project’s core priorities of affordability, modularity and ease of implementation. 5.7.1 Variable muscle stiffness The initial concept for the upper and lower arm was inspired by human anatomy, using multiple actuators to mimic the biceps-triceps pairing and the lower arm muscles and tendons. This biomimetic approach promised more natural movement and force distri- bution, along with adjustable muscle stiffness similar to how real muscles co-contract to stabilize limbs during different tasks. This would have made the exoskeleton’s response more intuitive, especially for delicate or unpredictable interactions, but in practice, we encountered some major hurdles. The elbow joint’s mechanics, especially the braking system, took much longer to de- velop than expected, eating up most of our timeline. A true muscle-like system would’ve required fitting multiple actuators into tight spaces, sophisticated force coordination soft- ware, and fine-tuning stiffness controls. Each of the systems adds weeks of work. Given those constraints, we shifted focus to the joint’s necessities and simplified the design to only temporary cubic arms. With that said, the bio-mimetic approach isn’t off the table. Future versions could rein- troduce muscle-like features incrementally, maybe starting with a bicep and triceps or testing software for stiffness control before adding physical components. By building on the current simpler system first, the progress can steadily go forward toward the original vision of lifelike, adaptive stiffness control. 5.7.2 Elbow joint An alternative approach to the current elbow joint configuration could be replacing the current joint with a bevel gear transmission system. Bevel gears are designed to trans- mit motion between intersecting shafts [26], which makes them an ideal replacement for redirecting force from the elbow joint to another structural region. In this proposed con- figuration, one gear would be mounted at the proximal end of the lower arm. This gear would be fixed rigidly so that it rotates synchronously with the lower arm. A second gear would be fixed to a cylinder passing longitudinally through the upper arm, with an orientation perpendicular to the first gear. Both the second gear and the cylinder will 33 5. Discussion be able to rotate freely between the elbow joint and the shoulder mount. Additionally, a brake disc and a motor could be connected to this cylinder at the shoulder mount area. As the lower arm moves, it rotates the first gear, thereby transmitting rotational mo- tion to the freely rotating second gear and the attached cylinder. This free rotation motion can be controlled by applying a resistive torque at the shoulder mount brake disc. By fully engaging this breaking mechanism, the complete motion of the lower arm can be stopped, but partial engagement can be used as a technique to simulate variable re- sistance. Alternatively, the addition of a motor connected to the cylinder at the shoulder mount could be used to directly control elbow movement by enabling both passive and active actuation. Implementation of this proposed configuration into our prototype would significantly reduce the volume of the elbow joint because the braking and actuation systems will be displaced from the elbow to the shoulder area. This may potentially enhance ergonomic integration and make maintenance of the prototype much easier. Additionally, it will allow seamless and easy integration of future upgrades, such as motorized elbow control, which can be done without disrupting the prototype’s compact profile. However, a potential drawback that needs to be acknowledged is the presence of mechan- ical friction within the gear interface, which might introduce resistance in the movement of the lower arm. Further testing would be required to quantify transmission losses due to this friction. If resultant losses are considerable enough to impact the prototype’s biomechanical accuracy, then relevant solutions, including but not limited to fine-tuning gear alignment or applying lubricants. Overall, this proposed configuration presents a promising alternative while aligning with the project’s objectives of modularity, simplicity and scalability. 5.7.3 Brake system After evaluating several options, we chose a standard bicycle disc brake system for the robotic elbow joint. This decision was based on three key factors: availability, modularity and cost-effectiveness. Bicycle disc brakes are mass-produced products that are readily available for customers to buy online or in stores, which is a significant advantage for a student project with tight deadlines. The system also met all the basic technical requirements for braking force and ease of installation. 5.7.3.1 Potential alternative brakes Alternative braking systems were considered, but each had drawbacks for our specific application: • Drum Brakes: Their compact size is a major advantage, but their limited avail- ability and the complexity of integration presented significant disadvantages for this project. • Electromagnetic Brakes: These appeared ideal for safety applications, but even the cheapest units exceeded the total materials budget. They also required complex control circuitry that the team was not prepared to implement. 34 5. Discussion • Hydraulic Systems: Although powerful, concerns about fluid leaks and mainte- nance made them impractical. The pumps and hoses would have also occupied too much space within the already compact arm design. • Magnetic Particle Brakes: This is a fascinating technology, but sourcing a single unit for prototyping proved difficult. Most suppliers required minimum orders that were far beyond our needs and budget. • Regenerative Braking: While the energy-saving concept is promising for future sustainable designs, it still requires a conventional friction brake for complete stops. Implementing both systems would have added too much complexity, time and spa- tial requirements for this first prototype. 5.7.3.2 Application of alternative brake systems In our opinion, the most promising alternative for future iterations would be the drum brake, as it could be directly integrated with the existing cylindrical structure within the joint. This solution offers significant space savings by eliminating the external disc and calliper. A potential approach could involve mounting brake shoes to the upper link of the joint while the drum rotates with the joint’s cylinder. The enclosed design also provides natural protection against dust and contaminants, making it well-suited for use in harsh environments. However, the compact design limits heat dissipation compared to open disc systems, so a careful thermal analysis would be essential. Implementation could involve modifying existing cylindrical components to act as drums or fabricating custom thin-walled drums from steel or aluminium alloys. Actuation could be achieved through either a simple cable system (similar to bicycle drum brakes) or miniature hy- draulic pistons, depending on the desired balance between cost and control precision. Since the brake disc was made out of 3D printed PLA plastic for this proof-of-concept prototype, durability over time, and temperature were considered within the limited scope of the project, not for long-term use. PLA has several drawbacks under heavy and extended use: it can melt at high temperatures, wears out quickly and lacks the mechanical strength needed to handle repeated stress. For increased durability, other materials could be considered, such as acrylic, which maintains a lightweight profile or steel, which offers far greater resistance to heat and mechanical stress. These alternatives would significantly improve the brake’s performance under repeated use, particularly in scenarios where heat buildup is a concern. 5.7.3.3 Conclusion of the brake system Although the disc brake system is not the optimal solution, it provided a functional, testable system within the project’s constraints. For future development, revisiting some of the more advanced options may offer improvements in space efficiency and friction control. However, for this proof-of-concept student project, the bicycle disc brake was the most practical and feasible choice. 5.7.4 Closed-loop feedback mechanism A potential upgrade that could greatly enhance the prototype’s mechanical efficiency is replacing the current open-loop feedback mechanism with a closed-loop. This will auto- 35 5. Discussion mate the process of receiving positional feedback directly from the brake system and can be achieved by integrating an AS5600 magnetic encoder. This component is a non-contact magnetic rotatory position sensor designed to measure angular displacements with high precision. It utilizes magnetic field measurements, which reduce wear and tear that could be caused due to physical contact between components. This encoder supports full 360° angle de- tection and offers a resolution of 12-bit, which corresponds to an angular accuracy of 0.09 degrees [27]. Its working principle is based on the Hall effect, wherein the voltage is gen- erated perpendicular to the direction of the electric current and the externally applied magnetic field. To achieve this, a diametrically magnetized rotating magnet is placed above the sensor, which generates a magnetic field. This magnetic field is measured by two or more Hall sensors that are arranged orthogonally. Using these measurements, the AS5600 can determine both the angular position and speed of the magnet. With this encoder, the microcontroller could continuously monitor the stepper motor’s angular position and dynamically adjust braking force. This would impart the features of adaptive resistance control and automatic error correction, which our prototype currently lacks. Additionally, incorporating a closed-loop mechanism will enable the real-time log- ging of joint kinematics, which clinicians can use to track patients’ recovery. 5.8 Ethical considerations Implementation of robotic exoskeletons also poses ethical concerns that range from im- mediate issues like data privacy and safety to broader philosophical debates around issues like dependency and misuse of dual-use technologies. The ethical issues specific to sys- tems similar to our prototype are discussed in-depth below. Privacy and data security: Robot-assisted rehabilitation systems are equipped with user monitoring and biofeedback capabilities, which involve the collection of sensitive phys- iological and behavioural data. Thus, ensuring compliance with data regulations (e.g., the General Data Protection Regulation) and demonstrating this compliance is essential. However, since this project does not involve the collection of sensitive data or human participants, implementing these data regulations through informed consent procedures and data handling protocols is beyond its current scope. However, we emphasize that future applications involving human subjects must incorporate secure data handling, anonymization and explicit consent protocols. User safety: Within the healthcare sector, patient safety is of paramount importance. Therefore, malfunctioning of robot-assisted rehabilitation technologies could result in pa- tient injuries. In this project, we not only provide a platform to develop and test user safety mechanisms but also implement them within the design through strategic control mechanisms and rigorous system calibration. Militarization: Utilization of robot-assisted exoskeletons within the defence sector has the potential to improve soldier endurance but also raises complex ethical concerns about ac- countability and coercive use. While we exclusively focus on rehabilitation applications in 36 5. Discussion our project, we would like to acknowledge the potential for dual-usage of systems similar to our prototype. Thus, it is pertinent to emphasize the need for transparent governance and commitment to non-violent applications during the development of technologies anal- ogous to our prototype. Dependency: The primary objective of rehabilitation is to empower patients by foster- ing autonomy. Robot-assisted systems with enhanced automation abilities might reduce patient engagement and motivation, ultimately leading to slower recovery. This can be prevented by including features enabling human override and providing constructive feedback wherever possible. In this project, we prevent patient dependency through the incorporation of adjustable resistance and real-time patient feedback within our design. Sustainability: Environmental responsibility has become every engineer’s prerogative, necessitating sustainable technologies. We have tried to execute this responsibility by developing a prototype with a modular design and opting for 3D printed components, which substantially reduces material waste. Nevertheless, we think it is important to pinpoint that the used materials, including thermoplastics like PETG, are not easily re- cyclable and thus emphasize the need for further research within the field of affordable sustainable materials for robot-assisted rehabilitation technologies. 5.9 Valuable lessons While we learned a lot about the technical aspects of building an elbow joint, the most important lesson was about teamwork. At first, we struggled with dividing tasks and meeting deadlines, especially when putting all the parts together. There were times when we disagreed, and progress slowed down. However, these challenges ultimately helped us grow. We learned to speak openly about problems, adjust our plans when needed and use everyone’s unique skills. What started as individual efforts eventually became real teamwork. In the end, we didn’t just build a working robotic joint, but also proved we could work through difficulties together, find compromises and combine our strengths to solve problems. This experience showed us how much can be achieved when a team works well together. 5.10 Conclusion This project provides a strong foundation for the ongoing innovations within rehabili- tation engineering. Its affordable production cost, modular architecture and spasticity simulation make it suitable for diverse settings that extend beyond medical applications, which have not been explored in this project. For instance, it can be an essential edu- cational resource in engineering institutions by providing a hands-on learning platform for students studying robotics and biotechnology. This system also holds the promise of being utilized by government agencies to formulate standardized safety protocols for medical-grade robotic equipment. Owing to its simplicity and replicability, it can also be used in community-based workshops led by non-profit organizations for educational purposes, either to explain human joint biomechanics or to provide a platform to learn technical skills related to electrical hardware. In summary, this project presents a robotic 37 5. Discussion system that not only advances the democratization of practical biotechnology but also serves as a foundation for future innovation that is affordable, accessible, scalable and not constrained by infrastructural limitations. 38 6 Contribution To ensure the report reflected each member’s individual contributions, the responsibilities were divided among the group. Henrik and Josef were responsible for everything from the front page to the end of the theory section (including: front page, abstract, acknowl- edgments, introduction chapter and theory chapter), as well as the discussion from 5.4 Societal Implications and onward, plus the conclusion. On the other hand, Hjalmar and Benjamin were more hands-on the product itself at CASE lab, then documented and evaluated the process through Methods, Results and 5.1-5.3 of the discussion. 39 Bibliography [1] J. Mehrholz, M. Pohl, T. Platz, J. Kugler, and B. Elsner, “Electromechanical and robot-assisted arm training for improving activities of daily living, arm function, and arm muscle strength after stroke,” Cochrane Database of Systematic Reviews, 2015. doi: 10.1002/14651858.CD006876.pub4. [Online]. Available: https://doi. org/10.1002/14651858.cd006876.pub4. [2] World Health Organization. “Over 1 in 3 people affected by neurological conditions, the leading cause of illness and disability worldwide.” (2024), [Online]. Available: https://www.who.int/news/item/14- 03- 2024- over- 1- in- 3- people- affected-by-neurological-conditions--the-leading-cause-of-illness- and-disability-worldwide (visited on 05/12/2025). [3] European Parliament, Regulation (EU) 2017/745 on medical devices, 2017. [Online]. Available: https://eur-lex.europa.eu/eli/reg/2017/745/oj/eng (visited on 05/12/2025). [4] J. W. Friedrich Paulsen, Subotta Atlas of Anatomy, 16th ed. Munich, Germany: Subotta, 2018. [5] A. Poirson. “Arm joints.” (-), [Online]. Available: https://quizlet.com/463309982/ arm-joints-diagram/ (visited on 05/12/2025). [6] R. R. Group, “Recent advances in industrial robotics: A survey,” International Journal of Robotics Research, vol. 33, no. 5, pp. 485–501, 2014. doi: 10.1017/ S0263574713000817. [Online]. Available: https://doi.org/10.1017/S0263574713000817 (visited on 05/15/2025). [7] tarikvision. “Illustration of a revolute joint.” [Image] From Freepik. (2025), [On- line]. Available: https://www.freepik.com/premium- vector/d- isometric- flat - vector - illustration - types - synovial - joints - labeled - anatomy - infographic-item_145743189.htm (visited on 05/12/2025). [8] National Joint Registry. “Elbow replacement information.” (2025), [Online]. Avail- able: https://www.njrcentre.org.uk/patients/elbow-replacement/ (visited on 05/12/2025). [9] J.-H. Kim, Y.-J. Kim, B.-M. Kwak, and S.-M. Hwang, “Design and evaluation of a new exoskeleton for patients with spinal cord injury,” Journal of Mechanical Science and Technology, vol. 33, no. 6, pp. 2875–2883, 2019, issn: 1738-494X. doi: 10.1007/s12206-019-0323-0. [Online]. Available: https://link.springer.com/ article/10.1007/s12206-019-0323-0 (visited on 05/12/2025). [10] M. Y. Ilyasin. “Illustration of a disc brake system.” [Image] From Vecteezy. (2025), [Online]. Available: https://www.vecteezy.com/vector-art/25292494-disc- brake-illustration-vector-isolated-white-background (visited on 05/12/2025). [11] L. Wang and A. S. Mujumdar, “A comparative study of five low reynolds number k- models for impingement heat transfer,” International Communications in Heat 40 https://doi.org/10.1002/14651858.CD006876.pub4 https://doi.org/10.1002/14651858.cd006876.pub4 https://doi.org/10.1002/14651858.cd006876.pub4 https://www.who.int/news/item/14-03-2024-over-1-in-3-people-affected-by-neurological-conditions--the-leading-cause-of-illness-and-disability-worldwide https://www.who.int/news/item/14-03-2024-over-1-in-3-people-affected-by-neurological-conditions--the-leading-cause-of-illness-and-disability-worldwide https://www.who.int/news/item/14-03-2024-over-1-in-3-people-affected-by-neurological-conditions--the-leading-cause-of-illness-and-disability-worldwide https://eur-lex.europa.eu/eli/reg/2017/745/oj/eng https://quizlet.com/463309982/arm-joints-diagram/ https://quizlet.com/463309982/arm-joints-diagram/ https://doi.org/10.1017/S0263574713000817 https://doi.org/10.1017/S0263574713000817 https://doi.org/10.1017/S0263574713000817 https://www.freepik.com/premium-vector/d-isometric-flat-vector-illustration-types-synovial-joints-labeled-anatomy-infographic-item_145743189.htm https://www.freepik.com/premium-vector/d-isometric-flat-vector-illustration-types-synovial-joints-labeled-anatomy-infographic-item_145743189.htm https://www.freepik.com/premium-vector/d-isometric-flat-vector-illustration-types-synovial-joints-labeled-anatomy-infographic-item_145743189.htm https://www.njrcentre.org.uk/patients/elbow-replacement/ https://doi.org/10.1007/s12206-019-0323-0 https://link.springer.com/article/10.1007/s12206-019-0323-0 https://link.springer.com/article/10.1007/s12206-019-0323-0 https://www.vecteezy.com/vector-art/25292494-disc-brake-illustration-vector-isolated-white-background https://www.vecteezy.com/vector-art/25292494-disc-brake-illustration-vector-isolated-white-background Bibliography and Mass Transfer, vol. 40, pp. 1–7, 2013, issn: 0735-1933. doi: 10 . 1016 / j . icheatmasstransfer.2012.12.015. [12] Y. F. Ivanov, E. A. Petrikova, and A. D. Teresov, “Surface modification of aluminum alloys by electron-ion-plasma methods,” Journal of Surface Investigation: X-ray, Synchrotron and Neutron Techniques, vol. 16, no. 2, pp. 215–220, 2022, issn: 1819- 7094. doi: 10.3103/S1068366622020106. [13] CASE-Lab. “Prusa 3D printer documentation.” Chalmers University of Technology. (2025), [Online]. Available: https://chalmers.instructure.com/courses/786/ files/3925038?module_item_id=553565 (visited on 05/12/2025). [14] X. C. Gillian Holcomb Eugene B. Caldona, “On the optimized 3d printing and post-processing of petg materials,” 2022. [Online]. Available: https://doi.org/ 10.1557/s43579-022-00188-3 (visited on 05/12/2025). [15] Kollmorgen. “What is a stepper motor?” (2025), [Online]. Available: https://www. kollmorgen.com/en-us/resources/technologies-explained/motors/what- is-a-stepper-motor (visited on 05/12/2025). [16] Adobe Stock. “Stepper motor.” [Image]. (2025), [Online]. Available: https : / / stock.adobe.com/ (visited on 05/12/2025). [17] Robocraze. “What is motor driver.” (2025), [Online]. Available: https://robocraze. com/blogs/post/what-is-motor-driver?srsltid=AfmBOormeIHUS3JpPtS82fbfExtbnl89kSkA- iXGn1Q3F0ytzg9vUjtW (visited on 05/12/2025). [18] S. Contributor, Cnc stepper motor driver isolated on white background, [Photo- graph], 2023. [Online]. Available: https://www.shutterstock.com/sv/image- photo/cnc-stepper-motor-driver-isolated-above-1957998973 (visited on 05/12/2025). [19] B. L. Cameron Hashemi-Pour. “What is a microcontroller (mcu)?” (2024), [Online]. Available: https://www.techtarget.com/iotagenda/definition/microcontroller (visited on 05/13/2025). [20] Arduino, Arduino nano rp2040 connect [photograph], Image extracted from product page, 2023. [Online]. Available: https://www.digikey.se/sv/products/detail/ arduino/ABX00032/10239967 (visited on 05/12/2025). [21] Arduino. “Arduino® nano esp32.” (2025), [Online]. Available: https://store. arduino.cc/products/nano-esp32?srsltid=AfmBOorH5BQNxe2JkF7n2JZ8fPpbD84LHwaxTHOzewYzLC03hyLAvbDg (visited on 05/13/2025). [22] Jinftry. “What is a slide potentiometer? how does it work?” Image extracted from product page. (2024), [Online]. Available: https://www.jinftry.com/news/What- is-a-Slide-Potentiometer-How-does-it-work (visited on 05/12/2025). [23] Bourns ptb6053-2010apb103 potentiometer, [Product photograph of slidepotentiome- ter]. [Online]. Available: https : / / www . digikey . se / sv / products / detail / bourns-inc/PTB6053-2010APB103/3781242 (visited on 05/12/2025). [24] G. Crowell. “What is a breadboard?” (2019), [Online]. Available: https://www. circuitbread.com/ee-faq/what-is-a-breadboard (visited on 05/12/2025). [25] M. rf, Electronics white breadboard, [Photograph], CC BY-SA 4.0, 2019. [Online]. Available: https://commons.wikimedia.org/wiki/File:Electronics-White- Breadboard.jpg (visited on 05/12/2025). [26] I. Q. Search. “Bevel gears: Types, processes and applications.” (2025), [Online]. Available: https://www.iqsdirectory.com/articles/gear/bevel-gear.html (visited on 05/13/2025). 41 https://doi.org/10.1016/j.icheatmasstransfer.2012.12.015 https://doi.org/10.1016/j.icheatmasstransfer.2012.12.015 https://doi.org/10.3103/S1068366622020106 https://chalmers.instructure.com/courses/786/files/3925038?module_item_id=553565 https://chalmers.instructure.com/courses/786/files/3925038?module_item_id=553565 https://doi.org/10.1557/s43579-022-00188-3 https://doi.org/10.1557/s43579-022-00188-3 https://www.kollmorgen.com/en-us/resources/technologies-explained/motors/what-is-a-stepper-motor https://www.kollmorgen.com/en-us/resources/technologies-explained/motors/what-is-a-stepper-motor https://www.kollmorgen.com/en-us/resources/technologies-explained/motors/what-is-a-stepper-motor https://stock.adobe.com/ https://stock.adobe.com/ https://robocraze.com/blogs/post/what-is-motor-driver?srsltid=AfmBOormeIHUS3JpPtS82fbfExtbnl89kSkA-iXGn1Q3F0ytzg9vUjtW https://robocraze.com/blogs/post/what-is-motor-driver?srsltid=AfmBOormeIHUS3JpPtS82fbfExtbnl89kSkA-iXGn1Q3F0ytzg9vUjtW https://robocraze.com/blogs/post/what-is-motor-driver?srsltid=AfmBOormeIHUS3JpPtS82fbfExtbnl89kSkA-iXGn1Q3F0ytzg9vUjtW https://www.shutterstock.com/sv/image-photo/cnc-stepper-motor-driver-isolated-above-1957998973 https://www.shutterstock.com/sv/image-photo/cnc-stepper-motor-driver-isolated-above-1957998973 https://www.techtarget.com/iotagenda/definition/microcontroller https://www.digikey.se/sv/products/detail/arduino/ABX00032/10239967 https://www.digikey.se/sv/products/detail/arduino/ABX00032/10239967 https://store.arduino.cc/products/nano-esp32?srsltid=AfmBOorH5BQNxe2JkF7n2JZ8fPpbD84LHwaxTHOzewYzLC03hyLAvbDg https://store.arduino.cc/products/nano-esp32?srsltid=AfmBOorH5BQNxe2JkF7n2JZ8fPpbD84LHwaxTHOzewYzLC03hyLAvbDg https://www.jinftry.com/news/What-is-a-Slide-Potentiometer-How-does-it-work https://www.jinftry.com/news/What-is-a-Slide-Potentiometer-How-does-it-work https://www.digikey.se/sv/products/detail/bourns-inc/PTB6053-2010APB103/3781242 https://www.digikey.se/sv/products/detail/bourns-inc/PTB6053-2010APB103/3781242 https://www.circuitbread.com/ee-faq/what-is-a-breadboard https://www.circuitbread.com/ee-faq/what-is-a-breadboard https://commons.wikimedia.org/wiki/File:Electronics-White-Breadboard.jpg https://commons.wikimedia.org/wiki/File:Electronics-White-Breadboard.jpg https://www.iqsdirectory.com/articles/gear/bevel-gear.html Bibliography [27] Lingib. “AS5600 magnetic angle encoder.” (2025), [Online]. Available: https:// www.instructables.com/AS5600-Magnetic-Angle-Encoder/ (visited on 05/12/2025). I https://www.instructables.com/AS5600-Magnetic-Angle-Encoder/ https://www.instructables.com/AS5600-Magnetic-Angle-Encoder/ A Appendix Appendix A: Arduino code "3 programs" 1 #include 2 3 // Define motor interface type 4 #define MOTOR_INTERFACE_TYPE 1 // 1 for driver (step/dir) 5 6 // Create an AccelStepper object with step and direction pins 7 AccelStepper myStepper(MOTOR_INTERFACE_TYPE , 4, 3); // Step pin is 4, Dir pin is 3 8 int printCounter = 0; 9 int potPin = A5; // Analog pin for the potentiometer 10 float alpha = 0.01; // Smoothing factor (0 < alpha < 1) 11 float smoothedValue = 0; 12 const int minStepThreshold = 2; // Minimum steps to move 13 const int maxSteps = 50; // Maximum steps allowed (45 degrees / 1.8 degrees per step) 14 const int maxSpeed = 1000; // Maximum speed in steps per second 15 const int minSpeed = 25; // Minimum speed in steps per second 16 17 // const int maxAcceleration = 1000; // Maximum acceleration in steps per second squared 18 // const int minAcceleration = 100; // Minimum acceleration in steps per second squared 19 20 int microstep = 1; 21 bool initialMove = true; // State variable to track the initial fast move 22 int targetPosition = 0; // Target position in steps 23 24 char currentMode = ’0’; // State variable to track the current mode 25 unsigned long lastStepTime = 0; // Variable to track the last step time 26 const unsigned long stepInterval = 1000; // Interval between steps in milliseconds 27 28 void setup() { 29 Serial.begin (9600); // Start serial communication for debugging 30 31 // Set initial acceleration 32 myStepper.setAcceleration (16000); // Acceleration in steps per second squared 33 } 34 35 // Custom mapping function to handle non -linear potentiometer behavior 36 int customMap(int value) { II A. Appendix 37 if (value <= 120) { 38 return map(value , 0, 120, 0, 8* microstep); // Map first segment 39 } else if (value <= 600) { 40 return map(value , 121, 600, 9*microstep , 16* microstep); // Map second segment 41 } else { 42 return map(value , 601, 1023, 17* microstep , 25* microstep); // Map third segment 43 } 44 } 45 46 void oscillationMode () { 47 if (currentMode != ’1’) return; // Ensure this function only runs in mode 1 48 Serial.println("Mode:␣Oscillation"); 49 myStepper.setMaxSpeed(minSpeed); // Set to a slower speed for oscillation 50 if (myStepper.currentPosition () == 0) { 51 targetPosition = maxSteps; // Move to 45 degrees 52 } else if (myStepper.currentPosition () == maxSteps) { 53 targetPosition = 0; // Move back to 0 degrees 54 } 55 myStepper.moveTo(targetPosition); 56 } 57 58 void stepByStepMode () { 59 if (currentMode != ’2’) return; // Ensure this function only runs in mode 2 60 Serial.println("Mode:␣Step -by -Step"); 61 myStepper.setMaxSpeed(minSpeed); // Set to a slow speed for precise stepping 62 unsigned long currentTime = millis (); 63 if (myStepper.currentPosition () != 0 && myStepper.distanceToGo () == 0) { 64 targetPosition = 0; // Ensure starting at 0 degrees 65 myStepper.moveTo(targetPosition); 66 } else if (myStepper.distanceToGo () == 0 && (currentTime - lastStepTime >= stepInterval)) { 67 targetPosition = myStepper.currentPosition () + 1; // Move one step 68 myStepper.moveTo(targetPosition); 69 lastStepTime = currentTime; // Update the last step time 70 } 71 } 72 73 void rapidBackAndForthMode () { 74 if (currentMode != ’3’) return; // Ensure this function only runs in mode 3 75 Serial.println("Mode:␣Rapid␣Back -and -Forth"); 76 myStepper.setMaxSpeed(maxSpeed); // Set to a faster speed for rapid movement 77 if (myStepper.currentPosition () == 0) { 78 targetPosition = maxSteps; // Move to 45 degrees 79 } else if (myStepper.currentPosition () == maxSteps) { 80 targetPosition = 0; // Move back to 0 degrees 81 } 82 myStepper.moveTo(targetPosition); 83 } 84 III A. Appendix 85 void loop() { 86 if (Serial.available () > 0) { 87 char input = Serial.read(); // Read the incoming byte 88 89 if (input == ’1’ || input == ’2’ || input == ’3’) { 90 currentMode = input; // Update the current mode 91 Serial.print("Switched␣to␣mode:␣"); 92 Serial.println(currentMode); 93 } else { 94 Serial.println("Invalid␣input.␣Enter␣1,␣2,␣or␣3."); 95 } 96 } 97 98 switch (currentMode) { 99 case ’1’: 100 oscillationMode (); 101 break; 102 case ’2’: 103 stepByStepMode (); 104 break; 105 case ’3’: 106 rapidBackAndForthMode (); 107 break; 108 default: 109 // No valid mode selected 110 break; 111 } 112 113 myStepper.run(); 114 115 } Listing 1: Arduino code "3 programs" Appendix B: Arduino code "Slide pot" 1 #include 2 3 // Define motor interface type 4 #define MOTOR_INTERFACE_TYPE 1 // 1 for driver (step/dir) 5 6 // Create an AccelStepper object with step and direction pins 7 AccelStepper myStepper(MOTOR_INTERFACE_TYPE , 4, 3); // Step pin is 4, Dir pin is 3 8 int printCounter = 0; 9 int potPin = A5; // Analog pin for the potentiometer 10 float alpha = 0.01; // Smoothing factor (0 < alpha < 1) 11 float smoothedValue = 0; 12 const int minStepThreshold = 2; // Minimum steps to move 13 const int maxSteps = 50; // Maximum steps allowed (45 degrees / 1.8 degrees per step) 14 const int maxSpeed = 1000; // Maximum speed in steps per second 15 const int minSpeed = 200; // Minimum speed in steps per second 16 17 // const int maxAcceleration = 1000; // Maximum acceleration in steps per second squared IV A. Appendix 18 // const int minAcceleration = 100; // Minimum acceleration in steps per second squared 19 20 int microstep = 1; 21 void setup() { 22 Serial.begin (9600); // Start serial communication for debugging 23 24 // Set initial acceleration 25 myStepper.setAcceleration (32000); // Acceleration in steps per second squared 26 } 27 28 // Custom mapping function to handle non -linear potentiometer behavior 29 int customMap(int value) { 30 if (value <= 120) { 31 return map(value , 0, 120, 0, 8); // Map first segment 32 } else if (value <= 600) { 33 return map(value , 121, 600, 9, 16); // Map second segment 34 } else { 35 return map(value , 601, 1023, 17, 25); // Map third segment 36 } 37 } 38 39 void loop() { 40 int potValue = analogRead(potPin); // Read the potentiometer value 41 potValue = constrain(potValue , 0, 2000); 42 smoothedValue = alpha * potValue + (1 - alpha) * smoothedValue; // Apply low -pass filter 43 // Serial.println(smoothedValue); 44 // Use custom mapping function 45 int targetSteps = customMap(smoothedValue); 46 // Calculate the difference between the target and current position 47 int stepsToMove = targetSteps - myStepper.currentPosition (); 48 49 // Calculate speed based on the distance to move 50 float speed = map(abs(stepsToMove), 0, maxSteps , minSpeed , maxSpeed); 51 myStepper.setMaxSpeed(speed); 52 53 // Calculate acceleration based on the distance to move 54 // float acceleration = map(abs(stepsToMove), 0, maxSteps , minAcceleration , maxAcceleration); 55 // myStepper.setAcceleration(acceleration); 56 if (printCounter >= 100) { 57 Serial.println(smoothedValue); 58 // Serial.print(" Current Speed: "); 59 // Serial.println(myStepper.speed()); // Print the current speed of the motor 60 printCounter = 0; 61 } 62 // Move the motor to the target position 63 if (abs(stepsToMove) >= minStepThreshold) { 64 myStepper.moveTo(targetSteps); 65 } 66 printCounter ++; 67 68 // Run the motor to the target position 69 myStepper.run(); 70 V A. Appendix 71 } Listing 2: Arduino code "slide pot" VI DEPARTMENT OF ELECTRICAL ENGINEERING CHALMERS UNIVERSITY OF TECHNOLOGY Gothenburg, Sweden www.chalmers.se www.chalmers.se Introduction Purpose Problem description Scope Theory Anatomy of the arm Elbow joint Revolute joint Force and torque Brake disc system Brake disc Integration in robotic systems 3D printing Embedded system Stepper motor Motor driver Microcontroller Slide potentiometer Breadboard Methods Mechanical structure overview Force and torque measurement Hardware design and electronics Motor and circuit setup Microcontroller Code Assembly Testing and calibration Results Mechanical structure Shoulder mount Arm segments: upper and lower arm Elbow joint Brake system performance Motor coupling Motor control Analog control via slide potentiometer Digital control Final assembly Discussion Technical reflections on the mechanical design Control strategies and microcontroller choice System evaluation and limitations Societal implications Societal integration Advantages Alternative approaches and further upgrades Variable muscle stiffness Elbow joint Brake system Potential alternative brakes Application of alternative brake systems Conclusion of the brake system Closed-loop feedback mechanism Ethical considerations Valuable lessons Conclusion Contribution Appendix Appendix A: Arduino code "3 programs" Appendix B: Arduino code "Slide pot"