Arduino Uno, L298N, dual dc motors. But my end result isn't feasible?

Hello,

Super super new to Arduino. Like, just got my components in the mail this week and had to look up how to upload code to the unit new.

Here's what I want to do, which I have googled (and youtubed) extensively:
Attach the Uno to the L298N to two dc motors.
Here's where it gets tricky:
My desired application is to attach a laser-cut shape of hobby wood to each motor axle and spin them like a pinwheel, but at an incredibly low rpm. Off the top of my head I'm thinking perhaps 30-60rpm. My setup I have cloned from googling is the picture attached. Additionally, as this is more for use as a costume, I need it a small space to house all of the components I end up using. It's going to be part of a hat, so I have a little bit of room to play with by raising the hat. (Miniature top hat, so have some extra vertical space to play with)

I've watched some youtube videos dictating how to use the Uno and L298N to control a single motor. I've added more code to dictate the additional motor and pins. But....single or double motors I find some issues:

  1. My power source (4xAA, 2xAA, or 9V) will not power up the setup.
  2. Even though everything is hooked up right, and the code was double checked, the motors won't work, but they still run if I connect it directly to power, independent of the setup (battery to motor only)
  3. No rpm value (5-255) works. I try increments of 25 or so and nothing works.

So then I found instructables for dual motors and PDFs with pin lineups, etc and even with that experienced guidance my system still sits there with a red LED on the bridge.

My red power wire is going into the 12V on the bridge, with the black ground wire into bridge GND, and the GND of the bridge going to one of the GND's on the Uno with an additional black wire.

So, I don't know what I'm doing wrong at this point. Motors don't spin at all, let alone super slow.

I thought perhaps the power wasn't enough at the start, so I bumped to 4xAA, but was afraid it might be too much power. The motors I'm using are:

Voltage:DC 3V;Rated Speed:24000 RPM

I have learned that 4xAA is about 5.3V, but engineering was never my forte so I'm not sure what that value "does" for me.

I've learned that using a low value of PWM may just make a motor whine, and one video mentioned a capacitor to help smooth that issue. I don't know where to start or what to look for in this case.

Additionally, as I will be out in the bright sun (traveling south with this), I was toying with the idea of solar panels but read that I can overload the setup without special batteries. Plus, amazon and ebay aren't exactly clear with their values or how to implement them outside of landscaping lights.

I've tried to do as much research as possible, including google site-specifier per moderator nickgammon on here and still, here I am. Any thoughts, advise, stuff to look at, etc would be greatly appreciated. I have a few short weeks until this is needed so there is some time to order additional hardware if absolutely needed. Although I'd love to see if I can achieve this with what I have.

I got this kit:

if that helps any. I thought maybe the potentiometer might be an option until I researched the bridge.

So for the TL;DR

  1. I have an Uno and a L298N bridge, and two motors
  2. Want to run motors at a SLOW rpm with an external power source for a portable setup
  3. I've tried straight copy/paste from google, instructables and youtube and failed
  4. Do capacitors help with super low rpm?
  5. As I'm not sure continuous motion (even slow) will be nice to a portable battery's life span, is solar feasible?
  6. And not really mentioned above, I need to keep these motors small. Steppers are way to big, so DC all the way at a MAX of 2 inch nose to butt.

Here's OP's pic for reference

Might help to post your code.

The 298 has a voltage drop of 2V minimum, from memory about 4V with higher current, so it's likely that your motors aren't getting much voltage at startup where they draw higher current. (Even with the 9V battery it may be a problem since they can't provide decent current anyway.)

Weird. I saved my sketches or I thought I did. Here's the starting point I used for a single motor as proof of concept (which failed):

int In1 = 7;
int In2 = 8;
int ENA = 5;
int SPEED = 210;
void setup ()
{
pinMode(In1,OUTPUT);
pinMode(In2,OUTPUT);
pinMode(ENA,OUTPUT);

digitalWrite(In1,HIGH);
digitalWrite(In2,LOW);

analogWrite(ENA,210);

}

void loop ()

Does that 298 module have any blinkenlghts to show it's alive and operating?

It's got a red LED. Nothing blinks though. Of the videos I've watched of successful builds, this particular bridge is solid red when powered and working as desired.

Might be an idea to try for say 12V into the board?

Bought one, will be shipped soon. In the meantime I have been researching possible solutions, and discovered the world of high torque low rpm gear motors. I have found some that are 30rpm by devault and 6v to boot. Now I just have to figure out if I need a motor shield board or not. Or maybe rig power directly to the motors with a solar panel and a mere voltage regulator to protect said motors. I had no idea what I was getting into with this project.