motor - changing rotation way with one pulsd


Closed Thread
Results 1 to 12 of 12

Hybrid View

  1. #1
    xnihilo's Avatar
    xnihilo Guest

    Smile motor - changing rotation way with one pulsd

    Hello,
    i wonder if someone might know.

    i need to make a motor rotate in one direction then it the opposite direction everytime i send a pulse with a pic.

    let's imagine i use pin ra0 of a pic16f684; i output 5v for 150ms to some mysterious/magical mcguffin ic, motor turns clockwise for 150ms. later i output again 5v for 150ms but motor will turn counter clockwise for 150ms.

    motor has to change direction at every pulse and rotate for the duration of the pulse.

    Does such cheap magical ic exist???

    Thanks.

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by xnihilo View Post
    let's imagine i use pin ra0 of a pic16f684; i output 5v for 150ms to some mysterious/magical mcguffin ic, motor turns clockwise for 150ms. later i output again 5v for 150ms but motor will turn counter clockwise for 150ms.
    motor has to change direction at every pulse and rotate for the duration of the pulse.
    Does such cheap magical ic exist???
    Thanks.
    Probably not...but why not make said 'magical' IC yourself by using...oh...I don't know...something like a...well...maybe...a....PIC...
    No, a PIC most likely wouldn't actually be able to DRIVE a motor, but you could easily connect it to an H-bridge setup and drive it from there.

  3. #3
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    Right here it is.

    http://www.picbasic.co.uk/forum/showthread.php?t=6548

    I did no magic but it is possible.

    Just modify it as you need.


    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  4. #4
    Join Date
    Oct 2007
    Location
    The Netherlands
    Posts
    45


    Did you find this post helpful? Yes | No

    Default

    Another possibility is to use two relays, controlled by two pins of the PIC. One for forward the other for reverse. See the simple attached drawing
    Attached Images Attached Images  

  5. #5
    xnihilo's Avatar
    xnihilo Guest


    Did you find this post helpful? Yes | No

    Smile

    Sayzer, Eggman,

    Thank you both.

    regards!

    PS:
    Skimask: that was the idea, using a pic to control the stuff but I can dedicate only one pin to control the motor so probably the idea of Sayzer is the one that might best fit my needs... Even if I will need to use relays anyway because the motor will be more than 5V.

  6. #6
    Join Date
    Mar 2006
    Location
    China
    Posts
    266


    Did you find this post helpful? Yes | No

    Default 150ms

    are you even sure the motor will have enough time to even move before the time is up?

  7. #7
    Join Date
    Feb 2003
    Posts
    432


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by xnihilo View Post
    Sayzer, Eggman,

    Thank you both.

    regards!

    PS:
    Skimask: that was the idea, using a pic to control the stuff but I can dedicate only one pin to control the motor so probably the idea of Sayzer is the one that might best fit my needs... Even if I will need to use relays anyway because the motor will be more than 5V.
    Dont forget that the relay will probably take around 25mS to operate and release so a solid state solution might be much better.

    thee is also the life of the relay to consider. If you are changing direction every 150ms that is over 3.3 complete cycles of the relay every second. Even with a life of 1 million operations it will take less than 85 hours to reach that figure !!!!!
    Keith

    www.diyha.co.uk
    www.kat5.tv

  8. #8
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by eggman View Post
    Another possibility is to use two relays, controlled by two pins of the PIC. One for forward the other for reverse. See the simple attached drawing
    It is also possible to make it using one dual contact relay.

    Right here it is: http://www.picbasic.co.uk/forum/showthread.php?t=8567

    However, our friend xnihilo needs to control the whole thingie with one pin.

    -----------------
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

Similar Threads

  1. 2D Matrix Rotation
    By Art in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 16th February 2010, 12:34
  2. Encoder rotation calculation
    By Stefan in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 31st October 2007, 07:37
  3. picbasicpro with rotation
    By cesurcelik in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 13th February 2006, 09:05

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts