Go Down

Topic: SERVOS WITH ARDUINO 328 (Read 1 time) previous topic - next topic

logic_deepak

Mar 29, 2012, 06:21 pm Last Edit: Mar 29, 2012, 08:11 pm by logic_deepak Reason: 1
im planning to make a dog robot. dat uses 8 servos for walking .    how many maximum servos can i run using "arduino Duemilanove w/ ATmega328"    ?               i heard dat it has 3 internal timers!!  and each timer runs 2 servos and a total 6 servos can b run using atmega328  .is dat true?      :~ pls try to clarify my doubt.       thanks a lot.

AWOL

#1
Mar 29, 2012, 07:32 pm Last Edit: Mar 29, 2012, 07:41 pm by AWOL Reason: 1
Why are you shouting?
What is wrong with your punctuation keys?
Have you read the notes for the Servo library, and if not, why not?

logic_deepak

im really sorry sir.
i read the servo library. but still pls explain me the "internal timer" concept

AWOL

Quote
but still pls explain me the "internal timer" concept

Why, do you think it is important?
That's what the library is there for, to hide the complexity from you so you don't need to worry about it.

logic_deepak

im using Tower pro SG90 micro servo.
but if i give it a command to stay at angle 90degrees , it jus fluctuates from 0 to 90 degrees..\
wat ever angle i set, it jus keeps moving from dat angle to zero continously..

if i use HXT900 servos  i didnt face dis problem..
can u pls help me with a solution..
tanx a lot!

AWOL


logic_deepak

#include <Servo.h>
Servo myservo; 
void setup()
{
  myservo.attach(6);   
}
void loop()
{
myservo.write(90); }                               


this is my code to stay at 90 degrees,  but my servo keeps moving between 0 to 90 degrees  continously...

AWOL

My guess is your processor is resetting because of the load placed on the supply by the servo.
A print in setup would show some more evidence.

logic_deepak

but wen i use my hxt900 servos  i didnt face this problem...


logic_deepak

so wat do u suggest me to do now?

AWOL

I suggest you read reply #7.
But that's just a suggestion.

logic_deepak

okey    can u pls be more clear about that point?

AWOL

Setup is called just once per reset, so if a print in setup is seen more than once, your processor is resetting.

logic_deepak

i tried it .
i found    my processor is not resetting, its working normally .
but i still have  the problem

Go Up