Teensy Convolution SDR (Software Defined Radio)

Bob Larkin provided very nice code for an Audio Equalizer (https://forum.pjrc.com/threads/60928-Audio-Equalizer-using-FIR?highlight=audio+equalizer), which I implemented as a 9-band graphical EQ in the latest version of the Teensy Convolution SDR.

I was always a little unhappy with the built-in five-band-EQ of the SGTL5000 codec, because my impression was, it did not accurately separate the frequencies (Adjusting Bass also impacted Mids etc.). This seems much better now with the FIR-based EQ by Bob. But it also takes a lot more CPU power.

We have to experiment with several parametres:

* menu: adjustable dB response for 9 bands (separate responses for wideband FM and the other modes) --> a nice feature is the graphical display of the frequency response, I tried to scale the frequency-axis logarithmically
* hardcoded (see lines 1918ff): 60dB stopband attenuation
* hardcoded: centre frequencies for the nine bands
* hardcoded: number of FIR coefficients: at the moment 199 taps for the T4 and 69 taps for the T3.6

Please feel free to test and report any bugs.

 
version (c) Frank DD4WH 2020_09_08

Please help
I got an error in version (c) Frank DD4WH 2020_09_08

The version (c) Frank DD4WH 2019_10_15 is ok

in line 6814: max_gain = powf (10.0, (float32_t)bands[current_band].AGC_thresh / 20.0);

error code :'struct band' has no member named 'AGC_thresh'

inline 7865:pixelnew[x] = displayScale[currentScale].baseOffset + bands[current_band].pixel_offset + (int16_t)(displayScale[currentScale].dBScale * log10f_fast(FFT_spec[x]));

error code : 'struct band' has no member named 'pixel_offset'

73 ,PA0HAH Henk
 
Hi Henk,

you have to keep an eye on which #define you uncomment/comment at the beginning of the .ino-file.

Probably you have too many #define uncommented, so that the program initializes a very old version of the "band" struct.

Have a close look on which version of the band struct you are using.

73 de Frank
 
Hi Henk,

you have to keep an eye on which #define you uncomment/comment at the beginning of the .ino-file.

Probably you have too many #define uncommented, so that the program initializes a very old version of the "band" struct.

Have a close look on which version of the band struct you are using.

73 de Frank

Hallo Frank,

I do not understand it. The "band "struct is a part of the *.INO file which I have downloaded ? Or is this not right ?
 
The "band "struct is a part of the *.INO file which I have downloaded ?
Yes! But it is defined in different ways, depending on which hardware you have defined at the beginning of your sketch!

Which Hardware did you define in the very first lines of the sketch?
 
Yes! But it is defined in different ways, depending on which hardware you have defined at the beginning of your sketch!

Which Hardware did you define in the very first lines of the sketch?

/* If you use the hardware made by Frank DD4WH uncomment the next line */
//#define HARDWARE_DD4WH

/* If you use the hardware made by Frank DD4WH & the T4 uncomment the next line */
#define HARDWARE_DD4WH_T4

/* If you use the hardware made by Frank DD4WH & the T4 uncomment the next line */
//#define HARDWARE_AD8331

/* If you use the hardware made by FrankB uncomment the next line */
//#define HARDWARE_FRANKB
//#define HARDWARE_FRANKB2

/* If you use the hardware made by Dante DO7JBH [https://github.com/do7jbh/SSR-2], uncomment the next line */
//#define HARDWARE_DO7JBH

/* If you use the hardware made by Dante DO7JBH with a Teensy 4.1 adapter [https://github.com/do7jbh/SSR-2], uncomment the next line */
//#define HARDWARE_DO7JBH_T41

/* only for debugging */
//#define DEBUG

/* this prints out the ADC and DAC levels when NOT in SAM mode, primarily for debugging hardware
recommendation: leave this commented */
//#define USE_ADC_DAC_display

/* only for support of the hardware RF frontend filters designed by Bob Larkin, W7PUA
http://www.janbob.com/electron/FilterBP1/FiltBP1.html
adjust cutoff frequencies according to your needs in function setfreq */
//#define USE_BOBS_FILTER

/* flag to indicate to use the changes introduced by Bob Larkin, W7PUA
recommendation: leave this uncommented */
//#define USE_W7PUA

/* use faster log calculations
recommendation: leave this uncommented */
#define USE_LOG10FAST

/* use faster atan2f calculation
recommendation: leave this uncommented */
#define USE_ATAN2FAST

// #define MP3 //<<++++++++++++++++++++++++++++++++++++++++++++++
 
Greetings from a newbie very attracted to this project.
I am also following some others like QRP Labs, QCX, uSDX...
I have tried to find info about it in the forum but I have not found it: I would like to know if it is in the roadmap to cover bands above 30 MHz - 6 m, 4 m, 2 m, 70 cm...air bands, full band - and if the receiver could be operated as say a "AM/NBFM police scanner" with its usual functions and features.
Thanks so much for this amazing project. Chapeau !!
73 Iñigo; EA2AYO
 
Iñigo,
it is already possible with the Msi001 chip! Ask tisho and Esteban! I do not have working hardware with the Msi001, so I cannot contribute to that part of the software (yet).
 
it seems there is a say ;) "hidden" roadmap.
No, it seems you completely misunderstood me! There is NO roadmap, not even a hidden one.

And there already is existing code for the Msi001 which allows for the VHF/UHF bands you are looking for :). It has been developed by tisho and Esteban, have a look into this thread and read their posts.
 
Dear all, As amn old analog guy I took the opportunity to go on this project. I use a Teensy4 did uncomment #define HARDWARE_DD4WH_T4
could compile Software and frontend are OK but cannot igure out how preselector switching works in this configuration.
Any clue would be appreciated best 73,s Hubert F6DUK
 
hi Hubert,

please let us know what you are using, how your hardware looks like, what kind of preselector you would like to switch etc.

otherwise it is difficult to answer your questions.
 
Dear Frank thank you for your patience you may wonder that I am not (yet) an expert but I feel that time has come to do something else than tayloring crystal filters!

I start from the previous thread

DD4WH said:
Hi!
The Teensy Convolution SDR code works with many hardware configurations including different I2S codecs, I have built and tested a few of those types:

* T4.1 & audio shield rev D
* T4 & PCM5102 & PCM1808
* T3.6 & audio shield rev B
* T3.6 & PCM5102 & PCM1808
* ...

I am not able to understand what your problem is here . . .

* which software switches (#defines) did you comment out during compile?
* Do you have working audio? Which demodulation type are you using?
* the sample rate is adjustable in the menu, which sample rate did you choose?
* what is your hardware frontend setup? Do you use a Tayloe type (QSD) frontend?
* please give us some more information :)



So I am using as frontend exatly what you describes in the paper in mai 2017 with 74cbtlv3253 it delivers a nice IQ with correct phase to the Audio board RevD unter the Teensy 4.0

So software runs and give the correct info to the SI5351. As I did not see any response in the Spectrum I started to check the signals going to the Codec and have

on pin 23MCLK Clock I have 45.157 Mhz I have the 11.289 for a couple of milliseconds after booting
on pin 20LRCLK I have 176Khz
on pin 21BCLK I have 11.289Mhz


This looked strange and try to understand what I have done wrong



//#define HARDWARE_DD4WH

/* If you use the hardware made by Frank DD4WH & the T4 uncomment the next line */
#define HARDWARE_DD4WH_T4

/* If you use the hardware made by Frank DD4WH & the T4 uncomment the next line */
//#define HARDWARE_AD8331

/* If you use the hardware made by FrankB uncomment the next line */
//#define HARDWARE_FRANKB
//#define HARDWARE_FRANKB2

/* If you use the hardware made by Dante DO7JBH [https://github.com/do7jbh/SSR-2], uncomment the next line */
//#define HARDWARE_DO7JBH

/* If you use the hardware made by Dante DO7JBH with a Teensy 4.1 adapter [https://github.com/do7jbh/SSR-2], uncomment the next line */
//#define HARDWARE_DO7JBH_T41

/* only for debugging */
//#define DEBUG

/* this prints out the ADC and DAC levels when NOT in SAM mode, primarily for debugging hardware
recommendation: leave this commented */
//#define USE_ADC_DAC_display

/* only for support of the hardware RF frontend filters designed by Bob Larkin, W7PUA
http://www.janbob.com/electron/FilterBP1/FiltBP1.html
adjust cutoff frequencies according to your needs in function setfreq */
//#define USE_BOBS_FILTER

/* flag to indicate to use the changes introduced by Bob Larkin, W7PUA
recommendation: leave this uncommented */
#define USE_W7PUA




With many thanks in advance
Hubert F6DUK
 
Dear Frank
Some new facts
Problem seems not to be where I thought. If I decrease sample rate I get the correct frequencies but the only pulse encoder that works correctly is the frequency encoder.
I use Bournes from Farnell not from Ebay signals are as they should be in either directions just scratching my head!

When I turn it reacts randomlyI use the correct bounce library (debounced Version of Paul Stoffregens)
73,s
Hubert
 
Hi Hubert,

the software switches seem correct. But you configured it as "No Teensy audio board", because my T4 hardware has no audio board, but external ADC and DAC.

if you use the #define HARDWARE_DD4WH_T4, the only thing you are missing, I think, is the configuration of the SGTL5000 control code for the audio lib

* line 1189: delete the #ifdef and #endif
* delete line 3070 and line 3087

BTW, do you have working audio? You did not answer that question.

Try the two deletions above and please report back.
 
Hi Frank

Of course no audio and that could be a serous reason thanks or the clue will try it and keep you informed.
 
I Commented some other !defined(HARDWARE_DD4WH_T4) lines 10148 10214 12251 13631 they ar still some uncommented ones but and do not clearly understand the consequence. But now I have audio. Still some wierd things Enc2 changes the color and button of enc 2 pushes the frequency down I will have to investigate on that. I ordered ADC and DAC maybe easier to do hands on on a proven configuration.

Do we have a automatic preselector switching in this setup?

Thanks and best 73,s

Hubert
 
Dear Frank

A little progress report, could fix the Encoder issue, When I plugged the T4 in the Audio board, 1 side from Enc2 was pulled to ground by Audio board , I cut these pins and it starts to behave. :) Remaining other !Define uncomment or comment and Presel switching.73,s Hubert
 
Almost everything looks ok now, could copy first signals, just looking for getting preselector switching to work
 
Back
Top