Stepper-driven tank platform for remotely operated vehicle

by tjhowse, published

Stepper-driven tank platform for remotely operated vehicle by tjhowse Nov 11, 2011

Featured Thing!

0 Share
Download All Files

Thing Apps Enabled

Order This Printed View All Apps


Liked By

View All

Give a Shout Out

If you print this Thing and display it in public proudly give attribution by printing and displaying this tag.

Print Thing Tag

Thing Statistics

21132Views 3970Downloads


First: Some history.

I found this cheap wifi pan-tilt camera on ebay. It's a Foscam knockoff, and I bought it for about AUD$60 delivered. I strapped it to the top of a cheap RC car chassis, compiled an application for the camera, wrote it into the ROM, banged out some python, stuck on an arduino and had a bit of fun:


The car was fun, but unusable over high-latency links due to its high speed and fairly unpredictable trajectory. It also had a terrible turning circle.

I've just finished designing a printable tank chassis for the camera. I re-jigged the control system to be wholly contained within the browser, using poorly-documented cleverness to send data straight to the camera's serial port. The result is a remote-controlled tank that can point a camera around independently of the body, that works anywhere there's wifi reception and behaves well enough to control over a 500ms internet connection:


I have successfully driven it through medium-length grass, over, under and around my house. It's a bit top-heavy at present, I need to move the battery lower to lower the centre of gravity. I predict about half an hour of usage from a 2200mAh 3 cell lipo battery, but I can't say for sure since I've never flattened one.


Print the parts described in assembly.scad, starting with the tread bids.

Please note that the gears in this design are made for my steppers, and probably won't work for you right away. My steppers are nema17, and have a belt drive sprocket on them with a 12.5mm diameter. If you are in this boat, great! If not you will have to modify the bore of the drive gear, and perhaps other parts of the design. The relevant variables are described in assembly.scad. It's not as scary as it sounds.

Assemble the treads by joining 20 pairs of the tread pieces together by threading some 3mm filament through the holes. The curved top of the linker piece should be nestled into the tread piece. If you have problems with the pins wiggling loose over time, give them a quick zap with a soldering iron to fuse the tread piece to the filament. Print these parts first and assemble them while you're printing the other parts. Once they're pinned together, run them through your hands whilst waiting for everything else to print in order to wear them in. The more handling, the better. I put a little zig-zag of hot glue on the base of each segment to give extra traction.

Attach the driven gear to one of the hub pieces by pinning them together with two pieces of filament. To get the orientation correct, lie the driven gear flat on the table, toothed-side down, then put the hub piece on top of it with the prongs on the bottom.

Clip the main beams onto the axles, then clip on the stepper holders, ensuring the countersinking holes are on the correct side. Next, clip the spacer pieces onto the front axles, then the hub pieces. The prongs on the hub pieces should be on the outsides of the assembled hub. There is no need to pin the idler hubs together, though you can if it makes you feel better.

Do not be tempted to lubricate anything! This will impede the natural process of the plastic wearing itself smooth. Only lubricate once the tank operates without lubrication, to improve performance. Everything will be very stiff to begin with, but will wear in quickly. Be patient!

Mount your stepper onto the stepper mounting plate and attach the drive gear. Clip your driven gear assembly onto the rear axle and ensure the gears mesh smoothly. If it is difficult to turn (it will be, initially) check that the teeth aren't being pushed against eachother, there should be some clearance (0.5mm) between the tips of the teeth and their corresponding valleys on the other gear. Manually spin the hubs around for a while to wear the axle in a bit.

Slip the tread assembly over the front hub, then over the rear. Clip the last remaining hub piece over the rear axle to secure the tread in place.

That's it for the printed assembly.

As for the rest, you're going to have to work it out for yourself a little bit. I can help, though:

You'll need:
Printed tank,
Two stepper motors, nema17 for preference,
Foscam-knockoff wifi camera (Easyn FS 613A M136, Tomtop, etcetera),
2x Pololu stepper drivers,
Battery, 3S 2200mAh recommended,
A 5-watt 5V regulator (do not run camera off arduino's vreg),
A bit of cardboard,
Some velcro.

Custom code for webpage built into camera: http://pastebin.com/9KBE2Kss
Code for the arduino between the camera and the pololus: http://pastebin.com/iFcs1EJ5
Script I used to decompile and recompile the webui for the camera, foscam_pkmgr: http://pastebin.com/8ayWk5fc
Compiled webUI replacement: www.tjhowse.com/hackerspace/camcar/myrom.7z
(You can write the webUI in using the existing webUI on the FS 613A M136. Beware: Might brick other cameras.)

Initially the steppers probably won't be able to turn the treads without being run scaldingly hot, but it will quickly wear in and you'll be able to turn the power down.

Probable future improvements:
Integrate the stepper mount and spacer pieces into the main beam, removing the need for the unique axle pieces and reducing part count.
A printable platform, to replace the cardboard.

All Apps

3D Print your file with 3D Hubs, the world’s largest online marketplace for 3D printing services.

App Info Launch App

Auto-magically prepare your 3D models for 3D printing. A cloud based 3D models Preparing and Healing solution for 3D Printing, MakePrintable provides features for model repairing, wall thickness...

App Info Launch App

Kiri:Moto is an integrated cloud-based slicer and tool-path generator for 3D Printing, CAM / CNC and Laser cutting. *** 3D printing mode provides model slicing and GCode output using built-in...

App Info Launch App
KiriMoto Thing App

With 3D Slash, you can edit 3d models like a stonecutter. A unique interface: as fun as a building game! The perfect tool for non-designers and children to create in 3D.

App Info Launch App

Print through a distributed network of 3D printing enthusiasts from across the US, at a fraction of the cost of the competitors. We want to change the world for the better through technology, an...

App Info Launch App

Quickly Scale, Mirror or Cut your 3D Models

App Info Launch App

3D Print a wide range of designs with Treatstock. Easy to use tools to get the perfect result. The global 3D printing network that connects you with high-quality and fast working print services nea...

App Info Launch App

I love the way it snaps together, very inspiring in it's simplicity and yet very sturdy!
Are you aware that the stepper mount hole is not round? 1.5mm variation in width vs height, just estimated looking at the .stl file, as well as measured in my printed part.
Also wanted to mention you spec the power supply as 5watt-5v min, but you probably meant 5Amp-5v min? If I'm mistaken, my apologies.

Thanks for this contribution, I enjoyed the design style!

hi how did you hook the ip cam to the board and how did you wire every thing up

Hi! I'm trying to print the peices right now!

is necessary to modify the camera to get the seria signal on the port or i just can programme the arduino only

Wanted you to know, I just published a Derivative of your original design.

Any chance you could share some more detailed pictures of the proto board with the parts, and connections. I have ordered all the bits, and am printing the parts now. Can't wait to get this one built.

 Unfortunately I have cannibalised the prototyping board for parts, so I don't have any pictures of it in detail. The circuit isn't very complex, most of it can be inferred from the circuit sketch: http://www.thingiverse.com/image:84826http://www.thingiverse.com/ima...

And no, the sprockets that are on my steppers just happened to be there when I scavenged them from an old photocopier.

I finally got my "version" of the camera, They seem to change the layout of the board often, as my serial port pins were totally different than the ones online in the forums. During testing, I noticed that the serial port does not just output the commands from the .htm file, but include a bunch of ther junk, did you run into this too? I am guessing that is why you trigger off the string in the arduino code the way you do.

Is it possible to get the exact model number of the following parts you used? Arduino, 2x Pololu stepper drivers? I want to try to replicate your bot, looks great.

 The type of arduino is unimportant, any should work. I used an arduino duemilanove. The stepper drivers are the pololu A4988.

Could you post a link to the exact camera that you got (is it easyN ? ), as well as your firmware?


Added the info to the instructions.

Model: FS 613A M136
WebUI (Firmware): http://tjhowse.com/hackerspace/camcar/myrom.7ztjhowse.com/hackerspace/camcar...

2 Requests:

1) Can you post the individual STLs so the site can render them?

2) Are they printable on a cupcake or another small build area machine?

1) Done!

2) Most of the parts, yes, but the big axles have to be rotated to fit on my mendel's print bed, so printing on a little baby printer (!!) is going to be difficult. There are two modules, "HalfRearAxle()" and "HalfFrontAxle()" that you can use to print half an axle, but you'd have to work out a ro
bust joining technique.

Hi, here it goes just a suggestion. Unlike normal DC motors, steppers spend energy even if the robot is not moving. A normal DC motor with a shaft encoders is a good alternative to the steppers for differential robots (tanks, roomba and other similar robots...). http://1.bp.blogspot.com/_QYCIPYPZ-pc/SK6ZZb5XrLI/AAAAAAAABac/04KlikXAmp8/s400/encoder_mk2_front.JPGhttp://1.bp.blogspot.com/_QYCI...

You also would have ti program in the arduino motor control routines. A PD(proportional differential) control would do it. ;)

Here is a example of a Lego robot with a DC motor and shaft encoder.


This is from a student project from a robotics class in my university. I help the teacher in the class. :-P

Hi, me again.

If you seriously consider the encoder, I just want to give the tip that as many teeth in the encoder the better so you can get more signal peaks per encoder rotation. The faster the encoder runs the better too so, it should be put in a place that it will rotate more, normally a less reduced shaft in your robot, but if the encoder is not in the wheal (the one that touches the floor) shaft it normally get backlash imprecision due to the gears... so it is a compromise in this case.

You also could simply mount a optical switch in the gears teeth instead of making a encoder wheal.

And just another thing, ideally the encoders should be plugged in a interrupt port in arduino so it can count the wheal rotation with less overhead to the control routines.

sorry the amount of text. :-D

You're correct in saying that stepper motors can consume power when stationary, but in this case you'd be wrong. My arduino code disables the stepper drivers when the tank is not moving, saving power.

Steppers are low RPM, high torque and high precision. They provide all the benefits of a DC motor with a gearbox and an encoder, with zero backlash and much reduced component cost and complexity.

Simply awesome and thank you very much for sharing an awesome design.