cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 5, 3 & 1 MCU

mvarga
New Contributor II

Dear Cypress Community,

I am using an evaluation board for PSoC 5LP (CY8CKIT-059) and trying to downmix a signal.

My aim is to downmix a noisy signal that contains a very small sine wave (1mVpp) whose frequency is known, e.g., 10 MHz. The DC value I would get after the mixing+filtering tells me if that sinewave is present in the signal or not.

I was able to achieve this only for sine waves of max. 4 MHz using the mixer component of 5LP. 

Question: Is it possible to mix with a frequency higher than 4 MHz so that I can downmix a 10 or 15 MHz signal?

I ask this because I do not want to include/pay a separate (I-Q) demodulator in my design. 

Cheers,

Matija.

 

0 Likes
Reply
1 Solution
odissey1
Honored Contributor II

Technically, PSoC5 doesn't have analog capability in 10-15MHz frequency range.

I suggest using a simple Tayloe mixer to downsample incoming sine signal. See, for example this YouTube video (closer to the end)

https://youtu.be/JuuKF1RFvBM

There are many other links for Tayloe detector schematic. See.e.g:

http://www.norcalqrp.org/files/Tayloe_mixer_x3a.pdf

https://www.arrl.org/files/file/Technology/tis/info/pdf/020708qex013.pdf

Basically, it is 4x fast analog switch, which is controlled by a pair of quadrature signals I and Q. The output is practically a DC voltage and can be amplified by slow opamps in psoc. Knowing the amplitudes of the quadrature signals, one can calculate the phase of the incoming sine signal.

The analog switch is cheap ($1). So all it needs is to generate a pair of digital quadrature signals I and Q at 10MHz, alongside with the source sine.

 

If the phase of the incoming signal is fixed (for example it is being provided by local signal generator), then Tayloe mixer simplifies even further, as Q component is not needed, and 4xF frequency generator is not needed, etc.

Can you provide more specifics on the project to help you better?

/odissey1

View solution in original post

10 Replies
odissey1
Honored Contributor II

Technically, PSoC5 doesn't have analog capability in 10-15MHz frequency range.

I suggest using a simple Tayloe mixer to downsample incoming sine signal. See, for example this YouTube video (closer to the end)

https://youtu.be/JuuKF1RFvBM

There are many other links for Tayloe detector schematic. See.e.g:

http://www.norcalqrp.org/files/Tayloe_mixer_x3a.pdf

https://www.arrl.org/files/file/Technology/tis/info/pdf/020708qex013.pdf

Basically, it is 4x fast analog switch, which is controlled by a pair of quadrature signals I and Q. The output is practically a DC voltage and can be amplified by slow opamps in psoc. Knowing the amplitudes of the quadrature signals, one can calculate the phase of the incoming sine signal.

The analog switch is cheap ($1). So all it needs is to generate a pair of digital quadrature signals I and Q at 10MHz, alongside with the source sine.

 

If the phase of the incoming signal is fixed (for example it is being provided by local signal generator), then Tayloe mixer simplifies even further, as Q component is not needed, and 4xF frequency generator is not needed, etc.

Can you provide more specifics on the project to help you better?

/odissey1

View solution in original post

odissey1
Honored Contributor II

mvarga,

On the other hand, simple NE602 (SA602, SA612) mixer is cheap (~$2), and can be used to downconvert the signal. See this NE602 use example (around 6:00)

https://youtu.be/Mm7WfVzr1ao

 

But I believe that direct conversion with Tayloe mixer is simpler and returns DC output.

/odissey1

mvarga
New Contributor II

Dear odissey1,

I find the Tayloe mixer a very appealing solution for my problem and I will go forward with it. 

Best regards,

Matija.

0 Likes
Reply
odissey1
Honored Contributor II

mvarga,

I am just curious, is this for detection of the radio signal (remote 10MHz oscillator with undetermined frequency and phase) or a lock-in detector (local 10MHz oscillator with fixed frequency and phase)?

0 Likes
Reply
mvarga
New Contributor II

Hi odissey1,

I am injecting some signal on one side of a wire (instead air) and trying to detect it on the other side. I am glad you ask this question because my next open question is how to deal with the fact that the input signal and LO won't have exactly 10 MHz frequency, i.e. input freq. might be 10.08 MHz and the LO 9.92 MHz. My "solution" for now is to sample the down converted signal and then do FFT.

0 Likes
Reply
odissey1
Honored Contributor II

mvarga,

It is better to keep frequencies close. The frequency deviation in your specs is: 10.08MHz - 9.92MHz = 160 kHz. This is a little bit high. For example, if transmitter and receiver are  stabilized using low-grade XTAL with 200ppm accuracy, the frequency deviation will be only 10MHz x 2 x 200E-6 = 4kHz, which is much more manageable. It is convenient to bring this frequency down as much as possible, as it allows using DelSig-ADC instead of SAR_ADC. The DelSig-ADC has high impedance input buffer with variable gain, which potentially allows omitting two Opamps from the Tayloe mixer. The above Opamps should be selected with good noise figures, as PSoC internal Opamps has equivalent noise ~100x worse (~700nV/sqHz).  

The Tayloe detector produces both I and Q components of the incoming 10MHz signal. Since the transmitter and receiver are not synched, both I and Q will oscillate at frequency  F_transmitter - F_tayloe, which is less then few kHz (using XTALs). Total sine carrier amplitude at any given moment is: Ampl = SQRT(I^2 + Q^2).

So, the algorithm of carrier amplitude detection can be following:

(1) measure I and Q outputs of the Tayloe mixer using DelSig-ADC. Both I and Q will be a signed values, oscillating at frequency offset.

(2) Calculate instant amplitude Ampl=SQRT(I*I + Q*Q). A CORDIC component can be used to offload the calculation. The obtained Ampl value is likely to be quite noisy.

(3) Low-pass filter Ampl values for better S/N using the Filter component.

 

To operate Tayloe mixer at 10MHz, the PSoC's MASTER_CLK should run at 40MHz or 80MHz.

Alternatively, external frequency generator si5351 can be used to drive the Tayloe mixer, while PSoC operating at its own frequency. Using external si5351 allows for "scanning the range" if necessary, or tuning between 10/15MHz "on the fly", etc.

/odissey1   

mvarga
New Contributor II

Dear odissey1,

Thank you so much for your advice. I am not only getting very fast to the solution but also learning on this thread.

The deviation between frequencies that I wrote was somehow exaggerated (a worst case). I find it comforting after you showed me that the deviation will not be as  significant as I thought.

In addition, thank you for listing the PSoC components that might be useful for my problem - this will speed me up significantly.

0 Likes
Reply
mvarga
New Contributor II

hi oddisey,

I am trying to use as much internal components of PSoC so this sentence caught my attention:


@odissey1 wrote:

The DelSig-ADC has high impedance input buffer with variable gain, which potentially allows omitting two Opamps from the Tayloe mixer.  


How would such a circuit (without opamps) look like? I understand that there is only 1 DelSig-ADC in PSoC 5, I know how I'd do it with 2 DelSig-ADCs...

mvarga 

0 Likes
Reply
odissey1
Honored Contributor II

mvarga,

This is a schematic extracted from Mike Hightower's paper on PSoC5-based SDR receiver (attached). It shows only the broadband input filter, a balun, a Tayloe mixer, Opamps and PSoC5 inputs. The low-noise Opamps were used to amplify differential voltage from each capacitor pair, which is typically in 10th of uV range, by about 1000 times prior to ADC sampling. If your signal is larger, say in ~10-100mV range, then, I believe, the Opamps can be omitted, using direct sampling of the differential voltage on C11-C14 by DelSig-ADC.

Hightower_Tayloe_01a.png

Here is potential arrangement using external Tayloe mux (P/N SN74CBT3253CPWR). It uses full Tayloe mixer, with input balun and four capacitors. The input filters and protection diodes are not shown. Since the input frequency is fixed (10MHz), it is possible to put a resonant LC fiter to reject all other signals. Note that PSoC5 must have a XTAL installed to maintain its frequency.  

Tayloe_02a_A1.png

The mixer is driven by a pair of (10MHz) I/Q clocks produced by the quadrature generator, resulting in frequency BUS_CLK/4. PSoC5 BUS_CLK should be set to 40MHz in this case. The ADC is set to operate in differential mode with input buffer enabled. It sequentially samples voltage difference on the caps pairs C1/C2 and C3/C4 using Analog Mux (software mode). If BUS_CLK/4 is close to the frequency of the incoming signal (10MHz) to within <100ppm, then capacitor voltages will oscillate at low speed (<1kHz), and ADC sampling can be performed in software code (no hardware AMux is required). 

 

The ADC sampling code can be something like this:

void Init()
{
    ADC_1_Start();
   ADC_1_StartConvert();

}

 

int main()
{
     Init();
     int16 val1, val2=0;
     for(;;)
     {

           .....

           AMux_1_FastSelect(1);
           ADC_1_StartConvert();
           ADC_1_IsEndConversion(ADC_1_WAIT_FOR_RESULT); // Wait until the ADC conversion is complete/
           ADC_1_StopConvert(); // Since the ADC conversion is complete, stop the conversion/
           val1 = ADC_1_GetResult16();

           AMux_1_FastSelect(0);
           ADC_1_StartConvert();
           ADC_1_IsEndConversion(ADC_1_WAIT_FOR_RESULT); // Wait until the ADC conversion is complete
           ADC_1_StopConvert(); // Since the ADC conversion is complete, stop the conversion
           val2 = ADC_1_GetResult16();

           uint16 root = Sqrt((uint32) (val1*val1 + val2*val2)); // get square root

           .....

}

/odissey1

0 Likes
Reply
odissey1
Honored Contributor II

Here is another good link with PSoC5 project using Tayloe mixer by Mike Hightower

0-500khz Very Low Frequency direct sampling SDR