How do I make a button switch off all other outputs upon activation

LesJones

Joined Jan 8, 2017
4,509
Re your post #16 requesting a suggestion for suitable ICs. For my suggestion in post #7 to use CD4000 family logic the OR gates could be CD4078 (These are 8 input OR / NOR gates The output of 4 of these would go to the reset inputs of the latches The other 4 would go to the set inputs on the latches. For the latches you could use CD4013. You would only need 2 of these as each one contains 2 latches.
For your example in post 1

For button 1
The pulse originating from this button would be connected to an input on each of the 4 OR gates connected to the reaet inputs of the 4 latches. (So all 4 outputs would be set off)

For button 2
The pulse originating from this button would be connected to to an input on the OR gates that are conneted to the reset inputs of latches 1, 2 & 3 (So these inputs would be set to off )
This pulse would also be connected to an input to the OR gate that is connected to the set input of latch 4. (So output 4 would be set to on.)

For button 3
The pulse originating from this button would be connected to to an input on the OR gates that are connected to the resets on latches 2 & 4. (Setting outputs 2 & 4 to off.)
This pulse would also be connected to an input to the OR gate that is connected to the set inputs of latchs 1 & 3 (Setting outputs 1 &3 on.)

For button 4
The pulse originating from this button would be connected to to an input on the OR gates that are connected to the resets on latches 1 , 2 & 4. (Setting outputs 1 , 2 & 4 to off.)
This pulse would also be connected to an input to the OR gate that is connected to the set inputs of latchs 3 (Setting output 3 on.)

For button 5
The pulse originating from this button would be connected to to an input on the OR gates that are connected to the resets on latches 1 & 2. (Setting outputs 1 & 2 to off.)
This pulse would also be connected to an input to the OR gate that is connected to the set inputs of latchs 3 & 4 (Setting output 3 & 4 on.)

For button 6
The pulse originating from this button would be connected to to an input on the OR gates that are connected to the resets on latches 1, 3 & 4. (Setting outputs 1, 3 & 2 to off.)
This pulse would also be connected to an input to the OR gate that is connected to the set inputs of latch 2 (Setting output 2 on.)

Les.
 

Ya’akov

Joined Jan 27, 2019
10,258
Why? He only needs four and he already has 4. My only question is how these get latched? Does the decoder chip do that or does it supply a strobe or clock signal for an external latch?

I am assuming the transmitter sends a single serial message for each button press. I guess the decoder chip would have to latch them now that I think about it.

Also, TS mentioned “toggle buttons”. I hope he means momentary buttons, toggles would really not make sense as you would not want more than one active at a time.
I want to have 6 toggle push buttons on a 433mhz remote transmitter
 

LesJones

Joined Jan 8, 2017
4,509
I had only looked very quickly at the datasheets on the HT12 devices when I made my previous comments. I had assumed that the HC12 could send the 6 bits of data from the 6 push buttons. After reading some more of the data sheet I see it can only send 4 bits of data. This means that the conversion of the 6 buttons to the 4 latched outputs would have to go at the transmitting end. OR the 6 push buttons would have to be encoded to use 6 of the 16 available states of the 4 data bits. If it was done this way the 4 bits (Only 3 bits are actualy required to define 6 states.) would need to be decoded at the receiving end.

Les.
 

LesJones

Joined Jan 8, 2017
4,509
MisterBill2s comment in post #23 prompted me to make this suggestion. Use diodes to make a hard wired ROM.

encode.png
This should do the encoding for your example in post #1 This is on the transnit unt between the 6 push buttons an the encoder data inputs.
NOTE the diodes are installed between the push button and the outputs that are to be set to the off state.

Les.
 

BobTPH

Joined Jun 5, 2013
11,555
As I understand it:

Each button sets a particular configuration of four outputs. Only four bits are transmitted, only four bits are needed to control the relays.

I suggested a diode matrix to encode the buttons to the four outputs, others have suggested OR gates, either will do the job.
 

MisterBill2

Joined Jan 23, 2018
27,652
The benefits from using some form of ROM decoding is that it could be a lot easier to implement without the complexity and possible unanticipated results from an extensive logic device array. I suggested a prom because it could be a small package simple to connect.
 

BobTPH

Joined Jun 5, 2013
11,555
This should do the encoding for your example in post #1 This is on the transnit unt between the 6 push buttons an the encoder data inputs.
NOTE the diodes are installed between the push button and the outputs that are to be set to the off state.
Reverse the logic and only 7 diodes plus 4 pulldowns are needed. This is the simplest way to achieve the desired result that I can think of.
 

LesJones

Joined Jan 8, 2017
4,509
Hi Bob, I actually drew the schematic first thinking that the 4 data inputs were active low until I looked again at page 8 of the HT12A/E datasheet. I don't know what is available now in the way of PROMs (I have not used any since the days of UV erasable PROMs.) If I was doing this I would probably use a PIC and prgram it to emulate the HT12 transmitter as well as converting the 6 inputs into the 4 outputs.. (I think the TS has rulled out using any microcontrollers.)

Les.
 

Erebos05

Joined Sep 14, 2024
4
I don't suppose you could give me and part numbers for the IC's and the set/resets I need so I can study the data sheets? Or tell me the terminology so I could find some similar wiring diagrams to study? I understand if you're busy I know I'm asking a lot but I really appreciate the help
SN74LS279: Transistor-Transistor-Logic Through-Hole-Technology Integrated Circuit (DIL) with four active low sr latches
SN74LS04: TTL THT IC inverter if you need to change the above to active high
SN74LS32: TTL THT IC with four 2-input OR gates

They're all TTL so compatible running on +5V. They are not the best available versions for the job these days since TTL is old-fashioned but it's most likely more than enough.
 

sghioto

Joined Dec 31, 2017
8,634
Because the HT12D has latched outputs a MC74HC238 1 of 8 decoder chip with 3 steering diodes should suffice.
The 2 thru 6 on the output pins of the ULN2003 represent the 6 button pushes.
1729698572532.png
 
Last edited:

MisterBill2

Joined Jan 23, 2018
27,652
SN74LS279: Transistor-Transistor-Logic Through-Hole-Technology Integrated Circuit (DIL) with four active low sr latches
SN74LS04: TTL THT IC inverter if you need to change the above to active high
SN74LS32: TTL THT IC with four 2-input OR gates

They're all TTL so compatible running on +5V. They are not the best available versions for the job these days since TTL is old-fashioned but it's most likely more than enough.
The "other" devices with SET and RESET functions, and also Q and Q-not outputs, and ableto also operate at 12 volts, is the CD4013. I am not sure if operating from 12 volts is a benefit or not, in this application, but some times it is.
 

Erebos05

Joined Sep 14, 2024
4
The "other" devices with SET and RESET functions, and also Q and Q-not outputs, and ableto also operate at 12 volts, is the CD4013. I am not sure if operating from 12 volts is a benefit or not, in this application, but some times it is.
Personally I have never really found a case where TTL couldn't work in hobby applications. You really only need CMOS if you need to optimise power consumption or work at higher frequencies. And SMD is also likely overkill for most applications. Not to mention that after 0805 they are a pain to solder without dedicated equipment.
 

MisterBill2

Joined Jan 23, 2018
27,652
In addition to being abole to work on 12 and 15 volts, CMOS lacks the fan-out issues of TTL, and the funny current versus voltage relationships. That is to say it is more convenient to use.
 

Thread Starter

Asaidubz

Joined Oct 17, 2024
9
My device will be running from a 2x 3.7v 18650 batteries terminated in series to 7.4v total then stepping down to
MisterBill2s comment in post #23 prompted me to make this suggestion. Use diodes to make a hard wired ROM.

View attachment 333944
This should do the encoding for your example in post #1 This is on the transnit unt between the 6 push buttons an the encoder data inputs.
NOTE the diodes are installed between the push button and the outputs that are to be set to the off state.

Les.
I think this method looks the best for what I want, and ease of the build too, thanks for the help and consistent replies, I'm on holiday till next week, once I'm back I'll start making it, I'll give you a message if i struggle anymore if that's OK, thanks les
 
Top