Go Down

Topic: servo is not behaving (Read 677 times) previous topic - next topic

vinceherman

Awesome.  I can see the image on that one.  No idea why I could not on reply 9.
Still no info from you on the brand and model of your servos.
The pic shows you powering the servos from a 9v transistor battery.  These are mostly useless for powering anything other than a transistor radio.  You can expect a large voltage drop once you try to pull the amount of current 5 servos are going to draw.
You had mentioned earlier that you had 8 1.5v batteries.  My math says that is 12v.

What servos do you have.
How are you powering them?  8 1.5v batteries?  What kind of batteries?
Do you have the ground from the arduino connected to the ground from the servos? (hint, the pic does not show this)

SlimyCheese

I have written code to move the servo, no servos move now
Code: [Select]

#include <Servo.h>

Servo TestServo;

void setup() {
  // put your setup code here, to run once:
TestServo.attach(3);
}

void loop() {
  // put your main code here, to run repeatedly:
TestServo.write(0);
delay(1000);
TestServo.write(10);
delay(1000);
TestServo.write(20);
delay(1000);
TestServo.write(30);
delay(1000);
TestServo.write(90);
delay(1000);
TestServo.write(120);
delay(1000);
TestServo.write(180);
}

vinceherman

You have been asked multiple times for information that only you know.
You have been VERY unwilling to provide answers.

What servos do you have.
How are you powering them?  8 1.5v batteries?  What kind of batteries?
Do you have the ground from the arduino connected to the ground from the servos? (hint, the pic does not show this)

slipstick

I have written code to move the servo, no servos move now
Sorry to hear that. Maybe the servos you won't tell us about don't work with the batteries that you won't tell us about or the connections are wrong because that code is fine.

I suppose you do realise that you have to load the code into the Arduino, just writing it isn't enough?

Steve

SlimyCheese

Here is the link to the amazon product
https://www.amazon.com/gp/product/B007R9TS3C/ref=oh_aui_detailpage_o00_s00?ie=UTF8&psc=1

You have been asked multiple times for information that only you know.
You have been VERY unwilling to provide answers.

What servos do you have.
How are you powering them?  8 1.5v batteries?  What kind of batteries?
Do you have the ground from the arduino connected to the ground from the servos? (hint, the pic does not show this)
sorry about not providing information, I have dont use the forum very often.

no, the Arduino does not have a common ground with the servos,I am powering the servos with 8 1.5 volt energizer nonrechargable batteries.

SlimyCheese

Awesome.  I can see the image on that one.  No idea why I could not on reply 9.
Still no info from you on the brand and model of your servos.
The pic shows you powering the servos from a 9v transistor battery.  These are mostly useless for powering anything other than a transistor radio.  You can expect a large voltage drop once you try to pull the amount of current 5 servos are going to draw.
You had mentioned earlier that you had 8 1.5v batteries.  My math says that is 12v.

What servos do you have.
How are you powering them?  8 1.5v batteries?  What kind of batteries?
Do you have the ground from the arduino connected to the ground from the servos? (hint, the pic does not show this)

I had to use the 9 volt battery since that was the only battery I found on Circuits.io to show a battery.

no, My arduino does not have a common ground with the servos.

the batteries are 8 1.5 volt energizer batteries.

vinceherman

#21
Jun 21, 2017, 07:19 pm Last Edit: Jun 21, 2017, 07:25 pm by vinceherman
Having seen the amazon link that you posted, I can see this model information.

Google tells me that this is listed at Sparkfun, where much technical information is available.

Like
Voltage: 4.8-6.0 Volts

You need to re-think that 12v battery you are using to power the servos.

And you must have a common ground between the servos and the arduino.

Here is a pic I frequently use to show good wiring.  I added a red arrow to point to the wire that provides the common ground.


SlimyCheese

Having seen the amazon link that you posted, I can see this model information.

Google tells me that this is listed at Sparkfun, where much technical information is available.

Like
Voltage: 4.8-6.0 Volts

You need to re-think that 12v battery you are using to power the servos.

And you must have a common ground between the servos and the arduino.

Here is a pic I frequently use to show good wiring.  I added a red arrow to point to the wire that provides the common ground.


Why do you need a common ground to the arduino? Just wondering.

Delta_G

So they will both have the same voltage reference.

Voltage is like height. You can't tell me how high a hill is unless I tell you where to measure from. Maybe I want to know the height above the ground around it. Maybe I want to know the height from sea level. You have to have a reference point for 0. Same with voltage.  And if the two things don't have the same ground reference, then thy might not agree on what 5V actually is. What the Arduino calls 5V might look to the servo like only 2.  And that's obviously not going to work.

In general, with electronics, you must always connect the grounds.
If at first you don't succeed, up - home - sudo - enter.

SlimyCheese

Sorry to hear that. Maybe the servos you won't tell us about don't work with the batteries that you won't tell us about or the connections are wrong because that code is fine.

I suppose you do realise that you have to load the code into the Arduino, just writing it isn't enough?

Steve
[/quote

I have uploaded the code to the Arduino, They wont move

SlimyCheese

Having seen the amazon link that you posted, I can see this model information.

Google tells me that this is listed at Sparkfun, where much technical information is available.

Like
Voltage: 4.8-6.0 Volts

You need to re-think that 12v battery you are using to power the servos.

And you must have a common ground between the servos and the arduino.

Here is a pic I frequently use to show good wiring.  I added a red arrow to point to the wire that provides the common ground.


I have connected the arduino to ground but the problem is still apparent.

vinceherman

Time to take things apart.
Like Paul suggested in reply #5, use just 1 servo.
Power the servo from an appropriate source in the proper voltage range.  NOT 12v. 4.8-6v.  That would be 4 1.5v batteries.
Connect the grounds.
Write a simple sweep or similar test sketch.

If it does not behave as expected, post code, a wiring diagram and a description of what was expected and what actually happens.

Do you have any other servos?  It is entirely possible that when you were powering then with 12v, double their rated voltage, that you damaged them.

SlimyCheese

Time to take things apart.
Like Paul suggested in reply #5, use just 1 servo.
Power the servo from an appropriate source in the proper voltage range.  NOT 12v. 4.8-6v.  That would be 4 1.5v batteries.
Connect the grounds.
Write a simple sweep or similar test sketch.

If it does not behave as expected, post code, a wiring diagram and a description of what was expected and what actually happens.

Do you have any other servos?  It is entirely possible that when you were powering then with 12v, double their rated voltage, that you damaged them.

Ok I will try that today

SlimyCheese

#28
Jun 22, 2017, 04:25 pm Last Edit: Jun 22, 2017, 05:39 pm by SlimyCheese
Here ill note the servos that wont turn:
Pin 3 Servo
Pin 9 Servo
Pin 10 Servo

here is my code:

Code: [Select]

#include <Servo.h>

Servo TestServo;

void setup() {
  // put your setup code here, to run once:
TestServo.attach(9);
}

void loop() {
  // put your main code here, to run repeatedly:
TestServo.write(0);
delay(1000);
TestServo.write(10);
delay(1000);
TestServo.write(20);
delay(1000);
TestServo.write(30);
delay(1000);
TestServo.write(90);
delay(1000);
TestServo.write(120);
delay(1000);
TestServo.write(180);
}


My Wiring is the same except that I added a common ground.

What I expected the code to do was write to the servo and move to those positions.
What it did was not move at all, and prooduce a humming sound

vinceherman

I don't see the code.
You mention the behavior of several servos.  I thought that you were going to try a single servo.

With a single servo attached to the arduino, can you get a test sketch like  sweep to make a servo move as expected?

If some of your servos don't work, or some of the pins don't work, you might have damaged things when you were powering the servos with 12v.

Go Up