Shop OBEX P1 Docs P2 Docs Learn Events
Question on RF transmitter and RF recevier — Parallax Forums

Question on RF transmitter and RF recevier

BotakheadBotakhead Posts: 12
edited 2009-01-07 06:49 in BASIC Stamp
Hi,

I had bought a Basic Stamp, RF transmitter·, RF receiver, LCD and GPS module·from Parallax. I am using them for·my school project. When I downloaded and open the RF transmitter source code by Parallax, I saw that I would need to mount the RF transmitter and RF receiver onto 2 separate Basic Stamp. May I know if I have to buy another Basic Stamp ? As I am a secondary school student, the Basic Stamp is not cheap to me.

Comments

  • stamptrolstamptrol Posts: 1,731
    edited 2008-10-22 11:51
    Whether you need a second Stamp may depend on what you're actually trying to accomplish.

    Can you give us a few details of your project?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tom Sisk

    http://www.siskconsult.com
    ·
  • BotakheadBotakhead Posts: 12
    edited 2008-10-22 12:38
    Oops tongue.gif

    I am trying to send the information from the GPS module to show on the LCD. The GPS module will be mounted with the RF transmitter on a Basic Stamp.The LCD will be with the RF receiver. The Baisc Stamp with the GPS module will be on mobile and information will be sent to the LCD. And 1 more question. Does the RF transmittor and RF receiver reqiure programming ? When sending the information to the LCD, can i mount everything on 1 Basic Stamp.

    1 Baisc stamp cost about SGD $2xx in my state(Singapore). shocked.gif
  • sylvie369sylvie369 Posts: 1,622
    edited 2008-10-22 13:07
    Botakhead said...
    Oops tongue.gif

    I am trying to send the information from the GPS module to show on the LCD. The GPS module will be mounted with the RF transmitter on a Basic Stamp.The LCD will be with the RF receiver. The Baisc Stamp with the GPS module will be on mobile and information will be sent to the LCD. And 1 more question. Does the RF transmittor and RF receiver reqiure programming ? When sending the information to the LCD, can i mount everything on 1 Basic Stamp.

    1 Baisc stamp cost about SGD $2xx in my state(Singapore). shocked.gif

    You will need a Stamp on the receiving end (as well as one on the transmitting end). Something has to take the data received by the RF receiver, recognize valid data, break it into pieces representing the information you want to display, format it, and send it to the display. What you're describing can be done: I set up two BS2s to do this last fall. But it will require two Stamps.

    An engineer might be able to build a non-microprocessor-based way to receive and display the information, but it'd be quite a feat, and I'll bet it wouldn't cost much less than a Stamp.

    As for you question about whether the RF units "require programming", the Stamps that you connect to them will need to be programmed to send and receive the information. The units themselves are not programmable - they just do what the Stamp tells them to do.

    Post Edited (sylvie369) : 10/22/2008 1:12:54 PM GMT
  • JonathanJonathan Posts: 1,023
    edited 2008-10-22 13:28
    Actually, I would imagine that you could drive the LCD directly from the RF receiver, except for data error checking. So, as long as you were within range, it *should* work. However, error checking is a big deal if you are operating anywhere with interference or at the edge of the units range.

    I haven't ever done it this way however, and it assumes that the LCD is a serial type, not parallel.

    Jonathan

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.madlabs.info - Home of the Hydrogen Fuel Cell Robot
  • BotakheadBotakhead Posts: 12
    edited 2008-10-22 14:01
    sylvie369 said...
    Botakhead said...
    Oops tongue.gif

    I am trying to send the information from the GPS module to show on the LCD. The GPS module will be mounted with the RF transmitter on a Basic Stamp.The LCD will be with the RF receiver. The Baisc Stamp with the GPS module will be on mobile and information will be sent to the LCD. And 1 more question. Does the RF transmittor and RF receiver reqiure programming ? When sending the information to the LCD, can i mount everything on 1 Basic Stamp.

    1 Baisc stamp cost about SGD $2xx in my state(Singapore). shocked.gif

    You will need a Stamp on the receiving end (as well as one on the transmitting end). Something has to take the data received by the RF receiver, recognize valid data, break it into pieces representing the information you want to display, format it, and send it to the display. What you're describing can be done: I set up two BS2s to do this last fall. But it will require two Stamps.

    An engineer might be able to build a non-microprocessor-based way to receive and display the information, but it'd be quite a feat, and I'll bet it wouldn't cost much less than a Stamp.

    As for you question about whether the RF units "require programming", the Stamps that you connect to them will need to be programmed to send and receive the information. The units themselves are not programmable - they just do what the Stamp tells them to do.

    Oh i see. Is the programming on the RF transmitter and RF recevier difficult ? I found it hard to understand. I tried to read from the Basic Stamp manual and read from other posts from the forum. But I could not understand them as this is the first time I seen Basic Stamp programming. Could someone show me some example on programming the RF transmitter and RF receiver to send information to LCD please ? I could not understand source code from Parallax download shakehead.gif

    And my teacher also ask me to find out what is uses of MAX232.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2008-10-22 14:20
    Hello,

    The RF Transmitter and RF Receiver themselves are not programmed. They are simply handling the RF communication, which is done serially. However, as with most RF systems you have noise issues to worry about which can garble or lose data. Without a BASIC Stamp on both ends handling the data, it is likely your display would quickly get too much garbage for you to read. Example RF Transmitter/Receiver code for the BASIC Stamp are available from our website on the product pages. These examples include error checking to ensue data integrity.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Engineering
  • stamptrolstamptrol Posts: 1,731
    edited 2008-10-22 14:20
    OK, you've set a reasonably complicated project for a first attempt. However, with lots of work it should be successful.

    Basically, your project will be divided into Three distinct parts:

    1. Get the wireless receiver to to successfully receive data from the wireless transmitter. Start with the sample programs with the wireless units or in "Whats a Microcontroller" or "Stampworks". One Stamp will use SEROUT to send to the transmitter and the second will use SERIN to receive the data from the receiver.

    2. The mobile part with a Stamp, GPS receiver and the wireless transmitter. Get the stamp to successfully read the GPS and display the data using the DEBUG screen. The GPS will be read using the SERIN command. Once the data is being received, use the SEROUT command to send the data to the transmitter.

    3. The third part will be the stationary Stamp with the wireless receiver and the LCD. Read the data using SERIN and display the data (after formatting) by using SEROUT to the LCD. (hopefully you've got a serial LCD because they are much easier to use).

    The MAX232 (and MAX233) are special chips to shift the Stamp's serial voltages from 0 and 5 volts to +/- 10 volts or so. You shouldn't need them on this project.

    Your teacher may let two or more of you do one part of the project each to reduce costs. And, the Stamps can be re-used for many other projects in the future.

    Cheers,

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tom Sisk

    http://www.siskconsult.com
    ·
  • BotakheadBotakhead Posts: 12
    edited 2008-10-23 12:04
    I had bought another Basic stamp kit today turn.gif

    Hope I can complete the project. Thanks guys for helping me tongue.gif
  • BotakheadBotakhead Posts: 12
    edited 2008-11-03 11:33
    I can't show the information on the LCD. I keep trying and i keep getting useless or unreadable words on the LCD.
    I really need some help cause my teacher is going to review my project in 2 days... skull.gif

    could someone enlighten mi please ? Thanks
  • sylvie369sylvie369 Posts: 1,622
    edited 2008-11-03 11:56
    Your problem is very likely a mismatch in baud rates.

    You're using a BS2, right (not a BS2px, or anything like that)?
    You're using a Serial LCD, right? Like this one?

    www.parallax.com/Store/Accessories/Displays/tabid/159/CategoryID/34/List/0/Level/a/ProductID/50/Default.aspx?SortField=ProductName,ProductName

    Try this code (from the product page):

    ' {$STAMP BS2}

    TxPin CON 0 ' adjust this to whichever output pin you're using
    Baud19200 CON 32

    HIGH TxPin ' Set pin high to be a serial port
    PAUSE 100 ' Pause for Serial LCD to initialize
    SEROUT TxPin, Baud19200, [noparse][[/noparse]"Hello, this text will wrap."]

    If it doesn't work, look on the back of your LCD module, and make sure that the two DIP switches are both in the "on" position, to enable communication at 19,200 baud.
  • BotakheadBotakhead Posts: 12
    edited 2008-11-03 12:17
    Sorry i should be more specific. It is the RF transmitter and RF receiver part which gives mi the problem.

    I could show the information I want on the LCD from the GPS module if they mounted on 1 Basic Stamp.

    Now I'm trying to send the information to another Basic Stamp by using RF transmitter and RF receiver. smile.gif

    Thanks you sylvie369 for trying to help.

    I'm using 2 BS2(serial version), a 4x20 LCD backlit, a RF transmitter and a RF receiver for my project. All of them were bought from Parallax smilewinkgrin.gif

    I had attached the code I'm using for review. Hope someone could help me.
  • sylvie369sylvie369 Posts: 1,622
    edited 2008-11-03 14:14
    There is nothing in that code to send information out through an RF unit.

    Did you run the demo programs for the RF units? If you haven't gotten those to work, you need to figure that out before you try to do it with GPS data and an LCD.
  • BotakheadBotakhead Posts: 12
    edited 2008-11-03 14:51
    I tried the RF transmitter and RF receiver demo code from the Parallax website. It sent the demo code messages to the debug window on my computer.

    I am not sure how to "put" the demo code into the my Project code so the information from my GPS module could be shown on the LCD.

    Should I start writing the RF code in the "Program code" section or at the "Subroutines" section ?

    Is the error checking code from the RF units demo code important to my project ? Its is because I dun understand most of it confused.gif

    And I looked at other posts too. May I know what is NMEA sentences ? And how do I put them in my code if It is needed. shocked.gif

    I saw this sentence on 1 of the Completed Project section on Parallax forum.
    SERIN 1, 188, 4000, NO_DATA, [noparse][[/noparse]WAIT("GPGGA,")

    I only pasted part of it cause its too long

    I know that GPGGA is NMEA sentence. But I dun know what is the function. And what function is the WAIT command.

    I am sorry for asking so many questions. But I'm new to this. Hope someone can help me.

    Many thanks

    tongue.gif
  • sylvie369sylvie369 Posts: 1,622
    edited 2008-11-03 15:37
    NMEA codes:

    http://home.mira.net/~gnb/gps/nmea.html

    You need code to read the GPS. It transmits these NMEA codes: you want to take data from the $GPGGA string that the GPS sends, and read those data into your own variables. Then you want to transmit those variables to your other BS2. Then the other BS2 needs to format them and print them to the LCD.

    The "Wait" command tells the BS2 not to start reading data until the correct string ("GPGGA") is sent by the GPS. At that point you can start counting bytes received to figure out which of the incoming data represents which part of the GPS information (Latitude, Longitude, etc.).

    The RF code for the transmitter goes in your program after you've read the GPS data.
    The RF code for the receiver goes at the beginning, before you're trying to send things out to the LCD.

    If I were you, I'd sketch out what needs to be done in what order before I worried about code specifics.
  • BotakheadBotakhead Posts: 12
    edited 2008-11-07 08:01
    turn.gif I am able to show the information from the GPS module already. However the information is incorrect.. (e.g Number of Satellite : 83)

    I know it got to do with the error checking code. May I know is it all error checking code the same ? Can I use the error checking code from the RF transmitter or RF receiver provided by Parallax web page for my project ?

    Thanks
  • BotakheadBotakhead Posts: 12
    edited 2008-11-10 08:57
    Hmm can someone enlighten mi pls smilewinkgrin.gif
  • FranklinFranklin Posts: 4,747
    edited 2008-11-10 16:43
    Could you show us how you have everything connected? Did you have this working with the two devices hard wired together ( the gps side and the lcd side )?
    Attach the code you are using for both sides to your next post so we can see where you are now.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • plingbootplingboot Posts: 7
    edited 2008-11-11 10:11
    chris - would you be good enough to post a link to the sample RF Tx/Rx code please - i've hunted around for the last ten minutes and not been able to locate it.
    thanks, david
  • BotakheadBotakhead Posts: 12
    edited 2008-11-11 10:40
    [noparse][[/noparse]url]http://www.parallax.com/Store/Sensors/CustomKits/tabid/134/List/1/ProductID/113/Default.aspx?txtSearch=rf+transmitter&SortField=ProductName,ProductName

    I think this the link for the RF transmitter and recevier sample code. Email Chris for the page if I'm wrong tongue.gif
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2008-11-11 10:58
    plingboot -

    The sample programs to which Chris made reference are attached to this message.

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When all else fails, try inserting a new battery.
  • plingbootplingboot Posts: 7
    edited 2008-11-11 12:34
    thanks chaps [noparse];)[/noparse]
  • BotakheadBotakhead Posts: 12
    edited 2009-01-07 00:56
    Hi

    Sorry for the late posting of my Transmitter and Receiver code. I tried to follow what Stamptrol had replied previously. However, I could not get the correct value from the GPS module(example Number of Satellite : 1023). I had attached my codes for review. Greatly appreciate if someone could help. Thanks you.

    Best regards

    BotakHead
  • stamptrolstamptrol Posts: 1,731
    edited 2009-01-07 02:33
    In that your sample code is largely the Parallax sample code, I'm a bit surprised it doesn't work.

    In particular, the Number of Sats is a byte value in the code and you report it being 1023!

    Is the GPS unit properly powered and does it have a clear view of the sky?

    You may have to attach some schematics to refresh us as to where you are in the project.

    Cheers,

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tom Sisk

    http://www.siskconsult.com
    ·
  • BotakheadBotakhead Posts: 12
    edited 2009-01-07 06:49
    I am doing the project in a room mounted with an antenna on the wall. Thus, i could get satellite signal easily and stable. When I connect the GPS module and LCD on a Basic Stamp 2, it all works well(code attaches for review).

    The problem is I cant get the GPS value wireless when I send them through 433mhz transmitter and 433 mhz receiver. I had mounted the transmitter and GPS module on 1 Basic Stamp, while receiver with the LCD on another Basic Stamp.
Sign In or Register to comment.