SSB modulation and demodulation with STM32 - Page 1
Forum section: electronics / rf-microwave

author: Mrt12
author_rank: Regular Contributor
timestamp: May 09, 2019, 08:00:29 am
content: Hi guys,I would like to make a simple SSB transceiver. First I thought I do it completely analog, for which I used the well known 90° polyphase network to generate the audio frequency phase shifters, because I wanted to use the phasing method. I did a quick test of the polyphase network on a breadboard and it work very well between 300 Hz and approx. 3 kHz.But then I thought perhaps it would be even nicer if the audio processing could be done with an STM32 microcontroller. I have used STM32F407 for motor control applications previously, so I have a bit of experience with them.I thought it should be possible to implement the required hilbert transformers etc. within the STM and then use external mixers to create the SSB IF signal.But then I am unsure about the demodulation. How could that be done in software?Further I thought if I already use some DSP to generate my signals, why not also generate FM as well? would that be possible? does the STM32 have enough power to do FM modulation and demodulation?The idea is that the STM32 only generates low frequency stuff (i.e. I and Q audio signals) which are then mixed to the 10.7MHz IF.For the receiver part, I am unsure about how its best done.Has someone ever done this?

author: Kalvin
author_rank: Super Contributor
timestamp: May 09, 2019, 08:25:16 am
content: Using on-chip 12-bit DAC should be sufficient for the transmitter, but using the on-chip 12-bit ADC may not give the best reception sensitivity. However, you can use an external 24-bit audio I2S codec at 48 kHz - 192 kHz with a Tayloe mixer and modulator giving quite a good sensitivity and simple implementation. This approach has been used in mcHF transceiver which implements CW, SSB and FM modulation and demodulation using the DSP algorithms, among other things.Here is a link describing the algorithms implemented:https://github.com/df8oe/UHSDR/wiki/Topics:-UHSDR:-Theory-of-OperationHere is a link for the project SW:https://github.com/df8oe/UHSDRYou can find complete open source hardware schematics for the mcHF V0.6 transceiver with a little help from Google.The official project page is here:http://www.m0nka.co.ukSomewhat similar projects do exist, but this mcHF is something that I have been following with great interest.

author: Mrt12
author_rank: Regular Contributor
timestamp: May 09, 2019, 12:07:58 pm
content: Hi Kalvinyes I know the mcHF. I recently looked at the schematics, but I didn't understand completely how it works. I am missing e.g. some mixers etc.I am also missing a proper block diagram. But perhaps there is one and I just didn't find it?I didn't expect the internal ADC and DAC to be good enough and already considered to use external 16 bit SPI devices. Wouldn't it be sufficient to use e.g. 16 kHz sampling rate to get something slightly better than telephone quality? this would be way enough in my opinion.But I see there are not so many other projects around using these DSP approaches. When looking at HF SSB/FM, most OMs seem to use the filter method or the phasing method, and rarely the Weaver method, but so far I didn't see a single project similar to the mcHF :-( but that would have been good to get some ideas.

author: Kalvin
author_rank: Super Contributor
timestamp: May 09, 2019, 12:38:42 pm
content: mcHF uses Tayloe mixer, which is sort of commutating mixer consisting of four analog switches driven with 90 phase shift outputting the I and Q baseband signals, which are then fed into a 24-bit audio CODEC using the I2S stereo audio interface. The sampling rate is 96 kHz, but it could be increased using different CODEC and faster MCU/removing some features - which would provide wider band scope, for example. In the transmission direction the process is reversed ie. the baseband I and Q signals from the MCU are fed into the audio CODEC and further into the Tayloe modulator. With proper filtering the spurs can be filtered out.Some Elecraft transceivers are also using the Tayloe mixer. You should be able to find the schematics and other useful documentation for the Elecraft transceivers from here:https://elecraft.com/collections/full-kits-1You may want to read A Software-Defined Radio for the Masses, Parts 1 - 4, which can be found here, for example:https://github.com/engibeer/sdr/tree/master/documentation