0

We're complete beginners with Arduino and we're working on a project that moves a pointer based on a color sensor reading.

We used two servo motors each: one performs a specific task, the small servo works pretty fine. The problem is with the larger one.

We used this servo motor model: (towardpro MG996R), Arduino Uno and a color sensor. Because the motor is large we connect it to a 9 V power supply.

But when we run the code it just vibrates in place and the arm won't move :(

Is there anything else we need to add to the circuit like a resistor or some thing?

#include <Servo.h>
Servo largeServo;

void setup() {
  largeServo.attach(6);
  largeServo.write(0); 
}

void loop() {
  largeServo.write(0);
  delay (2000);
  largeServo.write(30);
  delay (2000);
  largeServo.write(60);
  delay (2000);
  largeServo.write(90);
  delay (2000);
}
  • Does the small servo perform well with the very same code on the same pin? If so, chances are there is something wrong with the large servo, or with its power supply. – Edgar Bonet Apr 28 '17 at 15:55
  • yes, the code is perfectly fine with the smaller one , – user33243 Apr 28 '17 at 15:58
  • but if the problem with the battery how would i know ? – user33243 Apr 28 '17 at 16:01
  • "9V power supply" as in 9V PP3 battery...? – Majenko Apr 28 '17 at 16:06
  • 1
    No, not more voltage. You need something capable of delivering more current. A 9V battery is not suitable for driving motors. They belong in smoke detectors and maybe a transistor radio. Get 3 or 4 AA or AAA batteries and things will go much better. – Delta_G Jun 3 '17 at 3:02
1

As already suggested in the comments you need a more powerful current source than your battery.

No device work purely on Voltage, they all operate on Power (watts) or, if you prefer, on a combination of Voltage and Current (ampere).

You are feeding 9V into your beefy motor, but the amount of current your battery can provide is pretty limited due to the battery internal resistance and limited capacity.

Replace the battery with a proper power source capable to deliver 10W or more (1+ ampere at 9 volts equals 9+ watts) and your motor will start to operate and it will also get warm while operating.

  • Please mind that theoretically putting a higher voltage will give more power. But that soms component can not resist higher voltages. The way to go is to take a supply with a voltage within the voltage range of the device. And to make sure it can supply more current as neccesary. (Not the other way around) – Paul Jun 3 '17 at 9:18
  • 1
    When applied to motors the voltage reflects on speed and current on torque, but if the motor jitters it's because it doesn't get enough current to overcome the windings inductance. So, while it's true higher voltage means more power, that's not going to solve the issue in this case. – Roberto Lo Giacco Jun 4 '17 at 11:16
  • Hmm interesting 10v 1a or 20v 0,5a is the same "power". But the first example has more torque and the second one more speed? My conclusion is still true, don't overvolt and be able to supply enough current. – Paul Jun 4 '17 at 22:09
  • That's correct Paul: higher voltage means you can change the magnetic field in the coils more quickly while higher amperage means you can create stronger magnetic fields. You don't have to exceed in voltage because the the internal windings have a resistance: provide too much voltage and you burn the windings. – Roberto Lo Giacco Jun 6 '17 at 12:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.