Project Help - Uno + L298N + Motor with Gears

Hi all, first time poster and really abit lost so hopefully someone can point me in the right direction.

Ive got the following parts thinking that would get me on the way but now im totally stuck

  • Uno
  • L298N Dual H Bridge Stepper / Motor Driver Board
  • 12volt Battery
  • Motor from Sea Scooter

When the motor was in the sea scooter it could got at 2 speeds (gears i think) and reverse and i was hoping to get the same functionality from it from the arduino - pulled the motor out and left the wires attached but took it off the board that came with the sea scooter.

Ive attached some photos of the motor and parts....

I looked up some examples of how to connect the battery to the motor via uno and l298N but it wasnt very successful ..... so any help or advice would be awesome....

Happy to post anything that people might be able to help talk me through alittle.

Cheers

How much current (Amperes) does the motor require at full speed in the Sea Scooter?

If your 12V battery can run the motor properly, then it's fine. Just follow these steps:

  1. Connect VCC and GND of H-Bridge to the 12V supply respectively.
  2. Connect the pins through which you want to control the Arduino to the H-bridge's INPUT1 and INPUT2.
  3. Connect the motor to OUT1 and OUT2.
  4. Through your code, vary the speeds of the motor and the direction of rotation [i.e. of the pin connected to INPUT1].

If you want to move in direction A then OUT1 is varied and OUT2 is LOW.
If you want the opposite direction then OUT1 is LOW and OUT2 is varied.

You can add a SPDT switch [with digital pins] for direction and a potentiometer [with an analog pin] for speed.

To prevent damage to the motor and the H-Bridge, reduce the speed to minimum then change the direction

I personally think it's a good idea to test a motor and h-bridge without a microcontroller connected to make sure you understand how the logic pins work. Here's a tutorial on the using those L298N PCBs.

SagarDev:
4. Through your code, vary the speeds of the motor and the direction of rotation [i.e. of the pin connected to INPUT1].

Your method assumes the enable pins have been tied high. There are indeed jumpers on the L298N to set the enable pins high but by pulsing a direction pin instead of the enable pin you cause the motor to hard brake with each low pulse. IMO, this is a bad way to control a motor. It sounds awful, uses more current and makes the parts get hot faster. I think one is much better off pulsing the enable pin, which allows the motor to coast with each low pulse, instead of shorting the two motor leads together with each low pulse of the PWM signal.

outsider:
How much current (Amperes) does the motor require at full speed in the Sea Scooter?

Is this the device?

http://www.seadooseascooter.com/pro.html

Figuring out the current needs is the big one - and something you need to learn FIRST.

According to what else I found, the motor seems to be a 250 watt DC motor - and the battery is described something like a 12V 12 Ah battery - with a runtime of 1.5 hours.

That gives a current pull of 8 amps; I'm not at all certain of that being accurate, though. Needless to say, the device is meant to pull a human around thru water, using a large propeller. The motor as in your pictures looks fairly large - at least as large or larger than those used in 12 volt PowerWheels, which I think are 550 class (?).

Did the sea scooter have a fuse involved in the circuit? If it didn't, I'd be surprised (though if these things came from China - well, who knows). Check the rating of that fuse.

Your h-bridge needs to be rated at that number, plus 10-15% for safety. Needless to say - half of an L298 (2A) will not likely cut it for this motor; even if you used the parallel mode of the L298, it would likely still be too small.

You need to find out what that current rating is - then purchase an h-bridge to match.

Then we can help you.

In the meantime - if you have a much smaller motor, we can help you get the L298 working with it - then the code will be the same when you get your larger h-bridge.

If the battery itself can provide an 8 Amp current, then you are well to go..!!!

I'm interested in what the other wires are for.
I see that the red/black go to that black cylindrical thing, (whatever it is), but also what do the yellow and green wires connect to? Speed feedback perhaps?

You can get an idea of the motor's stall current by measuring the resistance between the motor wires, then I = 12V/R.
You need an H-bridge rated for that current plus some overhead as mentioned by cr0sh.

@cr0sh, You said:-

According to what else I found, the motor seems to be a 250 watt DC motor - and the battery is described something like a 12V 12 Ah battery - with a runtime of 1.5 hours.

That gives a current pull of 8 amps;

Assuming it really is a 250W motor, at 100% duty-cycle:-
I = P/V = 250W/12V = 20.8A, (not 8A).

Edit: The original controller might have run the motor at maximum 38% duty-cycle to make the battery last 1.5 hours, but unless robport's program does the same, up to 20.8A continuous is possible, with about 30 minutes runtime between charges at full speed.

There is not the fabled "snowball's chance in hell" that an L298N driver will handle a 250 watt motor, although there might be a second or two of excitement!

jremington:
There is not the fabled "snowball's chance in hell" that an L298N driver will handle a 250 watt motor, although there might be a second or two of excitement!

Yep, and some of that lovely smoke.
Even 10 parallelled 298Ns stacked on top of each other with a good fan would be right on the borderline.

Hey guys, thanks for all our comments, sorry for the slow reply I didnt get the notifications.

I think its similar to this machine Sea Scooter (200W) - Yongkang Shukeda Metal Company

Oldsteve, I think (and this is me guessing) that the red and black goto the gears... the other 2 seem to goto a little buzzer/sound device which I think was the part that was making the beeps when it was assembled and changing gear etc..

There doesnt seem to be anything on the motor i can easily see.... even the battery is very light on information. but that link above is very close to what I have... (i brought it 2nd hand so dont have any documentation etc with it)

Those specs say 24V. A misprint I guess.

200W will draw a little lower current than I estimated for 250W, but not much. Still almost 17A at 100% duty-cycle.
Off the top of my head, the Sabertooth 6-30V 25A motor driver would do it, but it's $125!
(I'm sure there are cheaper options. It's just in my head because someone else referred to it earlier.)

And since the specs say it has temperature sensing, that's probably what those other two wires are. You could make good use of that.

Cheers, Ive got my code working now with a smaller motor, So I guess I just need to to figure out abit more about the battery and motor specs.... Ill start looking into that now...

Here is the battery that im using, I think (and this is just me having a look online cause i cant find much on the battery itself... I think its 12v but I dont know if its 12ah

robport:
I think its 12v but I dont know if its 12ah

Didn't you try Google? 12V 12Ah :-
6-DZM-12 12V 12Ah SLA Battery

Propellers are not constant torque loads, torque (and current) varies with the square of of speed, if you double the speed torque is 4 times as much and power required is cubed (8 times as much).

outsider:
Propellers are not constant torque loads, torque (and current) varies with the square of of speed, if you double the speed torque is 4 times as much and power required is cubed (8 times as much).

The point being?
If the propeller is the 'normal' load and the motor is rated for 200W under it's 'normal' load at 100% duty-cycle, the current drawn will be as I stated.
If driven at less than this speed, it will use considerably less power, but we're concerned with the maximum. And actually, the driver should also be rated for the peak, ('stall' current). I only mentioned the typical current draw.
Or am I missing something. If so, please elaborate.

Edit: The highest current will be drawn at virtually zero speed anyway, when the motor is first started underwater.

If i wanted to try and use the 12v battery on the motor for 45mins (or less if it runs out) is the board that I got not really suitable? I thought it was ok cause it talked about 12v but I think thats been proven wrong..

robport:
If i wanted to try and use the 12v battery on the motor for 45mins (or less if it runs out) is the board that I got not really suitable? I thought it was ok cause it talked about 12v but I think thats been proven wrong..

Nowhere near suitable, I'm afraid. It would take more than 10 of them to do the job.
You need a board rated for more than the continuous current of your motor, as well as being able to handle the startup current surge.
As I said, something similar to this: Sabertooth 6-30V 25A motor driver
Or an even higher current rating would be better, but you need a single motor driver, not a dual.
Note the price, too.

I can't suggest anything off the top of my head, but if you do some searching you'll soon find something suitable. Be prepared to pay through the nose though, because high-current DC motor drivers aren't cheap.

Wow thats more than I paid for the 2nd hand seascooter which seems crazy.. (i stupidly took off the electronics and just kept the motor and the battery.

Am I over complicating what im trying to do, all I want is to basically turn on the motor via a remote which ive got working on a smaller motor and have it run for a period of time say 30 mins which I can get programmed. I totally think ive under estimated this part of the build... would you recommend any good articles ?

robport:
Wow thats more than I paid for the 2nd hand seascooter which seems crazy.. (i stupidly took off the electronics and just kept the motor and the battery.

Am I over complicating what im trying to do, all I want is to basically turn on the motor via a remote which ive got working on a smaller motor and have it run for a period of time say 30 mins which I can get programmed. I totally think ive under estimated this part of the build... would you recommend any good articles ?

So you don't need speed or direction control? You could simply use a relay if that's the case. With the Arduino switching a transistor via a series resistor to power the relay. And of course, a diode backwards across the relay coil to suppress spikes on switch-off.