Teensy Convolution SDR (Software Defined Radio)

Hi Silvano, hi Henk,

sorry for the late reply, did not have much time the last weeks . . .

A bit strange, that you have to add that "extern "C"" code, because in my setup it works without that . . .

You could also easily substitute the sincosf with the two corresponding cosf and sinf calls, because sincosf simply calculates the sin AND the cos of a value.

@Silvano: I would need a little more information about your setup to be able to try to help you. Teensy Convolution SDR uses three encoders at the moment. So I am not sure what kind of problem you have. Would be good if you give more detail.

@Henk: do you have your Teensy Convolution SDR running?

All the best, have fun!

Frank
 
Hi Frank many thanks for the reply ! I used rheslip code-Teensy 3.2-Sparkfun teensy adapter-SDR reloaded from Kainka and everything goes fine :)) When i use teensy 3.6 with your code and same hardware, i cannot tune the si5351 and (strange !) encoder on pins 16, 17 doesn,t works ! No reception at all !
Now i'm trying without the sparkfun adapter and pins 16, 17 are working :) but i not have tried the "SDR reloaded" with pins 18,19 (sda,scl).
Can you give some trichs for the "SDR reloaded" from Elektor and your library for si5351 ?
Every other thing of yor wonderful code is running :)
THANKS from Silvano
 
Last edited:
Hi Silvano,

maybe there are some misunderstandings:
- what is the Sparkfun Teensy adapter? Could well be that the adapter is using pins that are needed for the SDR
- pin 16/17 are encoder pins for the tune encoder
- pin 18/19 are SDA/SCL for the Si5351 on the SDR QSD board
- the Si5351 lib is not my lib! I have not written a single line of code for that lib.
- Are you really using a Teensy 3.6 ? If not, buy one. Teensy Convolution SDR only works with Teensy 3.6 at 180MHz
- have a close look at the configuration in lines 136 & 137 ! Define the right clock output of the Si5351 and the right crystal frequency

Really: there are no tricks, everything is open source! :)

I have now prepared a txt file with a table of all the pins used for the Teensy Convolution SDR

It is in the github:

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

Hopefully that will solve some of the questions. Dont hesitate to ask.

73 de Frank DD4WH
 
Hi Frank !
The adapter is this:
https://www.sparkfun.com/products/13288
I use it with Teensy 3.2 and SDR reloaded; the code for the radio is from rheslip original, and the si5351 on the sdr works with the modified library from rheslip;
now I use Teensy 3.6 ! With the adapter your code runs (display, rf gain, etc.) but no tuning , nor reception , only noise ...
So now i use Teensy 3.6 ALONE with the SDR reloaded and seems good... the encoder works but i have no time to try with the SDR reloaded ...
So in the next days i'll post my results, i hope good :)))
MANY THANKS for yoru help !
Regards, Silvano
 
Hi Frank my problem is the sdr reloaded, it works with Teensy 3.2, but if i connect the Teensy 3.6 (sda 18, scl 19) it gives me error (Serial.print(si5351.dev_status.LOL_B); returns 1 instead of 0).
Do you have used the SDR reloaded from B. Kainka with no problems? Thans in advance for your answer.
Bye from Silvano IK2WYT
 
Hi Frank my problem is the sdr reloaded, it works with Teensy 3.2, but if i connect the Teensy 3.6 (sda 18, scl 19) it gives me error (Serial.print(si5351.dev_status.LOL_B); returns 1 instead of 0).
Do you have used the SDR reloaded from B. Kainka with no problems? Thans in advance for your answer.
Bye from Silvano IK2WYT

I noticed that the sparkfun board you have has a cut trace / solder blob pad option. These will configure the shield header pins for either A6, A7 OR SCL(A5), SDA(A4).

If you were to put a solder blob on this jumper without cutting the trace you would effectively jump teensy pin 18->20 and pin 19->21.

On the VE3MKC rheslip firmware (teensy 3.2) pins 20 and 21 are button inputs, and may have a non-disruptive effect on the I2C communication.
On the DD4WH Convolution firmware (teensy 3.6) pins 20 and 21 are LCD DC, and CS Output signals. This will most certainly have a disruptive effect on I2C communications.

Maybe if we could see the wiring it would give us some more clues as well.

Hope that helps.
Good luck!
 
Hi Silvano,
we would need much more information on your specific setup in order to be able to help you.

The Elektor board definitely works with the Teensy Convolution SDR, I have tried it. Please note that the Si5351 has three different clock outputs. Did you specify the right one in the script?

73 de Frank
 
Hi friends SUCCESS ! With your comments i have revisited all the project and now it is running (from about ten minutes ago... :)) )
Teensy 3.6 + SDR Reloaded from B.Kainka + Audio adapter + DD4WH Convolution software :)))
THANKS to everybody and see you soon, now i have to listen to the radio :))
73 from Silvano IK2WYT
 
hi Silvano,
congratulations!!!
I would be very interested to hear about your experiences and comments on the SDR (maybe some photos also? ;-)). it is the third existing working Teensy Convolution SDR I know of.
Have fun!
73 de Frank
 
Sure Frank :))) In the next days i'll come back with photos and comments.
This is only a beginning...
Bye ! Silvano
 
Convolution SDR.jpg

73 by Silvano
 
Teensy Convolution SDR now has a working LMS noise reduction AND an LMS automatic notch filter.

All relevant parameters for these filters can be finetuned in the menu (no. of taps of the LMS FIR filter, delay length, mu, gamma).

These two variable leak LMS algorithms were adapted from the excellent GPLv3 licensed DSP library by Warren Pratt, wdsp. Thank you, Warren!

All the best, have fun with the Teensy,

Frank
 
Hi Frank many thanks !! I am now working on the CW decoder by Loftur E. Jonasson, i am trying to modify
it with a binary search tree instead of the various if ... then ..else ; Elektor CW shield uses this method.
I'll come soon with other images and video of the 3.6 Teensy Convolution SDR and my first Teensy 3.2 SDR.
Best regards, Silvano
 
CW decoder by Loftur E. Jonasson, 73 Silvano

Looking good! I'll be putting my own receiver together once the parts arrive in the mail next week and I'm hoping to include a CW decoder. Could I get a look at the code you used?

73
John
 
After resolving some initial trouble with the CMSIS libraries I've run into a bit of a roadblock when compiling the Teensy_Convolution_SDR.ino file. I'm not so much concerned with the SD.h library error as I am with the others. My understanding is that the arm_math.h error was commented out. If anyone could shed some light on this I'd really appreciate it.

Code:
Arduino: 1.8.2 (Windows 10), TD: 1.36, Board: "Teensy 3.6, Serial, 180 MHz, Faster, US English"

In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Audio/analyze_fft256.h:32:0,

                 from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Audio/Audio.h:61,

                 from C:\Users\John\Documents\Radio stuff\CS-40\Teensy_Convolution_SDR\Teensy_Convolution_SDR.ino:112:

C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3/arm_math.h:314:4: error: #error "Define according the used Cortex core ARM_MATH_CM7, ARM_MATH_CM4, ARM_MATH_CM3, ARM_MATH_CM0PLUS or ARM_MATH_CM0"

   #error "Define according the used Cortex core ARM_MATH_CM7, ARM_MATH_CM4, ARM_MATH_CM3, ARM_MATH_CM0PLUS or ARM_MATH_CM0"

    ^

Multiple libraries were found for "SD.h"
 Used: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SD
 Not used: C:\Program Files (x86)\Arduino\libraries\SD
Error compiling for board Teensy 3.6.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
 
Thanks, Pete, that cleared up the previous errors. Unfortunately a series of others have sprung up. After dumping the rest of the files from CMSIS-Master/CMSIS/Include into the teensy3 folder I get this on compile (Line 113 in the .ino file is "#include <Audio.h>"):

Code:
Arduino: 1.8.2 (Windows 10), TD: 1.36, Board: "Teensy 3.6, Serial, 180 MHz, Faster, US English"

In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3/core_cmFunc.h:61:0,

                 from C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3/core_cm4.h:155,

                 from C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3/arm_math.h:304,

                 from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Audio/analyze_fft256.h:32,

                 from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Audio/Audio.h:61,

                 from C:\Users\John\Documents\Radio stuff\CS-40\Teensy_Convolution_SDR\Teensy_Convolution_SDR.ino:113:

C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3/cmsis_gcc.h:58:74: error: macro "__enable_irq" passed 1 arguments, but takes just 0

 __attribute__( ( always_inline ) ) __STATIC_INLINE void __enable_irq(void)

                                                                          ^

C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3/cmsis_gcc.h:69:75: error: macro "__disable_irq" passed 1 arguments, but takes just 0

 __attribute__( ( always_inline ) ) __STATIC_INLINE void __disable_irq(void)

                                                                           ^

Multiple libraries were found for "SD.h"
 Used: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SD
 Not used: C:\Program Files (x86)\Arduino\libraries\SD
Error compiling for board Teensy 3.6.
 
I "solved" those two errors by editing cmsis_gcc.h and commenting those two macros (or you can #ifdef them).

Pete
 
That did it, Pete, but that doesn't seem to be the end of the trouble. This is turning into quite the game of Whack a Mole. Every time an error gets squashed more pop up to replace it! I dare not post the entirety here, but I'm starting to wonder if I've missed something in setting up the build environment. Here's a link to the errors, this is getting depressing. https://pastebin.com/4Qa0gQfp
 
Hi John,

very difficult to say what´s going wrong.

Have you tried to set up your system step by step like Jan described very nicely in his contribution?

https://forum.pjrc.com/threads/4059...Defined-Radio)?p=129081&viewfull=1#post129081

The CMSIS library has to be installed very carefully and systematically. It is not difficult, but you have to be very consistent and go ahead step by step. From my experience no need to add anything else to the code, just the new CMSIS lib has to be installed correctly.

Good luck!

73 de Frank
 
Hi Frank,

I have followed those steps as dilligently as possible, which brought me to the errors from this post. There also seem to be some errors in relation to the audio.h file that are a bit of a puzzle. It's time for bed here, but I'll try cleaning out the CMSIS files and make a fresh start tomorrow.

Thanks for the help!

Cheers,
John VA7JBE
 
BTW: John, you have got a lot more files in
C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3/

than I have.

So probably you made something wrong with installing the new CMSIS lib.

Follow the instructions by Jan and it will work ;-).

EDIT: our postings crossed ;-). Good night and good luck tomorrow!

73 de Frank
 
Back
Top