Parts

433 MHz receiver, XY-MK-5V

The XY-MK-5V: a 433 MHz receiver whose DATA pin follows any FS1000A on the canvas, and hisses random noise when nothing is sending.

This part has a page of its own, with a note on using it and a circuit to try: the part page.

Aliases: XY-MK-5V, MX-RM-5V, RF-5V, 433 MHz receiver, RF receiver, ASK receiver, superregenerative receiver.

It is the other half of the FS1000A transmitter pair.

Pins

Pin What it does
VCC Supply. Rated 5 V; it works from 3 V with a weak high on DATA.
DATA High while a carrier is heard, low while not.
DATA (second) The same line, called DATA2 here. Use either one.
GND Ground.
ANT The antenna pad, and the air every 433 MHz module on the canvas shares. Leave it unwired.

How it works

A superregenerative receiver: an oscillator that keeps starting and dying at 433 MHz, and dies sooner when a carrier is there, then an LM358 that turns that into a logic level on DATA. So DATA is the transmitter's own DATA, on another board.

The LM358 cannot pull its output all the way to VCC: a high is about 1.5 V short. On 5 V that is 3.5 V, which a 5 V board reads as HIGH. On 3.3 V it is under 2 V, which an ESP32 may read as LOW, and that is why the module is sold as a 5 V part.

To decode it:

  • RCSwitch.h (rc-switch): mySwitch.enableReceive(0) watches interrupt 0, which is pin 2 on an Uno, and available(), getReceivedValue(), getReceivedBitlength() and getReceivedProtocol() give the code.
  • RH_ASK.h (RadioHead): driver.recv(buf, &len) gives a whole message once its checksum is right. Its receive pin is 11 by default.

Noise when nothing is sending

The receiver has no squelch. With no carrier for a while its gain and its slicing level settle on the noise, and DATA toggles at random, hundreds of times a second. Mokxi does the same: DATA stays low for 20 ms after the last carrier, or after power-up, then turns to random pulses of 50 to 600 microseconds until a carrier comes back.

That is why the libraries work the way they do. rc-switch takes a code only once it has arrived twice with the same sync gap. RH_ASK sends 36 bits of preamble so the receiver settles, waits for a 12-bit start symbol and checks a CRC. A sketch that reads DATA with digitalRead() sees the noise.

Untick noise in the part's settings for a clean trace to learn from. The noise's timing is a fair picture of the bench, not a measurement: a real receiver's changes with its supply and the room.

What is not modeled

Distance, walls, signal strength and interference: every transmitter on the canvas is heard at full strength. The edges come out when the carrier switches, where a real one lags by some tens of microseconds and its pulse widths wander. The tuning coil is assumed set to 433.92 MHz.

Common mistakes

Reading DATA with digitalRead() in loop() and printing it: the noise makes it flicker even with nothing sending. Use a library.

Powering it from 3.3 V and reading it with a 3.3 V board. The high is too weak; use 5 V.

rc-switch on a pin with no interrupt. enableReceive() takes an interrupt number: on an Uno 0 is pin 2 and 1 is pin 3.