TB6612FNG H-Bridge ...
 
Notifications
Clear all

TB6612FNG H-Bridge Motor Controller - Better than L298N?

4 Posts
2 Users
0 Likes
1,247 Views
DroneBot Workshop
(@dronebot-workshop)
Noble Member Admin
Joined: 4 years ago
Posts: 1174
Topic starter  

Today we are going to work with the TB6612FNG, a MOSFET-based H-Bridge Motor Controller that has many advantages over the popular L298N.

Article with code and more information - https://dbot.ws/tb6612fng

When you want to control the speed and direction of a DC Motor an H-Bridge is what you need. And when working with low-voltage motors the go-to module has always been the L298N. It’s cheap, easy to use, and available from just about everywhere you buy electronic parts.

But the L298N is far from perfect. It drops the motor voltage by 1.4-volts and dissipates all of that lost power as heat, which is why it requires such a large heatsink. And it’s pretty large, mostly due to that big hunk of metal.

The problem with the L298N is that it uses bipolar junction transistors (BJTs). A better way to design an H-Bridge is to use MOSFETs.

Enter the TB6612FNG. This MOSFET-based H-Bridge can replace the L298N in most applications, and it is so efficient that it doesn’t even require a heatsink! It’s a few pennies more than the L298N, but as I’m sure you'll see, it’s well worth it.

This device is also much smaller than the L298N, it’s available on dedicated motor control modules, on Arduino shields, and HATs for the Raspberry Pi. And, perhaps best of all, you can wire it into your L298N circuit and use the same code with it!

Here is what we will be covering today in our look at this H-Bridge motor controller:

00:00 - Introduction
02:03 - Introduction to TB6612FNG
04:55 - Look at TB6612FNG
06:58- TB6612FNG vs L298N
09:50 - TB6612FNG Arduino Hookup
25:06 - Ugly Robot Car

Yes, the last one was an “ugly robot car”. I put the TB6612FNG onto one of those acrylic car bases and gave it a test using a versatile library from Sparkfun. I think you’ll agree, that’s one ugly car - but it does work!

"Never trust a computer you can’t throw out a window." — Steve Wozniak


   
Quote
Aubey
(@aubey)
Active Member
Joined: 2 years ago
Posts: 6
 

Hi Bill,

I have been struggling with the Adafruit version of the TB6612 breakout board and DC motors. I cannot for the life of me get it to turn the motors. The boards seem the same in terms of pinouts, the are just in different locations. I am using two Mini DC Electric Gearbox Dual Shaft Geared TT Motor (3-6V), the little yellow ones that are available everywhere. I wired it as per the pinout you provided (Adafruit support for this board is slim). The motors are powered by a 5 X AA battery pack (6.5-7.5) and the Arduino from my laptop USB. The board is getting power from both sources and have ground shared. I have tried both your layouts and sketches - nothing. I reviewed the Sparkfun header files and I don't see anything specific to their version of the TB6612 breakout board. It may be worth nothing that I was unable to get the Adafruit Motor shield V.2 working either. I have some L298N H-bridges, that I may go with, but I do like the idea of the lower power hit of the TB6612 H-bridge. Any help or suggestions would be greatly appreciated. Thanks.


   
ReplyQuote
Aubey
(@aubey)
Active Member
Joined: 2 years ago
Posts: 6
 

So, after a good night's sleep, I figured out that I need to solder the headers to the TB6612 breakout board. Did that this morning - my first time soldering anything more than battery pack lead - and I have one motor working. I need to check the solder on the A motor pins and retry. 

Just a note, for posterity, about how the pandemic is complicating this process. My wife was sent home from work last week to quarantine because she had been in (masked) contact with a co-worker who had tested positive. I have a rare neuroendocrine type of cancer and an autoimmune disease, so she has been quarantining in the basement, where my office/workshop happens to be located. She also shares the office part when she works from home of the large room (it was our son's large ensuite bedroom I built when he was a teenager), so I must wear a mask, try not to touch anything needlessly, and keep my time in the Q-zone to a minimum. So while I am struggling to solder tiny header pins, for the first time ever, she is worriedly telling me I am spending too much time in the basement. Crazy times.


   
ReplyQuote
DroneBot Workshop
(@dronebot-workshop)
Noble Member Admin
Joined: 4 years ago
Posts: 1174
Topic starter  

@aubey

Glad you have it figured out, and good luck with the soldering!

And I am so sorry to hear of your diagnosis, it must be even more difficult with your wife isolating.  I hope everything works out for you both.

😎

Bill

"Never trust a computer you can’t throw out a window." — Steve Wozniak


   
ReplyQuote