air cylinder direction/relays design

Discussion in 'The Projects Forum' started by skippyV, Jul 20, 2015.

  1. skippyV

    Thread Starter New Member

    Jul 20, 2015
    4
    0
    Hello,
    I was given a requirement to to control 2 servos that will spin an air-cylinder either clockwise (CW) or counter-clockwise (CCW).
    Also included with this requirement was the ability to control another relay which enables power to this device.
    And I'm using an Arduino to send the binary commands: on=> 5v, off=>0v
    So in the designers minds I'd need to control the digital output of 3 pins:
    1) turn on/off power to the cylinder
    2) turn on/off relay which engages a CW direction
    3) turn on/off relay which engages the opposing CCW direction

    The air-cylinder is something you would see on the inside of a basic air driven tool - like a grinder.

    So of course, in code, I'll have to make #2 and #3 mutually exclusive.
    No problem. I can do that. But this design seems overly complex to me.
    Since the air-cylinder is going to be going either CW or CCW, it seems to me that a better design would be to add some circuitry so that one direction would be enabled by default.
    And the other direction would be enabled by turning on a relay.
    And have the power relay as planned.
    This way the software could never try and engage both CW and CCW at the same time.

    Now these relays haven't been purchased or reviewed. The first plan was brainstormed and it was figured that I could get the software ready before they figure out what relays would be used or how they'd be wired.

    So my question is - does their plan make sense?

    When I questioned it and tried to state the idea above I got the response of "well what happens when we lose power?".
    Which confounded me even more...


    Thanks, Skippy.
     
  2. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    You have three useful states: Off, CW, CCW.

    Anyway you do it, that takes two Arduino port pins. Two port pins have 2^2 = 4 potential states, one of which is the undesired state where both solenoids are on at the same time. With one port pin per solenoid, you can get the undesired fourth state.

    If you can externally decode the two port pins using this coding: First pin means run if high, stop if low. Second pin means run CW if low, CCW if high. That makes the illegal state impossible...
     
  3. mcgyvr

    AAC Fanatic!

    Oct 15, 2009
    4,769
    969
    You simply need a form C relay contact to change states
    I'm assuming your servo controller simply functions in one direction with a HIGH and the other direction with LOW signal.
    So simply attach the "C" terminal of the relay to the servo controller and 5V to the "NO" terminal and ground to the "NC" terminal. (or switch NC/NO for the desired orientation)
    When the relay is not energized the servo controller input will see LOW, when you energize the relay the servo controller will see HIGH.

    As to power loss...Lets assume that the problem there is that your requirement is that IF power is lost the device MUST continue in the same direction as when power was lost.. Then you would have to always know which direction it was going and "remember" that even if power is lost..
     
  4. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    Safest thing to do during a power loss is to shut everything off, and let it coast to a stop. This would imply that both air solenoids close when there is no power...
     
  5. skippyV

    Thread Starter New Member

    Jul 20, 2015
    4
    0
    Your logic basically agrees with mine. There is a potential for that undesired state regardless if you have two independent signals.
    And in our case that state will result in some shorting out of equipment.

    Maybe my description wasn't adequate. I agree that it will take two ports (two signals), but throwing in the third independent signal with an opposing effect - just opens up the possibility for destruction. I can minimize that possibility in code but I wonder if there is some switching time that can result in the opposing state - even if for a microsecond. Regardless of how well the code prevents that condition.
     
  6. skippyV

    Thread Starter New Member

    Jul 20, 2015
    4
    0
    Yeah the "power loss" comment was just me sharing a moment of my conversation - which really was a ridiculous statement.

    Your idea is what I believed was possible - but my electronics knowledge is spotty.
    In my mind if there is any way to prevent an unsafe condition via hardware then that is the way to go. Instead of just saying "well lets just let the software prevent that" design motto.
     
  7. mcgyvr

    AAC Fanatic!

    Oct 15, 2009
    4,769
    969
    Not having any idea of the details of what you are even doing prevents me from commenting further..
    I have no idea what your servos are even doing let alone the dangerous situations that may arise from them.
    It seems like you have someone to discuss your plans with that is familiar with all of this that has the details..
    They will give much better information than any of us could..
    Don't be afraid to ask questions of them..

    The devil is in the details.. and we don't know the details...
     
  8. #12

    Expert

    Nov 30, 2010
    16,257
    6,757
     
  9. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    Power loss is not the only potential problem. What happens if the unit is spun up one direction, and suddenly direction is reversed. If this was an electric motor, you would have to provide some dead-time before reversing...
     
  10. skippyV

    Thread Starter New Member

    Jul 20, 2015
    4
    0
    There are no servos in this aspect of the project. And the danger I see is a potential to fry some equipment.
    Because of "personalities" (egos, perceived "toe-stepping"), it can be daunting to ask questions. At least at this job site. So one has to come armed with knowledge to demonstrate that alternative solutions may not only exist but may be a better design. That's why I come to forums like these to pick the brains of much more knowledgeable people.

    As for more details - I'm currently at a small prototype machine shop. The designs are fluid with many holes for "details" that are filled in as the tool (or pieces of it) are built! It can be a frustrating work environment. But ultimately we all have the same goals - make it do whats needed for the lowest cost.

    I admit that its hard to give details because the guys who are building/designing it figure that this aspect is one of those details that will be filled in as needed. I do know that the rotation of the air cylinder will be dependent upon the direction of air flow. The direction will change from sliding a... call it a piece of manifold. In one position the air enters one way, exits another and the cylinder spins CW. Slide the manifold piece over to the other position and the air is forced to go the opposite direction. Which makes the air cylinder reverse its rotation.
    Admittedly I'm not 100 % sure of this design (only 95%), but am confident in that is how the design currently exists.

    So when I'm told that 3 relays are needed with each direction dedicated to a relay, I know they are looking at this from a functional point of view and not really studying the matter further. Because they have more important design decisions/hurdles to occupy their immediate focus.

    mcgyvr, your first post and #12 logic diagram gave me the sanity check I was looking for. To summarize - one relay should be used to control the direction. Even if multiple pieces of the manifold must be moved to change the airflow then I think this switch between CW and CCW should still be controlled via one software signal. Perhaps support circuitry is needed to ensure that multiple dependent moving pieces are moved at the same time - but that should still be a hardware solution.

    When I learn more details - and if anyone is interested in hearing them (I am long-winded. Apologies), I'll follow up on this thread.

    Meanwhile, thanks for all the inputs. They are helpful.
     
  11. BReeves

    Member

    Nov 24, 2012
    412
    64
    All you really need is two Air solenoids/valves like this. Use one for direction and the other to turn on/off the air supply.
    AirValve2.jpg
    eBay item # 161767332065
     
  12. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,509
    2,369
    Why not use a 3 posn valve, the centre (off) and A & B coil for each direction.
    (Actually known as 4 way).
    Max.
     
    Last edited: Jul 21, 2015
Loading...