Need help designing a circuit

Discussion in 'The Projects Forum' started by mongoose711, Aug 29, 2010.

  1. mongoose711

    Thread Starter New Member

    Sep 4, 2009
    7
    0
    I am trying to build a circuit to operate a small motor setup, in a similar fashion to that of a CD drive tray. By this I mean that the motor should run via a single button press in one direction a given amount, then stop; and on a second press of the button run in the other direction a given amount and stop. Any help with this is greatly appreciated.
     
  2. windoze killa

    AAC Fanatic!

    Feb 23, 2006
    605
    24
    If you have pulled apart a CD drive you will notice there are small micro switches at each end of travel. These stop the tray before damage occurs. You will need to employ something similar for a simple method. To step up a level you could use photo interupters (fancy name for a light switch). When the light from a LED no longer falls on a photo transistor it will operate like a switch. Have a bit of a search on this forum and you will be surprised what you will find. I know there was a recent post regarding the switch method.
     
  3. Bernard

    AAC Fanatic!

    Aug 7, 2008
    4,173
    397
    Is the motor run a timed event or a distance measure?
     
  4. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    And does this one button operate the forward and reverse?
     
  5. mongoose711

    Thread Starter New Member

    Sep 4, 2009
    7
    0
    Yes the one button operates both.

    "Is the motor run a timed event or a distance measure? "
    It should run till it reaches its limits switches as suggested by windoze killa.
     
  6. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    Ok, just a little flow chart, tell me if it is correct:

    1. Press Button
    2. Motor drives object until limit switch(A) is triggered
    3. Does the motor stop here and wait for the next button press, or does the item reverse now, like windshield wipers?
    3a. (If button press is required for reversing) Press button
    4. Motor drives in reverse until limit switch(B) is triggered
     
  7. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Have a look at the attached circuit.

    The L2722 is pin-equivalent to the industry standard L272 0.7A power opamp, but can output closer to the power rails. Since you haven't mentioned what your power rail(s) are, 5v is shown.

    U2C in conjunction with R1, R2, C1 serve to de-bounce the clock input from S1 to U1A, a dual-D type flip flop. U2 is a quad Schmitt-trigger NAND gate. You need Schmitt triggers to ensure no ambiguity.

    Pressing S1 toggles the state of U1A. Right now, the state of the FF will be arbitrary on power up. Add a RC network to the R (reset) input, cap to Vdd, 10k resistor to gnd, to ensure a known state on power-up.

    S2 and S3 are limit switches.
    R3 and R4 keep one input high to U2A and U2B respectively, unless a limit switch is closed.
    R5 and R6 keep the inverting inputs of U3A/B at Vdd/2
     
    Last edited: Aug 30, 2010
  8. John P

    AAC Fanatic!

    Oct 14, 2008
    1,634
    224
    "Joule thief", ha ha, that's very clever.

    If your motor is very small (and there are such motors) you could run it off the outputs of a CMOS chip and not need any kind of specialized driver.

    For the ultimate in elegance, you could leave out limit switches and just let the motor stall. If the power dissipation is low, this would be harmless. Or, put in a sensor so that when the current goes up, which it will when the motor stalls, the motor is shut off. This could be a resistor in series with the power supply to the CMOS chip I mentioned, which turns on a transistor when the current causes a sufficient voltage drop, and the transistor then drives the logic.

    An 8-pin microcontroller could do this whole thing with hardly any additional parts.

    Edited to add another idea: How about a model aircraft servo? If this thing travels between the same end points, just servo it to those points--maybe with a little flex in the drivetrain so that the motor will complete its travel and there won't be any risk of stalling it, which you can't allow with this type of device. Cheap & easy!
     
    Last edited: Aug 30, 2010
  9. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    You must be referring to this thread:
    http://forum.allaboutcircuits.com/showthread.php?t=42331
    It IS a clever name. Too bad nobody here thought of it first.

    I don't recommend this, as you'll almost certainly be using a CMOS IC outside of it's maximum limits. There ARE, however, many "solid state relays" that might work for such a purpose.

    I'm afraid that I'll have to disagree with you here; as a stalled motor will draw many times its' no-load operating current. If a battery powered device, this means VERY frequent re-charging or replacement. If mains-powered, it means high current consumption when idle. Neither situation is desirable or elegant.

    The idea of using limit switches minimizes the stress on the motor and the object being moved. Properly placed limit switches allows the motor to be electrically braked to a smooth stop by shorting both motor terminals, which is what the (basically) H-bridge configuration I've posted will do.

    That it could; if the stall current of the motor in use did not exceed 20mA. More than that, and external components would be required.
     
  10. John P

    AAC Fanatic!

    Oct 14, 2008
    1,634
    224
    Wookie, I suggest you take a look at this:

    http://www.circuitron.com/index_files/Tortoise.htm

    It's a device used on model railroads to operate the switches. It works by driving a geared motor into a hard stop and allowing it to stall, with no need to kill the current. Current draw is claimed to be 4mA moving and 15mA stalled, on a 12V supply. Hardly a big contributor to global warming!

    They talk about a 9 year warranty, so I doubt if they think the machine is tearing itself to pieces.

    Come to think of it, you could mount one to drive this slide device, maybe via a lever to increase the throw. All the mechanical parts would be packaged right there.
     
  11. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    There are always exceptions to every rule. What you found is a relatively rare one.

    In the case of a model RR, it's necessary to either lock the switch points via use of some kind of cam/toggle/over-center action, or physically hold them in place using a magnet, solenoid, stalled motor, etc. to prevent a passing train from inadvertently moving the points.

    Without knowing more about our OP's situation, I'll stick with my recommendation on avoidance of operating a motor with the rotor locked.
     
  12. mongoose711

    Thread Starter New Member

    Sep 4, 2009
    7
    0
    To address all of the questions.

    The motor stop and wait for the next button press is the config I am looking for.

    the power will be from an atx psu, so 5v and 12v are available. I am leaning towards 5v as I believe I have more motors that are rated at appor that voltage.
    A little more background.I am looking to build a slide out tray that will closely resemble a cd drive, the only diffs being the shape, purpose of the tray and would like to avoid as much of the bulkiness of a cd drives casing, unused components.
     
  13. eblc1388

    Senior Member

    Nov 28, 2008
    1,542
    102
    You also need to think about the inertia of the motor rotor+tray when it hits its end limits. There must be some cushions at the end travel to break the travel movement softly.

    One would think its easy but apparently even a big design company can't design such a setup properly. With end limit switches at both end of travel, my PHxxxxx CD player developed a fault in the sliding tray with the drive pinon sheared right off after repeatedly hitting the end stop in several years of CD loading.

    I went to check online and literally hundreds of others suffered the same fate. Luckily spare part is available but it has cost me $20, for a tiny plastic pinon.
     
  14. marshallf3

    Well-Known Member

    Jul 26, 2010
    2,358
    201
    Ever think of buying an old CD player from a thrift shop for $2 then taking it apart to see how they did it?

    You might even be able to adapt what's in there.
     
Loading...