Shop OBEX P1 Docs P2 Docs Learn Events
LOW command and a Motor driver Problem — Parallax Forums

LOW command and a Motor driver Problem

Andy BAndy B Posts: 17
edited 2006-07-17 22:39 in BASIC Stamp
hi again guys..

i bought this motor driver
http://www.hvwtech.com/products_view.asp?CatID=113&SubCatID=146&SubSubCatID=0&ProductID=30

as you will see,there is a common ground which is connected to the stamp VSS
to control Forward and backward of each motor you send a LOW command.

I:E
Left_F·· PIN 0
Right_F· PIN 1
LEFT_R··PIN 2
Right_R· PIN 3
LOW 0 and LOW 1 to drive both motors forward, connected to the pins on the L298
my problem is:
when i give it a LOW 2 or LOW 3, the motors freeze, because it hasnt turned off LOW 0 and LOW 1 and is trying to go forwards and backwards at the same time.

Forgive my Stupidity but is there a way to turn off the LOW to that pin? rather than sending a HIGH.
As i am not sure and NOT brave enought to send a HIGH incase i blow the Stamp or Controller.freaked.gif
or should i be using another command to turn it off? ... Making it neither High or Low?

All the help i can get will be greatly appreciated, i'm a very Newbie to roboticssmhair.gif

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Prone to outbursts of ultimate creativity and weird interests

Post Edited (Andy B) : 7/16/2006 4:36:14 AM GMT

Comments

  • Andy BAndy B Posts: 17
    edited 2006-07-16 05:38
    i think i found a solution:

    alloff:
    DIRS = %0000000000000000
    return

    it seems to turn them off, hope i'm right lol

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Prone to outbursts of ultimate creativity and weird interests
  • FranklinFranklin Posts: 4,747
    edited 2006-07-16 05:40
    tie a resistor from the pin to vdd then when you set the pin high it won't be low but it will not have enough power to damage anything. There are examples of this around but I couldn't find any at this time.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • Andy BAndy B Posts: 17
    edited 2006-07-16 15:05
    Thank you stephen, i'll give that a try also and see what works best

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Prone to outbursts of ultimate creativity and weird interests
  • Beau SchwabeBeau Schwabe Posts: 6,557
    edited 2006-07-16 17:45
    By the looks of the L298 datasheet on page 1, it appears that there is logic
    protection that prevents the H-Bridge from self destruction.
    http://www.tecel.com/data/l298.pdf

    In other words, when BOTH inputs (Fwd or Back) are the same either both HIGH
    or both LOW, you have an electronic braking effect from the motor.

    Aside from that the "motor Kit" already has 10K current limiting resistors on
    the inputs.


    Seems like what you want to do is "Disable" the motors.· I would pay attention
    to the "Enable" pin... The documentation says...

    "[color=red]The Enable connection is an active LOW[/color] connection that is pulled HIGH for 
    you on the circuit board. Ground this connection to disable a motor. Note: 
    While disabled, commands from the host microcontroller will have no effect on 
    that motor"
    


    ...It should say "The Enable connection is an active HIGH..."· ...either way,
    making this pin LOW should disable the motor(s).· If you need separate control
    for each motor, then you will need 2 I/O's (One on each motor). If both motors
    can be enabled/disabled at the same time then you will only need 1 I/O. ( Tie
    both Enables on the motor controller kit together. )

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • Andy BAndy B Posts: 17
    edited 2006-07-17 22:39
    I thought there was something wrong with the instructions that came with it..
    Many thanks BEAU i will give that a try tonight

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Prone to outbursts of ultimate creativity and weird interests
Sign In or Register to comment.