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?
TB6612, DC motor, feather M0 basic
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- dastels
- Posts: 15817
- Joined: Tue Oct 20, 2015 3:22 pm
Re: TB6612, DC motor, feather M0 basic
Ain1 and Ain2 control the direction of motor A, and basically the motor gets power when PWMA is High.
https://learn.adafruit.com/adafruit-tb6 ... ns-1214507 for more.
Dave
If you don't need to control the speed of the motor, connect PWMA to High. See Dave
- Hapka
- Posts: 89
- Joined: Fri Jul 03, 2015 10:52 pm
Re: TB6612, DC motor, feather M0 basic
It works!
Thank you, that was precisely what I needed!
Thank you, that was precisely what I needed!
Please be positive and constructive with your questions and comments.