PDA

View Full Version : ASK MODULE HELP



buntyshubho
01-20-2009, 12:01 PM
I have a 433MHz ASK Transmitter - Receiver pair. I have a doubt. If I give 5V to DATA IN pin of Transmitter, then will I get 5v output at receiver? The modules are the same as shown below except that I am not using encoder and decoder.

http://www.triindia.co.in/resources/?p=50

I am just giving 5v to transmitter DATA IN and measuring data out at receiver(ofcouse i am connecting Vcc and Gnd but no antenna)....am i supposed to get 5v output?

allbits
01-20-2009, 03:26 PM
No, you cannot get. These are AC coupled, so you need to keep on sending something alternating all the time. like a square wave, or any continuous TTL pulse.


It can bug you, irritate you, spoil your mood,and spoil your day. But still, it can serve you good if you treat them(the modules) right.

Manchester coding. the key.

tijoseymathew
01-21-2009, 05:55 AM
yeah u hav to use manchester coding, these are very difficult modules to work with, I had lots of trouble getting it to work.
I have heard that using encoder/decoder pair will also do the trick, have never tried it...

bhishmar
03-26-2009, 04:07 AM
If I give 5V to DATA IN pin of Transmitter, then will I get 5v output at receiver?
No, you cannot get. These are AC coupled, so you need to keep on sending something alternating all the time. like a square wave, or any continuous TTL pulse.
....
Manchester coding. the key.
Can the experts here help me with some answers. First let me elaborate what I have learned after some research from related resources, in a structured way.

1. These ASK RF receiver modules have very high gain & hence sensitive to noise, and they do pickup noise from the air, when there is no real transmission output by the Transmitter-modules.

2. The receiver module has also built in AGC (Automatic Gain Control). So when it starts receiving a powerful RF signal from the actual Transmitter, the AGC kicks in and starts reducing it gain, but only after a delay depending on the 'time constant' of the AGC circuit.

3. Once the AGC is fully active, the noise pickup by the receiver reduces significantly, and it starts getting real data in its output pin. (To be received & processed by whatever circuit connected there).

4. Because of the above mentioned phenomena, the initial one or two bytes will be corrupted at the receiver, but the rest will be correctly received. (See ref #1 (AVRFreaks) below)

5. As a strategy to overcome this issue, the transmitter has to prefix (some preamble bytes) before actual data during sending. These bytes will have to be stripped out & discarded at the receiver end decoding software.

6. It is better to use an alternating bit-pattern like (55H), as the preamble bytes, so that they do not contribute any dc-value into the signal, into creating a dc-offset problem, since as 'allbits' pointed out the circuits are AC-coupled.

7. It is also preferable to use bitpatterns with alternating 0 & 1's in the actual data also, to avoid earlier problem dc-offset problem, created by the send data stream. This requires special encoding like "manchester encoding" while sending actual data, which obviously increases the required number of bits to be send to double.

This much is understood. Now I have the following questions to fellow experts here.

A. Which signal is AC coupled? The input to Transmitter-module OR output of the Receiver module or both?
Why I am confused is that, somewhere I remember reading, that if TX-pin is kept high (+5V), the transmitter transmits carrier continuously, and if it is kept low, it ceases to transmit (ON/OFF keying).
If Txr input is AC coupled, this cannot happen!
Can 'allbits' please clarify his findings and share his experience?

B. My question is particularly relevant, since if your are connecting the AVR micro or any other micro's 'UART-TX' pin direcly to the ASK-Txr module's input-pin (without any interveing hardware "inverter"), then it should be in permanent transmit mode (Carrier On mode), since the idle/passive condition of any UART is high (+5V). Am I right? or where am i wrong?

C. How much of a need is for the manchester encoding of data?
The real need is for the pre-amble data at the header of the data-packet. This does away the need for continous dummy transmission of bytes. The need for the pre-amble I have adequately explained in points- 2 - 5 above. Once this is realized, is the manchester coding necessary. Why i am asking is because, since here there is no need for the receiver for extracting the clock timing information, as required in real-manchester encoder-decoder case. Since the start-bit will provide that.
Then is not the manchester coding required for the data only if the dc-offset builds up significantly during the packet period. Can this build up be made insignificant, by using the preamble method alone?

Thanks & regards.
Ref: Similar discussions:
1. AVRFreaks:Interfacing A434 rf module with ATMEGA32 (http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=75766&view=next)
2. Feedback on TX RX wireless modules for RS-232 (http://www.roboticsindia.com/modules.php?name=Forums&file=viewtopic&t=3658&start=0&postdays=0&postorder=asc&highlight=rf+modules+manchester)
3. Need Help on Project (RF ASK modules) (http://www.roboticsindia.com//modules.php?name=Forums&file=viewtopic&t=2727&start=0&postdays=0&postorder=asc&highlight=)
4. NigelGoodwin's Pic Tutorial-12, with RF RemoteControl (http://winpicprog.co.uk/pic_tutorial12.htm)
5. Ensuring byte-alignment for ASYNC over RF (http://www.piclist.com/techref/microchip/ammermansync.htm)

allbits
03-26-2009, 10:32 AM
The module is "AC coupled" means that the pair, requires a signal with no DC levels. Or, the signal must be DC balanced, with no DC component over a specific time.

This is because, when a transmission system uses DC levels, it can happen that a DC level is transmitted for a long time. - like the USART can be idle for a long time, and the logic high over a long time can cause bit errors in the module, by charging the coupling capacitor over the long time.

To avoid this, the bit patterns should repeat. or, alternate.

You may, or may not use manchester, depending upon the module and your luck. Things can work pretty well without manchester, depending upon your baudrate and your data repeat frequency. SOme modules attenuate at 2400, so you are forced to work at 1200. and while working at 1200, if you are transmitting an ff, or an 0x00, its close to dc . So in some cases, there can be glitches in communication, and in case if you want a solid, robust communication with these stupid modules, you should have manchester, so that the data always repeats, and bit errors are reduced.

Remember - keeping it simple - the point is to keep the data as close to ac as possible. the frequency of AC - depends on the module you use !!!

If you have loads of data to be sent, use zigbee. only bad thing about xbee is the 3.3 V and the price.

bhishmar
03-26-2009, 03:32 PM
@allbits Thanks for your clarification.


The module is "AC coupled" means that the pair, requires a signal with no DC levels. This portion I did not understand. Even though it is a pair, they are indeed independent modules, physically separated: one sitting in Sender-circuit, & other in the receiver circuit.

A. I was asking the independent behavior (AC/DC coupling) of each, if you had cared to test it in your previous experience. But I know such a test is difficult, & you can evaluate the behavior only as a pair, in a simple test. Probably that is what you have meant, by the above statement. Pls confirm. Otherwise I may be missing some point.

B. I have another question to you, since we are in this RF modules issue.
This is about the antennae orientation. I do know that the required antennae size for 434 is somewhere 17 cm (lamda/4). My question is your experience with this modules, w.r.to any specific orientation needs.
i.e they have to be vertical & cannot be horizontal etc.
The context is, Can i meet the 17cm requirement, partly by horizontal PCB-trace & partly be vertical wire (sum)?

Theoeritically I am aware that both receiver & transmitter antennas are required to be aligned (both vertical or both horizontal -not sure about latter). But your practical experience wih these modules pls share.
thanks & regards

allbits
03-30-2009, 01:18 PM
well...

No, i dont know when I will be rich enough to buy an analyser myself, nor do I have an access to an analyser for now... hee hee

Even if I had, I dont think I would be working on the behaviour, as the normal behaviour of these modules itself was pain in the .. er neck.
:D Lots of time has been already wasted to try to understand why these things fail, rather than how to make these things work.. YOu need to be too good in the wireless domain, so have quit these modules and the wireless domain long time back.

Now , as to coupling, you can only consider them as ONE, because there is no physical ground line between the wireless links. (Not talking about the ground plane)

And about antenna - yes, Never split the antenna.. Strips never worked for me, and as long as you are using whips, you may not worry anything about the orientation, its always vertical.

And I would suggest NOT to mount them on a common Board. (the common dot board or strip board as they call it)

And still if you need to know more in detail, I suggest you PM docel.