View unanswered posts | View active topics It is currently Mon Sep 21, 2020 5:41 am

Reply to topic  [ 3 posts ] 
anything about programing a robot 
Author Message

Joined: Wed Nov 13, 2013 4:04 am
Posts: 1
Post anything about programing a robot
I am working on a project and need to stop an electrically powered vehicle autonomously. I have experience building remote control cars and can build whatever is needed for the project, however I do not know anything about programing a robot, or the materials needed to build the components i need to stop the robot at a certain distance. I am currently considering 2 methods of stopping the car, the first is to measure the cars velocity and calculate the time needed to reach a certain distance and program that time into a timer which will shut off my drive motor. The second would be to count the revolutions of the wheel and use its circumference to calculate how many revolutions are needed to stop at a certain distance.

Last edited by JohnWatson on Fri Nov 22, 2013 11:37 am, edited 2 times in total.

Removed two links from comment.

Mon Nov 18, 2013 2:36 am
Site Admin
Site Admin
User avatar

Joined: Tue Oct 09, 2012 10:34 am
Posts: 192
Post Re: anything about programing a robot
Hi tindra,
Your first method will work to certain degree, but will probably have pretty low accuracy because your vehicle's velocity is not going to be perfectly maintained.

Your second method is the standard approach. Usually people use sensors called rotary encoders to measure wheel rotations. These sensors produce a defined number of electrical pulses per revolution, and so you can count the number of pulses (either using a programmable microcontroller or you could build your own simple counter circuit) to determine how far the vehicle has gone. If you don't need much resolution, you can build your own cheap encoder by attaching an encoder wheel pattern to your wheel, then using an optical reflectance sensor to detect the transitions from black to white to black as the wheel goes around. Here's a page on using ROBOTC with an Arduino and encoders to do measured movement.

If you don't have to travel very far (maybe 100 meters or less), another - very low-tech - option would be to attach one end of string to a spool on your wheel axle, and the other end to the lever of a knife switch. As your vehicle travels, it will wind up the string; when it has wound up all the string, it will pull the knife switch, disconnecting the electricity from your motor.


Ryan Cahoon
CMU Robotics Academy
RVW Software Developer

Robot Potato Head; Virtual NXT

Mon Nov 18, 2013 12:35 pm
User avatar

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1523
Post Re: anything about programing a robot
Also, do you need the vehicle to stop very precisely or approximately is fine? How heavy is the vehicle? How fast are you planning to travel? If your vehicle is heavy and travelling fast, the vehicle may not be able to stop on the dime when you reach your "target position". Understanding your requirement is crucial in determining what the best way to implement the solution is.

Mon Nov 18, 2013 4:58 pm
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.