BasicMicro - Forums

www.basicmicro.com
It is currently Mon May 21, 2012 8:40 pm

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Variable R/C Servo frame times
PostPosted: Fri Dec 16, 2011 4:18 pm 
Offline
Master

Joined: Tue Jun 22, 2010 1:15 pm
Posts: 203
Mostly cross-posted from an LM message:

I've mentioned and I'm sure others know about running servos from a desk power supply at lower voltage for initial tests in order to "weaken" or slow down servos so they don't destroy themselves.

In talking with a UK robotics friend, he says he varies the frame or refresh rate of his servos in order to control the stiffness of the "electronic spring" effect of R/C servos. 20 mS is normal frame time, if the frame time is lengthened to 25 mS, there is a noticeable "softening" of the servo. Up to 100 mS is often useful. He varies all of his servos times, not fixed by interrupt code in the uP.

My question,
Can we add variable frame time to BasicAtomPro to allow a choice of frame time? That shouldn't be too hard, assuming adequate memory time, and perhaps a handle for the parameter. Ideally it would modify groups of servos (or single servos), on the fly, at a minimum even just an initial, one-time setting of the frame time would be useful.

Actually, the benefits go further then just start-up. Making a servo "softer" makes for much more complaint walking, moving arms, etc. as well.

Alan KM6VV

_________________
Visit:
http://groups.yahoo.com/group/SherlineCNC/
http://tech.groups.yahoo.com/group/HexapodRobotIK/


Top
 Profile  
 
 Post subject: Re: Variable R/C Servo frame times
PostPosted: Wed Dec 21, 2011 11:54 am 
Offline
Site Admin
User avatar

Joined: Thu Mar 01, 2001 11:00 am
Posts: 903
Location: Temecula, CA
HSERVO is timer interrupt driven. The 32 servos are in groups of 8 on the Pro40 and Arc32. On the Atom24/28 they are in groups of 4. Each group has 2.5 or 5ms(3687 versus 3694) to produce their pulses and then the next group is started. To change the refresh rate the group times would have to change. This would change all the servos refresh times. There is no way to change individual servo refresh rates with the current hservo system. I'm sure a complete rewrite could do it but instead of 1% of power it would probably be 10s of % in processor power to handle the non-syncronized servo pulses.

The software servo commands could be changed to do this but in that case I'd just suggest using pulsout to create your servo pulses instead and then you can use whatever refresh rate you want.

Also digital servos don't work this way so there would be no noticable effect when using them.

_________________
Tech Support
Basic Micro - Robotic Technology Evolved


Top
 Profile  
 
 Post subject: Re: Variable R/C Servo frame times
PostPosted: Wed Dec 21, 2011 12:12 pm 
Offline
Master

Joined: Tue Jun 22, 2010 1:15 pm
Posts: 203
I can see it's quite complicated.

How about ALL servos, or all in one group?

I haven't proven it yet anyway, although the source is quite reliable.

Alan KM6VV

_________________
Visit:
http://groups.yahoo.com/group/SherlineCNC/
http://tech.groups.yahoo.com/group/HexapodRobotIK/


Top
 Profile  
 
 Post subject: Re: Variable R/C Servo frame times
PostPosted: Thu Dec 22, 2011 2:25 pm 
Offline
Site Admin
User avatar

Joined: Thu Mar 01, 2001 11:00 am
Posts: 903
Location: Temecula, CA
On the AtomPro24/28 modules you can set HSERVO_PERIOD con ######. The default value is 64000 which gives 4ms group periods for a total opf 20ms refresh rate(5 servo groups).

HSERVO_PERIOD is not defined for teh ARC32 in the current release but I did add it so it will be in the next release. Default value is 50000 for 2.5ms per servo group with 8 groups for 20ms refresh rate.

Note however the maximum value for either is 65535. On the 24 and 28 modules this gives a maximum refresh time of only 20.4ms which isn't much of a stretch. Making it support anything higher though would require a major change which isn't something I can do right now or soon.

The ARC32 will support upto a 26ms refresh period.

_________________
Tech Support
Basic Micro - Robotic Technology Evolved


Top
 Profile  
 
 Post subject: Re: Variable R/C Servo frame times
PostPosted: Thu Dec 22, 2011 4:51 pm 
Offline
Master

Joined: Tue Jun 22, 2010 1:15 pm
Posts: 203
Thanks Nathan, the 26 mS of the ARC32 is probably a good number to start with. When will it be available? (no rush).

Alan KM6VV

_________________
Visit:
http://groups.yahoo.com/group/SherlineCNC/
http://tech.groups.yahoo.com/group/HexapodRobotIK/


Top
 Profile  
 
 Post subject: Re: Variable R/C Servo frame times
PostPosted: Mon Dec 26, 2011 11:11 am 
Offline
Site Admin
User avatar

Joined: Thu Mar 01, 2001 11:00 am
Posts: 903
Location: Temecula, CA
probably the first or second week in january.

_________________
Tech Support
Basic Micro - Robotic Technology Evolved


Top
 Profile  
 
 Post subject: Re: Variable R/C Servo frame times
PostPosted: Tue Dec 27, 2011 11:08 am 
Offline
Master

Joined: Tue Jun 22, 2010 1:15 pm
Posts: 203
Thanks Nathan!

Merry Christmas!

Alan KM6VV

_________________
Visit:
http://groups.yahoo.com/group/SherlineCNC/
http://tech.groups.yahoo.com/group/HexapodRobotIK/


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

phpBB SEO