1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

Fast Switching Circut On/Off

Discussion in 'Electronic Projects Design/Ideas/Reviews' started by epicfatigue, Jan 26, 2013.

  1. epicfatigue

    epicfatigue New Member

    Joined:
    Jan 26, 2013
    Messages:
    49
    Likes:
    0
    Hello everyone,

    First off long time reader first time poster!
    Awesome site awesome people!


    I am ataempting to build a fast on/off circut for an arcade machine.

    Its designed to press the power button for the computer that is kept inside.

    Forinstance have a toggle switch that would trigger the circut, to switch on then off quickly.

    This would allow the computer to start.

    The computer switch is simpily shorting a pin to ground in an on/off fasion very quickly.

    However i would also like when the toggle switch is turned back to the off position it would repeat the process turning off the machine.

    Is this possible?


    I would ideaily like to have the circut powered by 230v as i live in australia,
    However this is a Stepdown transformer inside that provides 110v if thats easyer!

    Thanks Everyone!!!!!!
     
  2. MikeMl

    MikeMl Well-Known Member Most Helpful Member

    Joined:
    Mar 17, 2009
    Messages:
    11,126
    Likes:
    564
    Location:
    AZ 86334
    Duplicate post
     
  3. MikeMl

    MikeMl Well-Known Member Most Helpful Member

    Joined:
    Mar 17, 2009
    Messages:
    11,126
    Likes:
    564
    Location:
    AZ 86334
    Are you going to hack into the computer and REPLACE the existing switch, or do you want to actuate it with a solenoid or other mechanical means?

    Do you have an old plug-in transformer (Wall-Wart) DC power supply? Anything from 5V to 15V at a few hundred mA would work.
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. epicfatigue

    epicfatigue New Member

    Joined:
    Jan 26, 2013
    Messages:
    49
    Likes:
    0

    Hello,

    Since the mother board is mounted inside the arcade machine the push button is not there, however i can easily put on in.
    I was going to replace the manual push button switch with an electronic switch. (transistors or as such)

    I would rather not use mechanical as its another point of failure over time.

    I have a pic programer aswell so i can make an IC if need be.
    I am just over thinking what i need to do. and need some asistance
     
  6. MikeMl

    MikeMl Well-Known Member Most Helpful Member

    Joined:
    Mar 17, 2009
    Messages:
    11,126
    Likes:
    564
    Location:
    AZ 86334
    The original switch; is it just a momentary contact on each push, or is it a mechanical push-once for on, push again for off, where the contact is closed for the entire time the computer is on?
     
  7. epicfatigue

    epicfatigue New Member

    Joined:
    Jan 26, 2013
    Messages:
    49
    Likes:
    0
    Hey Mike, sorry for not explaining correctly, been thinking about it for so long and so hard (there are many devices around this component).

    Its a momentary contact.

    1 push = on 1 push = off

    if the contact is closed for longer then 5 seconds = force shut off "this i want to avoid"
     
  8. epicfatigue

    epicfatigue New Member

    Joined:
    Jan 26, 2013
    Messages:
    49
    Likes:
    0
    Hey Guys,

    So i have made part of the circuit, This should fire the computer however am am going to have to work out how i can resend the signal when i loose power.

    When the relay receives its coil voltage it will open, shorting P1 and P2 on the computer "Turning the pc on"

    Once c1 is charged it will close the relay should take 1/2 a second. depending on coil voltage c1 can be changed to get desired output.

    R1 will bleed C1 once coil voltage is lost!

    Now if i can find away to reverse this i am in luck.

    Have to fly will look at it again tomorrow,

    Auto Start Arcade.png
     
  9. MikeMl

    MikeMl Well-Known Member Most Helpful Member

    Joined:
    Mar 17, 2009
    Messages:
    11,126
    Likes:
    564
    Location:
    AZ 86334
    Can you use a Form C (three-terminal, normally-open, normally closed) switch for the remote switch?


    Does the computer have a USB port? If so, you could use the presence of +5V at the USB spigot to determine if the computer is on or off. This could be use to synchronize the state of the computer with the state of the external switch after a power failure and auto reboot.
     
  10. alec_t

    alec_t Well-Known Member Most Helpful Member

    Joined:
    Jul 10, 2011
    Messages:
    9,315
    Likes:
    1,230
    Location:
    Cardiff, Wales
    :confused: But won't you be using a mechanical switch to trigger your proposed circuit?
    Be that as it may, here's one way to provide a fixed-width negative pulse whenever a SPST (or SPDT) switch changes state. A non-retriggerable monostable IC debounces the switch. You may need to adjust some of the component values to suit your situation, e.g. C3 could be bigger for better debouncing.
    BothEdgesTriggeredNegPulser.gif
     

    Attached Files:

  11. epicfatigue

    epicfatigue New Member

    Joined:
    Jan 26, 2013
    Messages:
    49
    Likes:
    0
    Hey Mike, yea that would work and it has a USB port but the machine would need a hard reboot if there was a power failure because of other components inside. Good thinking but.

    Hey i had a little look at the circuit seems a little over my head,
    I downloaded somthing called LTspice to see how that would work and i couldnt even work out how to flick the switch to see what the circut does!

    MUST BE OLD FASHIONED if i had the parts id build it on a bread board.
    Yes i know i said i didnt want mechanical however i couldnt see any other way of doing it.

    Could you give me a run down on exactly whats happening in that circut ? how how to operate it in a program so i can simulate it.

    Thanks!
     
  12. alec_t

    alec_t Well-Known Member Most Helpful Member

    Joined:
    Jul 10, 2011
    Messages:
    9,315
    Likes:
    1,230
    Location:
    Cardiff, Wales
    Just open the .asc file in LTSpice and click Simulate/Run. The simulation goes very slowly because of the 74HC221 (monostable) model used. If you take the operation of the 74HC221 on trust, just delete R5 and the sim will run much quicker
    V2 simulates the input being switched high and low. A positive edge of the input signal provides a positive trigger pulse. A negative edge of the input signal, because of the inverting done by Q1, also provides a positive trigger pulse. The two trigger pulses are 'OR'ed by diodes D1,D4 and fed to the monostable.
     
  13. epicfatigue

    epicfatigue New Member

    Joined:
    Jan 26, 2013
    Messages:
    49
    Likes:
    0
    response

    Hey Alec,

    So i had a look at the simulation,

    i added a monitor to V2 and V-out.

    So i am guessing from what you are saying ("Sorry this simulation is hard to grasp for an old timer")

    V2 is the interruption of supply simulating me flicking on and off the switch.

    If that is the case from the picture provided it appears that when voltage is applied v out will pulse 5v (if connected to a relay this would open then close) and if voltage then would stay stable.
    And then if it was to be interrupted (me turning off the switch) V-out would then pulse 5v again, (if connected to a relay this would open then close).

    Am i correct in assuming this? if thats the case this is perfect! if not tell me what i am missing :(

    Sorry for my lack of understanding as i am sitting next to an analog oscilloscope made in 1968.......
     

    Attached Files:

  14. ()blivion

    ()blivion Active Member

    Joined:
    Nov 24, 2010
    Messages:
    857
    Likes:
    210
    Location:
    Level 5
    You could use a touch switch of appropriate logic and design, tons of 'em out there. I was considering doing this on my PC because the plastics of the power button jam up every now and then. If it stays jammed when the thing starts to boot up, with the switch still being held down it goes into emergency shut off. This is not good for the hard drive.

    I haven't done the mod yet though, other things to do. Instead I just pay more attention to whether it is stuck or not. You may want to analyze your situation too and decide if it's worth it or not for you.
     
  15. alec_t

    alec_t Well-Known Member Most Helpful Member

    Joined:
    Jul 10, 2011
    Messages:
    9,315
    Likes:
    1,230
    Location:
    Cardiff, Wales
    V2 represents the input being switched, by whatever sort of switch you choose, repeatedly to 5V, 0V , 5V, 0V........ The Q output of the monostable produces, at each switching operation, a positive-going pulse output , but if you look closely at the waveform you will see the voltage (which is taken from the Not-Q output) is a negative-going pulse. Either one could be used for relay control, but the Not-Q one should be able to drive the computer switch directly (assuming the supply voltages of the monostable and computer match).
    What the circuit can't do, as it stands, is apply to the computer a start-up pulse after a power failure.
    I should point out that because of the number of components used the overall liability/failure rate is unlikely to be much different from the original mechanical switch :(
     
  16. ()blivion

    ()blivion Active Member

    Joined:
    Nov 24, 2010
    Messages:
    857
    Likes:
    210
    Location:
    Level 5
    Is the time this thing takes to go "OFF -> ON -> OFF" or "ON -> OFF -> ON" really very critical? When read carefully, Post #1 and #6 make it sound like the original poster is describing the workings of power switches for just about every modern PC in existence. I.E, the switch is only short circuit (on) when it is being pressed, it's off when you let go. And he's worried that if he uses a toggle switch, (which by nature "sticks" in one position), he will end up holding the power on/off signal, which will force off the computer after a few seconds.

    If this is true then as I said above, touch switch, all the way.

    Not to say that Alec_t's fine circuit won't work, but a variation on one of the below circuits would be (A) simpler, (B) easier, (C) cheaper, and (D) have no moving parts. The disadvantages are that (1) it won't be debounced, and (2) it won't have a programmed timing. But if those things are necessities, they can easily be added. The first is a high side (normally off) switch, and the other is low side (normally on). We have to modify these just a bit for what we are trying to do of course. EDIT: We also need to know the layout of the computers wires of course, to know the polarity.

    touch-switch.png Touch-switch-darlington.gif


    *CLICK THIS* to see a simulation of the high side version, without C1 and R2. (they made it blink)

    *CLICK THIS* to see a simulation of the low side version. I changed the resistances a bit.

    (Simulation note, you pretty much *HAVE* to use Firefox or Google Chrome, the sim doesn't work right in IE I guess.)
     
  17. epicfatigue

    epicfatigue New Member

    Joined:
    Jan 26, 2013
    Messages:
    49
    Likes:
    0
    The Big Picture

    Hello everyone,

    Thank you once again for everyone's contribution.

    I drew up a schematic in paint, forgive my short cuts for not drawing a complete circuit.... i dislike this program very much!
    What took 30 seconds on paper took 1 hour on this stupid paint thing !!!!!!!!!!!!!!!!!!!!!!

    Okay let me give you a run down.

    This is an Arcade Machine, it has both 110Ac and 230Ac.

    The unit is turned on by a single toggle switch, this provides power to the Monitor, PSU (110v) and the Power points (230v) inside the machine only.

    From there i need to open the back off it and turn the computer on Via a push button, and if i need to preform configuration changes i need to swap the Monitor cable from Display 1 and Display 2 (marked as Display Out 1 & 2).

    I have built a special Master Relay Circuit that when the Computer is booted to a correct state it will notify the relay and open it. (this is a must and needs to be here)


    So What i want to achieve.
    Adding a way to trigegr a momentary switch when the toggle Switch is turned on and off (starting up and shutting down the pc) ("Please note this is momentary on/off will not work") otherwise i would use 4pst switch.


    What the circuit i have designed (not built) will do.

    Toggle switch Turns on the monitor. (Manually Start the computer)(I Wante to Eliminate this aswell)

    Display 1 (configuration) is active, the default time for this is 1-2 Minutes however if i make any changes this duration will extend (that's why i use the software relay)

    When the computer is loaded it will notify the master Relay to Open (sending 5V)
    This will trigger the first 3 relays that will disable Display 1.

    Then the time-delay circuit will start (Im sure there is a better solution for this part) Perhaps a Capasitor and Resistor for Drain)
    This only needs to have a delay for 1-2 Seconds or less (stops 2 displays being conected at once)

    Then the Relay will open providing power to the next set of 3 relays that will connected Display out 2 to the monitor.


    Now yes i know this all seems pointless however this is what i want to do.


    What i am missing is the ability to trigger a momentary switch when the toggle switch is used. (is it possible to connect a touch switch to this? so when i hold the switch to turn it on in-turn it will fire the computer up?)

    My other Question is there an IC out there that can do the job of the switching eliminating the need for so many relays?

    Thought concerns thanks all !!!

    Arcade Monitor Switch.JPG
     
  18. ()blivion

    ()blivion Active Member

    Joined:
    Nov 24, 2010
    Messages:
    857
    Likes:
    210
    Location:
    Level 5
    Very interesting project.

    I'm fairly sure we all know exactly what you mean when you say "momentary switch", but you keep repeating yourself like we aren't getting it. So I would like us all to be absolutely crystal clear on what exactly you are trying to say. In case you are right and we(I) really don't understand you.

    You want it to only be ON for a short time, even if you are holding it down.

    ...Again, in different words...

    You want a normal toggle switch, which can only ever be ON or OFF, to instead send a pulse of OFF-ON-OFF.

    If this is so, then just as Alec_t has said, you want a A non-retriggerable monostable. (click for schematics)

    The touch switch that I was talking about is just a way to turn on electronic circuits without the use of moving parts. It is not the same thing as a NR-monostable. However, you can add a touch switch to the input of NR-monostable, and make a NR-monostable that can be turned on without moving parts.

    *HOWEVER*... if you have to keep the toggle switch, then you can't really use the touch switch circuit.


    Looking at your schematic, I'm guessing that the three pairs of wires running from "Arcade Monitor" to each "display out X" are the video cables RGB, YPbPr, or whatever wires used to sends video to the display?

    If I am correct, and you want to essentially make a way to seamlessly switch between the two displays with an IC rather than all those relays, then something similar to the MC14551B (click for datasheet) should work. And if the delay between change is 100% necessarily, we should still be able to do that. I haven't tried it myself though, someone here will have to confirm this idea(IC) is workable. But the datasheet seems to indicate that it was specifically intended for cleanly switching exactly these kinds of analog signals between two devices.

    If I am wrong on how your circuit works, and those are a bunch of power wires or some kind of high power, or some other thing I haven't even thought of yet, then disregard the whole idea. The MC14551B is only intended for "signals", it can not carry power like a relay can.


    Conclution
    I hope I am understanding you right, I tried really hard to read and comprehend what you wrote, but it is not all that clear to me. I assume since you are having some troubles with various software and such, that you maybe also can't type at a very high level? It's perfectly fine, it's not like you are doing anything wrong, it's just making it hard for me to understand I believe.
     
  19. epicfatigue

    epicfatigue New Member

    Joined:
    Jan 26, 2013
    Messages:
    49
    Likes:
    0
    Hi Oblivion,

    Sorry for my repetitiveness i blame paint!!!!
    Thank you for thinking its a "interesting project"

    Yes i need a circuit that will simulate a momentary switch being press when the toggle switch is on, then again when the toggle switch is set to off.
    (Toggle on Monitor on 110 + 230 + Starts the non-retriggerable monostable Powers up the computer) (Toggle set to off Power is disconected, non-retriggerable monostable shutdowns the computer by shorting pins)

    So if this can do that then ill start on it right away!

    You are exactly right this is for switching inputs R+G+B+Negsync+psync+Ground = 6 however we can keep Ground constant and make it 5.
    The MC14551B Sounds perfect its a shame its only 4, but we can always use 3!

    The Reason behind the short delay was so there was no chance that two monitor outputs were connected to the Arcade screen at once.
    Im not sure if it would cause long term damage or not, better safe then sorry!

    Im pumped now this is exactly what i need!
     
  20. ()blivion

    ()blivion Active Member

    Joined:
    Nov 24, 2010
    Messages:
    857
    Likes:
    210
    Location:
    Level 5
    How high quality is the video going to the screens? Since you are using relays and it is working fine, then I assume it's not that extreme. It's probably normal VGA, or SVGA at best right?

    If the signals the relays are switching are in fact high quality video, then the MAX4137-MAX4138 would be a better fit. The bandwidth for the better graphics standards can get quite high, and the MC14551 is not really designed for such extremes. On the other hand the MAX4137-MAX4138 were made specifically for switching high bandwidth video from one display to another. You couldn't find a better fit.

    However...

    We are starting to get in the area of high frequency analog, and that gets crazy hard to do without a good printed PCB. The datasheet for the MAX4137-MAX413 recommends you use "Microstrip and Stripline techniques" and you "design the board for a frequency greater than 1GHz." This is a tall order to DIY. Hopefully your video quality standards don't require this kind of design.

    And yes... you will need more than one of either chip no matter what you do. Two of the MC14551, and three of the MAX4137-MAX4138. The sync signals are slow enough that they can probably work with the MC14551, so you would need to still get some of them to go with the maximum chips.


    Edit:
    I would like to also point out, as some one might suggest it sooner or later. There are in fact cheap($20) manual VGA switcher boxes out there that already more or less do what you are trying to make. However, the switch in these is always a many pole double throw mechanical switch, and can not be made to switch with an electrical signal very easily. You would have to Jerry rig some kind of solenoid or servo to physically throw the switch, which would be very ugly and unprofessional. Anything with a chip that does the job will likely have a large price tag to go with it.
     
    Last edited: Jan 30, 2013
  21. epicfatigue

    epicfatigue New Member

    Joined:
    Jan 26, 2013
    Messages:
    49
    Likes:
    0
    Hey Thanks for the fast reply,

    I am currently not using a relay setup its manual at the moment.

    The signal is VGA 1024 x 768 15khz at MAX would this suit the chip?

    How would we delay the chips so its not possible for them to have 1 card half hooked up? eg (the delay between switching cards)
     

Share This Page