Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   How to make a max speed (http://www.chiefdelphi.com/forums/showthread.php?t=33806)

Team 668 01-02-2005 18:50

How to make a max speed
 
we want to make a motor on our robot have a max speed so it doesnt just shoot to fastest speed. what is the programing code. we are planning to hook it up to a pwm and use the p2_wheel to control it. thx for input.

steven114 01-02-2005 20:13

Re: How to make a max speed
 
If you want to measure the max speed in feet/s or m/s, you will need a way to measure the robot's speed. Trial and error - use the code to assign one value to the speed controllers, and measure the actual speed. Then limit the speed controller to the closest value that you want. If you want some sort of more advanced, much more reliable, and all-around better solution, experiment with some sort of encoder - either the hall effect sensors or maybe an optical encoder to read actual speed off the drive system.

Team 668 02-02-2005 17:44

Re: How to make a max speed
 
Quote:

Originally Posted by steven114
Then limit the speed controller to the closest value that you want.

how would i limit the speed controller to the speed i want. what is the code for that.

devicenull 02-02-2005 17:54

Re: How to make a max speed
 
if (yourpwm > p2_wheel) yourpwm = p2_wheel;

Watch out, because our wheels go from 64-250, they don't actually hit 0


All times are GMT -5. The time now is 17:47.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi