Society of Robots - Robot Forum

Software => Software => Topic started by: pusghatole on December 16, 2008, 09:53:12 PM

Title: Controlling Servos for 20 degree motion
Post by: pusghatole on December 16, 2008, 09:53:12 PM
Hi all,

I am making a bipedal robot and I am using HS-311 servo from Hitec. Now this servo needs to be programmed to get a 20 degree motion from the starting point and i need to hold this servo in the same position for some amount of time say 2 sec. I am not able to write any code for this motion...can anybody please help.... or can anyone suggest some site...where i can get this.... I am using Atmega32 microcontroller...plz its urgent... :'(
Title: Re: Controlling Servos for 20 degree motion
Post by: bulkhead on December 18, 2008, 02:29:28 AM
Some info here: http://www.societyofrobots.com/actuators_servos.shtml#control (http://www.societyofrobots.com/actuators_servos.shtml#control)

In your case you need to experimentally verify what pulse duration (between 1 - 2ms) will result in the "start point", and also what pulse duration will result in the "start point + 20 degrees".  The code would initially send out the pulse for the start position, then send out the pulse duration for the next position (keep sending it for 2 sec).

Read up on "PWM" for servo control.