Servo motor

hi there,

I am having a problem driving a servo motor using ULN2003a chip. When i attach motor using attach function with digital pin 11 of my mega8, the motoe starts moving at a low speed while i have not given any command of rotation such as write function. Is attaching motor to a specific causes its rotation? What could be the problem?

Thanks in advance :slight_smile:

Did you modify this servo yourself? If so then you'll recall that you replaced the existing potentiometer with two resistors; the issue now is that those two resistors aren't perfectly balanced.

Instead of counting "90" as stationary you might need to use "89", "91", etc. until it stops.

I am having a problem driving a servo motor using ULN2003a chip.

Unless you have some weird setup, I think that isn't the way to control a servo.

ULN2003 is a darlington transistor pair which is a current amplifier and I think it can be used to drive servo motor. I have connected one pin of servo to VCC and the other to OUT1 of ULN and INPUT1 of ULN gets commands from pin 11 of mega8. I do not use any POT or Resistor for it. Is it weird to connect it like this? Do you have a better setup with/without ULN?

oops! I had a deep misunderstanding of difference between DC motors and servos! What I was doing was driving a DC motor using servo functions! I am going t buy a servo and test it. You were right, It was a weird setup :))