0

This code works to listen for bytes via radio (with a 433 Mhz receiver module) with the Manchester library and Manchester code, and do an action when certain bytes are received:

#include "Manchester.h"

void setup() {
  pinMode(3, INPUT);
  man.setupReceive(3, MAN_1200);
  man.beginReceive();
}

void loop() {
  if (man.receiveComplete()) {
    uint16_t m = man.getMessage();
    man.beginReceive();   // start listening for next message 
    // do something with m
  }
}

But it requires to have the Arduino / ATtiny / ATmega / MCU constantly running.

Question: is there a way to put the ATtiny on deep sleep mode (to get < 1 uA consumption) and wake-up only when a byte arrives via radio?

I know how to do this with an interrupt or "pin change interrupt", but here with radio library Manchester, it's probably more complicated. How to do it?

In this case it's probably going to be more complicated than just:

sleep_enable();
set_sleep_mode(SLEEP_MODE_PWR_DOWN);
sleep_cpu();     
  • how much power does the radio consume? – jsotola Nov 21 '19 at 23:35
  • The attiny itself consumes 5ma or 1ma at 1mhz and this is too much to run on batteries; thus I'd like to use deep sleep mode if possible. – Basj Nov 22 '19 at 0:05
  • I couldn't do that with my 433Mhz module. It would constantly trigger my interrupt pin, even if there wasn't any being send by me. There was enough noise/interference on the 433Mhz, that my Arduino would have no time to sleep. – Gerben Nov 22 '19 at 15:44
  • @Gerben Yes I thought this would be the problem. Indeed PCINT are bit-based (on/off), and reading a message Manchester-encoded is higher level (bytes, etc.), so I really wonder how to do this properly! – Basj Nov 22 '19 at 15:47

Your Answer

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

Browse other questions tagged or ask your own question.