From: John E. on 24 Feb 2007 12:45 I want to turn on 4 lamps in 6 combinations. These are controlled by 3 switches in 6 corresponding combinations of contact closings. The truth table looks like this Switches Lamps A B C W X Y Z ----- ------- 0 1 0 1 0 0 0 0 1 1 1 1 0 0 1 0 0 0 0 1 0 1 0 1 1 0 1 0 1 1 0 1 0 0 1 1 1 1 1 1 1 1 While it's straight 3-bit binary count input, how to I translate it to the desired 4 output combinations? What's the best way to implement such an input-to-output matrix? Input from switches is 12 vdc and output requires 12 vdc, milliamp drive. I'm ignorant in all things PIC, so prefer to have another solution. Ideas? -- John English
From: Jan Panteltje on 24 Feb 2007 13:16 On a sunny day (Sat, 24 Feb 2007 17:45:14 GMT) it happened John E. <incognito(a)yahoo.com> wrote in <0001HW.C205BA3500C4CAEEF01826C8(a)news.sf.sbcglobal.net>: >I want to turn on 4 lamps in 6 combinations. These are controlled by 3 >switches in 6 corresponding combinations of contact closings. > >The truth table looks like this > >Switches Lamps >A B C W X Y Z >----- ------- >0 1 0 1 0 0 0 >0 1 1 1 1 0 0 >1 0 0 0 0 1 0 >1 0 1 1 0 1 0 >1 1 0 1 0 0 1 >1 1 1 1 1 1 1 > >While it's straight 3-bit binary count input, how to I translate it to the >desired 4 output combinations? What's the best way to implement such an >input-to-output matrix? > >Input from switches is 12 vdc and output requires 12 vdc, milliamp drive. > >I'm ignorant in all things PIC, so prefer to have another solution. > >Ideas? Program EPROM. swicthes on address inputs. data outputs - resistor - transistor - lamp. Allows for max 8 lamps. And for the smallest EPROM > 1000 switches. Can also be done with a 4051 (ABC input) 1 of 8 decoder, and some diodes resistors and transistors too. (You take a few diodes to the lamps drivers from 6 of the 8 outputs).
From: John E. on 24 Feb 2007 14:24 Thus spake Jan Panteltje: > Program EPROM. > swicthes on address inputs. > data outputs - resistor - transistor - lamp. > Allows for max 8 lamps. > And for the smallest EPROM > 1000 switches. Sounds very flexible, but again, I'm programming limited, so I think this won't work for me. > Can also be done with a 4051 (ABC input) 1 of 8 decoder, > and some diodes resistors and transistors too. > (You take a few diodes to the lamps drivers from 6 of the 8 outputs). I'm interested in single-chip OTS (off the shelf) solutions like this. The data sheet says: "The CD4051B is a single 8-Channel multiplexer having three binary control inputs, A, B, and C, and an inhibit input. The three binary signals select 1 of 8 channels to be turned on, and connect one of the 8 inputs to the output." (ref: <http://www.tranzistoare.ro/datasheets/120/109150_DS.pdf>) With my eyes, it looks like it's not what I'm looking for. It simply connects one input to one output. In one possible configuration of this flexible chip, the input is common (which, connected to 12v, would work for my purposes) and depending on the 3-bit binary control, be connected to one of the 8 outputs, which would not work for me, as I need 6 outputs working at once, some high, some low). It is a multiplexer, which might work for LEDs, but I am driving 12vdc relay coils with the output of this circuit. Or am I missing something... (my default presumption). Thanks, -- John English
From: Bob n. on 24 Feb 2007 14:34 On Feb 24, 12:45 pm, John E. <incogn...(a)yahoo.com> wrote:... > These are controlled by 3 > switches in 6 corresponding combinations of contact closings. If the current requirements were within CMOS or CMOS plus transistors, you could use that to produce a regular 1 of 8 output, then diode-OR to drive the lamps. But you didn't say the switches had to be single- pole. If switch A is single-pole double-throw, switch B is double- pole, double-throw, and switch C is 4-pole double-throw, that combination also produces 1 of 8 output, that can handle any current the switches can. Since you don't need outputs 0 and 1, switch C need be only triple- pole double throw. Your output table is: W= 2 or 3 or 5 or 6 or 7 X= 3 or 7 Y=4 or 5 or 7 Z=6 or 7 Using 1 of 8 decoders and diode-OR, that would be 12 diodes. But using the switches, the input poles of switch C are already (2 or 3) (4 or 5) and (6 or 7). So using those connections, you only need 8 diodes to run the 4 lights. What does this logic actually do?
From: Jan Panteltje on 24 Feb 2007 15:04
On a sunny day (Sat, 24 Feb 2007 19:24:37 GMT) it happened John E. <incognito(a)yahoo.com> wrote in <0001HW.C205D18000CA4084F01826C8(a)news.sf.sbcglobal.net>: >"The CD4051B is a single 8-Channel multiplexer having three binary control >inputs, A, B, and C, and an inhibit input. The three binary signals select 1 >of 8 channels to be turned on, and connect one of the 8 inputs to the >output." > >(ref: <http://www.tranzistoare.ro/datasheets/120/109150_DS.pdf>) > >With my eyes, it looks like it's not what I'm looking for. It simply connects >one input to one output. In one possible configuration of this flexible chip, >the input is common (which, connected to 12v, would work for my purposes) and >depending on the 3-bit binary control, be connected to one of the 8 outputs, >which would not work for me, as I need 6 outputs working at once, some high, >some low). It is a multiplexer, which might work for LEDs, but I am driving >12vdc relay coils with the output of this circuit. > >Or am I missing something... (my default presumption). OK, but I'l do only part of the design: >Switches Lamps >A B C W X Y Z >----- ------- >0 1 0 1 0 0 0 >0 1 1 1 1 0 0 >1 0 0 0 0 1 0 >1 0 1 1 0 1 0 >1 1 0 1 0 0 1 >1 1 1 1 1 1 1 ------------------------------------------------------------------------------------------ CD4051 diode LAMP matrix +12V in 1 2 ------------------ a diode k ----------> W' | 3 -------------------a diode k ----- | --a diode k ----------> X' S1 puldown resistors A 4 -------------------a diode k-----------> Y' S2 B 5 S3 C 6 So if '2' selected ,as in table above, W goes on. If 3 is selected, both W and X go on. If 4 is selected Y goes on. All diodes 1n914 Can you do the diodes for 5 and 6? Normally 4051 cannot drive a bulb, so we need some amplification. +12V | bulb A | |---- A' --| | Power MOSFET |---- | /// |