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.

Interfacing of MSP430G2553 WITH 433MHZ TRANSMITTER

Other Parts Discussed in Thread: MSP430G2553, CC1101

I am working with msp430G2553 and i want to interface it with 433Mhz transmitter using serial port. Will there be any problem with interfacing the transmitter through serial port at this frequency (i.e.433Mhz) due to noise presence in serial port at this frequency.

regards

akhilesh sati

  • 433 MHz (note the capitalisation) is the frequency of the RF carrier - it has nothing to do with the serial port!

  • Don't you think 433MHz transmitter manufacturer did not ask particular question before making such a product?

  • msp430g2553 cannot transmit nor receive at 433MHz. I presume that is why you want to add a 433MHz transmitter so that you can transmit signals at 433MHz.There are many such devices available. You need to choose one that fits your needs (which include ease of interface to a g2553). The interface can be the serial port, but it cannot be at 433MHz.

  • The issue that I raised was because one manufacturer was mentioning this statement "Please note that this device(RF Modules (Tx + Rx Pair) 433 Mhz ASK) will not support direct UART communication when connected to PC or microcontrollers as there is a lot of noise always available on these frequencies. If you are looking for Serial Communication see RF 2.4Ghz Serial Link instead of this product."

    regards

    Akhilesh sati

  • akhilesh sati said:
    one manufacturer 

    What manufacturer?

     

    akhilesh sati said:
    was mentioning this statement

    Out of context like this, it makes no sense - You need to give a link to the complete original text.

    Alternatively, why don't you just contact that manufacturer, and ask them to clarify for you?

  • You should not condemn the entire industry of 433MHz-band based on one product of one manufacturer.

    Yes, with the FCC limit on power level, the signal to noise ratio is terrible.

    ASK is very sensitive to noise thus you need to compensate for that. If the application signal rate is slow enough, you many be able to use even this RF Module. You are in control of your own destiny within the limitation of the components you choose.

  • akhilesh sati said:
    Please note that this device(RF Modules (Tx + Rx Pair) 433 Mhz ASK) will not support direct UART communication when connected to PC or microcontrollers as there is a lot of noise always available on these frequencies.

    It depends. Possibly you can success using either frequency. Signal/Noise is very important for successful transmission disregarding which frequency used. Even in presence of interference you can have strong enough signal to "overshout" interferer at receiver end. Possibly you can achieve good results finding interference-less channel in particular area, use low bitrate like 1200bps, running shorter distances so receiver have strong signal at the input. In case of slow serial bitrate you can use bit oversampling with majority voting error correction math (have to implement it yourself). I do not like "dumb" logic (serial) signal transmission, would never implement such. You can transmit serial data not as bits but as bytes which are transmitted using short radio data packets having error correction and ACK/ARQ (automatic resend). I do not say that error correction and block (re)transmission logic necessarily shall be radio function - it can be done by application uC software. ByTheWay TI have excellent ISM radio ICs with excellent specs. Look for CC1101 and other transceivers, evaluation kits (Chronos for instance).

    akhilesh sati said:
    If you are looking for Serial Communication see RF 2.4Ghz Serial Link instead of this product.

    Personally I think that 2.4GHz nowadays is worse than 400/800/900 MHz ISM bands. But again it's area-dependent.

  • akhilesh sati said:
    Please note that this device(RF Modules (Tx + Rx Pair) 433 Mhz ASK) will not support direct UART communication when connected to PC or microcontrollers as there is a lot of noise always available on these frequencies

    I think this statement refers to the fact that the 433MHz band is flooded by all kinds of communication already. So if you just modulate your serial data signal on the 433MHz carrier and decode it on the other side, you might get anything but not your serial data.

    Teh transceiver apparently does not have a UART compatible interface at all. Only a 'volume' input signal that amplitude-modulates the output of the 433MHz transmitter. For a reliable transmission, you'll have to take your data, put it into a packet with packet ID, and CRC. Then maybe put an hamming-encoding on it and a preamble on it. Then send it bit by bit and wait for an answer. At the receiving end, listen for the preamble, then receive the packet, hamming decode it, check the CRC and if everythign is okay, send back a 'packet xy received' (so-called "ACK" = 'acknowledge') back to the sender in the same way. If the sender doesn't get an answer in time, it resends teh packet. If the ACK packet was lost on its way back, the receiver will receive the same packet a second time, send an ACK package back but discard the data (as it was already received).

    It's pretty much the same as TCP/IP works.

    Many transceiver modules with integrated processors do (more or less) exactly this. But your transceiver seems to be just the 'dumb' modulator/demodulator part and all the handling is up to you.

    Btw: we once used such a simple transceiver in out projects. We did all the stuff described except the CRC (hamming encoding already allowed for bit-correction and wrong bit detection) and the package numbering. And we sometimes got 'ghost unit' reports from devices we never built. What happened? The receiver was 'detecing' a preamble in the RF noise, fetching a random data packet out of thin air. And every now and then the hamming decoder was able to 'reconstruct' a seemingly valid data packet from the received noise. Once we implemented the additional CRC, those packages failed the final CRC check and the 'ghost units' disappeared.

  • I just got a tx/rx pair of the 433mhz ASK radios for my project. There is a lot of noise coming out of the rx output signal. I did some searching and found a couple of posts over on Sparkfun.com that indicates one has to do some software work to overcome the noise issue. One or two folks suggested using Manchester Coding (which is basically using a rising edge for a 1 and a falling edge for a 0 (). Another post said something about the tx input signal having to change at least every 30ms for the rx to lock but I haven't verified this. Search over on Sparkfun and see what else you come up with. I am hoping to tackle this in the next several days.

    Hope this helps

    Michael

    www.bot-thoughts.com

  • Michael Shimniok said:
    One or two folks suggested using Manchester Coding (which is basically using a rising edge for a 1 and a falling edge for a 0 ().

    Manchester coding does not help in case of noise. Trellis coding do. I suggest to drop idea using 433mHz ASK radio (100-year old technology) unless you are building ultracheap toy which does not necessarily have to work every time.

  • Michael Shimniok said:
    There is a lot of noise coming out of the rx output signal.

    An ASK receiver always tries to interpret the strongest signal as data. If there is no signal, all kind of noise is interpreted until it is suppressed by a stronger signal. That#s normal and there is no way around. This is why data packets always start with a preamble, so if the receiver produces bits, they are ignored until they match the preamble pattern. However, even this is not 100% safe, so when a preamble is detected and following it data is received, the data should contain a CRC and if it isn't valid, the data is to be discarded. In addition, you can use hamming encoding to allow for single bit error correction.

    Michael Shimniok said:
    One or two folks suggested using Manchester Coding (which is basically using a rising edge for a 1 and a falling edge for a 0

    IIRC, manchester always has two edges per bit, basically doubling the data frequency. A '1' begins with a high level followed by a low level and a low begins with a low level followed by a high level. This allows not only reconstructiong the bit clock from the signal, it also ensures that even a sequence of multiple identical bits won't result in a constant amplitude. This is critical for FSK transceivers, but also improves reliability of ASK transmissions, as you always have a modulated signal, so the receiver doesn't saturate on a constant level (and then pickling the modulation by noise as the signal).

    Remember, on ASK, the change of signal amplitude determines the signal, not the absolute value. Else you couldn't receive in different distances.

  • Jens-Michael Gross said:
    An ASK receiver always tries to interpret the strongest signal as data. If there is no signal, all kind of noise is interpreted until it is suppressed by a stronger signal. That#s normal and there is no way around.

    Indeed. I didn't explain in my earlier post that the individual said that having the signal change every XX milliseconds, thanks to Manchester coding, helped the receiver, as you said, by modulating the signal regularly. Makes sense.

    Jens-Michael Gross said:
    This is why data packets always start with a preamble, so if the receiver produces bits, they are ignored until they match the preamble pattern. However, even this is not 100% safe, so when a preamble is detected and following it data is received, the data should contain a CRC and if it isn't valid, the data is to be discarded. In addition, you can use hamming encoding to allow for single bit error correction.

    Yup, that makes sense to me.

    Jens-Michael Gross said:
    This allows not only reconstructiong the bit clock from the signal, it also ensures that even a sequence of multiple identical bits won't result in a constant amplitude. This is critical for FSK transceivers, but also improves reliability of ASK transmissions, as you always have a modulated signal, so the receiver doesn't saturate on a constant level (and then pickling the modulation by noise as the signal).

    I wonder if more can be done given that one knows the expected data rate and that one is able to reconstruct the bit clock.

    Thanks much,

    Michael

  • Michael Shimniok said:
    I wonder if more can be done given that one knows the expected data rate and that one is able to reconstruct the bit clock.

    Sure, you can do any kind of further processing.

    I once logged the complete edge timing of an apparently incoming packet and run some correction voer it to reconstruct 'missed# edges due to the fact that I knew maximum and minimum timing. Indeed i was able to reconstruct an otherwise lost packet every now and then, but ont he bottom lien it wasn't worth the effort.

  • What I can say - if you are doing educational stunt, then use AM an manchester coding. You will have lot of fun with this inefficient and unreliable method of data transmission. If you are developing product which will be used by many others - don't. Better use FSK or PSK, put your bits into radio frames having sync preamble, some at least rudimentary FEC and CRC.

  • "Educational stunt" is rather condescending, perhaps unintentionally. :)

    I will happily proceed with this inefficient and unreliable method of data transmission, albeit without your personal blessing which may take some of the joy from it, but nonetheless I shall press on. :)

    I do appreciate your insight into superior, modern approaches and will use those when the need arises. In most cases I will gladly reuse someone else's solution in the form of an RF module or whatnot. I hope others benefit from the wisdom imparted in this thread. Thanks to all who have responded

    Happy holidays

    Michael

  • Michael Shimniok said:
    without your personal blessing which may take some of the joy from it

    Nice touch ;) In case you are still interested not in my blessing (which I don't give anyway) but in engineering excellence using resources you have then: What's your AM transmitter bandwidth? Your 2nd try can easily be using FM (dual tone) coding, using AM radios you have. In result you can get way better sensitivity and resulting range of transmission.

  • Certainly interested in engineering excellence. ;) That sounds like an interesting next step and have experimented briefly. No doubt I'll be interested in exploring other approaches you mentioned, falling down the rabbit hole as I am wont to do. The datasheet gives the data rate at 8kbps. 

  • Michael Shimniok said:
    The datasheet gives the data rate at 8kbps. 

    Then you probably can make 1kbps or even 2kbps FSK transmission system out of it. You need to read msp430 soft-modem demo application note to get the idea.  Demodulator design in app note is rather basic (most probably it works anyway), it can be improved using Goertzel algorithm to have better S/N performance.

    In case you are interested in Forward Error Correction (Convolution codes) then you shall read DN504 and DN507. For crc u shall read DN502.

    Good luck!

  • Michael Shimniok said:
    "Educational stunt" is rather condescending, perhaps unintentionally. :)

    This is more about proving that one can make things work using absurd choice of hardware or methods disregarding fact that useability of result for end-user products is questionable. So, if you do it just for challenge or education of yourself (or others), then this is rather good. Had no intention to be rude. English is not my native language, sometimes nonliteral translations happen.

  • Ilmars said:
    Then you probably can make 1kbps or even 2kbps FSK transmission system out of it.

    ASK transceivers work on constant frequency and modulate amplitude. FSK systems modulate the frequency and require a much more complex HF part.

    You can only turn an AM system into an FM system by using a 0Hz base frequency and modulate it with two different frequencies in the 433MHz range. :)

  • Jens-Michael Gross said:
    You can only turn an AM system into an FM system by using a 0Hz base frequency and modulate it with two different frequencies in the 433MHz range. :)

    Using exactly same AM radio we are talking about you can send 10101010 bit sequence at 8Kbit rate as "1" symbol, 101010 bit sequence at 6kbit rate as "0" symbol in result having... 1kbit FSK transmission.

    p.s. I did not say that I am going to turn AM radio into FM ;) W/o changing hardware it is not possible. BTW most of today's FSK radios does not work like direct modulation FM broadcast stations.

  • Ilmars said:
    Using exactly same AM radio we are talking about you can send 10101010 bit sequence at 8Kbit rate as "1" symbol, 101010 bit sequence at 6kbit rate as "0" symbol in result having... 1kbit FSK transmission.

    I started playing with this a few minutes after your first suggestion. Receiving... I can think of simplistic ways to detect which tone but haven't had time to implement yet. Slow data rate is more than ok, 1kbps is plenty fast.  Half that would be fine. Should be interesting to play with. Eventually I'll start playing with "real" radios.

    Michael

  • Ilmars said:
    1kbit FSK transmission.

    Well, there is indeed FSK in it. You have a 1kHz FSK signal with 7kHz center frequency that is used to modulate the 433MHz ASK signal. However, I wouldn't go as far as calling it FSK modulation. On HF side, it is still ASK. FSK is only on the digital wire between processor and transceiver.

  • Jens-Michael Gross said:
    I wouldn't go as far as calling it FSK modulation.

    You do not necessarily need to modulate signal at carrier level ;) If we use FSK at baseband, it stays FSK at the other end even if radio uses AM modulation/demodulation (and not spectrum up/down conversion) to transmit our baseband. Yes, my approach uses double-modulation so what? Good for education anyway.

  • Ilmars said:
    You do not necessarily need to modulate signal at carrier level ;) If we use FSK at baseband, it stays FSK at the other end even if radio uses AM modulation/demodulation (and not spectrum up/down conversion) to transmit our baseband.

    Sure, but it won't do any good. The RF transmission is still AM adn amplitude modulated and you might get noise and distortion due to it. And this will distort your FM-modulated digital signal and make it even more difficult to demodulate (digital decoding a digital FM modulation is quite a job).

    You could 'encode' the AM-transmitted signal by other means as well. E.g. expanding the manchester 1:2 encoding into a 1:4 or 1:8 encoding, so one bit is represented by an 8-bit pattern and if a different than the currect two out of 256possible patterns is received, you can do some reconstructing by pattern similarity. Would reduce the bandwith by the same amount but is much easier to handle on the software side.

    Ilmars said:
    Yes, my approach uses double-modulation so what?

    Sure. Manchester does double-modulation too, or Hamming. Jsu ta different 'modulatioN' But the problems of an AM transmissiton still apply all the way. Weakest part of a chain.

  • Jens-Michael Gross said:
    E.g. expanding the manchester 1:2 encoding into a 1:4 or 1:8 encoding, so one bit is represented by an 8-bit pattern and if a different than the currect two out of 256possible patterns is received, you can do some reconstructing by pattern similarity.

    In case of FM you receive 01010101 _oversampled_ "pattern" AND you measure which of two frequencies dominate. I doubt that pattern-guessing can be stronger detector than frequency estimator. In case you think how to improve your pattern matching for 010101 sequences, you will end-up with.. frequency estimator.

    BTW same way one can learn PSK coding too ;)

    Jens-Michael Gross said:
    But the problems of an AM transmissiton still apply all the way. Weakest part of a chain.

    At least/last here you agree with me (grin) :)

  • Ilmars said:
    I doubt that pattern-guessing can be stronger detector than frequency estimator.

    Stronger? Perhaps not. But easier to handle. To detect one of twwo frequencies, you'll need to massively oversample the signal to be able to detect different frequencies. And then do some calculations which most likely include fdivisions.

    Pattern matching can be done with a few bit operations and comparisons, things the processor support natively. So it is likely faster, shorter, easier to implement and gives a comparable result.

    In the C64 times, the floppy disk station uses a 4->5 bit pattern for storing information on disk. Which is, after all, an AM process. The processor was a 2MHz 8 bit processor without hardware multiplier. And it worked reliable and fast. Sure, todays improved proessing power allows for more sophisticated things, but why doing overkill when it is not necessary?

  • Jens-Michael Gross said:
    So it is likely faster, shorter, easier to implement and gives a comparable result.

    As I already said - noise-aware pattern matching shall work as frequency detector. BTW look for DTMF (Goertzel) detector code around - usually it is small and very efficient, runs on very lo-end CPU's.

    Jens-Michael Gross said:
    And it worked reliable and fast.

    ...For tape signals. So what? Jens-Michael, you forget that we are talking about ISM band AM radio transmission here.

  • Ilmars said:
    usually it is small and very efficient

    Perhaps our sense of 'small and efficient' differs a bit. Compared with a typical big and bloated PC program, almost everything is small and efficient. When it comes down to some bytes of code and a few clock cycles, there are worlds between. Both implementatiosn are definitely in the lower kB code range. But when the lower kB code range is all you have for your whole project, a few bytes of code more or less really count.

    Ilmars said:
    ..For tape signals. So what? Jens-Michael, you forget that we are talking about ISM band AM radio transmission here.

    I didn't. Almost all kinds of distortions found on AM transmissions are found on magnetic recording too. It makes almost no diference whether the sampled signal comes from a magnetic (sensor) or electromagnetic (antenna) receiver. Even worse: the floppy disk is subject to significant frequency instabilities too, while on AM you can at least usually assume a stable transmitter baudrate.

**Attention** This is a public forum