TB6612, DC motor, feather M0 basic

This is a special forum devoted to educators using Adafruit and Arduino products for teaching.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Hapka
 
Posts: 89
Joined: Fri Jul 03, 2015 10:52 pm

TB6612, DC motor, feather M0 basic

Post by Hapka »

I am using a tb6612 motor controller, a feather M0 basic, and a DC motor and coding in circuitpython.

I started with starter code from this tutorial:
https://learn.adafruit.com/use-dc-stepp ... /dc-motors

I changed the pin definition lines of code towards the beginning to

PWM_PIN_A = board.D9
PWM_PIN_B = board.D10

I have pins 9 and 10 on the feather connected to Ain1 and Ain2 on the motor controller.

I have the motor connected to the two motorA pins.
I have Vcc on motor controller to 3V on feather, and gnd on motor controller to gnd on feather. (the one next to Vcc)
I have a 9V battery connected to the Vmotor pins on the short edge of the motor controller.

The code runs without error but the motor doesn't move. I feel like I have a simple wiring/power issue? My motor runs fine with the battery, and the code runs on the feather (there are some print statements to the serial window).

I'm not doing anything fancy with the motor, just turning it on and off and changing direction. Any suggestions?

User avatar
dastels
 
Posts: 15608
Joined: Tue Oct 20, 2015 3:22 pm

Re: TB6612, DC motor, feather M0 basic

Post by dastels »

Ain1 and Ain2 control the direction of motor A, and basically the motor gets power when PWMA is High.
6612-mode.png
6612-mode.png (19.33 KiB) Viewed 418 times
If you don't need to control the speed of the motor, connect PWMA to High. See https://learn.adafruit.com/adafruit-tb6 ... ns-1214507 for more.

Dave

User avatar
Hapka
 
Posts: 89
Joined: Fri Jul 03, 2015 10:52 pm

Re: TB6612, DC motor, feather M0 basic

Post by Hapka »

It works!

Thank you, that was precisely what I needed!

Locked
Please be positive and constructive with your questions and comments.

Return to “For Educators”