Powering L298N (and motor) and Arduino Uno with 5V

Hello

I wanted to play around with a Mitsumi M42SP-7T stepper motor I had laying around. I couldn't find a data sheet specific to this model designation, so I assumed that it is a 12V motor. I assembled the following standard configuration: external 12V power supply powers a L298N motor driver board and the motor, built-in linear voltage regulator on L298N board is enabled and its 5V output is used to power Arduino Uno. Connected the motor and all signal leads as well.

When I plugged the Arduino into my computer to upload the test sketch (no 12V power at that time, of course), I noticed that the whole thing started working right away just from USB power supplied by my PC. The motor started spinning happily, as directed by the sketch. I.e. the Arduino was powered by USB's 5V and at the same time its 5V pin was back-powering the L298N board through the output of its built-in linear regulator, and in turn powering the motor as well.

Later I tried the whole thing as originally intended: disconnected from the computer and powered by an external 12V supply. Everything worked, except that the motor (and the heatsink on L298N) heated up to rather uncomfortable temperatures almost immediately, making me to suspect that this motor is actually designed for [much] lower voltage.

But back to the actual question: assume that for my experiments I just want to power the whole thing by external 5V battery (no 12V power). What would be the best/proper way to wire it then?

  1. Keep it as is, i.e. power the Arduino from 5V supply. Keep back-powering L298N board (and the motor) through its built-in linear regulator.

Or

  1. Power the Arduino from 5V supply. At the same time redirect the 5V power to the VCC pin of L298N board and disable built-in linear regulator on that board entirely.

You should NEVER draw power for a motor from the Arduino 5v pin. You are lucky not to have overloaded and damaged your Arduino.

These links may help
Stepper Motor Basics
Simple Stepper Code

...R

I just want to power the whole thing by external 5V battery

The M42SP-7 is a unipolar motor, designed for 12 or 24V operation(depending on specific model). Used as bipolar, it would need 24 or 48V for designed operation.

That motor, and the ancient, inefficient L298 driver, are among the worst possible choices for low voltage, battery powered operation.

In general, avoid using steppers for battery powered projects.

Robin2:
You should NEVER draw power for a motor from the Arduino 5v pin. You are lucky not to have overloaded and damaged your Arduino.

I probably didn't explain my intent clearly. (And chose a misleading title.) No, there's no intent to draw motor power from 5V pin of a USB-powered Arduino. The intent is to use external 5V power supply.

jremington:
The M42SP-7 is a unipolar motor, designed for 12 or 24V operation(depending on specific model). Used as bipolar, it would need 24 or 48V for designed operation.

Um.. No, that is incorrect.

Firstly, M42SP-7 is a bipolar stepper motor, identical in driving methods to well-known bipolar M42SP-5 series. The datasheet you linked actually begins by stating exactly that :slight_smile: And then it contains a glaring typo in the table, incorrectly claiming "unipolar driving" for this motor. This is, again, a classic bipolar motor: 4 wires, isolated case.

Secondly, my motor is M42SP-7T, not M42SP-7. Note the extra "T". The casing label clearly states 10 Ohm of coil resistance, which as you can see is a major deviation from the datasheet you linked.

Thirdly, this is about (preferrably portable) demo breadboard, not about some "battery powered project".

I couldn't find a data sheet specific to this model designation, so I assumed that it is a 12V motor.

Fascinating!

Best of luck with your project.

jremington:
Fascinating!

Exactly! I began by making the very same silly mistake you made: I used a datasheet for a different modification under assumption that the differences are negligible. Isn't that remarkable and exicing? "Great minds think alike"!

Except that in my case I had the luxury of actually having the motor right in front of me. So a few quick touches of multimeter immediately helped me to realize how hopelessly inadequate that datasheet was...

Montmorency:
No, there's no intent to draw motor power from 5V pin of a USB-powered Arduino.

I was hoping to convey the idea that you should not ALLOW it to draw power from the Arduino, even if it was not your intent.

...R