/u/7434365
/joeiddon

A Four-Legged Robot

After watching how newts move, I thought it would be cool to try and imitate the motion of their legs and how they move around.

Here is my "research" video that I took to base the project off:

I then began building the thing. The frame was to be made out of 3mm plywood which would be easy to cut to the right shapes for the different parts. Then, each leg neeeded 2 motors so with 4 legs, I ended up using 8 sg90 servo motors as they are cheap and have sufficient torque for this application. Finally, I used a HC-SR04 ultrasonic sensor to allow the robot to sense obstacles (and hopefully avoid walls).

To put everything together, I just did a quick job with a hot glue gun

Here is what it looked like mid way through programming the arduino:

Unforunately I did not get a video of it walking at this stage as I made a change to the design after a couple of tests. As you can see in the image above, the sensor is fixed to the main body of the robot so it cannot sense to the sides. I originally thought that this would be good enough as the sensor is meant to have a 15deg field of view. However, it was not quite enough and would often miss an obstacle and clip it with one of the front legs.

To solve this issue, I simply mounted the ultrasonic sensor on another servo that would allow it to rotate and have a much larger view of the obects it encountered.

Here is a video showing that motion:

Finally, I just needed to write some simply code so that the robot turned (using a technique of putting two legs on one side together and pushing around on the other) whenever a wall/object got detected by the ultrasonic sensor.

Here is a video of it doing some walking then turning when it sensors the white wall in its path:

And a sped up videos of the robot navigating about its pen: