1
\$\begingroup\$

I made a simple motor driver as suggested here

+12V ---------+---------+          
              |         |
             / \        |
             |M| motor ---  1N4001
             \ /       / \
              |         |
              +---------+
              |
            |/
CTL -/\/\/--|    2N2222 NPN       
      1k    |\>
              |
             ---
              -                    

How do I connect and control this with and Arduino?

Could you please post instructions or direct me to some links I may find useful.

\$\endgroup\$
  • \$\begingroup\$ I think this belongs in the original question. \$\endgroup\$ – Thomas O Nov 30 '10 at 14:58
  • 1
    \$\begingroup\$ The CTL signal turns the motor on or off. Set the output of your arduino connected to this pin high to turn the motor on, and set it low to turn the motor off. \$\endgroup\$ – Thomas O Nov 30 '10 at 14:59
  • 1
    \$\begingroup\$ @Kortuk, I'm not sure it's a duplicate - but more an extension of the original question that belongs on the original question page. \$\endgroup\$ – Thomas O Nov 30 '10 at 15:02
  • 1
    \$\begingroup\$ electronics.stackexchange.com/questions/7296/… this question was closed for not enough detail, what makes you think asking it again will help? \$\endgroup\$ – Kellenjb Nov 30 '10 at 15:10
  • 1
    \$\begingroup\$ @kortuk, its still a duplicate regardless. He can vote to reopen the other and add detail. Instead hes just creating lots of duplication. \$\endgroup\$ – Kellenjb Nov 30 '10 at 15:18
3
\$\begingroup\$
+12V ---------+---------+          (Connect to the Vin or 9v on the Arduino)
              |         |
             / \        |
             |M| motor ---  1N4001
             \ /       / \
              |         |
              +---------+
              |
            |/
CTL -/\/\/--|    2N2222 NPN        (Connect CTL to your Digital out pin)
      1k    |\>
              |
             ---
              -                    (Connect this to Gnd)
\$\endgroup\$
  • \$\begingroup\$ Thanks!! Beginner question; but that really confused me for quite a while. \$\endgroup\$ – gomek Nov 30 '10 at 15:16
1
\$\begingroup\$

Connect the control pin for your motor driver to a digital output pin of the Arduino, 13 is a good choice. Connect the Arduino's ground pin to the ground of your driver.

Here's an Arduino sketch to loop, turning it on and off.

int CTLPin = 13;                 // CTL connected to digital pin 13

void setup()
{
  pinMode(CTLPin, OUTPUT);      // sets the digital pin as output
}

void loop()
{
  digitalWrite(CTLPin, HIGH);   // sets the motor on
  delay(1000);                  // waits for a second
  digitalWrite(CTLPin, LOW);    // sets the motor off
  delay(1000);                  // waits for a second
}
\$\endgroup\$

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.