Motor Driver Wiring, MPU6050 and AI all in one!

Hi Andrew
The following refers to the connections on the motor.

Motor supply is a separate pair of terminal points. Is what the name implies “Motor supply” This pin you are referring to (part of a 6 pin group) is the actual motor Positive connection. This connects to one of the other two 2 pin terminal points for "Motor 1 (or 2, or “A” or “B”) Positive.

Ignore the next 4 pins for the moment.

Pin 6 is the motor negative connection. This connects to the other pin, "Motor 1 (or 2, or “A” or “B”) Negative on the same block as above.

This board has 2 completely separate motor drivers with a common supply shown in the wiring sketch as a bench top unit.

The other connections shown are for PWM and direction control and can be wired as shown.
The driver logic power and ground are the red and green wires on the sketch going to the red connector on the UNO.

Yes, one for each motor driver. There are 3 control signals for each driver on that board. Forward, Reverse and PWM (speed). They must be kept in their respective groups.

I would suggest ignoring the encoder wiring until you get the motors working properly.
The encoder is entirely separate. They will eventually be connected to digital inputs on the INO (or whatever)for decoding. The provision of input voltage to the encoder. suggests pull ups fitted to the encoder module so no pull ups should be required externally. The encoder will provide a quadrature switching to ground with the A and B phase 90º apart so that decoding will provide direction, relative position and speed. Whichever is required.

Yes to all. As suggested above external (or internal) pull ups should not be needed on inputs. This can be stated with more certainty if and when more detail is forthcoming re motor and encoder. The switches should be magnetic or optical but if not some debouncing will be required. When it is known exactly what type of switching is employed and what is the type of interface between encoder switch and UNO some sort of suggestions can be made.

Some time ago I did some experimenting re this bounce. Results here if you are interested.

Encoder Module with button (CE09436)

Rotary Encoder de-bounce with Nand gates

If course if you have no use for the encoder then you can completely ignore all of this.
Cheers Bob

1 Like