configuring differential drive with treaded tracks

This is the place to ask question about Enchanting, talk about your Enchanting projects or simply find out more about Enchanting on the NXT.

Moderator: clintonb

New User
Posts: 2
Joined: Sat Feb 28, 2015 5:51 pm

configuring differential drive with treaded tracks

Postby enchanted_learner » Sat Feb 28, 2015 6:04 pm

Hi, I recently discovered Enchanted for the NXT. I'm very new to both the NXT and the Enchanted software, and really like the idea of drag and drop programming. Thank you creators!

On to my question:

I'm using the very basic first robot design from the NXT instructions, which uses the tank treads. I'm trying to set up the differential drive measurements for wheel diameter and track width but having a real hard time. I'm testing this by using a drive in a square program sequence of drive forward X distance, turn 90 degrees, repeat 4 times. If I use the exact measurements (using a ruler) as recommended in the configuration of differential drive tutorial video, then my NXT doesn't actually turn 90 degrees. For wheel diameter I've tried measuring both the diameter of the plastic wheel, as well as the diameter of the wheel and rubber tread. For track width I measured from the middle of the rubber tread on the left track to the middle on the right.

What am I doing wrong? I'm guessing its because I'm using he tank treads and not rubber wheels.


Active User
Posts: 138
Joined: Fri May 28, 2010 1:44 am
Location: Cardston, Alberta, Canada

Re: configuring differential drive with treaded tracks

Postby clintonb » Mon Mar 02, 2015 2:59 pm

Hi enchanted_learner.

I'm glad you like enchanting.

I worked on a video explanation of precisely calibrating a differential drive robot, but never did finish. Someone else has a tutorial here. I can't say I've ever actually tried this with a treaded robot, but i think it should work.

There are two parts:
1) Figure out the straight distance
2) Figure out the turning distance

You will need to be able to measure how far the robot travels and how much it turns.


Set up a differential drivel; put in a rough guess (50 mm?) for the diameter of the wheels (and maybe a rough guess for the distance between the treads, although it doesn't matter much at this step).

Write a program and tell the robot to drive a known distance -- say 1 m. Farther is better, provided you can measure the distance and have a flat floor.

Now measure how far it actually went. Say it was 112.3 cm. Since it drove too far, it is reasonable to assume that the real diameter must be smaller. Plug it into this formula:

50 mm specified diameter * 1 meter specified distance / 1.123 meter actual distance = 44.524 mm actual diameter

Change the diameter in your program, and try it again. Does it go the right distance?

(You can repeat this procedure, especially at larger distances, until you are happy with the results).


You need to get the straight distance pretty accurate before moving onto this step. If you tweak the straight distance, you'll have to re-tweak the turning distance.

Set a rough distance between treads. Say 17 cm.

Create a program to turn, say, 5 rotations, slowly. 5 * 360 = 1800 degrees. Again, a larger number leads to greater accuracy, provided you can measure it.

Print out a 360 degree protractor that you can sit your robot on. With a program on it to turn slowly several times, place the robot at a known starting angle, and run it. Measure the final angle as best you can.

Let’s say that it spun around about 30 degrees short of six full rotations. 6 * 360 - 30 = 2130 degrees.

I think the formula to use here is slightly reversed from the last one, but I may have it wrong.

17 cm specified wheel base * 2130 degrees actual / 1800 degrees specified = 20.1167 cm actual wheel base

Try the new wheel base (distance between the treads) in your configuration, and re-run. Did it work right? Repeat until satisfied.

Hope this helps. Recognize that it’ll never be 100% exact.

New User
Posts: 2
Joined: Sat Feb 28, 2015 5:51 pm

Re: configuring differential drive with treaded tracks

Postby enchanted_learner » Thu Mar 05, 2015 5:22 am

Thanks, this makes sense! I'll give it a try.

Return to “Enchanting Questions and Projects”

Who is online

Users browsing this forum: No registered users and 1 guest