Robotics Project: MoDean

Objective

In 2025 I built a robot independently. The goal was to create a differential drive robot with an end-effector that would be controlled using a cell phone. The purpose of the exercise was to sharpen my engineering skills and to have a project to be excited about outside of my work.

Design Elements

The hardware elements that went into building MoDean are as follows:

  • 2x DC motors controlling the wheels
  • 2x Hall encoders monitoring wheel speeds
  • 1x servomotor controlling the grabber
  • 1x IMU
  • 1x motor driver
  • 1x USB camera
  • 1x USB battery
  • 1x WiFi dongle
  • 1x Le Potato Single Board Computer running on Armbian

The software systems that I created for the robot are as follows:

  • Python DC & servo motor control libraries
  • Software quadrature decoder
  • Localization script incorporating encoder and IMU yaw data
  • PID control loop
  • Flask environment User Interface

A few challenges I had to learn from to complete the project included:

  • Connecting remotely through WiFi (iPhone hotspot)
  • Editing the Device Tree Blob to expose PWM, I2C, and GPIO pins
  • Patching the kernel to allow edge detection (for quadrature)
  • Implementing Python threading for the feedback loop

Final Product

The final version of MoDean is shown below. The motor driver is circled in blue, the IMU in red, and the right encoder in yellow. The servomotor is inside the grabber casing and there is a caster wheel attached to the underside of the acrylic chassis. All of the hardware was purchased commercially.

The User Interface is shown below. The right side shows a live camera feed of what is in front of MoDean and the left side has buttons to control the different functions. The html has been censored for my privacy.

See MoDean in action below.

Remaining Issues

Veering Left

The DC motors I used to drive the wheels were old and did not rotate at the same speed. The two driven wheels were also slightly deformed. As a result, the right wheel spun faster when both were powered at 100%, turning MoDean sharply to the left. I mitigated this by implementing a PID control loop that incorporated both encoder and IMU yaw data.

Even with the feedback loop, MoDean veered slightly to the left when driven forward. This might be corrected through finer adjustment of Kp, Ki, and Kd in the PID controller. It might also be corrected by using newer hardware.

Speed control

An issue I ran into once I started trying to use MoDean to pick up items was controlling the speed. I never created a speed control function, but I would implement that using a joystick on the UI instead of a D-pad.

Camera mount

I decided to add the camera after I had finished building and wiring the rest of the elements. As a result, I was admittedly lackadaisical with the mounting system. I taped a piece of carboard onto the back of the chassis and clipped the camera to it. If this became a commercial demonstration, I would 3D-print or machine a more stable mounting system.