Xor gate question

Discussion in 'General Electronics Chat' started by jludwig83, Aug 6, 2013.

  1. jludwig83

    Thread Starter Member

    Jul 22, 2013
    33
    0
    I was wondering if an XOR gate can be used with reversing polarity ..........I am also using a 24vdc power source if I reduce the input power to say 5vdc going into the XOR Gate how can I step it back up to 24vdc on the output side of the XOR Gate
     
  2. crutschow

    Expert

    Mar 14, 2008
    13,052
    3,244
    I assume you mean reduce the input signal to the XOR gate to 5vdc. (The gate power supply voltage must, of course, be whatever the gate is designed for).

    You can use a transistor buffer at the output of the XOR gate to generate a 24vdc signal. Note that this will invert the signal, so you would add an inverter between the XOR output and the transistor input, if you don't want the inversion.
     
  3. WBahn

    Moderator

    Mar 31, 2012
    17,777
    4,805
    What do you mean by "reversing polarity" above?
     
  4. Brownout

    Well-Known Member

    Jan 10, 2012
    2,375
    998
    You can also use an open collector buffer pulled up to 24V. In order to actually reverse polarity, you'll need something like an H-Bridge between you logic and your load.
     
  5. jludwig83

    Thread Starter Member

    Jul 22, 2013
    33
    0
    I am using an L293DNE H-Bridge to run a electromagnetic coil I need to install an XOR GATE just before my coil to avoid any issues with multiple power switches Most of the XOR Gates seem to have an operating Max signal of 5.5vdc so I need to reduce this signal from 24vdc to 5vdc then back to 24vdc in order to energize the coil.................really I dont know what I am doing so I hope this makes sense
     
  6. Brownout

    Well-Known Member

    Jan 10, 2012
    2,375
    998
    It makes no sense at all. Please post a drawing of your circuit and a detailed description of what your objective is. I don't know what avoiding "issues with multiple power switches" means. Explain your issues in detail.
     
  7. WBahn

    Moderator

    Mar 31, 2012
    17,777
    4,805
    You might start with a drawing of how you would have it if there were just one switch. Then show what it would look like with two or three switches (without the XOR gate that you are contemplating) and point out the problem that would result.

    Remember, the first, most critical, and hardest part of problem solving is getting everyone to agree on what the problem is.
     
  8. WBahn

    Moderator

    Mar 31, 2012
    17,777
    4,805
    Are you trying to have,say, five switches such that any switch can be used to energize/de-energize the coil?

    If so, then why won't just using DPDT switches wired in a four-way configuration do what you want? They effectively implement an XOR/Parity functionality.
     
    jludwig83 likes this.
  9. jludwig83

    Thread Starter Member

    Jul 22, 2013
    33
    0
    here is my current set up
     
  10. WBahn

    Moderator

    Mar 31, 2012
    17,777
    4,805
    Are SW4 and SW5 mechanical switches or relays or what?

    Are the H-Bridge drivers just being used to add current drive capability to the Arduino outputs (i.e., act as buffers)?

    What is the behavior that you WANT to have happen in the diagram as opposed to the undesirable thing that IS happening?
     
    jludwig83 likes this.
  11. jludwig83

    Thread Starter Member

    Jul 22, 2013
    33
    0
    looking at the drawing I have posted...... I want to protect that set up in-case both arduino boards are powered up at the same time....... I know I could be using one arduino but for me that complicates things
     
  12. jludwig83

    Thread Starter Member

    Jul 22, 2013
    33
    0
    switchs 4 -5 are dpst and should never both be on at the same time .............however if they are the way it is now it blows my H-BRIDGE and/or the Arduino's I want to protect this from doing that with XOR Gates
     
  13. jludwig83

    Thread Starter Member

    Jul 22, 2013
    33
    0
    The H-Bridge drivers are for the coil the coil operates on 24vdc but it needs to reverse polarity in order to advance the clock hands
     
  14. WBahn

    Moderator

    Mar 31, 2012
    17,777
    4,805
    What do you mean by "protect that set up"?

    What do you mean by "in-case both arduino boards are powered up at the same time"? Does in matter if they are both powered as long as one of the two switches is open?

    What bad thing happens with how you presently have it shown? Is the problem one H-Bridge output contending with another H-Bridge output?

    What behavior do you WANT to have happen if both arduino boards are powered up at the same time? Do you want the coil to energize as long as one of them is trying to energize it? Do you want the coil to energize only if both of them are trying to energize it? Do you want changing the state of either arduino to change the state of the coil?

    I'm not going to ask again. What do you WANT this thing to do? Be explicit.
     
    jludwig83 likes this.
  15. WBahn

    Moderator

    Mar 31, 2012
    17,777
    4,805
    Okay. We cross posted and you are starting to give some of the information I've been asking for. Thank you. The big thing still is what is the behavior you want to have happen if both arduinos are powered and both DPST switches are closed?

    Do you not care what happens as long as nothing gets destroyed?
     
    jludwig83 likes this.
  16. jludwig83

    Thread Starter Member

    Jul 22, 2013
    33
    0
    ok I want one arduino board to be on at all times lets call that board "A" and the secondary board "B" when board "A" is on "B" would be off to the coil via one of the switches when "B" is on board "A" would be off again via a switch ..........now if both switches happen to both be closed at the same time it burns up the H-bridges and I dont want to have to change fuses if this scenario happens I would like logic gates to stop all power coming from either switch if they are both closed at the same time............I really hope this make some sense I am terrible at explaining this
     
  17. LDC3

    Active Member

    Apr 27, 2013
    920
    160
    Why not have only board A control the H-bridge and when B wants to change the state, it is sends a signal to A, which changes the state.
     
  18. jludwig83

    Thread Starter Member

    Jul 22, 2013
    33
    0
    I don’t know.......... I need to find someone local to help me with this.......... this is way beyond my level of expertise and I need to get this project finished
     
  19. Brownout

    Well-Known Member

    Jan 10, 2012
    2,375
    998
    This is not a difficult thing to do. The XOR gates need to be connected between the controllers and the H-Bridge. Connect both controller outputs to the XOR gate, and the gate outputs to the H-Brindge drivers. When both controllers try to drive at the same time, the gate outputs will be off, and thus drivers won't be driven.

    By keeping the gates in the digital part of the system, and not at the motor drivers, you don't need to worry about input signal voltages being too high.

    Once agian, a drawing and detailed explanaiton of what you intend to would help us to help you. You make it harder for everyone by not providing what we have asked for.
     
    jludwig83 likes this.
  20. jludwig83

    Thread Starter Member

    Jul 22, 2013
    33
    0
    Thats it all this time it was that easy all I needed to do was connect them before the H-bridges and not after and run the 24vdc externally and not thru the arduino itself
     
Loading...