I'm trying to charge a simple servo that only has + and - pins. Usually I would connect it's - pin to the ground and + pin to the digital output from Arduino. This works, but the servo turns weakly and can be stopped by hand. If i connect the servo directly to the battery or to 3.3 pin from the Arduino it turns strongly and i cannot stop it.

I tried an op-amp amplifier and a PMOS transistor in order to let the servo get power from 3.3V or the battery, but didn't work out.

Anyone has already did something similar and can share with me his/her design?

----- edit: this is the servo i'm talking about. https://solarbotics.com/product/gm20/

----- update: Now that I have worked on more projects, I think this kind of task should be done through an H Bridge as explained here: http://www.instructables.com/id/H-Bridge-on-a-Breadboard/ I tried it (obviously for another project) and it worked like a charm!

  • \$\begingroup\$ For now stop directly connecting the servo to your Arduino. Let's make sure you do right things before you kill it. \$\endgroup\$
    – jippie
    May 12 '13 at 8:53
  • \$\begingroup\$ Please add a datasheet or at least a picture of your servo. Edit your question, hit Ctrl-M and add a circuit diagram of how you are connecting things together. \$\endgroup\$
    – jippie
    May 12 '13 at 8:54
  • \$\begingroup\$ If you use '@jippie' in a comment, I will be notified. \$\endgroup\$
    – jippie
    May 12 '13 at 8:55
  • \$\begingroup\$ I don't think you're using the word "servo" correctly, What is sounds like you have is a motor or some sort of actuator. \$\endgroup\$ May 12 '13 at 10:54
  • 1
    \$\begingroup\$ @himura - Servo implies there is some feedback mechanism involved. A motor is not a servo, though it can be one part of a servo. Anything that is open-loop is not a servo. servo (plural servos) A servomechanism or servomotor. \$\endgroup\$ May 13 '13 at 2:36

That's not a servo, that's a straight up DC motor. Also @jippie's comment wasn't about burning out your motor, rather your Arduino.

I'm not sure what you mean by "Charging" it. If you want to control it in an on/off mode using your Arduino you can use the circuit below:


simulate this circuit – Schematic created using CircuitLab

The nice thing about this circuit is that you can drive higher voltage motors with it too. The PMOS is the ZXM part. If you want to get another PMOS make sure it's VGS is about 1/3 to 1/2 of your motor voltage (in this case 3.3V) and that it can handle 30%-50% more current than your motor needs. The NMOS is used to drive the PMOS since your motor voltage might be higher than 3.3V -- for some other use case. The only thing when selecting the NMOS is making sure it is rated for higher than your motor voltage and that it's VGS is less than 2V (since you are driving it from a 3.3V Arduino).

The diode is to protect your PMOS and your circuit from your motor's emf induced voltage.

  • \$\begingroup\$ Thanks, I'll try it today. I hope I can find the right PMOS and NMOS \$\endgroup\$
    – himura
    May 13 '13 at 1:47
  • \$\begingroup\$ Hello, I've tried it, it partially worked. The servo didn't fully stop. it just decreased. is there a way to decrease it more? \$\endgroup\$
    – himura
    May 13 '13 at 15:39
  • \$\begingroup\$ do you have any suggestions @EEToronto \$\endgroup\$
    – himura
    May 13 '13 at 16:42
  • \$\begingroup\$ 1. That is not a servo. A servo is a very different thing. You are using a DC motor. 2. I'm not sure what you mean by "decrease it more". You want to control the speed? \$\endgroup\$
    – EEToronto
    May 13 '13 at 21:03
  • \$\begingroup\$ Sorry @EEToronto I keep saying "servo". What i meant is that when the digital pin is '1' the motor rotates, when its '0' it rotates slower. I want it to stop completely (hence make it even slower that it looks stopped) \$\endgroup\$
    – himura
    May 14 '13 at 17:57

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.