top of page
Modular-Motor-Controller.jpg

Modular Motor Controller

Date started: 9 Sept 2024

GitHub Repository: coming soon!

After joining a robotics team which competed in the First Tech Challenge competition in my sophomore year, I learned the ins and outs of the Control Hub that the company, FIRST, gives to its competitors. 

IMG_20170502_154043_not_lm__25913-1.webp

FIRST Control Hub

As a lover of modular machines, components, and software, this hub was beautiful. It easily allowed the mechanical engineers to plug in the motors to a specific port and the software engineers to put in a piece of code that referenced that specific port. It is able to emit its own wifi connection for simple wireless connectivity.

Since I had become well versed with Raspberry Pi's with my Auto Plant System and AlfredAI, I felt confident that I could build this - however I lacked the financial opportunity to buy another one. 

After countless hours of research, I finally settled on a Le Potato: a copycat Raspberry Pi that has the ability to run Raspbian (a Debian version of Linux that is built for Pi's). I wanted my design to be modular just like the Control Hub from FIRST, which made me realize that I needed to design my own circuit - one that was built on a perfboard.

My goal for this project was to create a user-friendly, one-to-one copy of the Control Hub for myself. I merely challenged myself to see if I could create something that allowed simple modularity through complex wiring and software. 

IMG_7332_edited.jpg

01

Breadboard Prototype

An initial prototype was first created using the Le Potato,  L293D, and a small breadboard. This was to ensure a proof of concept with the circuitry and plausibility of the project.

02

Initial Perfboard Soldering

After a working breadboard circuit was completed, the initial soldering of the perfboard began. This was all hand soldered and all the connections are documented in my Dev Journal.

IMG_7333_edited.jpg
IMG_7352_edited.jpg

03

Completed Circuit

After coming across circuitry issues with voltage drops and irregular current, the circuit was modified to include a buck converter and capacitors. The buck converter takes in 12V input and converts it to a stable 5V while the extra capacitors enable smooth voltages for the L293D's.

04

Full 3D Printed Case

Once the circuit was finalized, I designed a case for the project using a tablet app named Shapr3D. This new case allowed organization of the wires and ease of use.

Modular-Motor-Controller.jpg
Remote Controller
099A5CED-85AC-4609-A5BA-9037383AE217_1_105_c_edited.jpg

Once you have a hub to connect all the motors together, you need a way to control those motors. After drawing out some designs, I finally settled on my own style for the controller. Powered by an ESP32, this controller will automatically search for the WiFi connection that the motor controller emits. It houses two joysticks and four buttons to be able to control all four motors and three servos. These connections were all hand soldered on perfboards.

Early Designs

Motor Controller Journal Pages 1-2

Pages 1-2 of Dev Journal

IMG_7740_edited.jpg

Pages 3-4 of Dev Journal

Shown above are the first 4 pages of the initial sketches I made for the motor controller. You can see the circuit diagram and design I was inspired by. On the 3rd page, an outline of the wireless joystick controller was designed which is followed by the pinout of the board itself for documentation.

Motor Controller Version 2.0

V1 Problems

The first design of the motor controller did not arrive without its setbacks. There were major issues that needed to be addressed, most of which were caused by the use of the Le Potato. This computer, a copy of the famous Raspberry Pi, did not fully bring the efficiency of the Pi. The power load it required demanded a small extra battery pack to be placed underneath the board (called a PiSugar for those curious: a 5V 5200mAh battery) in addition to the 12-volt external power supply. This caused a bunch of extra weight to be added to the design of the first version of the hub, shown above in the white colored 3D printed casing.

A second major inconvenience was the software available for use on the Le Potato. While it could run Raspbian, the operating system developed for Raspberry Pis, it was an older version that had many limitations due to it not being run on a real Pi. This caused software issues with controlling the GPIO pins (the pins you see on the board, also known as General Purpose Input Output pins). As a result, modifying PWM pins for servo control and other devices proved to be a hassle and began my search for a real Raspberry Pi to use in the system instead of the Le Potato.

The Solution

Even though I had saved money buying the Le Potato, I decided that the numerous software bugs that kept unraveling outweighed the cost of just buying a new Raspberry Pi. After getting my hands on a Raspberry Pi 4B, I began redesigning the circuits. After making sure the motor and servo control worked, I went to work on the power circuit. It turns out that the Raspberry Pi 4's power consumption is significantly less than the Le Potato -- which allowed the complete removal of the extra battery pack that version one required. The removal of this battery made the second version approximately half the height of the previous design. I also did my best to remove any unnecessary air gaps in the frame, which helped in reducing the length and width.      

bottom of page