Question:
can i use encoders to control the speed of robot...?plz help me or is their any other method to control speed?
2008-12-29 03:02:38 UTC
i am doing a line following robot.my robot should cross a small hill made of plywood..the robot speed should be controlled in such a way that it takes less time to go up the hill and take more time to come down the hill.can any one tell me how to control the speed?

can i use encoders to control the speed or is their any other method to control speed.please help me soon..........
Four answers:
robotfan_99
2008-12-29 10:19:27 UTC
Actually, you change the speed of your robot by means of the power your controller is applying to robot motors. This is normally done by Pulse Width Modulation (PWM), more power, more speed.



We can use the encoder to measurement the actual speed of the robot e.g. counting the pulses by second, and implement a control loop to control that speed, normally a simple P loop (Proportional Loop) works fine.



You can use Dead-Reckoning to compute the distance traveled by your robot. Dead-Reckoning uses the pulses of the encoder to compute distance traveled and even orientation of the robot and it is easily implemented.



It is a little bit long to type here but you can check up the following paper, just read the first 5 pages:



http://www.cs.biu.ac.il/~galk/teaching/s...



Basically the encoder pulses will depend on the wheel diameter, resolution of the encoder (number of counts per turn) and gear ratio between the encoder and the wheel.



So, to make what you want using only encoders you have to know the distances involved and program your robot to travel at certain speed up hill and in another speed down hill, measuring the distance traveled by means of the encoder counts and controlling the speed also by them.



Your program has to be "multitasking" since you have to counting encoder pulses, control speed, measure speed, produce PWM signal, and following a line, which could be too much for an only task.



If you specific your robot plaform, I can give you more details about what to do.
?
2016-05-22 04:15:57 UTC
Mechanical control seems like a bad idea, but there are no fundamental reasons not to do so. If I am on a bike or a truck I don't have the forward acceleration either, but that does not cause a lot of accidents as far as I know. In a dangerous situation you will either apply the brakes or the steering wheel while stepping on the accelerator at 77 is necessary in maybe one in a million cases, because acceleration on that speed is not much anyway except in a formula one car. I cant envision a situation where it will be necessary to go from 77 to 85 in half a second to prevent an accident, even when trying to pass by a truck it is much quicker and safer to hit the brakes and steer behind the truck if there is traffic coming towards you. So I don't agree with the statement in previous answers that the lack of accelerating power will cause more accidents. I think electronic maximum speed control is really easy with the technology we have today and safe also. To my opinion cars have too many mechanical parts still. Probably with the advent of electrical cars a lot of these parts and even brakes will be no longer necessary, because it is possible to brake using the electrical force (Lorentz force), which will safe a lot of energy and wear on the parts. Also there could be an electrical engine (and brake) for each wheel so there is no longer any need for axes or other mechanical transmission devices. The classical engine can then be replaced by a small generator that charges the car batteries a generator can run at optimal speeds and load and is much more cost efficient. The electrical engines will be computer controlled so depending on the program they can be set to any maximum speed. That way the need for speed control will diminish and be replaced by checking the cars setup now and then by the police. Of course when a car is still speeding they will still have to uphold it, but they can give a very big fine or impose the vehicle when the original setup has been replaced. The freedom arguments about the freedom to choose a fast car are nice, but government is about the limitation of freedom to the benefit of the common good, which is in this case less accidents, lesser fuel consumption, smoother traffic because of uniform speeds and less air pollution.
goober
2008-12-29 03:40:41 UTC
You could use an encoder as an inclinometer to measure the angle of the ground and adjust the motor speed accordingly. Hang a pendulum from it so that you can measure the angle. You may need some damping on the pendulum to keep it from reacting to small accelerations during normal motion. Alternatively you could provide the damping in the robot's software if it will have software. A potentiometer with a pendulum would also work as an encoder provide its own damping and give you an analog output if you are not using a software driven system.
zoot661
2008-12-30 00:23:33 UTC
As your robot is line following, you do not need encoders to control the speed, you just need an open loop PWM controller



PWM works by turning your motor drive outputs on for varying proportions of a fixed time depending on how fast you want to go



The actual base time for your PWM will depend on our motor time constant, but lets assume that it is 100mSec.



You can therefore arrange to have 10 speeds by having a base scan time of 10 mSec and then adjust the motor on time in 10 mSec steps depending on how fast you want to go



You would use the signals from the white line sensors to slow down the appropriate motor if you start to cross the line



You will need some sort of inclinometer if your speed needs to be gradient dependant



Your software does not need to be multitasking, just a simple timer driven processing loop



scan inputs

process inputs

drive outputs

wait for timer


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...