How to use a TB66212 as easily as an LP298n

Hi all,

I have purchased a TB6612 in order to replace an LP298n to power one single motor. Bad surprise as it is waaaaaaay more complicated to connect when the LP298n is such a piece of cake with just some power and one single digital connection from the Arduino.

Has anyone found the way to connect this tiny TB6612 the same simple way ?

Thank you

Do you mean the chips or driver modules?

I agree that an inverted IN2 input and shorted IN1/IN2 for direction had made the chip easier to use.

1 Like

Talking about the driver.
Your comment is interesting, any link please ?
Thank you

Link to what?

Did you see the many other drivers with only PWM (or Step) and Direction inputs?

I need the smallest possible and the TB6612 is the smallest one I could find.

I only need one with PWM, VCC and GROUND. Nothing more.

I was asking about a link explaining inverted input AIN2 and shorting AIN1/AIN2

Read the datasheet. You will find a schematic of a microprocessor connected to a TB6612 with six pins of output.

The PWM connection must remain under microprocessor control, but if you tie the other four to appropriate logic levels, you will have a dumb PWM only motor controller.

HTH

a7

If you don't want to change direction then you can hard wire all inputs except PWM.

Inverted inputs are widely used in RS-485 modules to change direction. One input enables reading while LOW, the other input enables writing while HIGH. Connecting both will change direction with a single signal. If both inputs (like AIN1/AIN2) have same polarity then an inverter has to be added for such a single signal control.

If you don't want to change direction then you can hard wire all inputs except PWM.

Ok super interesting.
By hard wire you mean I connect the VCC to all the other connections except to he pwm ?

… we mean connect the four unused inputs each to an appropriate logic level.

Use a 4K7 resistor on every input that is to be held at a constant level, and wire the other end of each resistor either to Vcc to tie it high (true), or to GND to make it low (false).

Then as you have realized, the PWM pin can be used alone to control the speed of the motor.

Consult the datasheet and figure out what those four inputs should be for making the motors spin the one direction you are interested in.

HTH

a7

1 Like

Post your L298 connection diagram.

Quote
Use a 4K7 resistor on every input that is to be held at a constant level, and wire the other end of each resistor either to Vcc to tie it high (true), or to GND to make it low (false).
UNQUOTE

1- That is very helpful ! My electronics knowledge is super basic and I had no idea I could do that
Thank you !

2- By default, for my education,
do I absolutely need a 4K7 when connecting unused inputs to the ground for LOW values ?

3- I am also reading that I need to put the standby value to High... Do I need also a 4k7 resistor ? Or can I just connect it to the VCC ?

I will try to make a hook-up map of my Ln298

Again, thank you for your time.

We happy to help.

Forum hardware heavies will weigh in, this is a bit above my pay grade:

With regard to the necessity of the resistors… it depends.

Often, no resistor is needed on inputs that are hard wired.

Studying the data sheets of the two devices would be a way to figure out if you need the resistors in your circumstances.

You could use four output pins, and just set them as outputs and to the value you want in setup().

No one wants to waste pins like that.

You could just wire them to Vcc or GND as needed and and hope for the best. I advise against that, because I don't want to see anything go wrong on my advices.

Or… you could use the resistors. The value is not critical. Anything from 1K to 47K should work fine. I picked 4K7 but often use 10K.

It's lazy of me, but rather than figure it out every time, I just use a resistor. Im not building 10000 of anything, so there's no reason to not.

HTH

a7

If you only have 3 or 4 wires from the L298 to Arduino and can't draw a diagram, just tell us which Arduino pin connects to which L298 terminal.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.