I am making a low power rf remote that just has 3 buttons and sends rf signals accordingly.

I've been trying to make pin interrupts work when it's in deep sleep but it's a huge hassle. And then I thought of this:


Is it a bad idea to do this?

I could imagine if you were too fast, you would shut the RF transmitter off while it's sending something, but that shouldn't be an issue because the user would notice nothing changed and will learn to press the button longer.

But the transmitter might also transmit too fast for a user to interrupt it.

And I don't know if debouncing is an issue here. I could just put a capacitor after the buttons.

Of course the code would be something like analogRead which button is pressed and then emit rf signals.

So my question is, is this bad practice and will this kill my battery/attiny/rf emitter?

  • I haven't notice any hassle with deep sleep mode and pin change interrupts. It's even working when the datasheet states it won't work with IO clock stopped.
    – KIIV
    Commented Jul 16, 2018 at 13:59
  • Will that use less power than this setup?
    – Tvde1
    Commented Jul 16, 2018 at 14:17
  • If you don't have to wake up periodically, and with disabling power to the RF module (how, it depends on required current), it might take less current than battery's self discharge.
    – KIIV
    Commented Jul 16, 2018 at 14:25
  • 2
    That could work. Add a capacitor between Vcc and Gnd to stabilize the power during bounce. You might have to change the fuses to lower the startuptime (which is 64ms by default I think). To prevent double sending, add a large delay after the sending code. That way the code is only sent once.
    – Gerben
    Commented Jul 16, 2018 at 15:27
  • 1
    I don't have any experience with capacitors, any tips? Do I just go for a big one?
    – Tvde1
    Commented Jul 16, 2018 at 16:04


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.