Help for a simple person with servos

Started by mjhall2961 December 12, 2010
Hello,
I am trying to move a servo depending on temperature, temperature range servo to one side until 60 deg C at 65 deg C servo to start to open, by 80 deg C servo open by about 20 deg motion. I can do the temp bit as its straight forward but I cant get the servo to turn consistently. Sorry if this is a stupid question. Any help appreciated.
Regards Martin

--- In b..., "mjhall2961" wrote:
but I cant get the servo to turn consistently.

Martin, I have written a robotics text book around the BX-24 and the Robodyssey Mouse. On my website I have provided a sample chapter for folks to see. It just so happens that the sample chapter is on programming servomotors. Perhaps it will help you. (You might want to skip through all the robot-specific stuff and get right to the code, but there may be some interesting things about servos and power that may interest you.)

You can find the sample chapter at http://www.basicxandrobotics.com. Then select "Samples and Reviews" from the menu bar. Then "Textbook Samples" and finally "Ch 11. Intro to Servos".

Hope this helps.
chris

I believe you need to get two models

Linear models seem OK

Y1=m1x1+b1

Degrees travel as a function of temperature

And

Y2=m2x2+b2

ms output to the computer as a function of degrees of travel

In other words equate y1 and x2 and substitute the first relation into
the second relation

Then you have the temperature as input to one equation that has one
unknown

Solve for y2 and use this as input to the cpu that makes a designated
pin either out put a frequency or pwm

By my recollection servos like between 1 and 2 ms for their full travel

This amounts to a servo rotation of about 180 degrees (always less)

See the jpeg I included

Numbers need double checking - I just shot from the hip

Richard

From: b... [mailto:b...] On Behalf
Of mjhall2961
Sent: Sunday, December 12, 2010 2:35 PM
To: b...
Subject: [BasicX] Help for a simple person with servos

Hello,
I am trying to move a servo depending on temperature, temperature range
servo to one side until 60 deg C at 65 deg C servo to start to open, by
80 deg C servo open by about 20 deg motion. I can do the temp bit as its
straight forward but I cant get the servo to turn consistently. Sorry if
this is a stupid question. Any help appreciated.
Regards Martin



Thanks
--- In b..., "Richard Friedrich" wrote:
>
> I believe you need to get two models
>
> Linear models seem OK
>
>
>
> Y1=m1x1+b1
>
> Degrees travel as a function of temperature
>
> And
>
>
>
> Y2=m2x2+b2
>
> ms output to the computer as a function of degrees of travel
>
>
>
> In other words equate y1 and x2 and substitute the first relation into
> the second relation
>
>
>
> Then you have the temperature as input to one equation that has one
> unknown
>
> Solve for y2 and use this as input to the cpu that makes a designated
> pin either out put a frequency or pwm
>
>
>
> By my recollection servos like between 1 and 2 ms for their full travel
>
> This amounts to a servo rotation of about 180 degrees (always less)
>
>
>
> See the jpeg I included
>
>
>
> Numbers need double checking - I just shot from the hip
>
>
>
> Richard
>
>
>
>
>
>
>
>
>
> From: b... [mailto:b...] On Behalf
> Of mjhall2961
> Sent: Sunday, December 12, 2010 2:35 PM
> To: b...
> Subject: [BasicX] Help for a simple person with servos
>
>
>
>
>
> Hello,
> I am trying to move a servo depending on temperature, temperature range
> servo to one side until 60 deg C at 65 deg C servo to start to open, by
> 80 deg C servo open by about 20 deg motion. I can do the temp bit as its
> straight forward but I cant get the servo to turn consistently. Sorry if
> this is a stupid question. Any help appreciated.
> Regards Martin
>
>
>

Thanks all working now
--- In b..., "chris_odom_georgeschool" wrote:
>
> --- In b..., "mjhall2961" wrote:
> but I cant get the servo to turn consistently.
>
> Martin, I have written a robotics text book around the BX-24 and the Robodyssey Mouse. On my website I have provided a sample chapter for folks to see. It just so happens that the sample chapter is on programming servomotors. Perhaps it will help you. (You might want to skip through all the robot-specific stuff and get right to the code, but there may be some interesting things about servos and power that may interest you.)
>
> You can find the sample chapter at http://www.basicxandrobotics.com. Then select "Samples and Reviews" from the menu bar. Then "Textbook Samples" and finally "Ch 11. Intro to Servos".
>
> Hope this helps.
> chris
>