Does the DATA line of the LR Series receiver seem to switch randomly when the transmitter is not on?
This happens because the module does not have any squelch built in. A squelch circuit stops the data output when the received signal strength falls below a certain level. While this is beneficial from a data standpoint, it does reduce the sensitivity of the receiver and the range of the system. Without the circuit, the receiver loses lock in a few milliseconds and outputs random bits based on noise in the system.
This is generally not a problem for off-the-shelf decoders and can be resolved in software for custom microcontrollers (see application note AN-00160 for protocol recommendations), but an external squelch circuit can also be used. Using a squelch circuit allows the designer to only allow data when the received signal is above a certain threshold, but it will sacrifice the range. This allows the user to make the tradeoff between random noise and range.
The RSSI line outputs a voltage that is relative to the strength of the received signal. Since the LR Series is On-Off-Keyed, this output follows the data and looks like a series of pulses. The output is at a lower voltage when receiving a ‘0’ and at a higher voltage when receiving a ‘1’. The amplitude of the ones determines the received signal strength.
An example squelch circuit for use with the LR Series receiver is shown below.
D1, C1, and R1 form a peak detector that follows the peak voltage of the ones. This voltage is fed into the non-inverting input of a comparator where it is compared to a reference level set by a potentiometer. When the signal level becomes greater than the reference voltage set by the potentiometer, the comparator releases the output line. When the signal level falls below the reference voltage, the comparator pulls the output line to ground. Most comparators have open collector outputs, meaning that they can only pull the line to ground or release it. They cannot pull the line high, so a weak external pull-up resistor (R3) is needed to pull the line to Vcc when the comparator releases it. The feedback resistor (R4) is used to stabilize the output.
The output of the comparator is fed into the non-inverting input of a second comparator. The DATA output of the receiver is also connected to this input through resistor R4. The inverting input is connected to a voltage divider that sets the reference voltage at half of the supply voltage. As with the first circuit, R8 provides a weak pull-up and R7 provides feedback.
When the first comparator pulls its output low, the non-inverting input of the second comparator is low and the output of the second comparator is pulled low. When the first comparator releases its output, the DATA line drives the non-inverting input on the second comparator. The output of the second comparator then follows the DATA line.
A discreet voltage divider or a voltage reference IC can be used in place of the potentiometer, and the values for C1 and R1 can be adjusted to tune the response as needed.