Author Topic: help - "magic numbers"  (Read 3715 times)

0 Members and 1 Guest are viewing this topic.

Offline byuriTopic starter

  • Jr. Member
  • **
  • Posts: 27
  • Helpful? 0
help - "magic numbers"
« on: January 29, 2009, 03:36:55 PM »
hello, i have atmega168 and servo hs-311. i look on "magic numbers" tutorial and i have some questions..
to stop servo from spinning i need to send 35 to the servo
[ 23/0.992*(time in ms) = numbers of cycles ]
but in my case something wrong. i cant stop the servo, the closet value to stop is 44 and 45, (44 spin slowly to left - 45 spin slowly to right).
anybody know whats wrong? and which value i need to use instead of 25-35-44?

Offline HDL_CinC_Dragon

  • Supreme Robot
  • *****
  • Posts: 1,261
  • Helpful? 5
Re: help - "magic numbers"
« Reply #1 on: January 29, 2009, 04:04:11 PM »
Is this after or before modding the servo?
United States Marine Corps
Infantry
Returns to society: 2014JAN11

Offline byuriTopic starter

  • Jr. Member
  • **
  • Posts: 27
  • Helpful? 0
Re: help - "magic numbers"
« Reply #2 on: January 30, 2009, 02:41:01 AM »
same, i test it before modding and after. right now i have new servo and modify servo. and 44 spin new servo to middle (90 deg) position.

Offline cosminprund

  • Robot Overlord
  • ****
  • Posts: 284
  • Helpful? 8
Re: help - "magic numbers"
« Reply #3 on: January 30, 2009, 04:30:38 AM »
How did you mod the servo, did you glue the pot are did you replace it with two resistors?

If you glued the pot then the pot moved a bit and what used to be center is no longer center. Or the temperature in the house changed.
If you used two resistors then your resistors are not of equal value. I had the same problem (replaced the pot with two resistors) and that's exactly how it manifested, couldn't get the center point! I replaced the two resistors with an 25-turn mini-pot and voila, I now have perfect center point;

Offline byuriTopic starter

  • Jr. Member
  • **
  • Posts: 27
  • Helpful? 0
Re: help - "magic numbers"
« Reply #4 on: January 30, 2009, 04:45:56 AM »
i glued the pot. but like i said , i have another unmodified servo, and i have the same problem, 90 deg is not on 35-value

Offline cosminprund

  • Robot Overlord
  • ****
  • Posts: 284
  • Helpful? 8
Re: help - "magic numbers"
« Reply #5 on: January 30, 2009, 05:02:57 AM »
Can you unglue it? Send the servo an constant "35" (if that's what you have for "center") and slightly turn the pot until the servo stops moving. Re-gule the pot. If that fails maybe it's time to get one of those tiny 25-turn pots. Can't find the post where those were discussed to put the link here...

Offline byuriTopic starter

  • Jr. Member
  • **
  • Posts: 27
  • Helpful? 0
Re: help - "magic numbers"
« Reply #6 on: January 30, 2009, 05:18:07 AM »
Can you unglue it? Send the servo an constant "35" (if that's what you have for "center") and slightly turn the pot until the servo stops moving. Re-gule the pot. If that fails maybe it's time to get one of those tiny 25-turn pots. Can't find the post where those were discussed to put the link here...

maybe i make mistake when i glue the pot, but what the reason that new unmodified servo have the same "bug"?

 


Get Your Ad Here