This project is a digital remake classic board game Hungry Hungry Hippos. I decided to try and recreate the motion of the hippos from the game at the push of a button. I knew going into this that the hippos had two main motions: the forward and backward motion of their body and the up and down motion of their head. I figured that I could use a servo to control the body motion and a solenoid to control the head motion. I decided that would program my hippo using an Arduino Mega 2560 R3. I started by 3D printing a head for the hippo and a rack and pinion that would represent the hippo's body. This was an iterative process (it took a few tries to get the pinion to fit on the servo), but I finally ended up with a set of parts that I was happy with.
The next thing I had to do was connect the head to the rack. I knew that the head had to pivot up and down in order to "eat" the marbles, so I attached it to the rack using a hinge and some superglue.
I then started working on attaching the solenoid to the rack and head. I was going to glue it to the rack and use a piece of copper pipe to attach it to the head. However, I quickly realized that the solenoid drew too much power to be powered by the Arduino alone. I was able to resolve this problem using a 9V battery adapter and a TIP120 transistor. (Side note: when working with transistors, make sure you use the right one for your project. I thought I could get away with using a transistor that I had laying around in an electronics kit, and when I went to touch it after hooking it up I almost burnt my fingers.) I then encountered another setback: the solenoid did not have enough pullback force to lift the head. I realized that I either had to get a larger solenoid (which may or may not have solved the problem) or come up with another way to move the head. Since I was short on time, I ultimately ended up putting the solenoid aside for another project.
In the mean time, I got to work on setting up the pinion attached to the servo since I was confident that my rack and pinion system would work. I pressure fit the pinion on the servo and taped the servo on the underside of the box lid I was using as the base for the project. I cut a hole in the box lid so that the pinion would be able to connect with the rack.
At this point it was time to wire everything. I decided to make two hippos so I got everything setup and taped all the wiring and components in place on the bottom of the box lid. I used standard push buttons as the controls and a 9V wall adapter to power the Arduino. The wiring was a little bit messy but it was functional nonetheless.
I then put the finishing touches on the hippos. I realized that I needed more weight on the body in order for the rack and pinion to work so I glued an eraser on top of the rack. As for the new head movement, I found out that if I glued a string to the top of the head and tied it back, the tension would cause the head to move.
In the end, everything came together and I was very pleased with the result. The hippos functioned as expected although they were not great at picking up marbles. Still, they properly recreated the motions of the hippos from the actual games. Check out the video below!
Overall, this was a pretty simple project. I would definitely recommend experimenting with servos. In addition to the 180° servos I used for this project, there are also continuous rotation servos that rotate a full 360°. Servos come in a variety of sizes and can be fitted with a variety of attachments. You can basically handle any type of rotational motion you need using a servo. They are very easy to program as well. For more information on this project, please check out the documentation about it that I wrote for my class on my website. You can also see the code I used to program the hippos on GitHub.