Goal
The goal of this Mono iteration is replacing the motor driver. In the earlier published post it was mentioned that L298N motor driver creates a significant voltage drop.
Well, I decided to go with the TB6612FNG chip as of the Pololu motor driver.
Designing the Mono driving module
Requirements
Okay, we have
- four motors
- and two motor drivers with the following pinout.
| Pin on the left | Description | I | Description | Pin of the right |
|---|---|---|---|---|
GND |
Logic ground | I | PWM for the engine A | PWMA |
VCC |
Logic VCC 2.7V-5.5V | I | Direction Pin 2 Engine A |
AIN2 |
AO1 |
Engine A output 1 | I | Direction Pin 1 Engine A |
AIN1 |
AO2 |
Engine A output 2 | I | Standby Pin | STBY |
BO1 |
Engine B output 1 | I | Direction Pin 1 Engine B |
BIN1 |
BO2 |
Engine B output 2 | I | Direction Pin 2 Engine B |
BIN2 |
VMOT |
Engines Vin 4.5V-13.5V | I | PWM for the engine B | PWMB |
GND |
Engines ground | I | PWMs and xINy ground | GND |
Therefore, module should supply following communications:
- power supply for engines (
VMOT/GND- power-supply 7.4V); - power supply for logic (
VCC/GND- power-supply 5V); - speed control PWMs x4 (
PWMA,PWMB,GND- PCA9685 PWM channels); - directions pins x2 per motor, x8 in total (
AIN1,AIN2,BIN1,BIN2- Raspberry Pi GPIO digital pins); - standby pins x2 (
STBY- Raspberry Pi GPIO digital pin; enables / disables both motors); - output engine connectors as terminals x4 (
AO1,AO2,BO1,BO2- engines).
Sketch
Here is a small sketch.
Manufacturing the module
Soldering
Assembling & installation
Demo
Here is a basic functionality demonstrated. I keep the software behind the scenes at the moment.
I will place an update on this later.