Monday 26 September 2016

Why is this Arduino RF Receiver changing value back and forth so much?


So I have a 315Mhz receiver hooked up to an Arduino, and constantly printing the value of the A0 Analog in pin over to the Serial Plotter that is built in to the Arduino software.



Arduino Graph This is the graph. You can see at the end there is some data from another 315mhz transmitter.


My question is, why is there so much noise when something is happening? Is this normal? Maybe a bad receiver chip?



Answer



Cheap RF receivers don't understand whether data is present or not. They cannot distinguish between noise or data. They don't use a protocol, they don't recognize data frames, payloads or baud rate.


So, when there is no data (aka no strong desired signal) present, the AGC circuit (Automatic gain control) in the receiver keeps raising the gain until something is found and, in the your case it is noise.


When "strong" real data does come along, the AGC rapidly backs-off to avoid saturation of the RF circuits and you get a data output.


Here's an idea of what happens in an FM receiver after the demodulator: -


enter image description here


This uses the terminology of an FM system (data slicer) but applies equally well to an AGC circuit that is constantly trying to find the correct level and only being able to do so after a few bytes of preamble have been received.


For an AM receiver I'd expect a picture like this: -



enter image description here


The left edge of the picture is when the receiver is switched on and the AGC rapidly boosts gain to try and get a decent signal. Noise is dominant here because there is no RF transmission. Along comes a transmission and it takes a little while for the AGC to settle down. Towards the right hand side of the picture, the AGC has stabilized to suit the amplitude of the data carrier and, as you can hopefully see, the noise superimposed on the data has been significantly attenuated due to the AGC.


There are 2 faint dotted lines across the middle of the picture - these are idealized threshold points for reconstructing the data with a comparator using hysteresis.


No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...