Raspberry Pi Spy Tank

by mkarvonen in Circuits > Robots

28689 Views, 457 Favorites, 0 Comments

Raspberry Pi Spy Tank

Kansi.png
Raspi Spy Tank

I got a first prize from PI/E day contest. (yaayyy. Thanks for all the awesome voters!!!)

I would like to reward the first 10 people to contact me. I have 10 pieces of 3 month PRO membership codes to giveaway. Write a comment to this project or send me a message and tell me why you should get a free code. The best answer will get a free 1 year PRO membership! So in total 11 PRO memberships are given away!

Like, follow and vote ;) Thank you!

The prize pack included a GoPiGo kit witch is a good robot for beginners to experts.

However the basic model case is pretty clumsy and too tall to move around the house efficiently.

So i made my own case for the whole thing and basically build the whole bot from scratch.

This project requires some modifications to the original GoPiGo board.

Parts

DSCN6585.JPG

The parts used are straight from the GoPiGo kit.

This includes:

-Raspberry pi B+

-Raspberry camera

-Two motors

-GoPiGo board

-Wifi Dongle

-SD card with GoPiGo image. You can download yours from here!

(Optional)

-LED's for light

-Cable

Printing the Parts.

DSCN6478.JPG
DSCN6479.JPG
DSCN6486.JPG
DSCN6487.JPG
DSCN6493.JPG
DSCN6494.JPG
DSCN6504.JPG
DSCN6509.JPG
DSCN6565.JPG
DSCN6566.JPG
DSCN6567.JPG
DSCN6568.JPG
DSCN6569.JPG

The case is a remix of this project here.

Parts are printed with Printrbot makers kit.

Print material is PLA plastic.

Print speed varies from 20mm/s to 50mm/s.

Layer height is 0.2mm.

Total cost for all the prints were about 25 dollars. This was however made with a expensive PLA plastic that costs about 50 dollars/1kg. With cheaper alternative (look at ebay) You can get a half of the price down.

Parts check list. "aka" how many of what?

Bottom lid x1

Head x1

Sides x4

Tail x1

Track x52 (26/side)

trackFrame x2

Wheel x4

WheelGuard x4

Clean Up the Parts.

DSCN6488.JPG
DSCN6562.JPG
DSCN6489.JPG
DSCN6573.JPG
DSCN6490.JPG
DSCN6495.JPG
DSCN6496.JPG
DSCN6499.JPG
DSCN6505.JPG
DSCN6570.JPG
DSCN6571.JPG
DSCN6561.JPG
DSCN6510.JPG
DSCN6497.JPG
DSCN6498.JPG
DSCN6501.JPG
DSCN6563.JPG
DSCN6564.JPG
DSCN6582.JPG
DSCN6583.JPG

Clean up the exes plastic and check that everything looks like it should look.

Do a test assembly for the parts to see that everything fits.

Connect Camera

DSCN6589.JPG
DSCN6590.JPG
DSCN6591.JPG
DSCN6592.JPG
DSCN6593.JPG
DSCN6595.JPG
DSCN6596.JPG
DSCN6597.JPG

Connect camera to its own place. Use screws or hot glue to hold it up.

At this point you could attach the LED's to the holes if needed. I added the LED's lastly and it was pretty hard to get them there.

Note that the camera goes upside down to the head.

Assemble the Wheels

DSCN6502.JPG
DSCN6503.JPG
DSCN6575.JPG
DSCN6576.JPG
DSCN6577.JPG
DSCN6579.JPG
DSCN6578.JPG
DSCN6580.JPG
DSCN6581.JPG

Assemble the wheels as show in the picture. Use hot glue or anything you like to ensure that the parts stay on its place.

Remember to test that the wheels turn without force. If you have to apply force to the wheel's to move them try sandpapering the parts until they fit perfectly.

Tracks

DSCN6630.JPG
DSCN6631.JPG
DSCN6632.JPG
DSCN6572.JPG

Connect the tracks to each other with toothpicks.

Toothpicks are cheap and work really well on the tracks. Note that the track's outer holes are smaller than the middle one. This is to keep the middle "hinge" loose when the toothpick is bushed through the smaller outer holes.

Use some force to push the toothpick to the track. Use small drill if needed to enlarge the outer holes.

Motor

DSCN6586.JPG
DSCN6587.JPG
DSCN6588.JPG

Put some clue to the wheel hole to ensure that the motor stays in place. Push the motor shaft in to the hole and put some hot glue around the motor just to make sure it stays there.

Assemble Body.

DSCN6600.JPG
DSCN6601.JPG
DSCN6602.JPG
DSCN6598.JPG
DSCN6599.JPG

Use hot glue to attach the side part and wheels to the main frame.

Glue only one side to the head and tail part.

If you glue both at the same time you will have a hard time to fit all the electronic parts inside.

Slim Up.

DSCN6607.JPG
DSCN6608.JPG
DSCN6609.JPG
DSCN6612.JPG
DSCN6613.JPG
DSCN6614.JPG
DSCN6616.JPG
DSCN6617.JPG
DSCN6618.JPG

To slim up the GoPiGo board we will remove the unneeded parts. (the parts can be soldered back if you need them later)

Motor pins change the side from down to up.

Remove everything from the downside of the board.

This includes

-Two led's

-Servo pins

-motor pins.

-ISP pins

-IR slot sensors

Fit the Board to the Case.

DSCN6619.JPG
DSCN6620.JPG
DSCN6621.JPG
DSCN6623.JPG

The fit is tight. Watch out for the camera module!

Remove the side pillar for easy access if needed.

Connect the motors to positive and negative cables. If your wheels act all strange, change the positive and negative cables on the motors.

This would also be a good time to update the GoPiGo software and make the WiFi Dongle setup if you haven't done it yet.

Also try out the camera.

You can read from here about the update process of the GoPiGo image used

Rest of the Case.

DSCN6624.JPG
DSCN6625.JPG
DSCN6629.JPG

Use a small amount of glue to the other side part. That just in case if you will have to fix something inside. The small glue will come off a lot easier than whole tube of glue put in there.

Tracks

DSCN6626.JPG
DSCN6627.JPG
DSCN6628.JPG

Put the previously build tracks now on the wheels.

Put the tracks under the wheels and move the heads to the up side of the wheels.

Insert last toothpick to the connecting points and you are all done.

Make sure that the tracks and wheels spin easily. If not, make sure that everything is in line and smooth.

Case Is Done

DSCN6633.JPG
DSCN6634.JPG
DSCN6635.JPG
DSCN6636.JPG
DSCN6637.JPG

The case is finally done. 2 days used to print all of these parts.

Inside the case is enough room for two 9V battery for stealth but quick run.

Run Program

Dwm 2015-05-21 11-15-57-80.jpg
Dwm 2015-05-21 11-16-15-52.jpg
Dwm 2015-05-21 11-16-25-37.jpg
Dwm 2015-05-21 11-17-17-15.jpg

To run the program you will need a SSH connection to your raspberry.

Make sure that the raspberry is on WiFi and find the IP address of the raspberry.

This is found from raspberry itself with ifconfig command at terminal OR via your own router setup site witch is your routers address. This address can be found from your routers manual or their website. Just Google

""insert your router name and type here" ip address".

After you are all set up. Download PuTTy and click SSH and type to Host Name your Raspberrys IP address

and click Open.

Now it will ask login name and password

Login name is: pi

Password is : raspberry

After that it should say pi@raspberrypi~#

To start the web server type:

This opens the folder the program is in

cd Desktop/GoPiGo/Software/Python/Examples/Browser\ Streaming\ Robot/

Then make the web server a executable file with

sudo chmod +x robot_web_server.py

And lastly start the web server.

sudo ./robot_web_server.py

Lastly type raspberrypi.local/ to your URL arddres bar on you browser

If that does not work use your raspberry's IP address to acces the site.

Now you can acces to the robot controls and live video with anything that has a internet connection and is in the same network.

Optional.

DSCN6653.JPG
DSCN6654.JPG
DSCN6655.JPG
DSCN6657.JPG

Attach the led's to the holes. Hook up them in series with 560 Ohm resistor. Connect the positive and negative wires to your battery lead wires. In the video the Led's were pretty dim because the battery was running out. When the battery was full they were really bright.

Bottom Lid

DSCN6656.JPG
DSCN6658.JPG

Push the bottom lid on to its place. This should just snap on. Easy to remove with flat head screwdriver.

Make a small hole to the corner if you are going to use bigger battery pack than the case can fit inside.

You Are Now Done.

DSCN6659.JPG
DSCN6660.JPG
DSCN6661.JPG
DSCN6662.JPG
DSCN6663.JPG
DSCN6664.JPG
DSCN6665.JPG

The bot is now complete.

Play with it and see where it can go. Use the live video and bright led's to see under your bed and discover horrible mess from there.

For stealth approach use two 9V battery's inside the case in stead of that hudge 8 AA battery pack. I used that because i was running low on battery's and these had just enough power left to do the debugging and test driving.

Thanks for reading!

And Remember to vote and follow :)

I would like to reward the first 10 people to contact me. I have 10 pieces of 3 month PRO membership codes to giveaway. Write a comment to this project or send me a message and tell me why you should get a free code. The best answer will get a free 1 year PRO membership! So in total 11 PRO memberships are given away!