Reversing a DC motor with microswitches

Discussion in 'The Projects Forum' started by dingding, Jul 23, 2008.

  1. dingding

    Thread Starter New Member

    Jul 23, 2008
    5
    0
    hiya,

    i am really new to electronics and this is my first project! i am trying to construct an automatic tripod head which will rotate through 180, change direction, head back to where it started then change direction again etc etc. the top of the tripod will have a beam on it which i am going to use to knock a microswitch with a lever on it in order to change the direction. I need to motor to spin slowly and have found one which is suitable, a single ratio 3000:1 gearbox motor. however i am unsure of how to make a circuit to control the lot. any ideas?
    After looking around the internet for a little i think i need to make a H bridge. When the switch is hit i need the signal to stay on until the other switch is hit. i think i might need to use a r/s flip flop but can the activation of one switch set one flip flop whilst resetting another? hope this makes a bit of sense!
    thanks,
    alex
     
  2. jpanhalt

    AAC Fanatic!

    Jan 18, 2008
    5,681
    900
    Is it a DC motor? AC may be a bit trickier, depending on the type.

    Do you want an electronic solution (e.g., one using an H-bridge, memory device, etc.) or will just limit switches at each extreme work for you. Here is a link to a Cherry datasheet for On/On DPDT limit switches.

    Wiring switches is relatively easy, just think of how a 3-way light is wired.

    John
     
  3. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Suddenly reversing a DC motor that's running at top speed is going to be pretty hard on it. It would be a good idea to short both leads to ground, Vcc or each other for a second to brake it to a stop prior to reversing it.

    Do you have a link to the motor you're considering purchasing?

    Mechanical switch contacts will "bounce". The contacts actually open and close a random number of times before they settle into their new state. It's typical to de-bounce switch contacts either using hard-wired discrete IC's or by using software in a microcontroller prior to using the signal to control logic functions, such as clocking a flip-flop.
     
  4. jpanhalt

    AAC Fanatic!

    Jan 18, 2008
    5,681
    900
    I think the main question is how complicated the OP wants the solution to be.

    As for mechanical limit switches being hard on the motor, my gut tends to agree. But, my overly simplified analysis doesn't. It is not like snap shifting a car into reverse while going forward, in which case one loses a transmission.

    The the motor coils can only exert so much force, so the reverse will be softened by that factor. The coils will not snap like gear teeth. Also, the mechanical switch is relatively slow break before make. I am assuming the OP is using a really sub-FHP, such as 1/20 HP or less, connected to a worm-gear reduction box. The amount of inertia in the armature is pretty small and the gear box (1:3000) will virtually eliminate any momentum effects from the object being reversed. Of course, there may be problems with the switch arcing, which would have to be taken into account.

    John
     
  5. KMoffett

    AAC Fanatic!

    Dec 19, 2007
    2,574
    230
    An electromechanical solution with 2 DPDT relays. On power-up, both relays attempt to activate, but one will be a little faster and start the cycle. This does not address the sudden motor reversal question. And, there is an extra current requirement because one of the relays is always powered. But it is simple ;)

    Ken
     
    Last edited: Jul 23, 2008
  6. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Ken,
    Your schematic still needs a bit of touch-up. The caption at the bottom doesn't agree with how you're showing the usage of AB.

    How about using 1A/1B for the separate SPDT switches in the 1st relay, and 2A/2B for the 2nd relay? I'm getting confused with the AA AB BA BB stuff. ;)
     
  7. blocco a spirale

    AAC Fanatic!

    Jun 18, 2008
    1,438
    368
    Another option would be to use an RC servo. Perhaps use a couple of 555:D to produce a pulse width that alternates between 1 and 2ms (make these adjustable so that the exact positions can be pre-set) based on the time it takes the servo to travel from one position to the other.
     
  8. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    I like the servo idea. What about jitter though? It's been quite a while since I've fiddled with hobbiest-type servos; and the old ones (like for R/C aircraft) would tend to have a good bit of jitter.
     
  9. KMoffett

    AAC Fanatic!

    Dec 19, 2007
    2,574
    230
    Right you are! This was a quickly minimized version of a 5x4PDTrelays/5xpushbutton switchs toggling circuit. I 'll redo it. :)

    Ken
     
    Last edited: Jul 23, 2008
  10. jpanhalt

    AAC Fanatic!

    Jan 18, 2008
    5,681
    900
    Here's a circuit with just two microswitches for limit switches. According to Digikey, they are maintained, on/on. I didn't know they existed.

    John
     
  11. KMoffett

    AAC Fanatic!

    Dec 19, 2007
    2,574
    230
    Are these considered "Push ON/Push OFF" SPDT switches? Do you have the Digikey part #?

    Ken
     
  12. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    John, I'm afraid that idea won't work. When the limit switch is struck, the outputs of the switch will toggle states, but as soon as the limit switch is released, the outputs will again toggle states - so the motor will sit there rapidly reversing at the hysterisis points of the switch.
     
  13. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Ask yourself what's going to happen when the limit switch is hit, and then the motor backs away from it?
     
  14. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    A single snap-action ON-ON DPDT toggle paddle or bat handled switch could be used, if there were two contactors, one on either side of the switch, that were some distance apart. See the attached. I think that's about as simple as it can get.

    This is the kind of switch I'm thinking of:
    [​IMG]
    http://www.radioshack.com/product/i...es=features&fbc=1&support=support&tab=summary

    If the switch has a "center off" position, it's very likely that the motor won't be able to "coast" through to push the switch lever all the way to reverse direction, so it'll become "stuck".
     
    Last edited: Jul 23, 2008
  15. blocco a spirale

    AAC Fanatic!

    Jun 18, 2008
    1,438
    368
    A single DPDT toggle switch is all that's required. The motor turns and when it reaches the end of its travel knocks the switch over, the motor reverses and when it reaches the opposite end it knocks the switch back again. The important thing is that the switch has a positive action.

    Ahhhhhh, you got there before me Sarge:D
     
  16. jpanhalt

    AAC Fanatic!

    Jan 18, 2008
    5,681
    900
    Hi Ken and SgtWookie,

    Of course, I am aware of the issue you mention and the usual solution of using a relay.

    However, just to be sure limit switches with maintained contacts weren't made, I searched on DigiKey. Search sequence: microswitch>DPDT>on-on. The latter On-On is to eliminate the two momentary options. Anyway, three possibilities came up.

    If you click on any of them, you will see inconsistent data, some showing momentary and some showing maintained. I could not resolve that discrepancy by looking at the Cherry datasheet. But that is not to say it is not there. I may have missed it. That's exactly why I added the comment that I didn't know they existed in my earlier post.

    However, out of some 5000 microswitches at DigiKey, only those three showed up with the search criteria just described, so maybe they really are rare birds for special apps.

    In any case, and back to the original OP, I think relays and microswitches (or these special rare birds) would be the way to go for someone who is inexperienced in electronics and doesn't want to make the need for motor reversing into its own project. So many times, it seems, someone gets started on an H-bridge, PWM circuit and has a tough time just getting the oscillator to work.

    John

    Edit: Darn it. That link doesn't work and I can't figure how to get to the actual search results page directly. So anyone who wants to try, will need to do the search sequence.
    Edit#2: Now the link works. Strange.
     
    Last edited: Jul 23, 2008
  17. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    John,
    I tried the search several different ways, and just couldn't make it work!

    Anyway, I can't see how that type of switch could work in this application unless it was used in conjunction with relays or some other electrically-releaseable switch.

    But I think that a single DPDT on-on switch with two contactors would work pretty well, and it would be pretty difficult to come up with an easier solution.
     
  18. jpanhalt

    AAC Fanatic!

    Jan 18, 2008
    5,681
    900
    I think something is amiss at DigiKey. See my experience in the edits to post#16.

    It is probably a moot point now. What I thought I saw was a pushbutton DPDT switch that toggled on/on with each push, not "push on, push off," which also answers part of Ken's question. However, since push on, push off single throw switches are well known, I don't see any reason not to suspect that a push on, push on DT switch couldn't also be made. John
     
  19. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Ahh, I think I'm finally getting what you're talking about.

    Sort of like the old power switches for computers; those were push on, push off - but if they were SPDT instead of SPST, that would work.
     
  20. jpanhalt

    AAC Fanatic!

    Jan 18, 2008
    5,681
    900
    Interesting discussion. I think you mean DPDT -- you need to take care of both lines to reverse a DC motor. I hope dingding gets it all. He has not joined in, as of yet. :)

    John
     
Loading...