RF Transmitters and Receivers?

Discussion in 'General Electronics Chat' started by jeff77789, Mar 21, 2013.

  1. jeff77789

    Thread Starter New Member

    Feb 22, 2013
    18
    0
    I've been trying to use this pair of RF transmitter/receiver:

    https://www.sparkfun.com/products/10534
    https://www.sparkfun.com/products/10532


    does anybody have any experience with what type of signal it actually sends/receives?

    you see that in the datasheet for the receiver you have a digital output and a linear output as well.

    I sent a pwm type output through this and it looks like it kind of successfully transfers but the signal is very noisy, disrupting the pwm signal. i dont think an analog voltage signal would transfer

    thanks
     
  2. WBahn

    Moderator

    Mar 31, 2012
    17,788
    4,808
    The data sheet for the transmitter states that it is using ASK -- Amplitude Shift Keying.
     
  3. crutschow

    Expert

    Mar 14, 2008
    13,056
    3,245
    ASK is for transmitting digital information at a relatively slow rate, so it will not transfer an analog signal, as you surmised.
     
  4. jeff77789

    Thread Starter New Member

    Feb 22, 2013
    18
    0
  5. WBahn

    Moderator

    Mar 31, 2012
    17,788
    4,808
    Which signal? It says it puts out three different types. If you want to bring the analog signal across using these transmitters and receivers you will probably need to digitize them. But be sure to consider your data rates and what these radio links can support.

    If YOU dig out the relevant numbers from the specs, we can help you interpret them. But don't expect us to go digging through the specs for you.
     
  6. jeff77789

    Thread Starter New Member

    Feb 22, 2013
    18
    0
    My bad, I was initially trying to use the analog signal because it seemed like the simplest but then I realized I would need to digitize the signal first, then I tried the PW signal and then It did not give me very consistent results at all. I tried. Using the rs232 digital signal too but it is inverted so I do not know how to get around that
     
  7. jeff77789

    Thread Starter New Member

    Feb 22, 2013
    18
    0
    okay so i finally figured out to find a digital signal to send through these. there is another problem that comes up:

    1. the signal being sent to the transmitter is 9600 baud which is 2x the 4800baud for the tx/rx (which i do not know if it affects the signal any)

    2. when i view the signal, it is very noisy and it looks like it is just random numbers. the thing is, if i turn off the Tx, the values stay in their random state and it looks like there is no uniformity
     
  8. WBahn

    Moderator

    Mar 31, 2012
    17,788
    4,808
    You can't just send data to the transmitter at some baud rate other than what it is expecting. When you say "view the signal", view it how?
     
  9. jeff77789

    Thread Starter New Member

    Feb 22, 2013
    18
    0
    the receiver end of it is connected to an arduino and i am converting the binary values to an ascii value and it shows up in the serial monitor
     
  10. WBahn

    Moderator

    Mar 31, 2012
    17,788
    4,808
    What is the format of the output from the receiver? Are you sure you are synced properly and capturing the data properly? Is this a serial link? Are you framing correctly? Are you getting msb/lsb order correct?

    What do you mean that you are converting the binary values to "an" ASCII value?
     
  11. jeff77789

    Thread Starter New Member

    Feb 22, 2013
    18
    0
    A mentioned above, I am trying to use the rs232 signal from the maxbotix sensor. Ideally I want to plug this signal (coming from the tx pin) into the transmitter and have that just automatically transmit to the receiver but i think that the baud rates are messing it up. I don't really have any experience with these items so I cannot sure exactly how the baud rates can affect the signal from being transferred.

    I do not know if there NEEDS to be some more logic in between the sensor and the transmitter
     
  12. jeff77789

    Thread Starter New Member

    Feb 22, 2013
    18
    0
    When the *BW is open or held low, the TX output delivers
    asynchronous serial with an RS232 format, except voltages are 0-Vcc.
    The output is an ASCII capital “R”, followed by three ASCII character
    digits representing the range in inches up to a maximum of 255,
    followed by a carriage return (ASCII 13). The baud rate is 9600, 8
    bits, no parity, with one stop bit. Although the voltage of 0-Vcc is
    outside the RS232 standard, most RS232 devices have sufficient
    margin to read 0-Vcc serial data. If standard voltage level RS232 is
    desired, invert, and connect an RS232 converter such as a MAX232.
    When BW pin is held high the TX output sends a single pulse, suitable
    for low noise chaining. (no serial data).

    so i do have the max232 converter and i do know how to interpret the signal directly with the arduino (just look for the "R" and then read the 3 range values) via wire aka direct connection but now the next step is to implement these tx/rx pairs
     
  13. WBahn

    Moderator

    Mar 31, 2012
    17,788
    4,808
    The baud rates on a serial link MUST agree. Imagine you tell someone that you will send a single 4 bit message to them by turning on or off a flashlight out a window tonight. You tell them that you will start a new bit every T seconds and you will keep the flashlight OFF if you are transmitting a 0 and will turn it ON if you are transmitting a 1. You also tell them that you will transmit your messages in packets of 8 bits and you will start each packet with a 1 bit and end each packet with a 0 bit (the start and stop bits).

    So tonight you set up a little timer that beeps every 4s and get read to send your message that is "1001". At the first beep you turn on the flashlight to begin your start bit. At the first beep you leave it on, at the second beep you turn it off, at the third beep you leave it off, at the fourth beep you turn it on, and at the fifth beep you turn it off to begin the stop bit. You are finished and you go to bed, having successfully transmitted your message.

    The guy at the other end is sitting staring out the window waiting for the first flash that signals your start bit. He has also set up a timer but has set it to beep every 2s. He sees your flash start and waits one second and starts his timer. That places him in what he thinks is the middle of your start bit. When his timer beeps he sees that your light is still on and so he records a 1. When it beeps again he sees that your light is still on and so he records another 1. On the third beep he records another 1. On the fourth beep he sees your light is off so he records a 0. On the fifth beep he notes that your light is off and concludes that he is looking at the stop bit. He then goes to bed having successfully received the message "1110".

    What went wrong?

    Your baud rate was 0.5 symbols/second and his was 0.25 symbols/second. He had twice the baud rate you did.

    Baud rate matters.


    Also, if the data coming over the link is ASCII, then you don't need to convert it to ASCII. It already IS in ASCII.
     
    absf likes this.
  14. jeff77789

    Thread Starter New Member

    Feb 22, 2013
    18
    0
    is there a PIC or PICAXE chip that can be easily programmed with an arduino to convert the baud rate from 9600 to 4800?
     
  15. absf

    Senior Member

    Dec 29, 2010
    1,493
    373
    WBahn, you're really good in explaining Asynchronous communication & baud rate in layman's terms. I am going to print this out and keep it for my friends who always has funny ideas arguing about Asynchronous comm.

    Allen
     
  16. jeff77789

    Thread Starter New Member

    Feb 22, 2013
    18
    0
    Now I am at the point where i can send a digital signal at 4800 baud through these sensors.

    The thing is, If it send "123" on the other side, i rarely ever get the "495051" sequence (refer to ASCII table)
    there is no encoding for this signal and i am not quite sure how to "encode" it either.
    the accuracy rate is less than 10% and I have no Idea why the signal is so "noisy"

    is there any way i can improve on this?
     
  17. atferrari

    AAC Fanatic!

    Jan 6, 2004
    2,652
    767
    By "123", do you mean this sequence= 00000001 00000010 00000011 ?

    or this= 00110001 00110010 00110011 ?

    Whatever you send is what you should receive provided that you handle each received byte consistently, that is, if the less significant bit is transmitted first, at the receiving end it should go to the less signifcant bit of the buffer. Getting them reversed is a quite common mistake.

    Maybe you are transmitting binary values but not doing the conversion from binary to hex (adding 48 decimal (or 30 Hex) to the received byte)?

    If you know all this, excuse me.
     
    Last edited: Apr 15, 2013
Loading...