In my previous post I described my intentions to build a robot snake as similar as I could to the one from this video. The first attempt was to use an astable multi-vibrator type circuit that would alternate outputs to two DC motors, which is what was used in the video. The circuit proved difficult to convert to DC motors instead of LED’s in part due to my limited background in electronics and the unique nature of astable multi-vibrators.
After several failed attempts to reconfigure the astable multi-vibrator chip, I decided to use an Arduino to control the motors since I only need to alternate the motors the code should be fairly simple as well as the circuit configuration.
Materials for result:
- Arduino Uno
- Jumper wires
- L298 Motor controller
- 3V DC Motors 2x
- Soldering iron
- Cable cover plastic sheets (snake frame)
- Small nails
- Oval beads (wheels)
- Heavy duty metal shears
- Hot glue gun
I began constructing the snake by configuring the electronics due to my previous lengthy issues. I started by attempting to run a single DC motor from the Arduino kit I ordered, by connecting the Arduino to a breadboard containing a L298 bridge and with output to the motor. After trying many different configurations and experiencing substantial heat coming from the motor controller I realized the kit came with the chip on the right while I needed the L298 chip on the left.
With relief I ordered an actual L298 module with no need of a breadboard as seen below.
After attaching the Arduino to the motor controller and motor controller to motors, I was able to control the motors individually and adjust speed through the “enable” pins on the diagram above.
Creating the body of the snake was the next step, and since I now have an Arduino, and motor controller to mount to the snake instead of just the small multi-vibrator I had to customize the size of the head and second segment to accommodate the extra hardware. The Arduino is particularly large, so to keep the segment off the ground I added an extra wheel behind the Arduino as well as in the front. Generally each segment has two square holes created using a Dremel to attach a bead to act as a wheel. On the ends to each segment I drilled a hole to attach to the next and previous segments using a nail and hot glue. To get traction from the motors I had originally planned to attach Lollipop sticks to the end, however, even after drilling pilot holes into the sticks they were still too dense to attach to the motors. I instead attached electrical tape to the ends of the motors with sufficient traction.
After lots of tinkering and fine tuning I did get the motors to rotate with a lot of resistance, however, the motors are not strong enough to move the entire snake, only the head.
With the additional weight of the Arduino I need to scale the power of the motors and also use a more powerful battery to power all of the units. I had hoped a 9V battery would be able to power the motors, which it does, but it does not power the Arduino and motor controller on top of them so the bot is currently limited to wall power.