Electronic – How to avoid a MCU to run constantly when a superheterodyne radio receiver is receiving nothing, and possibly enter in deep sleep

attinymicrocontrollerradioRFsleep

TL;DR: How to avoid an ATtiny to run constantly when the radio receiver is receiving nothing, and possibly enter in deep sleep mode? Configuration:


Context: I have now a working transmitter design based on an ATtiny45, a push button, a superheterodyne radio transmitter, and batteries. By using "pin change interrupts", I can make the ATtiny "deep sleep" until the button is pushed. When this happens, the ATtiny awakens and a few bytes are sent via radio with Manchester coding (using this Manchester library). Because of the deep sleep, the consumption is ~ 0.2 uA when nothing happens. So the batteries could theoritically last for years!


Now I'm designing the receiver part, with a code like this:

#include "Manchester.h"

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

void loop()
{
    if (man.receiveComplete()) 
    {
        uint8_t m = man.getMessage();
        man.beginReceive();
        if (m == 222)
        { 
            // do something
        }
    }
}

In order to reduce the power consumption, I was thinking about deep sleep and pin change interrupts too, but I don't think it will work here because a radio receiver will have very often noise like 0100010010111010010 until a real byte, Manchester-encoded, arrives…

Question: are there tricks to make a radio receiver code which uses very few power (and possibly sleep until a byte arrives)?

Best Answer

A superhet receiver won't invent signal to the same degree but you still have the problem of power drawn by the receiver itself. Radio links that don't have one end mains powered typically need careful efforts to establish a schedule of check-in appointments and suffer a latency in that a message may not be able to be sent until the next scheduled opportunity.

This is not a problem which has a general solution, rather only a variety of ways the task can be reduced to something that is solvable, such as mains power, time schedules, or ranges short enough for passive receivers to work.