Author Topic: Demodulation  (Read 2343 times)

0 Members and 1 Guest are viewing this topic.

Offline baksuzTopic starter

  • Newbie
  • Posts: 9
  • Country: at
Demodulation
« on: March 19, 2019, 01:09:22 pm »
Hello,

I need to do demodulation of modulated signal where I have 2 wires sin+ and sin-(negative voltage) 3.3v peak voltage 10kHz, I need to do it with Arduino or STM32. Can someone give me any advice on how to do it or is it even possible?
 

Offline janoc

  • Super Contributor
  • ***
  • Posts: 3785
  • Country: de
Re: Demodulation
« Reply #1 on: March 19, 2019, 02:34:34 pm »
Hello,

I need to do demodulation of modulated signal where I have 2 wires sin+ and sin-(negative voltage) 3.3v peak voltage 10kHz, I need to do it with Arduino or STM32. Can someone give me any advice on how to do it or is it even possible?

That's quite a confused mess. So all we know is that you have 2 power rails and a 10kHz signal. No idea what the 3.3V is about - are the two power rails +-3.3V? Or the input signal? (commas in sentences are kinda important, you know?).

What kind of modulation are we talking about? What kind of signal? Which Arduino? 8bit one? Or 32bit ARM-based ones? Which STM32? They exist from tiny Cortex M0 that are unlikely to be able to do much up to a Cortex M7 that could demodulate radio signals in real time while still having most of the resources free ...

Unless you tell us more, it is very unlikely that anyone will be able to help you.
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Demodulation
« Reply #2 on: March 19, 2019, 04:42:18 pm »
Is the 10 kHz the modulating frequency or the carrier frequency?  I would run the signal into a low pass filter to remove the carrier (envelope detector).

Then I would run the demodulated signal into an ADC and sample at least twice the modulating frequency.  Shannon/Nyquist will lead the way on sampling.  Now you have a digital representation but memory is filling up fast!

If you have to run the modulated carrier into the ADC, you are going to need a lot more bandwidth.  You still need to sample at a rate at least twice the highest frequency and, depending on the carrier, this could be quite high.

https://en.wikipedia.org/wiki/Envelope_detector

I don't know which uCs can sample at 20 kHz and still have time for other tasks.  I would buy the chip with the fastest ADC on the planet and work down.
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5884
  • Country: de
Re: Demodulation
« Reply #3 on: March 19, 2019, 05:01:58 pm »
I would run the signal into a low pass filter to remove the carrier (envelope detector).


Assuming it's AM, ASK or OOK, which we don't know.
« Last Edit: March 19, 2019, 05:11:56 pm by Benta »
 

Offline janoc

  • Super Contributor
  • ***
  • Posts: 3785
  • Country: de
Re: Demodulation
« Reply #4 on: March 19, 2019, 05:28:40 pm »
I don't know which uCs can sample at 20 kHz and still have time for other tasks.  I would buy the chip with the fastest ADC on the planet and work down.

Some STM32s can do it, possibly even faster, especially if you use DMA. 20kHz is not that fast.

Look up e.g. STM32-SDR project - here is one guy running a full HAM receiver on one of those Bluepill (STM32F103xxx) boards:



And that's an old and relatively slow/low end STM32. The bigger ones can handle a lot more - this guy has an STM32F4xx running an oscilloscope at 2.8Msps:


 

Online iMo

  • Super Contributor
  • ***
  • Posts: 4797
  • Country: pm
  • It's important to try new things..
Re: Demodulation
« Reply #5 on: March 19, 2019, 06:14:14 pm »
Best you have got I/Q input signal handy when trying to demodulate it. Some STM32 chips can do a simultaneous ADC conversion with 2 ADCs - for I and for Q. You can create I/Q in SW as well.
They can do a few MSamples/sec at 12bit, thus 10kHz is easily doable.
 

Offline baksuzTopic starter

  • Newbie
  • Posts: 9
  • Country: at
Re: Demodulation
« Reply #6 on: March 20, 2019, 10:21:21 am »
Sorry for sloppy explanation, I have carrier and message signal that are entering resolver as reference signal the are coming from function generator at 5v 10khz, out of resolver sensor I have 4 wires sine+- and cos+-, I need to modulate that signal to get envelope, I am using bluepill stm32, voltage is at normal level for adc for stm32. My question is how can I connect all of that, or is there need for anything else
 

Offline kg4arn

  • Supporter
  • ****
  • Posts: 271
  • Country: us
Re: Demodulation
« Reply #7 on: March 20, 2019, 11:04:57 am »
I still don’t understand.
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Demodulation
« Reply #8 on: March 20, 2019, 01:01:15 pm »
Google?  Try 'demodulate resolver outputs', there are a LOT of hits including:

http://www.jsst.jp/e/JSST2013/extended_abstract/pdf/Paper%20135.pdf

Or you might find that Analog Devices has a chip to do the entire process:

https://www.analog.com/en/analog-dialogue/articles/precision-rtdc-measures-angular-position-and-velocity.html

Mouser has the chip for about $20 and a development board for about $150
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5884
  • Country: de
Re: Demodulation
« Reply #9 on: March 20, 2019, 05:07:44 pm »
For a resolver, you'd normally use the excitation carrier peak as a trigger for A/D converting the sin/cos inputs. This way you'll get a reading of the sin/cos peaks, and will avoid delays from the envelope detector (which there will be, it's just a low pass filter).
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Demodulation
« Reply #10 on: March 20, 2019, 05:13:18 pm »
For a resolver, you'd normally use the excitation carrier peak as a trigger for A/D converting the sin/cos inputs. This way you'll get a reading of the sin/cos peaks, and will avoid delays from the envelope detector (which there will be, it's just a low pass filter).

Absolutely, an envelope detector wouldn't be satisfactory at all.
 

Offline vk6zgo

  • Super Contributor
  • ***
  • Posts: 7601
  • Country: au
Re: Demodulation
« Reply #11 on: March 21, 2019, 12:47:30 am »
For a resolver, you'd normally use the excitation carrier peak as a trigger for A/D converting the sin/cos inputs. This way you'll get a reading of the sin/cos peaks, and will avoid delays from the envelope detector (which there will be, it's just a low pass filter).
With a non linear device included------ without that, it won't demodulates anything!
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5884
  • Country: de
Re: Demodulation
« Reply #12 on: March 21, 2019, 10:43:10 am »
For a resolver, you'd normally use the excitation carrier peak as a trigger for A/D converting the sin/cos inputs. This way you'll get a reading of the sin/cos peaks, and will avoid delays from the envelope detector (which there will be, it's just a low pass filter).
With a non linear device included------ without that, it won't demodulates anything!

I'm not sure you know the signal from a resolver. No need for anything non linear, it's pure sampling.
 

Offline vk6zgo

  • Super Contributor
  • ***
  • Posts: 7601
  • Country: au
Re: Demodulation
« Reply #13 on: March 21, 2019, 02:12:31 pm »
For a resolver, you'd normally use the excitation carrier peak as a trigger for A/D converting the sin/cos inputs. This way you'll get a reading of the sin/cos peaks, and will avoid delays from the envelope detector (which there will be, it's just a low pass filter).
With a non linear device included------ without that, it won't demodulates anything!

I'm not sure you know the signal from a resolver. No need for anything non linear, it's pure sampling.

Sorry, I was really just commenting on the bit about the envelope detector.--- bit "tongue in cheek".
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5884
  • Country: de
Re: Demodulation
« Reply #14 on: March 21, 2019, 04:11:18 pm »

I'm not sure you know the signal from a resolver. No need for anything non linear, it's pure sampling.

Sorry, I was really just commenting on the bit about the envelope detector.--- bit "tongue in cheek".

Well you're not wrong, just old fashioned  :)

In a classic resolver you'd multiply the excitation carrier with the sin/cos signals to extract the polarity of sin/cos. Is a multiplier is non-linear? Dunno how to classify it.
Today its all digitized with fast ADCs.
 

Offline vk6zgo

  • Super Contributor
  • ***
  • Posts: 7601
  • Country: au
Re: Demodulation
« Reply #15 on: March 21, 2019, 11:20:05 pm »

I'm not sure you know the signal from a resolver. No need for anything non linear, it's pure sampling.

Sorry, I was really just commenting on the bit about the envelope detector.--- bit "tongue in cheek".

Well you're not wrong, just old fashioned  :)

In a classic resolver you'd multiply the excitation carrier with the sin/cos signals to extract the polarity of sin/cos. Is a multiplier is non-linear? Dunno how to classify it.
Today its all digitized with fast ADCs.

Both classical & digital methods do generate unwanted mixing products which weren't originally there in the received signal, though.
Aliasing in the sampling of a DSO is the most obvious case--- of course, that is in a wide band amplitude/ phase response device, so it will be a much greater problem.
 
Both classical & modern methods find ways to cancel or filter out  the unwanted products----- they just use different methods.

To me, sampling near as dammit = mixing---- but, then, I'm old fashioned! :D
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf