0

This question already has an answer here:

At the risk of looking like a complete idiot on the internet, I'll preface with this; I'm incredibly new to this. I'm new even to coding, and not sure what questions I should be asking.

I'm trying to run a bipolar motor with an Arduino Uno. I'm fairly sure it should be as simple as set a pin to high, plug the motor into that pin and a ground and it should run. I did this a week ago, and it worked then.

Now I'm trying to essentially run a modified version of blink with this motor running instead of the LED. Running the code with pin 13 as my positive does still flash the LED. If I set my pin to high with the motor, the motor no longer runs. However, It does run when plugged into the 5V and ground. The motor also runs straight off of the two poles of a 9V battery.

I'm unsure what I'm doing wrong. Do I need to step up the voltage of my pins somehow?

Thanks in advance. -Alec Rosso

Edit 1:Here's the code:

int motorPin1 = 13;
int interval= 5000;

void setup() {
pinMode(motorPin1, OUTPUT);
digitalWrite(motorPin1, HIGH);
}

void loop() {
digitalWrite(motorPin1, HIGH);
delay(interval);
digitalWrite(motorPin1, LOW);
delay(interval);
}

As far as voltage or current specifications, it says DC 12V.

Edit 2: it is not a stepper motor. The serial number is TS-32GZ370-950. It's apparently a "DC geared motor."

Final Edit: I've got it working using an L298. I used a 9-volt battery in addition to my arduino's 5 volts, and everything works like a dream. Thank you for your help.

marked as duplicate by gre_gor, VE7JRO, Juraj, Greenonline, sempaiscuba Oct 3 '18 at 8:06

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • @VE7JRO it's possible it's a duplicate, and it would make sense that i'd need a shield or something similar to run it. I'm going to try an L298 motor driver, but my limited expertise make this whole operation somewhat trial-and-error. – Alec Rosso Oct 3 '18 at 1:57
  • If you resolved the issue please "accept" the answer that helped you the most, or make your own answer describing how you solved it. This will help others to realize the problem has been solved. – Nick Gammon Oct 3 '18 at 19:26
1

Just for your knowledge and future reference - Arduino digital pins can deliver maximum of 40mA each. If you power Arduino by USB, Arduino UNO can draw maximum of 1A, and Nano maximum of 500mA. That is, the 5V pin can deliver that current, not a digital pin. Therefore pin 13(digital pin) can deliver 40mA at 5V, which is 200mW power.

Now, looking at your motor, TS-32GZ370-950,from datasheet at maximum efficiency the current needed is 140mA. Stall current is 480mA, therefore you should be able to deliver close to 480mA @ 12V for the motor to work under all possible loads. Now, that is 5.6W or so. Your 5V pin making the motor work simply meant that the load is low to medium. But you are unable to use the motor's full potential anyway.

Your driver choice is ok, because L298 can deliver up to 2 A, which is fine. The 9V battery(Alkaline I suppose?) will work, but the lifespan will be very very short. You can look at discharge graphs here : https://www.powerstream.com/9V-Alkaline-tests.htm

It will last about 1 hour at moderate load. Consider using other types of batteries. Your motor accepts voltage up until 24V, so feel free to experiment.

Best of luck!

-1

"At the risk of looking like a complete idiot on the internet,"

Without getting personal - you cannot put 10 pounds of potatoes in 5 pounds bag.

AKA you cannot run 12V device with (5V output) Arduino BECAUSE 12V device / motor requires far more current than Arduino can safely provide.

That is the short version - you probably moved the motor at very slow speed and lucked out before you let the smoke out from the Arduino chip.

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