Pizza Rat

by duboisvb in Circuits > Microcontrollers

3866 Views, 5 Favorites, 0 Comments

Pizza Rat

IMG_2783.JPG

After seeing the video of the pizza rat in NYC not so long ago, I thought I would make one . It ended up being a gift for my daughter and it used up an used piece of pizza.

I had a robotic car that used a Picaxe and a couple of motors that I no longer needed. So I repurposed them to make my pizza rat.

So all I needed were:

1. a Rat - I found on the internet for about 5.00

2. Picaxe 28 which I already had

3. Wheels and motors from previous project

4. battery holder

5. 4 double A batteries

6.An on/off switch

7. some misc wires

Video of It in Action

Downloads

The Build

IMG_2772.JPG
IMG_2774.JPG
IMG_2773.JPG
IMG_2775.JPG
IMG_2776.JPG

So using a small 6 inch piece of wood , I attached the battery holder to one side and the PIcaxe to the other. I attached the motors with double sided tape and then used a zip tie to further hold in place.

I hot glued the ends of 2 pieces of fairly rigid wire to the top of the wood and the other ends I secured to the bottom of the rat with hot glue and a couple of small screws.

I included a couple pieces of wire that are shaped like a C over the wheels. This keeps the pizza from resting on the wheels .

The Electronics

IMG_2777.JPG
IMG_2778.JPG
IMG_2779.JPG

Not much to this:

Power and Ground are attached as shown in photo. Likewise the motors are attached as shown.

The Code

Below is the code I used.

When both wheels are turning , it tended to go in circles so I tried to compensate by stopping there faster wheel for a short time. There may be a better way to do this.

' 12/10/15

' idea: turn on and it will derag the pizza backwards '' wait 2 seconds to put the rat down pause 2000

main: ' the main loop

' back up both wheels turning ' low 5 : low 6 : high 4 : high 7

low 6 high 7 high 5 low 4

pause 1000

' adjust turning by stopping fast wheel

low 4 high 5 low 6 low 7 pause 600

goto main