Motor loses power when it is on the ground

I am building a robot that has 2 DC motors. It runs fine when nothing is touching the engines, but when I put the robot on the ground it completely loses its power and moves very slowly. Could it be because of my wiring? I think the code is correct but I'm not very familiar with wiring.

Could it be because of my wiring?

No.

It is because your motor is not powerful enough or you are running it on too low a voltage. Note you do loose some voltage going through the H-bridge, up the supply to compensate.

Could you explain to me how I would up my voltage?

Use more batteries in series. Or use a boost regulator like this:-

By the way what battery are you using to feed directly into the 5V supply? It should not exceed 5.5V.

it is a battery pack with 4 AA batteries

nerdiator:
it is a battery pack with 4 AA batteries

4 times 1.5 = 6 volts = damaged Arduino.

It says this in the data sheet

Absolute Maximum Ratings*
Maximum Operating Voltage ............................................ 6.0V

and explains that:-

*Stresses beyond those listed under “Absolute Maximum Ratings” may cause permanent damage to the device. This is a stress rating only and functional operation of the device at these or other conditions beyond those indicated in the operational sections of this specification is not implied. Exposure to absolute maximum rating conditions for extended periods may affect device reliability.

So adding more voltage is definitly not an option.
Should I just different motors then? I am currently using these

So adding more voltage is definitly not an option.

Yes it is.

Feed the Arduino with power through the Vin pin not the 5V one.

But it will still output 5V then? So my motors will go even slower then?

I’m sorry for all my stupid questions though, I’m good at programming but terrible at wiring electronics

But it will still output 5V then?

No.
You wire up the supply to your H-bridge from the higher voltage not the 5V from the arduino.

That chip has two supplies, a logic supply and a motor supply. You currently have them both connected to the same 5V line. The logic supply is connected to 5V and the motor supply to the higher voltage.

Okay I'll try that. Thank you for the help

Or some "gearing" may be what's needed (pulleys and belt or gears and chain...)

nerdiator:
It runs fine when nothing is touching the engines, but when I put the robot on the ground it completely loses its power

This is completely the wrong analysis.

The motor does not lose power when you put it on the ground. It has the same power.

It is enough power to make the wheels turn when they are not touching anything.
It is not enough power to turn the wheels when they are sitting on the ground with the weight of the robot on them.

To find a solution you must first state the problem correctly.

...R

Robin2:
It has the same power.

Hmmmmm... since power is the rate of doing work, and work is the movement of a force, and if there's no movement there's no work, there can't be any power.

P=Tw and there's no w. (w = lower case omega, angular velocity)

But there is T, just not enough to get it moving.

JimboZA:
Hmmmmm... since power is the rate of doing work

Nit picking won't help the OP. KISS :slight_smile: :slight_smile:

...R