Snake Robot

(A personal project for kinematics and organic motion study)

This project began as an idea to work on forward and inverse kinematics and to explore organic motions in a larger project. I have worked on industrial robotic arms at Kindred Robotics (now a part of Ocado), but I wanted to create a system from scratch with more joints and the ability to move and eventually climb.

The first version of the snake included 2 wheel systems that I designed a gear system for to allow the wheels to turn and drive in any direction with no breaks in driving. I designed the gear system to ensure that the turning and driving motors stayed stationary and the two sets of gears stayed engaged.

This section included cutouts for power and motor signal wires, used slots for nuts and holes for M3 screws to connect top and bottom sections. Because the wheel assembly would be contained in this link the joint motors would be part of the adjacent links.

3D rinting this link showed a few issues with the design. First, the link was larger that would be reasonable for the servo motors to move. Through some moment math and weighing the section it was clear that the links needed to be smaller and lighter. The second issue was that the driving gear teeth were too thin for a reliable connection with the wheel.

Around the time of this I lost my school license to SolidWorks, so I decided to redesign the snake using SolidEdge, a similar piece of software that is free for hobby use. I also had come across a video by computerphile about a snake robot that talked about different methods of locomotion that convinced me to remove the wheels entirely and take on the challenge of a mobile robot without wheels or legs.

To make my snake robot mobile I needed to power each of the 10 high-torque motors I planned to use in addition to the Respberry Pi Zero and sensors I was using. To make the snake as light and small as possible I settled on using a 4S LiPo battery in the tail of the robot. I would then design my own chaining buck converter PCB to power the motors and components at a 5V level.

I used the TI Webench Power Designer to design a buck circuit and began to create my power circuit using KiCad. I also decided to use a PCA9685 board to generate the motor control signals as the Raspberry Pi Zero cannot handle 10 hardware PWM signals.

Because all of the PWM signals are originating from one place and then being run along the length of the snake, electrical interference was a concern, so I added a signal cleaning circuit consisting of a low-pass filter and a Schmitt Trigger to the back of the PCB. I also added pads for bypassing resistors for the back circuit and some bulk electrolytic capacitors to the 5V output to handle current spikes from the servo motors.

Schematic image here

With the echematic completed I worked on the layout attempting to maximize the area of the copper to pass through the battery ground and voltage leads as the battery power is chained through the length of the snake and minimizing resistance is key for efficiency.

Layout image Here

Once the PCBs arrived I went through the process of using a stencil and solder paste to reflow and add all the components for the power circuit first. First I used an incorrect temperature to try to reflow a board, but after I corrected the temperature the reflow went better. I did run into issues with two of the boards having short circuits under the very tiny buck chip, but taking the chip off and resoldering it fixed the issue for both boards. I now had boards that were outputting 5V when they recieved 12-16V.

I then populated the signal cleaning circuits on not all of the boards as the board that powere the Raspberry Pi will not need the back circit.

Next I populated the through-hold PCB components. I noticed that I had flipped the signal and 5V outputs to the motors at this point, so I unfortunately couldn't directly plug the servo motors into the boards (if I make more I will fix this). In the mean time I either soldered the regular headers with extra jumper wires or soldered cut wires directly to allow the motors to plug in. Each motor can draw up to 2.4A of current at the peak, so the wires used were selected as they are rated for 6A of peak current.

Now with working PCBs I tested running motors and began assembly of the robot as I 3D printed the second version of the snake which was much slimmer.

With 5 PCB links, 4 servo links, a head, and a tail, the snake is well over a meter long and so care was taken when managing wires and making the plugs to chain the battery power lines from PCB to PCB. I used XT60 conectors as they could handle more current than I needed and that was a standard for the batteries.

Currently I am working on an e-fuse circuit after inrush current caused electrical issues when using a LiPo battery. While I am fixing the inrush current issue I also set up a forward kinematics model for the snake in Python using DH conventions. Using the model I am planning joint angle trajectories for coordinated motions. So far I have motions for lifting the head and a caterpillar motion for forward motion.