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

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

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
Didn't mean to put that bit about that batteries, it was half a reply that I forgot to finish
 

MisterBill2

Joined Jan 23, 2018
27,659
My device will be running from a 2x 3.7v 18650 batteries terminated in series to 7.4v total then stepping down to

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
The unstated secondary benefit of a "diode ROM" is that if the requirements change a bit, no logic re-design is needed. Sometimes requirements do change.
 

LesJones

Joined Jan 8, 2017
4,509
Asaidubz, Have you considered the consequences of more than one of the 6 buttons being pressed at the same time ? This could give a pattern of the 4 outputs that could cause damage to the equipment it is controlling. You have not given us any idea of what this is controlling.

Les.
 

MisterBill2

Joined Jan 23, 2018
27,659
Asaidubz, Have you considered the consequences of more than one of the 6 buttons being pressed at the same time ? This could give a pattern of the 4 outputs that could cause damage to the equipment it is controlling. You have not given us any idea of what this is controlling.

Les.
In most single-carrier wireless signals are sent in sequence, not at the same time. AND looking at the proposed remote transmit device, sending more that one signal at a time is not physically possible. In addition, the receive decoding scheme will not be able to produce more than a single output at a time.
 

MisterBill2

Joined Jan 23, 2018
27,659
The transmitter can only send one code message at a time. Likewise, the decoder prom can only decode one value at a time. If a string arrives with an input not recognized nothing should happen.
 

Thread Starter

Asaidubz

Joined Oct 17, 2024
9
Alternative approach using a 8 bit priority encoder.
Breadboarded and verified.
View attachment 334165
Are the switches on A0-A7 pins on the HT12E for address setting via a binary code determined by switch configuration?
Asaidubz, Have you considered the consequences of more than one of the 6 buttons being pressed at the same time ? This could give a pattern of the 4 outputs that could cause damage to the equipment it is controlling. You have not given us any idea of what this is controlling.

Les.
There definately won't be any damage to the equipment from that happening that I can think of
 

LesJones

Joined Jan 8, 2017
4,509
The address lines A0 to A7 are to give the transmitter/ receiver pair an address so that up to 256 devices can use the same RF channel or work together without interfering with other devices in the same room if using infra red. This would also give you an alternative method send 6 different signals. You could have 6 receiving chips set to 6 different addresses and arrange for the 6 push buttons to control the address lines on the transmitter. That way you could leave the 4 data bits at the same value.
sghioto's circuit in post #45 would not have the potential problem that I described in post #43.

Les.
 

BobTPH

Joined Jun 5, 2013
11,555
Complete circuit using HT12E/HT12D.
View attachment 334232
That should work, assuming your diode decoding in the output side is correct.

But i still think encoding the buttons to the 4 lines that control the loads on the input side is far simpler. It takes only 7 diodes to do this. No decoding needed on the output side.

What triggers the HT12B to send a data packet? You don’t seem to do anything special to tell it to send. I don’t see how that works. Could you explain it?
 

sghioto

Joined Dec 31, 2017
8,634
When any switch is pressed on the CD4532 the enable out pin #15 goes low to trigger the TE pin (transmit enabled) on the HT12E.
 

BobTPH

Joined Jun 5, 2013
11,555
I did not follow the encoding, but you are still only encoding 3 bits. My idea was to encode the 4 bits that then directly control the four relays. Then there is no decoding required on the receive side.
 

sghioto

Joined Dec 31, 2017
8,634
My idea was to encode the 4 bits that then directly control the four relays. Then there is no decoding required on the receive side.
If the original switch number arrangement is reassigned then the following will accomplish the same relay activation as in the example in post #1
1729783505880.png
 
Last edited:
Top