1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

PWM Motor Control Question

Discussion in 'Robotics & Mechatronics' started by Iawia, May 16, 2013.

  1. Iawia

    Iawia Member

    Joined:
    Jul 21, 2011
    Messages:
    128
    Likes:
    1
    Location:
    San Diego, California US
    Hi,

    I have managed to get an Arduino to send out pwm signals (max 5v). I am looking to drive a hobby type motor (12v) to drive the wheels of a small cart (about 1.5 lbs or .7 kg). I found this .pdf of chip of TPIC0108B - 'Intelligent H Bridge'.

    I need the motor switching function, hence the bridge feature and have pwm as input, but reading the data sheet it is not clear that the pwm can be sent to IN1 & IN2. Is this implied? The function table just says 0 1 & 1 0 as the binary. I hate to purchase on assumption.

    Also, is it ok to ground 'gnd' to 'gnds' together and what is the consequence of this? Just my curiosity, why are there so many grounds, OUT1 and Vcc all over the place? Is this just for convenience for a two or motor setup? (bc I do have two motors).

    Thanks to all who read and respond!
    Cheers,

    -t
     

    Attached Files:

  2. koolguy

    koolguy Active Member

    Joined:
    Aug 24, 2010
    Messages:
    2,196
    Likes:
    9

    I am not sure that Arduino work on less than 5V anyway, for controlling motor you can use L298 also there will be no problem if input signal is 3.3V also...i have used it on 3.3V tooo.
     
  3. alec_t

    alec_t Well-Known Member Most Helpful Member

    Joined:
    Jul 10, 2011
    Messages:
    9,255
    Likes:
    1,218
    Location:
    Cardiff, Wales
    Look at the waveforms. It is clear that to run the motor you keep one of the In1/In2 pins low and pulse the other with the PWM signal.
    The datasheet says "NOTE: It is mandatory that all four ground terminals plus at least one substrate terminal are connected to the system ground. Use all VCC and OUT terminals." Multiple GND/Vcc/Out pins are used to share the IC load (not for driving a second motor).
     
    Last edited: May 17, 2013
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. Iawia

    Iawia Member

    Joined:
    Jul 21, 2011
    Messages:
    128
    Likes:
    1
    Location:
    San Diego, California US

    Yes, hi Ritesh. The Arduino does push a 5v amplitude for its pulse train, so will this controller work for switching a motor, as well as using pwm as speed control? The L298 looks like exactly what I am looking for. What does the Vsense do? Not sure how to manipulate the sensing voltage and resistor. Can you please tell me? I am looking for high sensitivity so that the cart will respond quickly, such that if the the motors will turn with even small duty cycles, and then speed up with heavy cycles.

    Vs I will set to 12v.
     
  6. koolguy

    koolguy Active Member

    Joined:
    Aug 24, 2010
    Messages:
    2,196
    Likes:
    9
    OK, please have a look to data sheet it has all information and its simple..
    anyway, the Vs logic is used for comparing your uC out signal to it if you are using 3.3V then give 3.3V to V logic supply and connect the PWM to enable and use input 1 and 2 for direction control..then current sensing are used for limiting maximum current so, set it to gnd only both current sensing to ground!!
     
  7. Pommie

    Pommie Well-Known Member Most Helpful Member

    Joined:
    Mar 18, 2005
    Messages:
    10,019
    Likes:
    317
    Location:
    Brisbane Australia
    Oh, the irony.

    Mike.
     
  8. Mr RB

    Mr RB Well-Known Member

    Joined:
    Jul 22, 2008
    Messages:
    4,716
    Likes:
    194
    Location:
    Out there
    Begun the learning process has... ;)
     
  9. Iawia

    Iawia Member

    Joined:
    Jul 21, 2011
    Messages:
    128
    Likes:
    1
    Location:
    San Diego, California US
    some ppl here are not as knowledgeable like you guys, we are looking for help. I have read the datasheet several times and still did not understand Vsense, HENCE the re-post.
     

Share This Page