May 2026 - June 2026 | MECH_ENG 433: Advanced Mechatronics
Created an interactive videogame and force feedback joystick. Created joystick mechanism in Solidworks, designed circuitry using STM32 and Raspberry Pi microcontrollers, and programmed controls in C. The videogame itself was programmed in Python.
The above graphs demonstrate how the height changes in the graphics of the videogame should line up with the force exerted by the motor on the user's hand. To clear a "bump" in the game, the user would need to press harder on the joystick to go up the hill. After the crest of the hill, the joystick motor would provide force in the same direction as the user's motion, simulating the ease of going down the hill. Likewise, in a dip, the motor first assists the user (going downhill), then resists motion (going back uphill). The force from the motor on the user is the negative of the first derivative of the height of the graphics.
This force is created by two PID loops. First, one loop controls the current through the motor (as measured by a current sensor in series with the motor) by commanding the PWM input into the H-bridge. The second loop controls the force on the user's hand (as measured by a load cell in the joystick) by commanding the motor current, which then calls on the first PID controller. This code lives on the Raspberry Pi Pico 2W (see below circuit diagram).
Above is the final circuit diagram encompassing the project. The STM32 microcontroller controlled the H-bridge motor driver and current sensor, powering and reading the current through the motor. This microcontroller communicated via CAN with the other microcontroller, a Raspberry Pi Pico 2W. The Pico received additional information from the Hall encoder attached to the motor, and the load cell within the mechanical joystick. The Pico was the main processor, running the PID controller and communicating with the laptop running the videogame to receive desired force levels and provide the position of the joystick from the encoder.
Each mechanical component was modeled in Solidworks and 3d printed. This includes the motor mount, haptic arm, and joystick. No analysis was conducted on any parts, as all were designed conservatively, and expected loads from gameplay were low.