Shop OBEX P1 Docs P2 Docs Learn Events
Prop H-Bridge and PWM Problemo — Parallax Forums

Prop H-Bridge and PWM Problemo

John BoardJohn Board Posts: 371
edited 2012-03-09 13:27 in Propeller 1
G'day everyone,

I am using a TB661FNG (Motor driver) with the propeller chip, however, I haven't been able to figure out a way to keep the motor running (as funny as it might sound). I have been using this page as a guide: http://www.meanpc.com/2012/01/how-to-use-tb6612fng-motor-driver-with.html

I am also using the Gadget Gangster board for my platform.

I have the wiring as follows:

GND = GND
VCC = 5v
AO1 = MTR -
AO2 = MTR +
VMOT = 6v
GND = GND
PWMA = P16
AIN2 = P17
AIN1 = PIN18
STBY = 5v (Just to remove the need to pull it high by code)

I can't tell you the code that I have... because I have practically none...

That is where the wonderful community, called "Parallax Forums" comes in! The motor responds to me toggling the PWMA pin at about 10 MS intervals, however, it only pulses the wheel once, before cutting off, although the code is inside a "repeat" block. I have tried a few feable attempts at PWM with some libraries, no more success. I am sure it is a code issue, however, I have no idea how to fix it. Anyone got any ideas?

Thanks for your help in advance!

-John

Comments

  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-03-09 08:46
    Just to make sure it works try hooking up the controller without the Prop.

    Make these changes.

    Connect:
    PWMA = 5V
    AIN1 = 5V
    AIN2 = GND

    Just to see if the motor will turn.

    If the motor does turn, then switch the 5V connections to 3.3V to make sure it works with 3.3V logic.

    If it's still working, connect PWMA to the Prop and try pulsing it.
  • John BoardJohn Board Posts: 371
    edited 2012-03-09 13:27
    Hmmm... Interesting idea, never thought of it. I hooked everything up as you said, and manually "pulsed" the PWMA pin. It worked when I hooked it up to both 5V and 3.3V. I didn't have to toggle the signal to make it start and stop, only toggle it from high to low (manually). The PWM probabbly isn't a requirement, it is only there to control the speed of the motor.

    Well, I am gonna make some simple code (Go High for 1 sec, go low for 1 sec) and see what I can come up with. Thanks for your help!

    -John
Sign In or Register to comment.