kookiebot 1: cat toy throwing robot

kookiebot 1 is a remotely controlled cat toy throwing robot. it is made out of legos, and is controlled by an arduino and a raspberry pi, along with an nxt motor shield for the arduino. there is also a tiny servo motor that is used to control the loading of a new cat toy onto the launcher. behold:




as mentioned in the intro, the body is made out of legos. there are two motors, so it will operate as a simple differential drive robot. i opted to go with treads because i want the robot to drive around and not have to worry about little “bumps in the road”. i also tried to make the body as compact as possible.

as of now, the power and processing are being done externally. i will need to add a platform or holder for the battery packs and raspberry pi/arduino.


right now, the hopper has the capacity to hold 3 small cat ball toys. i would like to add to this down the road, but it’s fine for testing right now. there is a tiny servo motor (amazon) that rotates to allow a ball through, and then closes the gate before the loaded ball is fired.

 firing mechanism

the firing mechanism is comprised of two parts, the restraining arm and the firing arm. the restraining arm is attached to an axle that is powered by the right motor over a 6 gear system.  pictured below is an earlier version of the gear system with only 5 gears:


the firing arm is a freely rotating shaft that rests on a bar close to the vertex (about an inch and a half away). at the other end of the firing arm is the basket, which holds the toy once it is loaded. at the back of the basket, there is a notch designed to “catch” the restraining arm.

when the robot is driving forwards, the restraining arm rotates backwards, and just brushes underneath this notch, lifting the firing arm slightly, and continuing on its way.


when the right motor is rotating backwards, however, the restraining arm rotates forwards, and catches the firing arm. when driven far enough, eventually the firing arm bends enough to be released by the restraining arm, and springs forwards, firing the toy.



there is a bar at the front of the firing arm that prevents it from over rotating. it hits this bar and bounces back into place once the toy has been fired.


right now, the robot is controlled by an arduino leonardo microcontroller with an nxt motor shield from tkj electronics. i had to solder all the parts onto the board which was a fun little project in and of itself. it is working nicely so far. it also has a port for the ultrasonic sensor which i can use down the road. the servo is also controlled by the arduino. it is connected to the +5 and GND pins for power, and digital pin 1 for control. the nxt motor shield uses almost all of the other digital control pins.

eventually, though, the leonardo will be replaced with an arduberry from dexter labs. i funded the kickstarter, and i will be looking to get that in a couple of weeks, along with my raspberry pi. i will explain how everything will play together in the software section.

i also plan on adding a webcam to the front of the robot. there is a nice little webcam that is designed specifically for the pi, and i will be looking to get it once my pi arrives.

finally, i will have a usb wifi dongle so that the pi will be able to connect to the network and controlled remotely.

the whole system will be powered by 7 AA batteries. since the pi only accepts 5 V in, i will need to send the batteries through a 5V DC-DC step down converter (something like this). everything else will be able to handle the 9V input voltage.


you might be wondering why i want a raspberry pi and an arduino. well i’ll tell you. the arduino will be running this program. that program will be waiting for serial commands from the pi. the pi will be available for a remote desktop connection, so i should be able to send commands from my phone, computer, or any other device that will allow me to remotely control the pi. the pi will be running whatever version of linux that it comes with. the pi will also be streaming the video from the webcam to justin.tv or ustream. that way everyone can watch along as oscar chases toys around the house.

serial commands

right now, the arduino program is set up to recognize a few commands. these commands are strings entered into the serial input window when a serial connection is open between the pi and the arduino. the exception is the “listen” command, which is running unless one of the other commands is in process. this command is listening over the serial connection for an input command.

“help”: typing in this command will list all of the other valid commands that the program can handle.

“drive”: typing in this command will elicit the response: “how far?”. the user can type a distance and the robot will drive forward until that distance is reached, then brake. after the user types the distance, the user will see the feedback “driving” in the serial monitor.

“fire”: typing this command will initiate the toy-firing sequence. this involves opening the gate for a set period of time to allow a toy to load, closing the gate, then driving backwards until a toy is fired.

“turn”: the turn command is similar to drive, in that it will also ask the operator “how far?”. the robot can only turn in the counter clockwise direction. turning clockwise will cause the right motor to move backwards, and thus fire the catapult. by only rotating counter clockwise, this unnecessary operation is avoided.

bringing it all together

this video shows the prototype in action. the input voltage at the time was coming from an ac/dc converter pumping 11V into the system. this was a little high for the nxt motors, so they were going faster than they will be when the robot is completed.

once the pi and arduberry come in, i will be able to unleash the robot from the grips of my desktop. i will post an update once the robot is in a more complete state!



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s