Final Project: PiCrawler
is my final project for this course. It is a voice-controlled robot that can move in all directions on the ground.
The robot integrated a Raspberry Pi (as the master for control), an Arduino (as the slave managing servo actions), and a mechanical base with two panels of “legs”. An offline speech recognition module called “Snips” is used for the project. A generated Snips assistant was configured and installed onto the Pi. Then a Python script was coded and set as a native service on the Pi. The script handles internal messages from the Snips assistant and parses them for robot command. The command will be sent to the Arduino using serial communication (USB A male to B male cable). The Arduino will then call servo functions based on the message. Currently, the robot can react to five commands: forward, backward, turn left, turn right, and stop.
The mechanical base was designed using Klann’s Linkage. It has the advantage of smooth progression and heavy load lifting, from the “D” shaped pattern from its legs. The robot was based on two panels of such linkage, each panel has two sets of legs. The robot can move forward or backward when the panels are all moving in the same direction. And it can make turns when the two panels move in different directions, similar to that of a tank.
Challenge 1: Power Solution
Since I had very limited knowledge of power supply of robots, I decided to take this part of the project first. And it’s proved to be a wise decision.
Each of the servos has a stall current of 1.5 Amps at 6.0 V. The Arduino can be powered with a variety of options. The Pi needs stable 5V and 1.5 to 2.0 Amps for reliable performance. I was thinking a high throughput power bank would be enough for all of these. But after putting everything into a test. It was pretty obvious that even a 15W dual USB output power bank won’t be enough. Then I turned to the idea of auxiliary power supply — using the power bank for the Pi and Arduino (board only), and one to two battery packs of 4x AA batteries for the servos. In theory, two battery packs are needed in a parallel setup, since the AA batteries have a reference current of 1.5 Amps. But in testing, I found that one would be enough for the robot to move. Since the load and frictions were not terribly enormous.
Challenge 2: Assembly
Proving the movement and leg patterns in software was one thing. But putting everything together and get a useable assembly is another story. With all the printing relief, and those many layers of acrylic parts, and screws, and spacers, I was not very successful in my first attempt. Quite some time were spent on sanding and drilling, reassembling and testing of the linkage. Even getting the screws was a challenge. Because, I used 4mm holes in the design, which would fit M3 screws smoothly. But none of the local stores has enough metric sized screws and nuts for me. So I spent many more hours switching everything to #6-32 screws (from the Imperial size chart).
In multiple layered mechanical linkage project, extra (I mean, quite a lot extra), precautions should be paid to load balancing, stability, and relief (or spatial allowance). With all the consumer level machines of laser cutting and 3D printing, and all those environmental variations going around, many measurements could go one way or another. And the gears will tilt if the loads are not balanced. There is still a lot to improve of my design. The frame is not stable enough for holding the body. The body design should have put those heavy batteries closer to the center of support. And the gear section needs a redesign, on a certain level, for a stable and smooth power progression. But I did have learned a good deal of lessons from this project.