Author Topic: how to stop servo motor  (Read 3873 times)

0 Members and 1 Guest are viewing this topic.

Offline ITZPRABATopic starter

  • Beginner
  • *
  • Posts: 1
  • Helpful? 0
how to stop servo motor
« on: December 20, 2010, 06:50:46 AM »
hi friends...i am using a servo motor (CLOCK WISE/PULSE TRAVELLING 1500 TO 1900usec).. the aim is to stop servo motor when a particular value is sensed by FSR...just am trying to simulate in matlab....please help me../

thanks

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,944
  • Helpful? 99
Re: how to stop servo motor
« Reply #1 on: December 20, 2010, 04:16:18 PM »
Send the same width pulse as was sent when sensed by FSR.

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: how to stop servo motor
« Reply #2 on: December 21, 2010, 04:55:15 AM »
Hi,

Send the same width pulse as was sent when sensed by FSR.
That will only work if the servo is moving in very small "steps" like this:

Code: [Select]
ServoWidth=1500
While FSR < chosen value and ServoWidth<1900
  Increment ServoWidth, 5  ' add a small step
  Output ServoWidth
  Read FSR
EndWhile
' The pulse width is now be the value that has to be repeated.
Output ServoWidth   ' to stop in that position (this signal needs to be repeated)
Whether it has to be "<" or ">" with the FSR, depends on whether the resistance of it goes up or down in the actual application of course.
If this method isn't used, the servo pulse will be whatever it was sent during it's entire travel.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives