hi Adafruit,
this board has a pin which when connected to GND puts the motors in standby. That's really great for my stepper which tends to get hot, but isn't working most of the time.
how should I wire this pin to an Arduino? I see that there's already a pullup on the pin, but do I need another one to 5v?
I'm not sure if something like digitalWrite(LOW, STBY) connects the pin to GND? (I don't want to just try it in case it fries the Arduino) Will the current sunk by the TB6612 breakout STBY be low enough that my 5v Pro Trinket can handle it? Or do I need a transistor to switch it?
thx -- wylbur.
TB6612 breakout wiring for standby pin
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_bill
- Posts: 88149
- Joined: Sat Feb 07, 2009 10:11 am
Re: TB6612 breakout wiring for standby pin
Yes. That will do it. The STBY pin has a fairly high input impedance so the current flow will be minimal.I'm not sure if something like digitalWrite(LOW, STBY) connects the pin to GND?
- virtualmo
- Posts: 4
- Joined: Sun Feb 22, 2015 3:03 pm
Re: TB6612 breakout wiring for standby pin
My code is intended to advance the motor by one step every minute. Since that's a LOT of not moving, the stepper gets quite hot. So I want to invoke the standby mode to turn the motor off before the long delay. When I pull the pin LOW, it turns the stepper off just fine, but I can't get it to go HIGH again to advance the motor after the 60 second delay.
Thoughts? Thank you!!
-------------------------------------
Thoughts? Thank you!!
-------------------------------------
Code: Select all
#include <Stepper.h>
const int stepsPerRevolution = 513;
Stepper myStepper(stepsPerRevolution, 4, 5, 6, 7);
int advance = 1;
int counter = 1;
int standby = 8; // pin connected to STANDBY mode on motor driver
void setup() {
// initialize the serial port:
Serial.begin(9600);
pinMode(standby, OUTPUT);
}
void loop() {
for (int stepCount = 0; stepCount <= 514; stepCount ++)
{
digitalWrite(standby, HIGH);
myStepper.step(advance);
Serial.print("step:");
Serial.println(stepCount);
digitalWrite(standby, LOW);
delay(1000 * 60);
}
}
Last edited by adafruit_support_bill on Sun May 20, 2018 9:10 pm, edited 1 time in total.
Reason: Please use [code] tags when posting code to the forums
Reason: Please use [code] tags when posting code to the forums
- adafruit_support_bill
- Posts: 88149
- Joined: Sat Feb 07, 2009 10:11 am
Re: TB6612 breakout wiring for standby pin
Logically, that looks correct. But I'm not sure if there are any timing considerations with respect to the STBY pin that might cause problems like you are seeing. The data sheet is not clear on that.
Typically, power to the windings would be modulated via the PWMA and PWMB pins. To limit power dissipation while idle, you would lower the holding current by reducing the PWM duty cycle on those pins.
Typically, power to the windings would be modulated via the PWMA and PWMB pins. To limit power dissipation while idle, you would lower the holding current by reducing the PWM duty cycle on those pins.
- virtualmo
- Posts: 4
- Joined: Sun Feb 22, 2015 3:03 pm
Re: TB6612 breakout wiring for standby pin
Thanks for your response. When you say 'timing considerations' might you be thinking because there isn't much time for the STBY pin to go high before the step advances and the pin goes low again? Sounds reasonable, to test your hypothesis, I added a 10mSec delay here:
digitalWrite(standby, HIGH);
delay(10);
myStepper.step(advance);
Bingo! The motor advances. Better yet, it's not hot to the touch any longer.
Thank you, Bill!
digitalWrite(standby, HIGH);
delay(10);
myStepper.step(advance);
Bingo! The motor advances. Better yet, it's not hot to the touch any longer.
Thank you, Bill!
- adafruit_support_bill
- Posts: 88149
- Joined: Sat Feb 07, 2009 10:11 am
Re: TB6612 breakout wiring for standby pin
Good to hear that worked for you. Thanks for the follow-up.
- perryadema
- Posts: 3
- Joined: Wed Jun 19, 2019 4:45 am
Re: TB6612 breakout wiring for standby pin
Hi, I am trying to connect a TB6612 with a 12V stepper to my Ardiuno uno but already "burned" one TB6612 and Arduino and in my second attempt I am getting again sparks on the Arduino board. Can you check my schedule to see what am I doing wrong in the wiring?
- Attachments
-
- tb6612 12V schedule.jpg (132.6 KiB) Viewed 766 times
- adafruit_support_bill
- Posts: 88149
- Joined: Sat Feb 07, 2009 10:11 am
Re: TB6612 breakout wiring for standby pin
You are connecting VIN from the Arduino to VM and also 12v to VM. Use only one or the other.
- perryadema
- Posts: 3
- Joined: Wed Jun 19, 2019 4:45 am
Re: TB6612 breakout wiring for standby pin
On your site a found a schedule for a 5V stepper. Is there also one for a 12V stepper?adafruit_support_bill wrote:You are connecting VIN from the Arduino to VM and also 12v to VM. Use only one or the other.
- adafruit_support_bill
- Posts: 88149
- Joined: Sat Feb 07, 2009 10:11 am
Re: TB6612 breakout wiring for standby pin
Motor voltage specs tell us nothing at all about wiring.
Please post a link to the electrical specifications for your stepper motor.
Please post a link to the electrical specifications for your stepper motor.
- perryadema
- Posts: 3
- Joined: Wed Jun 19, 2019 4:45 am
Re: TB6612 breakout wiring for standby pin
How convenient.
Please be positive and constructive with your questions and comments.