This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

ASK demodulation in MSP430

Other Parts Discussed in Thread: MSP430FR4133

hi,

i am working on a IR-protocol project where i need to demodulate the ASK ir based Packets before doing any operation on them.can anybody suggest me how to demodulate the ASK using msp430fr4133?

  • Anup,

    maybe this document is interesting for you!

    Dennis

  • ASK demodulator is simple envelope detector. Most of the IR receivers already includes such so on output you have demodulated, logic level signal. How to further decode this logical signal - it's different story (which is not demodulation).

  • Most of the IR receivers already includes such so on output you have demodulated, logic level signal.

    yes that is true but i am using an simple ir led without inbuilt demodulator , so its going to receive the complete modulated signal.
    that's why i wanted to demodulate this.
  • thanks for the help but in this document will only work the microntroller is deeded with a demodulated data, but i want to demodulate it on the controller.
  • You dont demodulate IR signal using microcontroller but envelope detector.

  • ANUP Sharma41 said:
    Most of the IR receivers already includes such so on output you have demodulated, logic level signal.

    yes that is true but i am using an simple ir led without inbuilt demodulator , so its going to receive the complete modulated signal.
    that's why i wanted to demodulate this.


    I think any ir led (infrared light emitting diode) you used is probably intended to be used to transmit IR, and not for receiving or detecting IR. I suppose with proper bias, you could use it to detect IR too. But I think the electric signal generated will be in the nA range. In that case, you will need an amplifier to convert the nA signals into 3V signals to be connected to the MSP430 digital input. Alternatively, you may be able to use the analog comparator of the MSP430. A little more information about how you use an ir led as an IR receiver will help to answer your question.

    Given that the sub-carrier frequency is probably in the 30 to 60 kHz range, the Timer Capture feature of any MSP430 can demodulate that easily.
  • yes you are right, but again i dont know how to demodulate it. can u explain me the demodulation process in detail?

    moreover i am using an ir receiver TSMP77000 in order to receive the ir .

  • >can u explain me the demodulation process in detail?

    Unfortunately DSP is off-topic here.  In short - in case microcontroller receives logical level modulated IR signal, you can treat it as modulated OOK signal, thus easiest solution in this case would be to use Goertzel frequency detector.

    You better drop idea to use simple IR diode but use IR receiver IC instead.

  • TSMP77000 is not an ir led. It is an ir receiver with amplifier and pulse shaper. It can be connected to MSP430 directly.

    When I have time to do it, I will try to explain how you can use the Timer of any MSP430 to demodulate the IR remote signal. It is quite simple.
  • thanks for replying, can you help me out in this?
    its very urgent.
  • >how you can use the Timer of any MSP430 to demodulate the IR remote signal

    You did mean decoding, right? - Because signal going out of IR receiver is already demodulated.

    en.wikipedia.org/.../Consumer_IR

    Reception of the modulated commands for RC-5, RC-6, and the NEC protocols is easily accomplished with specialized IR receivers, most readily available from Sharp Corporation and Vishay Intertechnology. These receivers include a photo-diode, an automatic gain control (AGC) circuit, and a demodulator. The demodulated signal is then decoded with a microcontroller.

  • ANUP Sharma41 said:
    its very urgent.

    Right :)

  • Ilmars,

    You are right, most IR-Receivers used to receive IR-Remote signal do include the demodulator. But, there are exceptions. TSMP77000 (from Vishey) is one of the exceptions. When exposed with IR pulse between 20 and 60 kHz, it produces an active low digital output. This is shown as (1) and (2) respectively in my drawing below.

    In the old days, one could use a negative edge triggered retriggerable monostable multivibrator to generate the desired envelop shown as (5) in that drawing.

    One could use the Timer of MSP430 to do a similar job. For example, use ~1MHz to clock that Timer and one of the CC channels, CCx, in the capture mode to invoke an ISR. This is shown as (3) in my drawing. This ISR does two things. One is to set (5) Env high. The other is to schedule a different CC channel, (4) CCy, in the compare mode. The count for CCy compare is set to the currently captured count of CCx + a constant Max, which is slightly longer than the period of the IR pulse. In the case of 20 to 60 kHz IR pulse, MAX should be slightly bigger than 50.

    Now, if the IR pulses continue to arrive, the CCy setting will be updated to a later count. Thus its ISR is never invoked in the presence of incoming IR pulse. When the incoming IR pulses stop, the ISR will be invoked as show in (4). This ISR will clear the Env in (5).

    With some modification, this method can be refined to provide immunity to IR noise and occasional missing Rcv pulse. It could also measure the sub-carrier frequency at the same time.

    I do not have the stomach to write sample code, especially when it is urgent. But I think it is next to trivial to do.

    -OCY

  • thanks for the help and sorry for the urgent part....

**Attention** This is a public forum