Forum Rule: Always post complete source code & details to reproduce any issue!
Page 6 of 9 FirstFirst ... 4 5 6 7 8 ... LastLast
Results 126 to 150 of 205

Thread: Teensy Convolution SDR (Software Defined Radio)

  1. #126
    Senior Member DD4WH's Avatar
    Join Date
    Oct 2015
    Location
    Central Europe
    Posts
    384
    From my experience, if you want to look behind the theory in the Teensy Convolution SDR, I would recommend reading three sources at the beginning (Wolfgang: you probably already know most of these):

    https://github.com/DD4WH/Teensy-Conv...ks-&-Resources

    First: Youngblood (2002) part 2

    Second: Whiteley (2011)

    Third: Borgerding (2006)

    With these three, you are already quite well prepared for further challenges.

    73 Frank DD4WH
    Last edited by DD4WH; 02-08-2019 at 09:41 AM.

  2. #127
    Senior Member DD4WH's Avatar
    Join Date
    Oct 2015
    Location
    Central Europe
    Posts
    384
    I uploaded a new version of the Teensy Convolution SDR code into the github:

    * EEPROM_LOAD message copied into header of the file
    * no more hanging when there is no SD card inserted
    * added many nice optimizations by Bob Larkin --> thank you, Bob !!!

    All the best,

    Frank DD4WH

  3. #128
    Junior Member
    Join Date
    Jan 2019
    Posts
    13
    Good news:
    Now the next step (living display, control of the SI5351) is done!
    Thank you very much, Frank, for your hints. (Inside the 10300 lines I wasn't able to find the comment after line 1734.)
    Now it's time to mount and solder the 5 remaining buttons, and the I / Q input. (Before I do so, I will test my QSD with a PC program, HDSDR.)
    Thanks a lot, also for the literature notes!
    73, Wolfgang

  4. #129
    Senior Member DD4WH's Avatar
    Join Date
    Oct 2015
    Location
    Central Europe
    Posts
    384
    updated links in the Ressources - WIKI (some were old and did not work)

  5. #130
    Junior Member
    Join Date
    Jan 2019
    Posts
    13
    More good news:
    Now the receiver is running. In the moment I cannot hear anything, but the spectrum seems to be correct, and the right audio output connection I hope to find soon.
    Very glad about this nice receiver!
    Because of using a touch screen my next goal is to make it work.
    73, WolfgangClick image for larger version. 

Name:	P1050430.jpg 
Views:	81 
Size:	131.1 KB 
ID:	15856

  6. #131
    Senior Member DD4WH's Avatar
    Join Date
    Oct 2015
    Location
    Central Europe
    Posts
    384
    I added some info on how to use the menu buttons, encoders and encoder push buttons in the Teensy Convolution SDR here:

    https://github.com/DD4WH/Teensy-Conv...nSDR/wiki/Menu

    Have fun!

    Frank

  7. #132
    Junior Member
    Join Date
    Jan 2019
    Posts
    13
    Now my receiver works, very well!
    Connected to my 80m dipole, I can hear ham radio stations in good audio quality, better as with my IC706.
    A mistake from me: false LSB/USB assignment .Changed I / Q connectors -> all ok.

    The lack of attenuator and LPF was no problem until now.

    Thank you, Frank, for the new informations (Wiki "Menu")!
    Wolfgang

    Click image for larger version. 

Name:	P1050440.jpg 
Views:	70 
Size:	173.7 KB 
ID:	15866

  8. #133
    Junior Member
    Join Date
    Jan 2019
    Posts
    13
    When testing the device, I noticed a few things that needed improvement:

    - There are two menus through which you can move with two up / down buttons.
    - Menu 1 contains 19 points, Menu 2 even 34 points.

    So sometimes you have to press the keys quite often,
    but above all, without a list you can not keep track of the whole thing.
    The device has a graphics screen!

    Here I will start to improve the usability.

  9. #134
    Junior Member
    Join Date
    Jan 2019
    Posts
    13
    Hello Frank,
    I have the following problem with FM reception :
    my strongest transmitter sends at 99.7 Mc.
    I tune to 33,233 Mc, but the audio is very distorted, only in AM mode to understand.
    What do I wrong?

    Thanks, Wolfgang

  10. #135
    Senior Member DD4WH's Avatar
    Join Date
    Oct 2015
    Location
    Central Europe
    Posts
    384
    Hi Wolfgang,

    for wideband FM reception, the SDR is in 3x undersampling mode, so your math is approximately right, if you divide the real receive frequency by 3 :-)

    However, in all demodulation modes -except for WFM- the SDR uses a digital IF of 1/4 * sample rate.

    Lets say you chose a sample rate of 234k, which in reality is exactly a sample rate of 234375Hz

    That is why the display would show ( 99700000 - 3/4 * 234375 ) / 3 = 33174739.6Hz, which is exactly what is displayed when you do the following:

    * adjust sample rate to 234ksps
    * Set demodulation mode to WFM
    * tune to 99.70MHz
    --> the frequency display automatically does the math for you, it shows the real receive frequency :-).
    * listen to fine audio
    * set demodulation mode to something else: the display shows 33.174.739Hz (and you know why it shows this ackward figure)
    * set demodulation mode to WFM (the display shows: 99.700.000Hz) and continue to listen :-)

    For wideband FM reception, you need a very large sample rate, because an FM signal has +-75kHz frequency deviation. According to Wikipedia, this corresponds to a modulation index of 5, which leads to a needed bandwidth of 180kHz for MONO FM reception. So for nice MONO audio, you need at least 192ksps sample rate.
    For STEREO you would better have a bit wider bandwidth, so I choose 234ksps. According to Wikipedia, you would need 270kHz of bandwidth (Carson formula: Bandwidth = 2 * frequency deviation * base band bandwidth [60kHz]) for all components of the FM signal: the L+R signal, the 19kHz pilot carrier, the L-R signal centred at 38kHz and the RDS data signal centred at 57kHz (RDS decoding is not -yet- implemented). Dont try WFM with the standard sample rate of 96ksps, it will sound extremely distorted, because the frequency deviation is +-75kHz and the signal will be aliased with such a small sample rate and unwanted signals will fold into your FM audio baseband.

    All the best 73s

    Frank DD4WH
    Last edited by DD4WH; 02-15-2019 at 07:50 PM. Reason: EDIT: learned more about frequency deviation in FM radio

  11. #136
    Senior Member DD4WH's Avatar
    Join Date
    Oct 2015
    Location
    Central Europe
    Posts
    384
    Sorry, I made a mistake: the Carson formula for the approximate bandwidth of an FM-modulated signal is the following:

    Bandwidth = 2 * (frequency deviation + baseband bandwidth of the audio signal)

    For an FM radio signal you have 15kHz of MONO audio (L+R), the pilot tone carrier at 19kHz, the L-R DSB signal centred at 38kHz and the RDS signal at 57kHz, that corresponds to a baseband bandwidth of approximately 60kHz. The frequency deviation of an FM radio signal is 75kHz. This holds for Europe, in other parts of the world there are additional digital data services and other frequency deviations, so the band width could be even higher.

    Europe -->
    Bandwidth = 2 * (75kHz + 60kHz) = 270kHz

    So we should use the sample rate of 281ksps for optimum wideband FM reception. However, the Teensy 3.6. comes to its limits at this high speed. The FM demodulation has to be done at this high sample rate and it uses the processor intense atan2f function and a complex multiply. [maybe the T4 will help here and allow for high speed stereo demodulation and simultaneous RDS decoding ;-)]

    All the best,

    Frank

  12. #137
    Junior Member
    Join Date
    Feb 2019
    Location
    UK
    Posts
    2
    Greetings from a newbie very attracted to this project. Hope it is still alive and well... and the knowledgeable people who brought it to its current state.
    My particular interest would be gaining first-hand experience of binaural listening under a variety of conditions in LF/MF/HF broadcasting.
    For me to do this, it is particularly important to be able to try a range of different settings using a recorded IQ stream.
    It seems IQ recording/playback was an intended feature but, as far as I can tell, this has not yet been released.
    Any update would be gratefully received.
    Kind regards
    Paul

  13. #138
    Senior Member DD4WH's Avatar
    Join Date
    Oct 2015
    Location
    Central Europe
    Posts
    384
    Hi Paul!
    You probably already know this WIKI site on binaural listening with the Teensy Convolution SDR:

    https://github.com/DD4WH/Teensy-Conv...o-demodulation

    At the moment, I have implemented three "Stereo" demodulation modes:

    • IQ: listen directly to I and Q without any demodulation
    • Stereo SSB: listen to demodulated LSB on the right ear and demodulated USB on the left ear
    • Stereo SAM: this is a Stereo version of sideband selected synchronous AM demodulation, i.e. a PLL which locks to the carrier of a station and sends the lower sideband (SAM-L) to the left ear and the upper sideband (SAM-U) to the right ear

    To my knowledge, these are more binaural options than any commercial transceiver on the market at the moment can deliver ;-). Feel free to try these options on LW, MW or HF.

    However, recording audio or I & Q is not implemented at the moment (well: audio recording is implemented, but does not work properly because of a lack of free memory). To be honest, I do not believe it is possible with the Teensy 3.6., because nearly 85% of the memory is being consumed for the main filtering and other real time audio stuff, so there is no more memory headroom for recording, especially not for stereo recording of I & Q. But hardcore programmers surely will be able to squeeze more out of the code ;-).

    But I also am convinced that you do not need to record in order to experiment with binaural listening, just use one of the three implemented options in real time and enjoy.

    All the best,

    Frank DD4WH

  14. #139
    Junior Member
    Join Date
    Feb 2019
    Location
    UK
    Posts
    2
    Quote Originally Posted by DD4WH View Post
    Hi Paul!
    You probably already know
    Really good of you to come back, Frank, and so quickly.
    Yes, I came across this thread and the github stuff - quite by accident when I was searching for anything new on binaural. It's a big puzzle to me why you hadn't come up before during extensive searches.
    Anyway... binaural has been something of an obsession for me since the late 1960s - when the principle and working technology were already 20 years old!
    Have been SWL intermittently ever since, and always on the lookout for receivers or adapters with this feature. No soldering skills or much programming experience meant something off-the-shelf was needed.
    Fast-forward to retirement and I'm saddened that (as you say) there is no kit out there offering (true) binaural. Pseudo implementations are just that . Seems to me, demonstration/education is lacking and it crossed my mind that one or two well-crafted YouTube videos might help to convince a (certain) busy SDR program author to make time for a proper implementation.
    So, with extremely limited funds I'm toying with the idea of gradually replicating something like your full receiver (giving up only when I've fried too many components).
    The question about IQ recording was prompted because a "scientific" investigation needs many experiments on repeatable scenarios, ending up with a video example of each situation/technique of interest.
    I do sympathize with your predicament (after more reading/education last night) and am coming round to the idea of using a second Teensy fed by DMA to handle recording, probably to SSD over USB 3.0.
    Paul Stoffregen's inspirational TDM project is very thought-provoking, though I wouldn't know if it can be adapted for Teensy-Teensy transfers. One notable "hit" for me was its potential to be extended to another obsession of mine: a multi-source audio controller for switching and routing (with a little bit of processing) the output from several SDR sources (preferably coherent as in RSPduo) for parallel channel comparison or diversity reception.
    Enough rambling, and thanks for your time. Will probably have a bash making the QSD/LO first and see where I get.
    Kind regards
    Paul

  15. #140
    Junior Member
    Join Date
    Jan 2019
    Posts
    13
    After studying the program, I have a suggestion to give it a more readable structure:

    DD4WH Convolution SDR

    1_Settings
    1_1_Buttons_encoders
    1_2_Zoom_factors
    1_3_Sample_rates
    1_4_Modulation
    1_5_Frequency_bands
    1_6_Constants
    1_7_Display_constants
    1_8_Menu_settings
    1_9_Menu_text
    1_10_Windowing
    1_11_Filter_constants

    2_Global_variables
    2_1_FFT_structures
    2_2_Arbitrary_variables

    3_Receive_functions
    3_1_General_functions
    3_1_1_Digital_convolution
    3_1_2_Filters
    3_1_3_AGC
    3_1_4_Noise_blanker
    3_1_5_Noise_reduction
    3_1_6_WFM_demodulation
    3_1_7_AM_demodulation
    3_1_8_SSB_autoTune
    3_1_9_SSB_demodulation

    4_User_interface
    4_1_User_input
    4_2_Screen_output
    4_2_1_Menu
    4_2_2_Spectrum
    4_2_3_Time_date

    I would prefer to dismantle the more than 11000 lines into smaller portions, e.g. into these .ino files.

    What do you think about this proposal?

    Wolfgang
    Last edited by DH1AKF; 03-07-2019 at 07:59 PM.

  16. #141
    Junior Member
    Join Date
    Jan 2019
    Posts
    13
    Other users made proposals, now my suggestion is:
    DD4WH Convolution SDR

    1_Settings
    1_1_Buttons_encoders
    1_2_Zoom_factors
    1_3_Sample_rates
    1_4_Modulation
    1_5_Frequency_bands
    1_6_Constants
    1_7_Display_constants
    1_8_Menu_settings
    1_9_Menu_text
    1_10_Windowing
    1_11_Filter_constants

    2_Global_variables
    2_1_FFT_structures
    2_2_Arbitrary_variables

    3_Receive_functions
    3_1_General_functions
    3_1_1_DC_rejection_and_mixer
    3_1_2_Digital_convolution
    3_1_3_Filter_design
    3_1_3_Filters
    3_1_4_WFM_demodulation
    3_1_5_AM_demodulation
    3_1_6_SSB_demodulation
    3_2_Utilities
    3_2_1_AGC
    3_2_2_Noise_blanker
    3_2_3_Noise_reduction
    3_2_4_SSB_autoTune

    4_User_interface
    4_1_User_input
    4_2_Screen_output
    4_2_1_Menu
    4_2_2_Spectrum
    4_2_3_Time_date

  17. #142
    Junior Member
    Join Date
    Mar 2019
    Posts
    6
    Hello!

    Have spent some time reading about this SDR project with the plan to build a shortwave radio.
    As an RF engineer, all is fine up to the iq feed into the ADC. I would use the AD9850 series DDS for the main LO, much faster and cleaner than the type suggested.
    When considering the SDR demod, it would be great to see the minimal script for just SSB, iq to audio out, rather than the whole system. This way, I would have some chance in appreciating the code and then build onto.

    Cheers, Rob

  18. #143
    Senior Member DD4WH's Avatar
    Join Date
    Oct 2015
    Location
    Central Europe
    Posts
    384
    Hi Rob,

    thanks for your comments!

    As a biologist, I may not be up to the latest developments in the RF engineering field.

    Why would you think the DDS AD9850 is "much faster" ? It goes up to only 125MHz -as far as I know- and the LO I use (the Si5351) can be used up to 270MHz.

    --> thus with the AD9850 it would not be possible to receive FM radio in 3x undersampling mode (108 / 3 is 36MHz receive frequency and requires 4 times higher LO --> 144MHz which is not possible with the DDS)

    Could you explain why you think the DDS AD9850 is "much cleaner"? According to the datasheet the spurs are about 50dB below the produced signal in the AD9850, which is not so great, I think.

    Also, I am not sure whether it would make sense to drive a Tayloe frontend = quadrature sampling detector directly with a sine wave (like the one produced by the AD9850). I think it needs a square wave LO, which is directly output by the Si5351.

    Have a look at the Wiki, there you can find information on the signal path. It is then easy to find the SSB demodulation (in fact the Teensy Convolution SDR has no "demodulation" at all in SSB mode: basically the IQ signal is transformed into the frequency domain by a 512-point FFT and then complex-multiplied with the FFT result of a FIR bandpass (Kaiser window) which simply filters away the unwanted sideband and after the inverse FFT & overlap-save you have single sideband audio :-)).

    https://github.com/DD4WH/Teensy-ConvolutionSDR/wiki

    Have fun, all the best,

    Frank DD4WH

  19. #144
    Junior Member
    Join Date
    Mar 2019
    Posts
    6
    Hi Frank

    I am assuming the Si5351 behaves similar to softrock Rx (Si570) which i have played with and found tune stepping to be somewhat clunky, time to settle. These are dual PLL's with up to 10ms settling.
    DDS will have very fast settling, good phase noise but yes there's some spurious but could be filtered out. For shortwave, freq range is fine.

    I read your description on math computation, thank you :-). Would be nice to strip the code down to stages, for instance, performing FFT on iq signal.

    Cheers, Rob

  20. #145
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    5,631

  21. #146
    Junior Member
    Join Date
    Mar 2019
    Posts
    6
    Ah, thanks for the link. A lot of comments there.
    General opinion is that the device is good for SW receivers. It's true that the PLL's are slow to lock, so this should reflect when tuning, but I'm not reading evidence of this. Best way would be to buy one and try for myself.

    Cheers

  22. #147
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    5,631
    10ms for tuning are not a problem, I think.
    I see more issues with the SGTL-5000 on the Audioshield -Ok, it seems to work pretty well, but..the datasheet says, its good for only 96kHz. So, we're overclocking it.. what's the max. samplingrate in this SDR? > 200KHz?
    Does it make sense to look for a better ADC?

    Edit: Is this baby overkill?

  23. #148
    Senior Member DD4WH's Avatar
    Join Date
    Oct 2015
    Location
    Central Europe
    Posts
    384
    Thanks Frank for the Si5351 link. Yes, confirmed, I have never experienced problems with phase noise in the Si5351 and also never had problems with slow lock of the Si5351 or Si570 which I have both been running in several radios (tuning behaviour is much more dependent on the library you are using for the Si chip).

    Best would be for you to make your own experiences and report them back here. At the moment this discussion is a bit on the theoretical side :-).

    And the Teensy Convolution SDR also uses sample rates up to 252kHz (my standard sample rate I use for FM radio, and I rarely also use 281 kHz with the SGTL5000). My radio has been running for two years now with the same (overclocked) SGTL5000 audio shield and its running almost daily . . . So does not seem to harm too much ;-).

    And why change the ADC in a nicely running system? Also all higher speed ADCs will have a much higher power consumption (>100mA in the AK5397).

  24. #149
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    5,631
    Quote Originally Posted by DD4WH View Post
    Thanks Frank for the Si5351 link. Yes, confirmed, I have never experienced problems with phase noise in the Si5351 and also never had problems with slow lock of the Si5351 or Si570 which I have both been running in several radios (tuning behaviour is much more dependent on the library you are using for the Si chip).

    Best would be for you to make your own experiences and report them back here. At the moment this discussion is a bit on the theoretical side :-).

    And the Teensy Convolution SDR also uses sample rates up to 252kHz (my standard sample rate I use for FM radio, and I rarely also use 281 kHz with the SGTL5000). My radio has been running for two years now with the same (overclocked) SGTL5000 audio shield and its running almost daily . . . So does not seem to harm too much ;-).

    And why change the ADC in a nicely running system? Also all higher speed ADCs will have a much higher power consumption (>100mA in the AK5397).
    No, a misunderstanding I mean, isn't there a performance degration with such a high overclocking? Is the SNR still OK? How much usable bits do you get?

    I have all parts, and about to build it soon .. But not original, I want to use the comming Teeny 4.. (glad to have a early beta) - have to think a bit about it, since it has less pins.
    Last edited by Frank B; 03-22-2019 at 09:24 PM.

  25. #150
    Senior Member DD4WH's Avatar
    Join Date
    Oct 2015
    Location
    Central Europe
    Posts
    384
    Ah, OK, now I understood!

    For AM & SSB reception up to 30MHz I use sample rates of 96k or 100k, that seems quite clean of spurs in the range that the SDR uses (as we use an intermediate frequency of sample rate / 4, the range that has to be clean is thus 25 to about 35kHz depending on your audio bandwidth).

    Bob Larkin has made some measurements and he has nicely shown that the audio board used with these sample rates produces less than -80dB of ADC noise in this range (relative to FS). However, when he used large dividers, he could even lower the noise to -100dB!

    https://forum.pjrc.com/threads/38753...l=1#post131216

    Whoops, I now realize that I use {1,7} = 100466Hz sample rate as dividers in my code and Bob used {224, 1575} = 100000. Maybe I should change that in my code in order to get even better noise performance? Hmm. Will implement both and compare . . .

    Higher sample rates are only used for FM wideband radio reception. However, that is still in a preliminary stage, because the T3.6 is at its limit at that sample rate speed. We need to demodulate the FM signal at the high sample rate without decimation and we need the extremely processor-intense arctanf for that purpose. With the T4 beta there would be more options to play with, of course :-). And hopefully the FPU working with double is a major step forward . . .

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •