Different voltages

Hi guys

Apologies if this is a dumb question.

On my 1st project I have created a very simple autonomous robot with the ultra sonic sensor + L293D Motor Drive Shield + 2 DC motors (4x 1.5 V batteries)

All works fine except the thing tends to go round in circles, as I can’t avoid different speeds on the two wheels.
I can read a voltage of near 6v on the power source “entry” of the shield but I get different voltages on M1 and M2 outputs.

Any help would be hugely appreciated

Many thanks

Miguel

Don't knownif this helps but, reading on the shield are:

M+ GRN = 5.11v

M1 = 3.75v

M2 = 2.73v

Thank you

There might be variations in the motors and the fact they are running in opposite directions.

Most DC motors have a prefered direction, which is why the terminals are marked +/-. The difference
is the brush angle being slightly advanced to enhance the top speed in the preferred direction - the
advanced timing partially compensates for the inductance of the armature delaying the build-up of
the current in the armature windings.

Thus in a two wheeled robot it is common to add slot encoders to each axle or motor to allow accurate
control of rotation.

There can also be differences in friction or loading of the wheels, not just in the motors, and of course
in the L293D driver itself.

Hi,
If you load some code that applies the same direction and speed signals to both motors, what happens?

I see that you have applied the connection to the motors' terminals.

You may simply have the connections to one motor around the opposite way to the other, remember one motor is physically oriented back to front compared to the other.

Tom... :slight_smile:

Many thanks

Will check that polarity on both motors is the same.

But wouldn't that not affect output voltage on shield?

I've put the multimeter probes where the wires leave the shield (on those blue boxes with the screws = I think that's the technical term)

Hi,
These small geared DC motors always have some variation so a robot does not go exactly straight.

You need to compensate for that in software, OR actually add encoders and count the motor rotations.

An example of doing this in software is HERE: scroll down to "TEST AND ADJUST MOTOR SPEEDS:"..

The example has different compensation values for different speeds also:

#define SlowMoveSpeed 280
#define SlowMoveAdjust 5 Adjust for straight move: - Left + Right??

#define MediumMoveSpeed 300
#define MediumMoveAdjust 5 Adjust for straight move: - Left + Right

#define FastMoveSpeed 350
#define FastMoveAdjust 5 // Adjust for straight move: - Left + Right