0
\$\begingroup\$

I am making a project where I will be using two different motors.

One is a 6V DC pump motor and the other is a servo motor. The two motors are not supposed to operate at the same time. The user will first select one and only one of them operates at a time.

The buttons here are used such that if the user presses the 1st button the servo rotates clockwise, and if they press the 2nd one it rotates ccw. I have tried designing a circuit where both of them are connected to the Arduino. The circuit is as follows:

enter image description here

Would this circuit work as I imagine?

\$\endgroup\$
2

1 Answer 1

1
\$\begingroup\$

No.

  1. The buttons are wired incorrectly. They most likely won't do anything at all. You would need a pull down so that the "resting position" of the input is low. Your buttons could then pull up against that. Most folks use a pull up in the microprocessor and have the buttons pull down. The pull up in the microprocessor can be turned on in software.
  2. The servo will probably draw more current than the 5V output of the Arduino is designed for - when the servo tries to move and there's a load on it, it will draw so much current that the Arduino shuts off. It may also damage the regulator.
  3. The pump is rated for 3.5A. The 2N2222 is rated for 600mA (0.6A) - the transistor will burn out carrying so much current.
  4. The transistor is wired with its base at 5V and the emitter at ground. That is practically a short circuit from the 5V supply to ground. That will destroy the transistor almost immediately.
  5. If the transistor didn't burn out, the pump would run continuously. It may even do so if the transistor dies - they sometimes fail shorted.

Each of the tasks you are trying to carry out has been done before. There are questions (and answers) here on the this site that address all of your problems.

You may also want to take a look at the Arduino examples The examples are installed with the Arduino environment. The web page shows the circuits needed.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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