[chbot] servo driving & PID
Richard Jones
rjtp at ihug.co.nz
Tue Aug 18 05:29:49 BST 2009
Hi Charles,
Sorry you will not be with us this evening, and thanks for the heads up on
servo driving, it does look a very useful approach. I guess it would extend
to 18 servos?
I was hoping to discuss with you cascading PID controls for position, speed
and torque, and getting the fixed point maths just right.
Maybe next time if the micromouse is not working by then!
Richard
On Tue, 18 Aug 2009 14:16:14 +1200, Charles Manning
<manningc2 at actrix.gen.nz> wrote:
> Hi All
>
> I can't make the robotics meeting tonight. A pity since I was hoping to
> discuss RC servo driving etc in the legged walker discussion.
>
> I've been dabbling with RC driving with an AVR and have developed some
code
>
> which can drive up to 16 RC servos simultaneously (though at this stage
> only
> 8 channels are in the checked in code).
>
> Code at http://github.com/cdhmanning/avrprojects/
>
>
> The code allows you to "set and forget" and all the servo stuff is then
> driven
> in the background by an interrupt.
>
>
>
> The main functions to call are
>
> servo_Initialise(); Initialise the whole party
>
> servo_Set(portPin,time)
> portPin is the pin number on PORTB. ie. 1 means controlling a servo on
> PORTB1.
> time is the pulse width in 10s of microseconds. 100 means full
> anti-clockwise,
> 200 means full clockwise.
>
> There is no delay in the functions themselves, so you can do things like:
>
> //Set servos 0,1,2 to all anti-clockwise.
> servo_Set(0,100);
> servo_Set(1,100);
> servo_Set(2,100);
>
> // do other stuff
>
> // Set servo 0 to anti-clockwise,servo 1 to middle, servo 2 to
clockwise
> servo_Set(0,100);
> servo_Set(1,150);
> servo_Set(2,200);
>
> This should enable pretty simple gait control.
>
> Have fun
>
> Charles
>
>
> _______________________________________________
> Chchrobotics mailing list Chchrobotics at lists.linuxnut.co.nz
> http://lists.ourshack.com/mailman/listinfo/chchrobotics
> web site: http://kiwibots.org
> Meetings Dates:
> Tue 18 August 2009 6.30pm
> Tue 20 October 2009 6.30pm
> Tue 15 December2009 6.30pm
> When replying, please edit your Subject line to reflect new content.
More information about the Chchrobotics
mailing list