Forum Rule: Always post complete source code & details to reproduce any issue!
Page 11 of 11 FirstFirst ... 9 10 11
Results 251 to 268 of 268

Thread: Teensy Convolution SDR (Software Defined Radio)

  1. #251
    Frank

    Just an FYI.

    I just now got the program to compile and load. It was complaining about a missing library "SPIN.h". I found those files on the 'net and created the library folder...Voila! The console shows a bunch of warnings and informational stuff, but the program seems to be working. If I open a serial terminal, I can see some timekeeping and other status information coming from the Teensy.

    So, it looks like I'm off to the races! I now have to build up a test platform with the Teensy, audio board, display and switches. Hopefully it will become much more interesting and rewarding from here.

    Joe
    Last edited by joedarock; 10-29-2019 at 08:24 PM.

  2. #252
    Frank

    I have the code compiled, uploaded to the Teensy 4 and running with the audio board and display. One thing I notice is that the GUI runs for about 10 seconds at 135.600 MHz, then goes all white. Should I assume this means it crashed because I don't have the Si5351 I2c connected?

    Joe

  3. #253
    Senior Member DD4WH's Avatar
    Join Date
    Oct 2015
    Location
    Central Europe
    Posts
    508
    @Joe: I do not know, because your setup is unknown to me. For the radio you need: T4, ADC, DAC, Si5351 LO, ILI9341 TFT, encoders, buttons, and a quadrature sampling detector (and RF input lowpass or bandpass filters). If your setup lacks one of those components, it can react weird :-). So there is no way for me to answer your question. What do you mean by "the GUI runs" and how and why did you tune to such a weird frequency? BTW, even if you had the Si5351 connected, it can NOT tune the SDR to 135.6MHz. The Si5351 is limited to about 290MHz, thus Rx frequency is limited to 290/4 == 72.5MHz

    My suggestion would be to completely build the SDR and then test it. Otherwise you will always be speculating why your setup behaves this or the other way.

    One speculation would be that your TFT connection wires have problems with correct soldering or are much too long.

    P.S.: Of course -as you probably know- the radio can receive at the third harmonic, so Rx frequency can be as high as 290/4 * 3 == 217.5MHz, but at the expense of an attenuation of 9dB [and all your components in the QSD front end have to be compatible with such high frequencies and you would have to highpass / bandpass filter the RF input to prevent aliasing]

  4. #254
    Frank

    I think you don't understand. I have the Teensy, the PJRC audio board and ILI9341 display running together and executing your latest code. The GUI comes up just fine at a default frequency of 135.600, every time. This is with no other peripherals (encoders, Si5351, etc) connected. I consider this a pretty well-defined hardware configuration, if not the complete configuration. The display runs and looks like your posted photos, but it crashes after about 15 seconds. I'd don't think it's the absence of an I/Q demod; that only results in no audio input. With some other graphics test code, the hardware setup works just fine, so it's this particular app that's crashing. From my experience with some Si5351 libraries, they crash when there's no Si5351 hardware attached, but I hoped you might have anticipated this and intercepted that condition, that's why I asked. It might also be the new model PJRC audio board I'm using, I don't know if you tried that yet.

    No problem though; I'll trace through the code and try to catch the conditions could cause a crash and intercept them, then we'll know for sure if/what hardware has to be connected in order for the app to run.

    I'll advise when there's more progress to report.

  5. #255
    Senior Member DD4WH's Avatar
    Join Date
    Oct 2015
    Location
    Central Europe
    Posts
    508
    @Joe: OK, now I understand, you mean 135.600kHz, not MHz :-). Yes, that is the expected behaviour of the SDR code to start with that band and that frequency!

    I consider this a pretty well-defined hardware configuration, if not the complete configuration.
    No, your configuration is not the complete configuration, it is complete when you attach everything that I listed in my previous post. I did not anticipate using the SDR without attaching all of the necessary components including the local oscillator Si5351, because that simply does not provide any radio function at all.

    But if you want to use the code without the Si5351, you can try to comment out the init functions for the Si5351 in the setup. And then you would have to look for all functions in the code using the Si5351 and comment those out. But then (and especially if you did not connect an encoder) the script will do nothing except showing the frequency and display the input noise in the spectrum display.

    then we'll know for sure if/what hardware has to be connected in order for the app to run.
    I am still not sure what you are talking about, maybe I am on the wrong track, I apologise for that.
    The hardware necessary for the Teensy Convolution SDR is very clearly defined (have a look into github for the details), so I do not understand your statement. And clearly, if you do not connect all the necessary hardware, the code (and the radio) will not perform as expected.

    Good luck with your progress!

  6. #256
    Frank

    I said my configuration is "well defined", not that it is what you anticipated. I was probing to see if you have any suspicion about what you would expect to happen in that configuration.

    I don't like the "shotgun" approach to trouble-shooting, ie; hook everything up and "let 'er rip". I like to break the system down into bite-size pieces as I proceed. My intent is to get a stable system with no peripherals attached, then introduce them one at a time to ensure everything is working or else troubleshoot what doesn't work.

    I'll get there, and I'll have a much better understanding of the system when I arrive.

  7. #257
    Frank

    I think I localized the cause of the system crashing some 15 seconds or more after startup when there are no peripherals attached. It seems to be associated with no audio into the ADC, possibly causing a divide-by 0 in the twinpeaks correction code? If I initialize the "twinpeaks_tested" variable to 1 instead of 2, it then runs in this "naked" mode, albeit with no twinpeaks detection/correction. On-screen clock and serial monitor output confirms that it's alive.

    Please tell me if you think I'm on the right track.

  8. #258
    Junior Member
    Join Date
    Oct 2019
    Posts
    8
    Hi Frank,
    Just to let you know that I now have the Teensy Convolution SDR up and running. I have picked up a number of MW stations and a few SW stations. Excellent work, I must say.
    I used the Teensy 3.6 with a piggy-back Audio board. I have a few questions if I may;
    1. Is there a 'cheatsheet' (simple user manual) to understand the menu options and the key sequences to select the correct menu choices and what is the expected outcomes? As an example, what would bit number mean?
    2. As some enhancements, I tried adding an RF Preamp about 18.5 dB gain, this works very well, but should this stage be added or not? What is everyone's thoughts on this?
    3. I was thinking of adding a PI-Attenuator of 3/6/9 db switchable. Again, is this something that should be added? or is the internal software based attenuator sufficient? I seen something as the PExxx att in the notes, This I find a bit complex, but, I could add that if necessary (or a solderable DIP/SMD alternative?)
    4. Is a RF BPF necessary for each band? How would this be driven?
    5. I have added a LM380N amp to the Line out. this works well. What are the recommendations for a separate volume (hardware based ) control?

    Some problems I have been facing when I have been 'playing around'.
    a. The screen sometimes goes white, not sure what causes this?
    b. The sound makes a sharp 'click' at times and it stops momentarily, what causes this?
    c. The step size is half of what is displayed, it used to work correctly earlier. Did I make a change somewhere incorrectly? The 1 Hz step is accurate.
    d. How do I run the calibrate routine?

    I have changed the code to use a 25Mhz XTAL and also my board uses CLK0 so have modified the line
    Code:
     define Si_5351_clock  SI5351_CLK0
    Sorry if there are too many questions, but I thought I'd get some thoughts in before I start choosing a box.

    Many thanks for your time.

    /MICUPRE

  9. #259
    Senior Member DD4WH's Avatar
    Join Date
    Oct 2015
    Location
    Central Europe
    Posts
    508
    @MICUPRE: great to hear its working for you! Just some short answers to your questions:

    1. https://github.com/DD4WH/Teensy-Conv...nSDR/wiki/Menu , also have a look at the other entries in the WIKI, maybe you find what you are looking for.
    2. RF preamp is not generally needed below 20MHZ, IF you have a nice 50 Ohm antenna. If you only have a piece of wire, a preamp does make some kind of sense, but testing this for your specific situation is vital.
    3. If you need an attenuator, why not add it to your setup :-)
    4. Definitely you need about 50 to 60dB of attenuation of your RX frequencys´ third harmonic, eg. to receive properly at 531kHz, you will have to install a lowpass RF filter in the frontend, that has 50-60dB attenuation at 1593kHz --> you probably need elliptic 7-pole lowpass filters for that. Highpass filtering is much less important.
    5. Maybe use a pot at the input of the LM380?

    a) You seem to have problems with incorrect switches that you set in the software, maybe additionally contact problems with the TFT wires. Provide highres pictures of your hardware setup, so we can see what you built, otherwise we are wildly speculating here . . .
    b) you spoiled something in the software or you did not take the latest software version from github. Did you change AudioMemory ?? If yes, be very careful with that!
    c) very odd! Seems to me like a severe hardware failure with your Si5351, your Johnson counter OR you spoiled up something very serious in the software
    d) ??? there is no calibration routine, search for China Radio International, switch to SAM demodulation and adjust calibration constant and calibration factor in the menu, until frequency is spot-on. Do this for different bands, re-adjust several times and then save those settings to EEPROM. China Radio International is one of the very few radio broadcasters, that are accurate to one Hz in their Transmit frequencies, most other international broadcasters are off, up to 100Hz sometimes, even worse for some Brazilian national radio stations ;-)

    My recommendation would be to use a 27MHz TCXO instead of a 25MHz crystal for the Si5351, then your frequency will be super-accurate [However it is quite accurate and temperature stability is high even with crystals like yours].

    Good luck with your progress!

    Frank DD4WH

  10. #260
    Junior Member
    Join Date
    Oct 2019
    Posts
    8
    Quote Originally Posted by DD4WH View Post
    @MICUPRE: great to hear its working for you! Just some short answers to your questions:

    1. https://github.com/DD4WH/Teensy-Conv...nSDR/wiki/Menu , also have a look at the other entries in the WIKI, maybe you find what you are looking for.
    2. RF preamp is not generally needed below 20MHZ, IF you have a nice 50 Ohm antenna. If you only have a piece of wire, a preamp does make some kind of sense, but testing this for your specific situation is vital.
    3. If you need an attenuator, why not add it to your setup :-)
    4. Definitely you need about 50 to 60dB of attenuation of your RX frequencys´ third harmonic, eg. to receive properly at 531kHz, you will have to install a lowpass RF filter in the frontend, that has 50-60dB attenuation at 1593kHz --> you probably need elliptic 7-pole lowpass filters for that. Highpass filtering is much less important.
    5. Maybe use a pot at the input of the LM380?

    a) You seem to have problems with incorrect switches that you set in the software, maybe additionally contact problems with the TFT wires. Provide highres pictures of your hardware setup, so we can see what you built, otherwise we are wildly speculating here . . .
    b) you spoiled something in the software or you did not take the latest software version from github. Did you change AudioMemory ?? If yes, be very careful with that!
    c) very odd! Seems to me like a severe hardware failure with your Si5351, your Johnson counter OR you spoiled up something very serious in the software
    d) ??? there is no calibration routine, search for China Radio International, switch to SAM demodulation and adjust calibration constant and calibration factor in the menu, until frequency is spot-on. Do this for different bands, re-adjust several times and then save those settings to EEPROM. China Radio International is one of the very few radio broadcasters, that are accurate to one Hz in their Transmit frequencies, most other international broadcasters are off, up to 100Hz sometimes, even worse for some Brazilian national radio stations ;-)

    My recommendation would be to use a 27MHz TCXO instead of a 25MHz crystal for the Si5351, then your frequency will be super-accurate [However it is quite accurate and temperature stability is high even with crystals like yours].

    Good luck with your progress!

    Frank DD4WH
    Hi Frank,

    Thank you for your time and advice on this. I will reinstall the FIRMWARE and give it a go.

    Best 73,

    /MICUPRE

  11. #261
    Junior Member
    Join Date
    Aug 2019
    Posts
    8
    Quote Originally Posted by DD4WH View Post
    @MICUPRE
    ............
    Softrock should work. Does it have an Si5351 as LO? Then it should be easy to modify the code for the SoftRock.
    There were many versions of the SoftRock. Early versions were crystal controlled for the LO. Subsequent versions that were more frequency agile used an Si570 to generate the LO. These also used an ATTiny controller that provided host PC connection to the Si570 via USB, and also handled switching of bandpass filters.
    That is where the rub comes in. I don't think it is a practical approach to use a Teensy and its USB port to support the Si570 requirements (I could be wrong, but I have been unable to find the details of the required protocol for the SoftRock to reverse engineer it).
    However, I have been looking at the concept of using a SoftRock RxTx (transceiver), Teensy with audio board, Si5351, and ILI9341 to create a basic, compact, stand alone SDR transceiver package that could even be battery operated. To that end, I have been using this concept as a learning platform as I am totally new to microcontrollers, C++, and OOP - even though I have other software development experience in a previous life. I am learning a lot, very quickly.
    I have 5 or 6 SoftRocks I can play with and even butcher if need be. I am going to start with an old 2 band (40/30m) transceiver that was crystal controlled and use the Si5351 to make it frequency agile. This much I have already got working for proof of concept. The next step will be to disconnect the front end Si570 and ATTiny on a more recent version, replacing its functionality with the Teensy.
    Still a long way to go, and my progress was recently hampered when I had a freak accident and broke my neck. Further development got pretty much halted as I convalesce. I hope to return to it soon. I'd be happy to communicate with anyone with a similar interest.
    Tom

  12. #262
    Junior Member
    Join Date
    Oct 2019
    Posts
    8
    EddieLeo

    For the SI570 see here: https://stevewhomans.wordpress.com/2...e-transceiver/

    Maybe useful to check the EDENDSP group in groups.io.

    Best

    /MICUPRE

  13. #263
    Senior Member DD4WH's Avatar
    Join Date
    Oct 2015
    Location
    Central Europe
    Posts
    508
    OFFTOPIC: I would recommend to no longer use the Si570 unless you have a very good reason to do so . . .

    The Si570:
    * needs way too much power supply current
    * is much too expensive
    * is much too sensitive to temperature fluctuations (which result in frequency fluctuations)
    * has lower phase noise than the Si5351, but I have not seen any convincing data/measurements how that relates to better receive properties compared to using the Si5351 as a LO [the theory is clear, but show it to me with real measurement data! ;-)]

    my recommendation would be: in this thread, lets talk about SDR software on the Teensy here, not about hardware . . . that is done by many people in many other places.

    All the best 73s,

    Frank DD4WH

  14. #264
    Junior Member
    Join Date
    Oct 2019
    Posts
    8
    Quote Originally Posted by DD4WH View Post
    OFFTOPIC: I would recommend to no longer use the Si570 unless you have a very good reason to do so . . .

    The Si570:
    * needs way too much power supply current
    * is much too expensive
    * is much too sensitive to temperature fluctuations (which result in frequency fluctuations)
    * has lower phase noise than the Si5351, but I have not seen any convincing data/measurements how that relates to better receive properties compared to using the Si5351 as a LO [the theory is clear, but show it to me with real measurement data! ;-)]

    my recommendation would be: in this thread, lets talk about SDR software on the Teensy here, not about hardware . . . that is done by many people in many other places.

    All the best 73s,

    Frank DD4WH
    Yes, I agree, that was off-topic and my apologies. :-)

    Let's stick to SDR software on the Teensy here.

    Best,

    /MICUPRE

  15. #265
    Junior Member
    Join Date
    Aug 2019
    Posts
    8
    Frank, with all due respect since this is your thread and your development project.....
    What is off topic is sometimes a gray or fine line. Sometimes a subject is merely tangential, but still pertinent to the primary thread.
    When I look at many software projects, such as your masterful convolution SDR, I also try to think of how that development might be leveraged in other similar uses or projects. You have said yourself that using the SoftRock front end should be a possibility with your software. So any discussion of that possibility cannot ignore the pertinent hardware aspects of that option for the simple reason that it affects the required software.
    I did not see that anyone was suggesting the Si570 as a viable alternative, and in fact, in my post I think I clearly indicated that working around it (disconnecting it in the circuit) was a more viable approach.
    It might be a good ideas to have a separate thread that is specifically SoftRock oriented and where various different SDR programs for the Teensy could be discussed as options in order leave this thread "pure" for discussion of your project.
    Regards, Tom

  16. #266
    Senior Member DD4WH's Avatar
    Join Date
    Oct 2015
    Location
    Central Europe
    Posts
    508
    Tom, thanks for your thoughtful comment! When saying OFFTOPIC, I meant that MY comment on the Si570 was offtopic. However, you are right, this is the PJRC TEENSY forum and this thread is on Software Defined Radio (Teensy Convolution SDR). So, my wish would be that intensive discussions on the quadrature sampling detector types, front ends and advantages and disadvantages of certain local oscillator ICs is done elsewhere in other forums and we use the excellent PJRC forum for discussions on the software side of Teensy-based Software Defined Radio.
    All the best,
    Frank DD4WH

  17. #267
    Junior Member
    Join Date
    Aug 2019
    Posts
    8
    Frank,
    Agreed!!
    To that end, I would be interested in having you do a short summary of the theoretical advantages (as well as any possible disadvantages) of using this approach to SDR, along with your real world observations of how well your implementation reflects those theoretical characteristics. I realize that some observations may be subjective as opposed to rigorously measured, but would be useful none the less!
    Thanks, Tom

  18. #268
    Senior Member DD4WH's Avatar
    Join Date
    Oct 2015
    Location
    Central Europe
    Posts
    508
    Tom, you are probably aware of these resources already, but at these places I have prepared all the info regarding the Teensy Convolution SDR:

    https://github.com/DD4WH/Teensy-Conv...%20english.pdf

    plus a Wiki explaining some parts in more detail (have a look at the right sidebar if you are looking for specific topics):

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

    there is also a WIKI for an STM32F7-based SDR running the UHSDR software, for which I have prepared even more topics on how QSD SDRs and specifically how the UHSDR software works in detail:

    https://github.com/df8oe/UHSDR/wiki/...y-of-Operation

    In the "Links & ressources" section you will find links to the classic SDR papers / books as well as links to open source code libraries:

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

    In order to get a quick overview, my recommendation to you would be the following order/priority for reading:

    1.) the classic papers by Youngblood 2002/2003
    2.) the manual by Whiteley 2011
    3.) then you might like to read my description of the Teensy Convolution SDR and
    4.) every specific topic in the WIKI that you might be interested in

    Have fun with reading! And dont hesitate to ask specific questions on specific topics or specific parts of the software.
    However, the best would be to start building an SDR after reading and then ask questions afterwards ;-).

    P.S.: As you also might already know, I am not advocating one specific approach to SDR, anyone can build/program anything she/he wants. I am not selling anything. This project and this thread is 100% purely educational (and sometimes fun ;-)).
    Last edited by DD4WH; 11-10-2019 at 04:02 PM.

Posting Permissions

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