I followed this video: https://www.youtube.com/watch?v=-xK0B_bM-yk and made these circuits:

Transmitter: transmitter circuit

Receiver: receiver circuit

And they work as I want them to. I have 2 pushbuttons so when one or both of them are being pressed, the corresponding LED/s on the receiver side light up, and when one or both of the pushbuttons are no longer pressed, the corresponding LED/s turn off (no latching on the HT12D decoder side because TE is constantly transmitting as it's hooked up to GND).

My question is - how can I (since battery life is important in my case) enable TE only when one or both of the buttons are pressed or stop being pressed. My goal is to not transmit all the time because I want to save battery. And also I don't want the LEDs to latch upon the receiver side so when the pushbutton/s stop getting pressed, I need the LED/s to turn off. What would be the simplest and most space-efficient (in terms of SMD components) way to do this?

  • \$\begingroup\$ How long is needed for the transmit chip to steady itself into action from a change in the TE signal? What does the data sheet say? \$\endgroup\$ – Andy aka Jun 10 '20 at 9:44
  • \$\begingroup\$ I'm not sure, sorry. Here's the datasheet of the HT12E - farnell.com/datasheets/1899539.pdf \$\endgroup\$ – Sleb Lagnej Jun 10 '20 at 9:54
  • \$\begingroup\$ I could have found that without help but you need to try and figure this out. \$\endgroup\$ – Andy aka Jun 10 '20 at 9:56
  • \$\begingroup\$ @Andyaka My only idea is to have an OR gate chip (since I have two buttons only) and when one or both are pressed, the OR gate chip connects TE to GND. But that wouldn't be SMD space efficient :\ \$\endgroup\$ – Sleb Lagnej Jun 10 '20 at 9:57
  • \$\begingroup\$ That sounds a good start but do you need to ensure that TE is kept at ground following the release of a button so that data can be transmitted? If yes, then how long? \$\endgroup\$ – Andy aka Jun 10 '20 at 9:59

It may be easier than you think; if you look at the data sheet more closely: -

enter image description here

So, any button being activated will automatically pull TE low and enable transmission and, in the case when buttons are released (thus deactivating TE), this diagram tells you that the device will continue to transmit the four byte message and thus inform the receiver that buttons are deactivated: -

enter image description here

  • 1
    \$\begingroup\$ Comments are not for extended discussion; this conversation has been moved to chat. \$\endgroup\$ – Voltage Spike Jun 13 '20 at 4:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.