Go Down

Topic: Servo help (Read 2182 times) previous topic - next topic

lost_and_confused

I have finally got 4 servo motors.

5 volts.

http://www.ebay.com.au/itm/281080712509?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649

(at a cheaper price)

Anyway, got them, got the SERVO sketch and tried one.
External power added.

NOTHING.

It uses pin 9 as the output....  So that is the second pin (from the right) on the second row (from the left) looking at the arduino with the USB to the LEFT.

Correct?

The 3 wires are RED, BROWN and ORANGE.

Lovely how they aren't explained what is what.

From what I gather: 
BROWN - Power, NEGATIVE.
RED - Power, POSITIVE. (5 volts)
YELLOW - Signal.

Anyone please?


zoomkat

Quote
Anyone please?
Please what? What are you using for an external power supply and how do you have it wired? What code are you using?
Google forum search: Use Google Search box in upper right side of this page.
Why I like my 2005 Rio Yellow Honda S2000  https://www.youtube.com/watch?v=pWjMvrkUqX0

keeper63

Anyway, got them, got the SERVO sketch and tried one.
Are we to assume you mean the "sweep" sketch?

External power added.
Did you connect the Arduino's ground to the servo/external supply ground?

From what I gather: 
BROWN - Power, NEGATIVE.
RED - Power, POSITIVE. (5 volts)
YELLOW - Signal.
That should be correct.
I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

lost_and_confused

(Strange, I am not getting notifications of replies.)

Yes, the SWEEP sketch.

The external power supply is connected to the .....   external power connector of the arduino.
So wouldn't the two power supply grounds be connected?

Oh, I also tried moving the control line around to adjacent pins.  Still nothing.


Cactusface

#4
Dec 29, 2014, 08:38 pm Last Edit: Dec 29, 2014, 08:40 pm by Cactusface
Hi,
       I don't think that is pin 9! But again you don't say which Arduino your using??  Don't seem to be a Uno or Nano, with a pin-9 in that position.

Quote
It uses pin 9 as the output....  So that is the second pin (from the right) on the second row (from the left) looking at the arduino with the USB to the LEFT.  Correct?
All Arduino pins are usually very clearly marked and numbered, no need to guess!! The 3 cables are usually BLK/BWN for GND, RED for 5v, and the signal Orange/Yellow.

If you code is OK? and we can't see it, then the pin number is wrong, or you have a wiring problem?

Do not power the servo from the Arduino, use a seperate power supply or batteries, do connect both GND's

Quote
(Strange, I am not getting notifications of replies.)
It seems there's a fault with the system, no one is getting any notifications at the moment, or so I'm told...

Hope it helps, Regards.

Mel.


Open your mind! But not too far, your brains might fall out.
Also like Photography, model building and my 300+ Cacti and Succs.

zoomkat

Quote
The external power supply is connected to the .....   external power connector of the arduino.
The servos need an external power supply like below, not thru the arduino.

Google forum search: Use Google Search box in upper right side of this page.
Why I like my 2005 Rio Yellow Honda S2000  https://www.youtube.com/watch?v=pWjMvrkUqX0

RParker

Just looked at one of my circuit projects,, It might be the pulses should be in the range of
0 to 1 or 2 ms.

so,,
repeating 50 to 100 times per second may be something like right.

I'd have to get out the scope to verify things,,  (don't know if it works now).

Repeating more quickly has the servo respond quickly, repeating more slowly might save power/cpu time.

JimboZA

#7
Dec 31, 2014, 09:18 pm Last Edit: Dec 31, 2014, 09:21 pm by JimboZA
It might be the pulses should be in the range of
0 to 1 or 2 ms.

so,,
repeating 50 to 100 times per second may be something like right.

Not quite: 1 to 2ms, with 1.5 as "neutral" or 90 degrees, and yes 50Hz is the normal repeat. You can change the repeat by changing the value of REFRESH_INTERVAL in servo.h from its standard 20ms. Pic attached is a scope trace from a servo attached with the default pulse of 1.5ms at 50Hz.
Johannesburg hams call me: ZS6JMB on Highveld rep 145.7875 (-600 & 88.5 tone)
Dr Perry Cox: "Help me to help you, help me to help you...."
Your answer may already be here: https://forum.arduino.cc/index.php?topic=384198.0

Go Up