L298N Not Turning Motor

Thread Starter

z0oinks

Joined Sep 12, 2012
137
I have the following hardware:
L298N: https://www.aliexpress.com/item/33012645746.html?spm=a2g0s.9042311.0.0.104f4c4d6rIgnn
NEMA 17 Stepper Motor: https://www.aliexpress.com/item/32585429251.html?spm=a2g0s.9042311.0.0.104f4c4d6rIgnn
NodeMCU 1.0: https://www.amazon.com/gp/product/B081CSJV2V/ref=ppx_yo_dt_b_asin_title_o03_s00?ie=UTF8&th=1
12V Power Supply: https://www.amazon.com/gp/product/B01AZLA9XQ/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&th=1

I've wired it up according to this diagram:
1637019673138.png
However, since my motor has a black, a red, a blue, and a green wire, the colors are a bit different.
To the top set of terminals, I have the blue and green wires. To the bottom set, I have the red and black.

When the motor is activated, it doesn't turn, but slightly rumbles in place.

If I check the voltage across the green and blue wires or red and black wires when the motor is activated, I get a reading of between 0.9V and 0.12V, which I've read is way too low to power the motor.

Can anyone tell me why this is happening?
 

AlbertHall

Joined Jun 4, 2014
12,345
I think the pairs are black/green and red/blue.
If you have a multimeter check the resistance between the wires and you should find where the two coils are connected.
 

Thread Starter

z0oinks

Joined Sep 12, 2012
137
Yeah, my multimeter shows continuity between blue/red and between black/green, so I want to have those pairs on the same terminal?
I tried that and it's still doing the buzzing.

Multimeter is showing 0V when not activating motor, then 0.7V when activated.
 

AlbertHall

Joined Jun 4, 2014
12,345
So blue/red should go to the terminals on one side of the board and black/green should go to the opposite side of the board.
What resistance did you measure across each coil?
 

KeithWalker

Joined Jul 10, 2017
3,063
It appears that your 12V power supply may not be delivering 12V. Measure it at the input of the L298N. You may need a supply that can deliver more current.
 

Tonyr1084

Joined Sep 24, 2015
7,853
I'm going to call into question your power supply. It is billed as being a saNsun, not a saMsunG, which to me seems like an attempt at being misleading. I have 2A power supplies that are bigger than that one. While it MAY be 2A, I'm dubious just because of the misleading name. I once bought an oMita clock thinking it was an oNita. Or some other name brand mockup meant to make the buyer think it was the established name brand device.

Buyer beware.
 

Thread Starter

z0oinks

Joined Sep 12, 2012
137
It appears that your 12V power supply may not be delivering 12V. Measure it at the input of the L298N. You may need a supply that can deliver more current.
Measuring at the input, I get 12.21V

I'm going to call into question your power supply. It is billed as being a saNsun, not a saMsunG, which to me seems like an attempt at being misleading. I have 2A power supplies that are bigger than that one. While it MAY be 2A, I'm dubious just because of the misleading name. I once bought an oMita clock thinking it was an oNita. Or some other name brand mockup meant to make the buyer think it was the established name brand device.

Buyer beware.
I feel like I'm going crazy, but I can't get any reading for current on my multimeter. I connect one probe to the positive side of the power supply, then the other probe to the input of the L298N, but nothing happens. Always shows 0A.
Do you have a link to a reputable power supply I could use instead?

What is the frequency of the pulses you are applying to the motor? The torque drops off rapidly above about 4KHz.
I'm not sure, the code can be found here: https://github.com/lance36/catFeeder/blob/master/catFeeder.ino
 

BobTPH

Joined Jun 5, 2013
8,813
No, switch the two wires on either the top or the bottom, but not both. I believe one of them is steppung forward and the other is stepping backwards, so it just vibrates in place. A very common mistake in wiring of stepper motors.

Bob
 

Thread Starter

z0oinks

Joined Sep 12, 2012
137
No, switch the two wires on either the top or the bottom, but not both. I believe one of them is steppung forward and the other is stepping backwards, so it just vibrates in place. A very common mistake in wiring of stepper motors.

Bob
You genius! I knew I was doing something stupid.
Connected the black/blue and red/green together and now it works perfectly.
 

Thread Starter

z0oinks

Joined Sep 12, 2012
137
Alright, now I'm running into another, unrelated problem.

The motor doesn't have enough torque to turn the paddle it's connected to. Anyone have recommendations I could replace this one with?
 

djsfantasi

Joined Apr 11, 2010
9,156
The motor doesn't have enough torque to turn the paddle it's connected to. Anyone have recommendations I could replace this one with?
Paddle? What paddle?

Let’s start over with what you’re trying to do rather than with your solution, which may not be applicable.

What is the requirement that you’re trying to solve?
 

Thread Starter

z0oinks

Joined Sep 12, 2012
137
Paddle? What paddle?

Let’s start over with what you’re trying to do rather than with your solution, which may not be applicable.

What is the requirement that you’re trying to solve?
The project identical to the one here: https://github.com/lance36/catFeeder

Basically, it's using this motor to rotate a paddle to dispense treats. However, the treats are a bit bigger than the cat food he uses in the project, so the paddle gets a bit stuck sometimes and it takes a bit more oomph to turn it.
 

Tonyr1084

Joined Sep 24, 2015
7,853
Rather than replacing the stepper motor run a set of reduction gears. The paddle will spin slower but will have more torque. Sorry I can't direct you to gears but I'm sure you can find something. Even something out of an old printer might be useful. I've scavenged plastic gears out of printers before, so it's a possibility.
 

Tonyr1084

Joined Sep 24, 2015
7,853
I have something similar, but only for food. Their water dish has a small pump and filter. Yes, my cats get constantly filtered water.
 

Thread Starter

z0oinks

Joined Sep 12, 2012
137
Rather than replacing the stepper motor run a set of reduction gears. The paddle will spin slower but will have more torque. Sorry I can't direct you to gears but I'm sure you can find something. Even something out of an old printer might be useful. I've scavenged plastic gears out of printers before, so it's a possibility.
I thought this would be something I could (mostly) 3D print, but after looking at Thingiverse and Yeggi, it looks like it would be a lot more effort than just replacing the motor. I don't rather not have a bunch of things hanging off this, you know?

My cats have one of those gravity feeders. They eat. When the bowl is low gravity spills more food into their dish. No motors, no batteries, no timers. Just hungry bellies.

https://www.amazon.com/Lucky-M-Pets-Automatic-Feeder-Green/dp/B07S294B6J/ref=asc_df_B07S294B6J
.
Unfortunately that wouldn't work for me. I actually want to have this controlled by a command on my stream, so it's gotta be IoT
 
Top