Help with wiring and powering 4x DC motor car with 2x L298N

Hi,

New to the forum, new to the field, I have thick skin don’t worry about filters.

I have acquired the parts I believe I need to put together a basic obstacle avoiding car. My biggest concern right now is powering and wiring the thing correctly. I want to focus on wiring together the L298N, the motors and the Arduino correctly to a power source. I’ve read a lot, probed other groups but I am still unclear on what be the right approach, although I feel this is probably a very basic question.

List of parts in play:

  • Chassis and tyres from a kit
  • 4 x DC motors (site says “90mA without load, 3~6v”)
  • 2 x L298N H-Bridges
  • 9V battery with a barrel jack adapter
  • A bank of 4x 1.5V AA batteries
    - Servo and ultrasonic (out of scope for now)

I can also get another battery if it’s necessary.

Most pressing questions for me:

  • How do I power this? Can I get away with one power source?
  • What’s better - the Arduino providing its 5V to the bridges, the Arduino being powered from the 5V of a bridge, or Arduino (on Vin) and bridges (on 12v?) being powered from a 9V in a power board?
  • Or should I use separate power sources for the Arduino and for the bridges? i.e. the 9V for the bridges, the 4x1.5V for the Arduino through VIN?
  • Do I power the bridges on 12V or 5V?

I am not lazy and I’m not looking for someone else to do my job, but I am really confused right now. I’ve come up with some sketches.

Thanks in advance.

A 9 volt battory might be used to pwr the Arduino but nothing more.
What is the voltage rating for the motors? Supply the motors by a separate and enough powerful supply. Note that 90mA is for a not load carrying motor. What is the stall current, maximum current? Take that x 4 plus 1 or 2 Amps more. That's what the pwr suplly needs to handle.

I've put all the info I have. The seller claims "90 mA without load" and "3~6V", that's all I have. The kit comes with a 4 x 1.5V battery holder so I just assumed it might be enough to power the 4 motors.

Q: How powerful are the wheel motors individually (i.e., RPMs, amps, max. speed, torque, etc.)?
A: Its speed is 200 rpm. Torque is 0.68. current is 90 mA. All parameter are tested without loading.

Q: Does this meet these specifications:brushed [versus brushless] dc motors 5v-9v 100ma to 500 ma with tires and integrated gearbox?
A: Its motor power supply is 3V ~ 6V without without load.

Okey. It looks like "normal" Chines information about their stuff. If You clculate 1 Amp, maybe 2 Amps shortly, for each motor You ought to be safe.

The L298s lose somewhere from 2.5-4.5V so almost none of your 6V is getting to the motors. You need at least 9V (6 x AA cells NOT a weedy PP3-type battery). I personally would use 8 x AA rechargeable NIMH batteries (9.6V).

I also would NOT run the motor power through a breadboard as they can't handle high currents like motors. You could power both the motor drivers and the Arduino from the same battery.

Steve

I think I really shot myself in the foot with those L238s, but the reason I explicitly chose them is most of the tutorials out there are based on it.

So if I am not to use a breadboard to bring power to the drivers, I guess I have to somehow wire the battery directly into the drivers, which I am not sure how I'm going to achieve without splicing. I am basically using the board to splice power.

I guess based on your answer I also don't have the right battery. What if I downgrade to two motors and one bridge, would I be able to power that from the 9V PP3 and the 4x 1.5V? I think this may also solve my splicing/breadboard problem, because I could hook the battery into the L238 and power the Arduino through the 5V of the L238 into the 5V PIN of the Arduino, right?

Thanks for your help.

Try it and see. You won't damage anything but there's not much chance of it working reliably, if at all.

Steve

Would anyone be able to give me an example of a battery that would power my setup? Assuming 4 motors via 2 L298N-s and the Arduino. I am looking at LiPo batteries on (large retail chain here), but they come with different voltage and amperage, not sure what I need.

If you’re comfortable with Lipos then a 3S (11.1V) is what you want. The capacity (mAh) depends on how long you need it to run for. Since you’re being shy about where you’re buying it from I can’t be more specific.

Steve

I don't know if it's against the forum rules, but I'll put it out there since you asked - I was browsing WalMart online, they seem to have a good variety. Could you make a specific recommendation in this case? Thanks Steve.

Nevermind, I just looked up what's a LiPo battery and why you'd ask if I am "comfortable" with it. Having pets and children at home, I'd rather not take any risks, as negligible as they might be :slight_smile: Alternatives?

8 x NiMH batteries (e.g. Eneloop) as I said in #4.

Steve

Hi,
Can you please post a/some pictures of the hardware you have please?
A L298N, can mean anything from just the IC to one of many module PCBs.
Also your motors.

Do you have a DMM to measure circuit parameters?

Thanks.. Tom.... :slight_smile:

Here is my sketch so far http://fritzing.org/projects/obstacle-avoiding-car-wip

I was made to understand that the Arduino should not provide power to the loads, so I have now rewired everything.

I am starting to realize that two bridges and 4 motors take up almost all of my pins so I will probably downgrade to one bridge (and two or four motors, TBD).

My main problem was figuring out how to power the thing. Ideally I don't want to have two power supplies - one for the motors and one for the Arduino, so I've taken a compromise variant of powering the Arduino through the 5V output of the bridge. I may end up powering the Arduino through a nice compact USB power-bank I remembered I have, though.

I just need to get the right rechargeable >7.1V battery now and I think I'm ready to start putting things together. I'll also need spacers/standoffs, probably from a local hardware store.

One observation I'm making is - that 4x 1.5V AA bank that comes with the kit is useless. Nobody is going to powering the motor directly and 6V is not enough to power up the l298N.

Is there any recommendation on what thickness of wires I have to use for this setup? I was going to use the jumper wires that came with my starter kit. I think I'm gonna go with stripping a CAT5 cable and use the color-coded wires, as thin as they seem. I also have questions around splitting the wire without using a breadboard. I'll probably use a metal screw on a standoff and tie the wires around it to split current.

(Click for bigger pic)

Am I correct to assume that the voltage across the board will be 9V minus the voltage drop of the l298N? Even though I have two bridges, it's not going to double-up the drop, right?

Do you have a DMM to measure circuit parameters?

Yes, I do. I am learning how to use it still.