Semi-Autonomous Shopping Cart

The motivation for this project was honestly to find the dumbest thing to motorize and make semi-autonomous. I figured a shopping cart that followed a person around would be pretty entertaining, and with ProjX funding on my side, I bought some hoverboard motors from Ebay and machined some aluminum mounting plates. The fixed casters of the shopping cart were removed with an angle grinder, and hoverboard motors mounted in their place. To protect the motors from collisions, stump kickers were added.

I soon found that the motors and motor controllers did not have matching connectors. After an excessive amount of soldering, the motor controllers had standard XT60 power plugs, and the hall effect sensor cables on the motors and motor controllers had matching 5 pin JST connectors. The throttle wire and hall effect wires were also sent to a breadboard header.

Hoverboard motors for $25 each on Ebay is an excellent deal for a pretty powerful sensored brushless hub motor. The $15 ebike controllers were somewhat disappointing. They did an excellent job at accelerating the motors, but they had no electronic braking whatsoever. This was very unfortunate because the shopping cart is steered by differential torque on the hoverboard motors. Since the motor controllers could only apply forwards torque and no braking force, the cart could only turn while accelerating or maintaining speed. This was very much not ideal for operating a motorized cart in a safe or controlled manner, but driving it was pretty entertaining. I plan on buying better motor controllers to have a more reliable and useful finished product.

Without a usable cart, it was somewhat difficult to develop good software for the cart. The cart uses a lidar for both tracking and obstacle avoidance, and I was able to write code that would actively track the target person to follow. Although the lidar-based object tracking is far from perfect, it does a decent job of tracking a target, even in the presence of obstacles or other people. Once I figure out how to capture a video of the lidar imaging in operation, I will upload it here. I also recycled some code from my quadcopter to grab gyroscope data from an MPU6050 chip, and some other interrupt routines from the quadcopter code were recycled to use the hall effect sensors as a rotary encoder on the wheels.