I picked up a TB6612FNG at sparkfun (SparkFun Motor Driver - Dual TB6612FNG (1A) - ROB-14451 - SparkFun Electronics) to use to power two motors that I have for a project. I'm still very new to the arduino and so far everything that I've needed to do had relatively simple to follow guides somewhere on the net, but I can't find one for this chip. I've never used a pwm before nor have I used the analog pins on the arduino, I'm not even sure which are the pwm pins on the nano.
The few things that I do know are that VCC is a low voltage current, VM is a higher voltage current (9v battery in my case), and GND is ground. If somebody could help me get this thing working, I would be very grateful.
edit: I think it might be helpful if I describe what I am trying to do. I have the brain (?) of a line follower robot working using sensors to find the line, and I just need to have the arduino tell the motors what to do.
That is the pinout. None of the PDF's or pictures on the sparkfun website show that. I'm assuming that AIN1/2 and A01/02 are for one motor, and BIN1/2 and B01/02 are for the other, and PWMA/B connects to the pwm pins on the arduino, but I'm not sure and I don't want to destroy another chip like my poor little propeller
I tried plugging AIN1 and BIN1 to Digital pins 11 and 12, VM to a 9v battery Positive terminal, VCC to the +5v out from the nano, all three grounds to the 9v Negative terminal, and the leads from one of the motors into A01/B01. I coded it to send HIGH out through 11 and 12, thinking that this would be what I needed to do. It didn't work. I tried again with AIN1/2 and A01/A02 with the same code and got nothing. I still don't know what to do with the PWM pins, I think that is my problem. Is that the only piece that I am missing, or am I very much confusing something?
JP1
Pin 1 to battery negative
Pin 2 to one end of motor 2
Pin 3 to other end of motor 2
Pin 4 to one end of motor 1
Pin 5 to other end of motor 1
Pin 6 to battery negative
Pin 7 to +5V on the Arduino
Pin 8 to + on the battery.
JP2
Pin 1 - PWM signal to control motor 1
Pin 2 - Direction / on / off motor 1
Pin 3 - Direction / on / off motor 1
Pin 4 - Standby - high = motors on - LOW = motors off
Pin 5 - Direction / on / off motor 2
Pin 6 - Direction / on / off motor 2
Pin 7 - PWM signal to control motor 2
Pin 8 - to arduino ground.
The Direction / on / off lines must be at different states for the motor to run. When they are the same state the motor stops.
PWMA = PWM Motor 1 VM = Battery +
AIN2 = Motor 1 Dir VCC = Arduino +5
AIN1 = Motor 1 Dir GND = Battery -
STBY = HIGH ON, LOW OFF A01 = Motor 1
BIN1 = Motor 2 Dir A02 = Motor 1
BIN2 = Motor 2 Dir B02 = Motor 2
PWMB = PWM Motor 2 B01 = Motor 2
GND = Battery - GND = Battery -
So if I am reading your post correctly, that is the pinout? So to get motor 1 to go in a direction (assuming the VM, VCC, and grounds are connected), all I need to do is plug AIN1 and AIN2 to digital OUT pins on the arduino, A01 and A02 to the two pins for motor 1, and STBY to a digital OUT (set to HIGH). This is correct? What do I do with the PWM pins?