Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Help designing a latching electronic switch
Hi there
I am a novice at electronics so please bear with me! I need to design a latching electronic switch with a momentary push switch as a trigger. When the trigger is pushed, the switch will latch closed. When the trigger is pushed again the switch will toggle back to the open position. The switch needs to be able to break/supply power a 12v relay. If the circuit loses and regains power the switch should default back to the open position. For reasons I won't go in to at this stage it is not possible just to use a latching switch to supply the power to the relay. Hopefully someone can help me if this design is possible! Thanks Mark |
#2
|
|||
|
|||
On Wed, 25 May 2005 07:28:50 +0000 (UTC), "Mark Ashley"
wrote: Hi there I am a novice at electronics so please bear with me! I need to design a latching electronic switch with a momentary push switch as a trigger. When the trigger is pushed, the switch will latch closed. When the trigger is pushed again the switch will toggle back to the open position. The switch needs to be able to break/supply power a 12v relay. If the circuit loses and regains power the switch should default back to the open position. For reasons I won't go in to at this stage it is not possible just to use a latching switch to supply the power to the relay. Hopefully someone can help me if this design is possible! --- If you can use a single-pole double-throw momentary switch, then debouncing is easy and the circuit can be put together with a 4013, a transistor and a handful of passive components. If you have to use a SPST switch, then it'll have to be debounced differently. Which way do you want to go? -- John Fields Professional Circuit Designer |
#3
|
|||
|
|||
Mark Ashley wrote: Hi there I am a novice at electronics so please bear with me! I need to design a latching electronic switch with a momentary push switch as a trigger. When the trigger is pushed, the switch will latch closed. W= hen the trigger is pushed again the switch will toggle back to the open position. The switch needs to be able to break/supply power a 12v relay. = If the circuit loses and regains power the switch should default back to the open position. For reasons I won't go in to at this stage it is not possible just to use= a latching switch to supply the power to the relay. Hopefully someone can help me if this design is possible! Thanks Mark Hi, Mark. Novice and newbie questions always welcome here. If you've got half of a CMOS inverter IC (4000-series would include 4049, 4069, 40106, 74C-series include 74C04, 74C14, &c) or three gates you can set up as inverters (NAND, NOR, &c), this circuit might fill the bill (view in fixed font or Notepad): ~ Logic Toggle Pushbutton With Power-On Reset ~ VCC VCC ~ + + ~ | | ~ 1N4002| | ~ VCC - C| ~ + ___ ^ C| RY1 ~ | .----------|___|--------. | C| ~=2E33uF | | 22K | | | ~ --- | | '---o ~ --- 1N4002| | | ~ | |\ | |\ |\ | ___ |/ ~ o--| O--|--o-----| O---o----| O--o--|___|-o-| Q1 ~ | |/ | |/ | |/ 22K | | ~ .-. | .-. .-. | ~ 10K | | | 220K| | | | | ~ | | | | | 22K| | | ~ '-' | T '-' '-' | ~ | | --- | || | | ~ | '--o o-------o----||----. =3D=3D=3D =3D=3D=3D ~ =3D=3D=3D || | GND GND ~ GND SW1 .022uF | ~ | | =3D=3D=3D GND created by Andy=B4s ASCII-Circuit v1.24.140803 Beta www.tech-chat.de Make sure you use a darlington NPN transistor (like the TIP120) to switch the relay. This keeps the load on the last inverter down to around 1mA or so, which any CMOS inverter can handle at 12V. This should be good for any relay coil that draws less than half an amp. The first inverter with the diode is set up as MML (Mickey Mouse Logic). It's only active at turn-on, and forces the input of the second inverter to be low right after turn-on. That means the third inverter will be low, and your transistor will be off. After a period set by the R and C (something on the order of 3ms) the output of the first inverter will be high, and the diode will effectively remove it from the circuit. This stuff was borrowed piecemeal from Don Lancaster's CMOS Cookbook, which is a good intro to digital electronics for newbies. It's available at Amazon, libraries, and Mr. Lancaster's website: http://www.tinaja.com/ Good luck Chris |
#4
|
|||
|
|||
"John Fields" wrote in message ... If you can use a single-pole double-throw momentary switch, then debouncing is easy and the circuit can be put together with a 4013, a transistor and a handful of passive components. If you have to use a SPST switch, then it'll have to be debounced differently. Which way do you want to go? Hi John I can't use SPDT switches easily as the switches are specific (arcade machine buttons to be precise). The only way I could make them SPDT would be to attach a relay to each one, but wouldn't that increase the risk of bouncing? Perhaps if I explain exactly what I want to do it will be a little clearer. I have built an arcade machine with 8 momentary SPST switches. These, as well as a joystick, connect to an xbox pad so I can use it to play xbox games. Currently I have a SPST toggle switch which energises a 4 pole relay. When energised this physically disconnects the arcade controls and connects a normal xbox pad. I want to remove the toggle switch and replace it with a circuit which will toggle between the arcade controls and the xbox pad only when I press all of the buttons on the arcade controls at the same time. Mark |
#5
|
|||
|
|||
Thanks for this Chris. I will have a look for some information on the IC you
have used in this circuit so I can find which pins I need to connect to. Unless you fancy saving me some legwork... Mark "Chris" wrote in message ups.com... Hi, Mark. Novice and newbie questions always welcome here. If you've got half of a CMOS inverter IC (4000-series would include 4049, 4069, 40106, 74C-series include 74C04, 74C14, &c) or three gates you can set up as inverters (NAND, NOR, &c), this circuit might fill the bill (view in fixed font or Notepad): ~ Logic Toggle Pushbutton With Power-On Reset ~ VCC VCC ~ + + ~ | | ~ 1N4002| | ~ VCC - C| ~ + ___ ^ C| RY1 ~ | .----------|___|--------. | C| ~.33uF | | 22K | | | ~ --- | | '---o ~ --- 1N4002| | | ~ | |\ | |\ |\ | ___ |/ ~ o--| O--|--o-----| O---o----| O--o--|___|-o-| Q1 ~ | |/ | |/ | |/ 22K | | ~ .-. | .-. .-. | ~ 10K | | | 220K| | | | | ~ | | | | | 22K| | | ~ '-' | T '-' '-' | ~ | | --- | || | | ~ | '--o o-------o----||----. === === ~ === || | GND GND ~ GND SW1 .022uF | ~ | | === GND created by Andy´s ASCII-Circuit v1.24.140803 Beta www.tech-chat.de Make sure you use a darlington NPN transistor (like the TIP120) to switch the relay. This keeps the load on the last inverter down to around 1mA or so, which any CMOS inverter can handle at 12V. This should be good for any relay coil that draws less than half an amp. The first inverter with the diode is set up as MML (Mickey Mouse Logic). It's only active at turn-on, and forces the input of the second inverter to be low right after turn-on. That means the third inverter will be low, and your transistor will be off. After a period set by the R and C (something on the order of 3ms) the output of the first inverter will be high, and the diode will effectively remove it from the circuit. This stuff was borrowed piecemeal from Don Lancaster's CMOS Cookbook, which is a good intro to digital electronics for newbies. It's available at Amazon, libraries, and Mr. Lancaster's website: http://www.tinaja.com/ Good luck Chris |
#6
|
|||
|
|||
On Wed, 25 May 2005 18:38:47 +0000 (UTC), "Mark Ashley"
wrote: "John Fields" wrote in message .. . If you can use a single-pole double-throw momentary switch, then debouncing is easy and the circuit can be put together with a 4013, a transistor and a handful of passive components. If you have to use a SPST switch, then it'll have to be debounced differently. Which way do you want to go? Hi John I can't use SPDT switches easily as the switches are specific (arcade machine buttons to be precise). The only way I could make them SPDT would be to attach a relay to each one, but wouldn't that increase the risk of bouncing? Perhaps if I explain exactly what I want to do it will be a little clearer. I have built an arcade machine with 8 momentary SPST switches. These, as well as a joystick, connect to an xbox pad so I can use it to play xbox games. Currently I have a SPST toggle switch which energises a 4 pole relay. When energised this physically disconnects the arcade controls and connects a normal xbox pad. I want to remove the toggle switch and replace it with a circuit which will toggle between the arcade controls and the xbox pad only when I press all of the buttons on the arcade controls at the same time. --- OK, that can be easily enough accomplished, depending on what you've got the eight momentary switches hooked to. Hopefully, you're switching either Vcc or ground on _all_ of them and we can use something like an 8-input AND or NAND to decode the all-buttons-down state and toggle the latch. Can you post a schematic of what you've got or describe the circuit in a little more detail? -- John Fields Professional Circuit Designer |
#7
|
|||
|
|||
"John Fields" wrote in message ... Perhaps if I explain exactly what I want to do it will be a little clearer. I have built an arcade machine with 8 momentary SPST switches. These, as well as a joystick, connect to an xbox pad so I can use it to play xbox games. Currently I have a SPST toggle switch which energises a 4 pole relay. When energised this physically disconnects the arcade controls and connects a normal xbox pad. I want to remove the toggle switch and replace it with a circuit which will toggle between the arcade controls and the xbox pad only when I press all of the buttons on the arcade controls at the same time. --- OK, that can be easily enough accomplished, depending on what you've got the eight momentary switches hooked to. Hopefully, you're switching either Vcc or ground on _all_ of them and we can use something like an 8-input AND or NAND to decode the all-buttons-down state and toggle the latch. Can you post a schematic of what you've got or describe the circuit in a little more detail? One of the legs of each momentary switch is connected to a common ground, which comes from a single point on the xbox pad, then daisy chains to each switch. This includes the four switches for the joystick I think. The other side of each switch then goes to its own point on the pad. I haven't measured what is going across the switch when it is closed, but I can do this if necessary. Is that enough information? I can post more or a schematic if you need me to. I really appreciate all your help! Thanks Mark |
#8
|
|||
|
|||
"John Fields" wrote in message ... Perhaps if I explain exactly what I want to do it will be a little clearer. I have built an arcade machine with 8 momentary SPST switches. These, as well as a joystick, connect to an xbox pad so I can use it to play xbox games. Currently I have a SPST toggle switch which energises a 4 pole relay. When energised this physically disconnects the arcade controls and connects a normal xbox pad. I want to remove the toggle switch and replace it with a circuit which will toggle between the arcade controls and the xbox pad only when I press all of the buttons on the arcade controls at the same time. --- OK, that can be easily enough accomplished, depending on what you've got the eight momentary switches hooked to. Hopefully, you're switching either Vcc or ground on _all_ of them and we can use something like an 8-input AND or NAND to decode the all-buttons-down state and toggle the latch. Can you post a schematic of what you've got or describe the circuit in a little more detail? One of the legs of each momentary switch is connected to a common ground, which comes from a single point on the xbox pad, then daisy chains to each switch. This includes the four switches for the joystick I think. The other side of each switch then goes to its own point on the pad. I haven't measured what is going across the switch when it is closed, but I can do this if necessary. Is that enough information? I can post more or a schematic if you need me to. I really appreciate all your help! Thanks Mark |
#9
|
|||
|
|||
John - how does this look? (open in Andy's ASCII-Circuit or notepad).
Would this layout affect the normal functioning of the switches? GND 1 2 3 4 5 6 7 8 | | | | | | | | | | _/ | | | | | | | | |-o/ o-o-)-)-)-)-)-)-)------o | | | | | | | | | | _/ | | | | | | | | o-o/ o---o-)-)-)-)-)-)--\ | __ | | | | | | | \ o-| \ __ | _/ | | | | | | \ | )--| \ __ o-o/ o-----o-)-)-)-)-)-\ \o-|__/ | )--| \ __ | | | | | | \-----------|__/ | )--| \ | _/ | | | | | /---------------|__/ | )-o o-o/ o-------o-)-)-)-)-----/ o--------------------|__/ | | | | | | | | | _/ | | | | | o-----------------------o o-o/ o---------o-)-)-)--------o | __ | | | | o-| \ __ | _/ | | | | )--| \ __ o-o/ o-----------o-)-)-----------o-|__/ | )--| \ | | | o-|__/ | )---- | _/ | | | o-|__/ o-o/ o-------------o-)------------------o | | | | | _/ | | o-o/ o---------------o-------------------------o (created by AACircuit v1.28.6 beta 04/19/05 www.tech-chat.de) |
#10
|
|||
|
|||
"Mark Ashley" wrote:
Thanks for this Chris. I will have a look for some information on the IC you have used in this circuit so I can find which pins I need to connect to. Unless you fancy saving me some legwork... Those gates in Chris's circuit could be in a variety of ICs, and so the pins will vary accordingly. For example, here's the circuit redrawn for a CMOS 4011 Quad NAND: http://www.terrypin.dial.pipex.com/I...hingSwitch.gif Note that the circuit uses only 3 of the 4 ('Quad') gates. The two input pins of the unused gate are therefore shown wired to ground. -- Terry Pinnell Hobbyist, West Sussex, UK |
#11
|
|||
|
|||
On Thu, 26 May 2005 07:17:09 +0000 (UTC), "Mark Ashley"
wrote: "John Fields" wrote in message .. . Perhaps if I explain exactly what I want to do it will be a little clearer. I have built an arcade machine with 8 momentary SPST switches. These, as well as a joystick, connect to an xbox pad so I can use it to play xbox games. Currently I have a SPST toggle switch which energises a 4 pole relay. When energised this physically disconnects the arcade controls and connects a normal xbox pad. I want to remove the toggle switch and replace it with a circuit which will toggle between the arcade controls and the xbox pad only when I press all of the buttons on the arcade controls at the same time. --- OK, that can be easily enough accomplished, depending on what you've got the eight momentary switches hooked to. Hopefully, you're switching either Vcc or ground on _all_ of them and we can use something like an 8-input AND or NAND to decode the all-buttons-down state and toggle the latch. Can you post a schematic of what you've got or describe the circuit in a little more detail? One of the legs of each momentary switch is connected to a common ground, which comes from a single point on the xbox pad, then daisy chains to each switch. This includes the four switches for the joystick I think. The other side of each switch then goes to its own point on the pad. I haven't measured what is going across the switch when it is closed, but I can do this if necessary. --- That would be a good idea. I think the switches are wired like this: Vcc--+----- - - ----+ | | [R] [R] | | +--+ +--+ | | | | | O | | O | | | | | | O | | O | | | | | | | | | GND--+--|-- - - ----+ | | | OUT1 OUT8 so that each output would be at Vcc until a switch was pressed, and then it would go to ground for as long as the switch was pressed. If you could verify that by measuring the output voltages with the switches open and pressed that would be fine. Also, if you could determine the values of the resistors and post that information that would be helpful. Is that enough information? I can post more or a schematic if you need me to. A schematic would be ideal. -- John Fields Professional Circuit Designer |
#13
|
|||
|
|||
On Thu, 26 May 2005 10:14:38 -0500, John Fields
wrote: On 26 May 2005 04:05:59 -0700, wrote: John - how does this look? (open in Andy's ASCII-Circuit or notepad). Would this layout affect the normal functioning of the switches? GND 1 2 3 4 5 6 7 8 | | | | | | | | | | _/ | | | | | | | | |-o/ o-o-)-)-)-)-)-)-)------o | | | | | | | | | | _/ | | | | | | | | o-o/ o---o-)-)-)-)-)-)--\ | __ | | | | | | | \ o-| \ __ | _/ | | | | | | \ | )--| \ __ o-o/ o-----o-)-)-)-)-)-\ \o-|__/ | )--| \ __ | | | | | | \-----------|__/ | )--| \ | _/ | | | | | /---------------|__/ | )-o o-o/ o-------o-)-)-)-)-----/ o--------------------|__/ | | | | | | | | | _/ | | | | | o-----------------------o o-o/ o---------o-)-)-)--------o | __ | | | | o-| \ __ | _/ | | | | )--| \ __ o-o/ o-----------o-)-)-----------o-|__/ | )--| \ | | | o-|__/ | )---- | _/ | | | o-|__/ o-o/ o-------------o-)------------------o | | | | | _/ | | o-o/ o---------------o-------------------------o (created by AACircuit v1.28.6 beta 04/19/05 www.tech-chat.de)\ --- Probably not, but you've left the input bubble off of the last gate in the top group, --- Unless... Are those all supposed to be ORs and the "o"'s are connections? If so, then your approach and mine are basically the same. -- John Fields Professional Circuit Designer |
#14
|
|||
|
|||
Terry Pinnell wrote:
"Mark Ashley" wrote: Thanks for this Chris. I will have a look for some information on the IC you have used in this circuit so I can find which pins I need to connect to. Unless you fancy saving me some legwork... Those gates in Chris's circuit could be in a variety of ICs, and so the pins will vary accordingly. For example, here's the circuit redrawn for a CMOS 4011 Quad NAND: http://www.terrypin.dial.pipex.com/I...hingSwitch.gif Note that the circuit uses only 3 of the 4 ('Quad') gates. The two input pins of the unused gate are therefore shown wired to ground. And I meant to add that the 4011's supply and ground pins (not usually shown explicitly on schematics) are 14 and 7 respectively. -- Terry Pinnell Hobbyist, West Sussex, UK |
#15
|
|||
|
|||
"John Fields" wrote in message ... --- Unless... Are those all supposed to be ORs and the "o"'s are connections? If so, then your approach and mine are basically the same. Hi John Just to clear up any confusion - is me, posting from No the gates in my circuit diagram are supposed to be AND gates, and the Os were connections. I have downloaded a trial copy of CircuitMaker and tested your circuit design (the one with the NOR gates) and have had limited success. Would you mind if I email you screenshots of the circuit so I can more easily explain? Thanks Mark |
#16
|
|||
|
|||
Chris, I think he wants to press 8 buttons to activate the toggle.
But, for a simple relay toggle using only one transistor, 4 resistors and one capacitor, there is an example on my page titled "Single Transistor Relay Toggle Circuit" http://ourworld.compuserve.com/homep...tm#toggle3.gif -Bill |
#17
|
|||
|
|||
Mark Ashley wrote: One of the legs of each momentary switch is connected to a common ground, which comes from a single point on the xbox pad, then daisy chains to each switch. This includes the four switches for the joystick I think. The oth= er side of each switch then goes to its own point on the pad. I haven't measured what is going across the switch when it is closed, but I can do this if necessary. Is that enough information? I can post more or a schematic if you need me to. I really appreciate all your help! Thanks Mark Hi, Mark. Try this (view in fixed font or Notepad): ` (X =3D X-Box pullup resistor) ` T ` --- ` .---o o---X---------. ` | | ` | T | ` | --- | ` o---o o---X--------.| VCC ` | || 4078 + ` | T || 8-input | ` | --- |'-o| OR(Pin 1)/ .-. VCC VCC ` o---o o---X-------.| | NOR(Pin 13) | | + + ` | |'--o| | | | | ` | T | | 220K'-' .--o---o--. ` | --- '---o|__ | | | ` o---o o---X------. -|=3D| 1 | | | ` | '----o|1 |------------|----o | ` | T -|__| | | o----A ` | --- .----o| | | 555 | ` o---o o---X------' | o--o-o | ` | .---o| +| | | | ` | T | | 10uF --- '-o | ` | --- |.--o| --- | | ` o---o o---X-------'| | | '--o---o--' ` | |.-o| | | | ` | T || =3D=3D=3D =3D=3D=3D =3D=3D=3D ` | --- || GND GND GND ` o---o o---X--------'| ` | | ` | T | ` | --- | ` o---o o---X---------' ` | ` =3D=3D=3D ` GND ` ` ` VCC VCC ` + + ` | | ` | | ` .-----------------------. - C| ` | | ^ C| ` | | | C| ` | .--------. | | | ` | | | | | | ` | | =3D=3D=3D | '---o ` | .-----o------.GND | | ` | | S | | ___ |/ ` '----oD Q o--------|___|- -| TIP120 ` | | | 10K | | ` | 1/2 4013 | | .-. | ` | | | | | | ` A---------o CLK | | 10K| | | ` VCC | | | '-' | ` + | | | | | ` | | | | | | ` .-. | Q'o-----' =3D=3D=3D =3D=3D=3D ` 10K | | | | GND GND ` | | | R | ` '-' '-----o------' ` | | ` o-----------' ` | ` .1uF --- ` --- ` | ` =3D=3D=3D ` GND created by Andy=B4s ASCII-Circuit v1.24.140803 Beta www.tech-chat.de From your description, all 8 switches switch a logic level voltage to GND when they are pressed, and show a logic level high when they're not pressed. First, you need to get a power supply voltage which is the same voltage as the power supply of the logic circuit you're interfacing (+/- 0.2V). Once you've done that, get a 4078 (8-input OR/NOR), a 555, and a 4013 to do your job, along with the handful of components shown. Not so elegant, but it should do the job. The CD4078 has 8 inputs and two outputs -- OR (pin 1) and NOR (pin 13). The OR will only go low when all 8 inputs are low (what you want). That signal then triggers a 555, which is on for about 2 seconds (giving you your debounce) and clocking a 4013 set up as a toggle F-F. The R/C at the reset input ensures that the circuit will power up with the transistor off. You should be able to put all this on a small perfboard, and you'll be good to go with the Pretendo relay switch. Good luck Chris |
#18
|
|||
|
|||
Chris wrote: Hi, Mark. Try this (view in fixed font or Notepad): ` (X =3D X-Box pullup resistor) ` T ` --- ` .---o o---X---------. ` | | ` | T | ` | --- | ` o---o o---X--------.| VCC ` | || 4078 + ` | T || 8-input | ` | --- |'-o| OR(Pin 1)/ .-. VCC VCC ` o---o o---X-------.| | NOR(Pin 13) | | + + ` | |'--o| | | | | ` | T | | 220K'-' .--o---o--. ` | --- '---o|__ | | | ` o---o o---X------. -|=3D| 1 | | | ` | '----o|1 |------------|----o | ` | T -|__| | | o----A ` | --- .----o| | | 555 | ` o---o o---X------' | o--o-o | ` | .---o| +| | | | ` | T | | 10uF --- '-o | ` | --- |.--o| --- | | ` o---o o---X-------'| | | '--o---o--' ` | |.-o| | | | ` | T || =3D=3D=3D =3D=3D=3D =3D=3D= =3D ` | --- || GND GND GND ` o---o o---X--------'| ` | | ` | T | ` | --- | ` o---o o---X---------' ` | ` =3D=3D=3D ` GND ` ` ` VCC VCC ` + + ` | | ` | | ` .-----------------------. - C| ` | | ^ C| ` | | | C| ` | .--------. | | | ` | | | | | | ` | | =3D=3D=3D | '---o ` | .-----o------.GND | | ` | | S | | ___ |/ ` '----oD Q o--------|___|- -| TIP120 ` | | | 10K | | ` | 1/2 4013 | | .-. | ` | | | | | | ` A---------o CLK | | 10K| | | ` VCC | | | '-' | ` + | | | | | ` | | | | | | ` .-. | Q'o-----' =3D=3D=3D =3D=3D=3D ` 10K | | | | GND GND ` | | | R | ` '-' '-----o------' ` | | ` o-----------' ` | ` .1uF --- ` --- ` | ` =3D=3D=3D ` GND created by Andy=B4s ASCII-Circuit v1.24.140803 Beta www.tech-chat.de From your description, all 8 switches switch a logic level voltage to GND when they are pressed, and show a logic level high when they're not pressed. First, you need to get a power supply voltage which is the same voltage as the power supply of the logic circuit you're interfacing (+/- 0.2V). Once you've done that, get a 4078 (8-input OR/NOR), a 555, and a 4013 to do your job, along with the handful of components shown. Not so elegant, but it should do the job. The CD4078 has 8 inputs and two outputs -- OR (pin 1) and NOR (pin 13). The OR will only go low when all 8 inputs are low (what you want). That signal then triggers a 555, which is on for about 2 seconds (giving you your debounce) and clocking a 4013 set up as a toggle F-F. The R/C at the reset input ensures that the circuit will power up with the transistor off. You should be able to put all this on a small perfboard, and you'll be good to go with the Pretendo relay switch. Good luck Chris The drawing wasn't too clear on something -- It's important that the CMOS IC be at the same voltage as the X-Box. That will probably mean using a 7805 if the X-box has a 5V supply, and an LM317 if it's an oddball voltage. You can use either of these as a post-regulator after your +12V for the relay. .------------------- To Relay | ____ 12V | | | o--o---|7805|---o------ To Logic +| |____| |+ --- | --- 10uF --- | ---10uF | | | =3D=3D=3D =3D=3D=3D =3D=3D=3D GND GND GND created by Andy=B4s ASCII-Circuit v1.24.140803 Beta www.tech-chat.de Either that or jsut decide to get a 4PDT telecom relay with a 5V coil voltage. If you can, find out the power supply voltage and get back to us. You might get some more help or another, better idea. Good luck Chris |
#19
|
|||
|
|||
On Thu, 26 May 2005 20:49:01 +0000 (UTC), "Mark Ashley"
wrote: "John Fields" wrote in message .. . --- Unless... Are those all supposed to be ORs and the "o"'s are connections? If so, then your approach and mine are basically the same. Hi John Just to clear up any confusion - is me, posting from No the gates in my circuit diagram are supposed to be AND gates, and the Os were connections. I have downloaded a trial copy of CircuitMaker and tested your circuit design (the one with the NOR gates) and have had limited success. Would you mind if I email you screenshots of the circuit so I can more easily explain? --- I used ORs, since for the circuit to work properly the gates must be ORs since what's being detected is the all-zeroes state. If you use ANDs, then any switch pressed will cause the output to go low, which will effect the toggle. It would be better if you posted them to alt.binaries.schematics.electronic. That way, everyone who's following the thread can stay connected. -- John Fields Professional Circuit Designer |
#20
|
|||
|
|||
"John Fields" wrote in message ... I used ORs, since for the circuit to work properly the gates must be ORs since what's being detected is the all-zeroes state. If you use ANDs, then any switch pressed will cause the output to go low, which will effect the toggle. I don't understand that. I thought an OR gate would output when *any* of the inputs were true. I have copied and pasted this truth table for an OR gate: Input A Input B Output Q 0 0 0 0 1 1 1 0 1 1 1 1 Also, I though an AND gate would only output if *all* of the inputs were true, as below: Input A Input B Output Q 0 0 0 0 1 0 1 0 0 1 1 1 I am sure that you are correct in what you say, but I would like to understand it better rather than just taking your word for it It would be better if you posted them to alt.binaries.schematics.electronic. That way, everyone who's following the thread can stay connected. I have posted them there, under the same heading as this thread. Thanks again Mark |
#21
|
|||
|
|||
On Fri, 27 May 2005 17:48:27 +0000 (UTC), "Mark Ashley"
wrote: "John Fields" wrote in message .. . I used ORs, since for the circuit to work properly the gates must be ORs since what's being detected is the all-zeroes state. If you use ANDs, then any switch pressed will cause the output to go low, which will effect the toggle. I don't understand that. I thought an OR gate would output when *any* of the inputs were true. I have copied and pasted this truth table for an OR gate: Input A Input B Output Q 0 0 0 0 1 1 1 0 1 1 1 1 Also, I though an AND gate would only output if *all* of the inputs were true, as below: Input A Input B Output Q 0 0 0 0 1 0 1 0 0 1 1 1 I am sure that you are correct in what you say, but I would like to understand it better rather than just taking your word for it In your schematic: GND 1 2 3 4 5 6 7 8 | | | | | | | | | | _/ | | | | | | | | |-o/ o-o-)-)-)-)-)-)-)------o | | | | | | | | | | _/ | | | | | | | | o-o/ o---o-)-)-)-)-)-)--\ | __ | | | | | | | \ o-| \ __ | _/ | | | | | | \ | )--| \ __ o-o/ o-----o-)-)-)-)-)-\ \o-|__/ | )--| \ __ | | | | | | \-----------|__/ | )--| \ | _/ | | | | | /---------------|__/ | )-o o-o/ o-------o-)-)-)-)-----/ o--------------------|__/ | | | | | | | | | _/ | | | | | o-----------------------o o-o/ o---------o-)-)-)--------o | __ | | | | o-| \ __ | _/ | | | | )--| \ __ o-o/ o-----------o-)-)-----------o-|__/ | )--| \ | | | o-|__/ | )---- | _/ | | | o-|__/ o-o/ o-------------o-)------------------o | | | | | _/ | | o-o/ o---------------o-------------------------o the assumption is that the leads going to the XBOX (1-8) are pulled up to Vcc through resistors, since the circuiit wouldn't make much sense otherwise. That is, closing the switches would have no effect on the logic if the leads went to ground, and they're not allowed to float. That is, unless they're bipolar TTL, but that's another story and is bad practice and they'd wind up looking like they were pulled up anyway. If the inputs are pulled up to Vcc and no switches are pressed, then the output of the circuit will go high since, for an AND, the output goes high when all the inputs are high. Consequently, if _any_ of the switches is pressed, that input will go low and so will the output. Therefore, since you want the output state to change when _all_ the switces are pressed, you need something with and output which will change when _all_ the inputs are low, and that's an OR. (or a NOR, depending on which way you want the output to swing when all the inputs are low. Having said that, the PDF I posted on abse shows an 8 input NAND being used, the reason being that with the SPDT switches you showed being normally connected to ground, all of the swithes being pressed will result in all of the inputs of the NAND going high, causing the output to go low, which is what I need to start the chain of events which will result in the toggle. -- John Fields Professional Circuit Designer |
#22
|
|||
|
|||
Hi John
I've found the following on the RS Components site but I'm not sure if they're the right ones. http://rswww.com/cgi-bin/bv/browse/P...odoid=11104034 http://rswww.com/cgi-bin/bv/browse/M...toid=-95461711 Do you know which of the flipflops I need? Thanks Mark |
#23
|
|||
|
|||
On Mon, 30 May 2005 19:02:20 +0000 (UTC), "Mark Ashley"
wrote: Hi John I've found the following on the RS Components site but I'm not sure if they're the right ones. http://rswww.com/cgi-bin/bv/browse/P...odoid=11104034 http://rswww.com/cgi-bin/bv/browse/M...toid=-95461711 Do you know which of the flipflops I need? --- The 8 input NAND is an SN74HC74AN, (TI) and the flip-flop can be either an SN74HC74AN, (TI) an MC74HC74AN, (ON Semi) or a 74HC74N (Philips). Go for the cheapest, they'll all work the same in your circuit. -- John Fields Professional Circuit Designer |
#24
|
|||
|
|||
On Mon, 30 May 2005 15:59:38 -0500, John Fields
wrote: The 8 input NAND is an SN74HC74AN, (TI) and the flip-flop can be either an SN74HC74AN, (TI) an MC74HC74AN, (ON Semi) or a 74HC74N (Philips). Go for the cheapest, they'll all work the same in your circuit. The 8 input NAND is a 74HC30 (with various prefixes or suffixes), the '74 is a flip-flop. -- Peter Bennett VE7CEI email: peterbb4 (at) interchange.ubc.ca GPS and NMEA info and programs: http://vancouver-webpages.com/peter/index.html Newsgroup new user info: http://vancouver-webpages.com/nnq |
#25
|
|||
|
|||
On Mon, 30 May 2005 15:23:03 -0700, Peter Bennett
wrote: On Mon, 30 May 2005 15:59:38 -0500, John Fields wrote: The 8 input NAND is an SN74HC74AN, (TI) and the flip-flop can be either an SN74HC74AN, (TI) an MC74HC74AN, (ON Semi) or a 74HC74N (Philips). Go for the cheapest, they'll all work the same in your circuit. The 8 input NAND is a 74HC30 (with various prefixes or suffixes), the '74 is a flip-flop. --- Yup! Thanks. -- John Fields Professional Circuit Designer |
#26
|
|||
|
|||
make a drawing at www.yahoo.com ( a 100dpi scannerdrawing will do fine
) ; go to the mailbox the ID is 'schetsen' and the password is 'diverse'. send the drawing to the same mailbox 'schetsenATyahoo.com' and I'll see what I can do for you ( for free of course ) |
#27
|
|||
|
|||
make a drawing at www.yahoo.com ( a 100dpi scannerdrawing will do fine
and wouldn't be to big ) ; go to the mailbox the ID is 'schetsen' and the password is 'diverse'. send the drawing to the same mailbox 'schetsenATyahoo.com' and I'll see what I can do for you ( for free of course ) |
#28
|
|||
|
|||
On 26 May 2005 16:00:02 -0700, "Chris" wrote:
` VCC VCC ` + + ` | | ` | | ` .-----------------------. - C| ` | | ^ C| ` | | | C| ` | .--------. | | | ` | | | | | | ` | | === | '---o ` | .-----o------.GND | | ` | | S | | ___ |/ ` '----oD Q o--------|___|- -| TIP120 ` | | | 10K | | ` | 1/2 4013 | | .-. | ` | | | | | | ` A---------o CLK | | 10K| | | ` VCC | | | '-' | ` + | | | | | ` | | | | | | ` .-. | Q'o-----' === === ` 10K | | | | GND GND ` | | | R | ` '-' '-----o------' ` | | ` o-----------' ` | ` .1uF --- ` --- ` | ` === ` GND --- Didn't notice it the first time around, but the sense of the power-on RESET is wrong. The way it's shown the 4013 will stay in RESET as long as power is applied. -- John Fields Professional Circuit Designer |
#29
|
|||
|
|||
On 4 Jun 2005 01:23:03 -0700, "William"
wrote: make a drawing at www.yahoo.com ( a 100dpi scannerdrawing will do fine ) ; go to the mailbox the ID is 'schetsen' and the password is 'diverse'. send the drawing to the same mailbox 'schetsenATyahoo.com' and I'll see what I can do for you ( for free of course ) --- Why don't you read the entire thread and any binaries posted to abse and then, if you have someting to say, post your comments here for everyone to see? -- John Fields Professional Circuit Designer |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Fan Switch Replacement, what is a "Light Kit"? | Home Repair | |||
Double-pole single toggle switch vs. 3-way switch? | Home Repair | |||
Wireless slave light switch | UK diy | |||
Dimmer switch on ceiling | Home Repair | |||
Change ceiling outlet pull switch to wall switch? | Home Ownership |