Go Down

Topic: Signal Identification on Analog pin A0 (Read 480 times) previous topic - next topic


I have a receiver end of frequency 50 KHz,which I have connected to Arduino due Pin A0.
How can I identify and differentiate if the received signal is AM or BPSK?


May 08, 2017, 04:25 pm Last Edit: May 08, 2017, 04:26 pm by ard_newbie
Although it is an analogic signal, you can identify a BPSK signal if you hook this signal to a digital input pin.

A "0" will be seen as a 010101 sequence, a "1" will be seen as a 101010 sequence. As soon as the signal will be a "0"following a "1" or a "1" following "0" you will see in the deciphering sequence …1101010 in the first case and ..0010101 in the second.

If you store and parse your 1/0 sequences into a buffer, as soon as a 00 or a 11 is detected, you have a beginning.

Data acquisition can be made thru a Timer interrupt. I.e. you will program a timer with a 50 KHz frequency (clock1 = 42 MHZ, RC = 840, RA = 200) and trigger an interrupt on RA compare match.

Choose a pin , i.e. PD10 / Arduino DUE pin 32, power PIOD in setup(), program a Timer Counter with the above parameters.

In the TC handler, clear the status register then store at index I of a buffer of i.e. 256  bytes the pin state (PIOD->PIO_PDSR & PIO_PDSR_P10 ) >> 10.  Compare the last one to the 2 precedent values, and if at least 3 values are identical, this is not a BPSK signal.
At the end of the buffer, stop the timer and set a flag to indicate the end of the parse process and whether it is or not a BPSK signal.

In loop(), once the flag is raised, print a message in the serial monitor to indicate the status of the analog signal.

Go Up