I believe that there’s a lot of RaspberryPi projects outside the tech world, a lot of good stuff that you can make especially if you are a “DIY guy” that always want to make your own version of “that very cool thing!” one day my boss gave me a RaspberryPi(That’s the first time I saw and touch a RaspberryPi, all thanks to ferduc). Playing with the RPi and installing different Linux flavor Operating System on it is quite fun. but then one time a saw a blog about “Controlling Bigtrak Motors with RaspberryPi” and its quite impressive and that’s give me interest to DIY my own version of RPi and motor controller here’s the details

 

Materials:

  • RaspberryPi
  • TB6612FNG (dual motor controller)
  • 2pcs 6V DC motor (tb6612fng can handle up to 15v supply for dc motor please read the datasheet)
  • 4pcs AA Battery
  • battery holder for AA Battery
  • Prototyping Board(Bread Board)
  • Jumper Wire (Solid)

 

Before starting to assemble and try to work around anything, you need to alteast try to read and analyse some of the basics of the following

Note: These guides above are very important for You to avoid destroying your RaspberryPi

 

My Work Around

TB6612FNG Motor Controller

TB6612FNG

Download data sheet here

RaspberryPi GPIO

RaspberryPi GPIO

Wiring Details (Rpi GPIO to TB6612FNG MC)

AIN1 => GPIO 27/21
AIN1 => GPIO 27/21    
AIN2 => GPIO 4        
BIN1 => GPIO 24       
BIN2 => GPIO 25       
AO1 => DC motor 1     
AO2 => DC motor 1
BO1 => DC motor 2
BO2 => DC motor 2
PWMA => 17
PWMB => 23
STBY => 22
VCC => 3.3v of RaspberryPi (pin 1)
VM => power source (for DC motors)

 

Wiring Diagram Diagram

Python code sample here Pidro