Avva Sai Pranav ← All projects

Johns Hopkins University · EN.530.666 Magnetically Actuated Robots · Spring 2025

Haptic Magnetic Microrobot

Real-time wall collision detection system with gradient haptic feedback for magnetically actuated surgical microrobots.

Role
Algorithm lead
Team
Team of 3
Tools
MATLAB · VR Joystick Toolbox · Arduino · FLIR Spinnaker SDK · SolidWorks

What I did

  • Wrote the wall-collision detector that compares joystick direction with the robot's actual motion
  • Built graded haptic feedback that ramps force with collision duration, with input filtering to cut false positives
  • Designed and built the test maze and ran a 4-user study
My part was the collision-detection algorithm using joystick-robot direction dot product, custom maze design and fabrication, and a 4-user haptic feedback study.

Problem Statement

Magnetic microbots can navigate in confined environments, but operators often struggle to detect wall contact early enough to avoid collisions.

  • Visual limitation: Microrobot is small and environment is visually dense
  • Delayed detection: Operators detect wall contact too late to prevent collision
  • Camera dependency: Teleoperator needs additional cues beyond the camera feed
  • Solution: Haptic feedback as intuitive indication of wall proximity

Methodology

The system combines electromagnetic actuation, visual localization, and joystick-based haptic feedback.

Robot position is tracked from an overhead camera feed, then compared against the maze geometry to estimate collision risk. When the direction of intended motion conflicts with detected wall proximity, the joystick vibrates with intensity that increases as the robot gets closer to the wall.

The main control architecture was implemented in MATLAB, with helper scripts handling localization, wall detection, actuation, and vibration control.

Design & Simulation

The core collision logic uses the dot product between the joystick command direction and the robot-to-wall direction.

  • Collision detection: Dot product between joystick direction and robot-to-wall vector
  • Virtual boundary: Haptic vibration creates "virtual tactile boundary" for operator
  • Proportional feedback: Vibration intensity directly proportional to force dot product
  • Real-time processing: Continuous position tracking and wall proximity estimation

Fabrication

A custom test maze was fabricated for controlled navigation experiments.

  • Maze design: Narrow passages and turning regions for wall detection testing
  • Actuation hardware: 4-coil electromagnetic array
  • Joystick interface: Xbox-style controller with haptic motor
  • Localization pipeline: FLIR overhead camera with computer vision

Test Setup

Control architecture diagram showing electromagnetic array, Arduino, motor controllers, joystick, and MATLAB interface
Control architecture: 4-coil EM array, Arduino, motor controllers, joystick, and MATLAB
Complete experimental setup showing all hardware components
Complete experimental setup with electromagnetic coils, joystick control, and overhead vision
4-coil EM array
Arduino Microcontroller
FLIR Overhead camera
MATLAB Control software

Results

The navigation interface displayed wall proximity in real time and provided haptic cues through the joystick.

Output System performance
  • Maze traversal: Robot navigated maze while operator received feedback
  • Wall detection: Live overlay showed wall detection status and robot position
  • Haptic cues: Joystick vibrated when robot approached walls
  • Situational awareness: Operator maintained awareness while relying less on direct visual inspection
Display Live overlay features
  • Wall detection status indicator
  • Frame rate display
  • Robot position coordinates
  • Collision risk visualization

What the Users Taught Us

Watching people use the system changed the design. How intuitive it felt, and how each person responded to the haptic feedback and interacted with the joystick, drove most of the changes we made.

Full Report

Project report, supporting documents, and implementation files from EN.530.666 Magnetically Actuated Robots.

Skills Technical skills demonstrated
  • Control: MATLAB real-time control, electromagnetic actuation
  • Computer Vision: Camera-based localization, position tracking
  • Haptics: Gradient haptic feedback, joystick integration
  • Fabrication: Custom maze design and construction