Author Topic: hs-311 twitching  (Read 2939 times)

0 Members and 1 Guest are viewing this topic.

Offline greywanderer012345Topic starter

  • Robot Overlord
  • ****
  • Posts: 133
  • Helpful? 2
hs-311 twitching
« on: February 05, 2011, 04:33:59 PM »
I have searched the forums, and although there are many similar questions, I couldn't find the answer to mine. I'm building the $50 robot, and I'm modifying the servos now. I have already hollowed out where the pot is turned by the gears and removed the mechanical stop. When I send a 1.5ms signal every 20ms I am able to adjust the pot until the gears no longer rotate, but they still twitch, sometimes rotating twitchily in one direction and then another very slowly. The change in direction makes me think that it is not a problem with the pot position. I have no trouble with speed control or twitching when calling a different pulse length or adjusting the pot. Is this twitching normal? Should I just send no signal in order to stop the servos, since they rotate fine otherwise? or does this indicate another problem? I have a separate battery for the mcu and the servos. I am using the $50 robot schematic with hs-311 servos. I have not glued the pot yet, and this is holding me up from finishing the robot. Thanks.

Offline robots-in-brighton

  • Jr. Member
  • **
  • Posts: 9
  • Helpful? 1
Re: hs-311 twitching
« Reply #1 on: February 05, 2011, 07:50:40 PM »
In your test circuit have you connected both power supplies so that their grounds are common? Are the supplies regulated? Have you fitted noise filtering capacitors between the power lines?

Offline greywanderer012345Topic starter

  • Robot Overlord
  • ****
  • Posts: 133
  • Helpful? 2
Re: hs-311 twitching
« Reply #2 on: February 05, 2011, 09:00:11 PM »
In your test circuit have you connected both power supplies so that their grounds are common? Are the supplies regulated? Have you fitted noise filtering capacitors between the power lines?

Common ground: YES
Regulated Supply: 5v mcu - YES ; 4.8v servo - NO
Capacitors: I have the large and small capacitors suggested by admin, which I believe means that the signal power is through the regulator and large capacitor, and the servo power is direct to the servo.
More info: This happens with one or with two servos.

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: hs-311 twitching
« Reply #3 on: February 07, 2011, 11:21:18 PM »
Hi,

When I send a 1.5ms signal every 20ms I am able to adjust the pot until the gears no longer rotate, but they still twitch, sometimes rotating twitchily in one direction and then another very slowly.
Do you have an oscilloscope available?

Either your potentiometer gets shaken a bit by vibration or your 1.5ms source has got jitter.
Is your source x-tal controlled?

HS-311 has a dead band of 5µs, which means that your 1.5ms signal must have less than 0.3% jitter, or it will twitch.
With an RC clock, I don't think you will be able to avoid it.


Should I just send no signal in order to stop the servos, since they rotate fine otherwise?
That would be the easy solution, but you'll not have as effective braking while it's not getting a signal.
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

Offline greywanderer012345Topic starter

  • Robot Overlord
  • ****
  • Posts: 133
  • Helpful? 2
Re: hs-311 twitching
« Reply #4 on: February 08, 2011, 11:32:00 AM »
I'm controlling the pulse and delay similarly to how admin does in the photovore_v1 code, creating a loop of appropriate length. I don't know much about timers, but maybe using them would be better than relying on a code loop. Could interupts be getting triggered and throwing off the pulse or delay time? Right now I'm running at 1MHz. Maybe I should try running at 8MHz so that I can tweek the pulse to a much more exact length... Let me know what you think, and in the mean time, I'll try this out. Thanks for the suggestions.

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: hs-311 twitching
« Reply #5 on: February 08, 2011, 01:47:03 PM »
Hi,

Could interupts be getting triggered and throwing off the pulse or delay time?
Yes, if you have something interrupting.


Right now I'm running at 1MHz. Maybe I should try running at 8MHz so that I can tweek the pulse to a much more exact length...
That may help, but...
I'll try once more
Do you have an oscilloscope available?
Is your source x-tal controlled?
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

Offline greywanderer012345Topic starter

  • Robot Overlord
  • ****
  • Posts: 133
  • Helpful? 2
Re: hs-311 twitching
« Reply #6 on: February 09, 2011, 07:24:28 PM »
No Oscilloscope available. My equipment and experience are both extremely limited. I don't evcen know what x-tal is. Wikipedia says it's a rock band... lol.

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,944
  • Helpful? 99
Re: hs-311 twitching
« Reply #7 on: February 09, 2011, 08:14:44 PM »
Ok, here's a little help.

XTAL is the common abbreviation for a Crystal and is used as a stable oscillator time base.
 
Here some info:
http://en.wikipedia.org/wiki/Crystal_oscillator

This may help you in the near furture.
http://www.interfacebus.com/Engineering_Acronyms_X.html

Offline greywanderer012345Topic starter

  • Robot Overlord
  • ****
  • Posts: 133
  • Helpful? 2
Re: hs-311 twitching
« Reply #8 on: February 09, 2011, 10:30:01 PM »
My circuit is admin's 9V/4.8V dot schematic exactly, except that I'm using an atmega328p instead of the atmega8. I'm not using an external crystal.

 

SMF spam blocked by CleanTalk