Shop OBEX P1 Docs P2 Docs Learn Events
Wireless Communication between Propeller Chips — Parallax Forums

Wireless Communication between Propeller Chips

Technic-R-CTechnic-R-C Posts: 117
edited 2009-02-23 10:37 in Propeller 1
Hello all,

I have· a question in regards to interfacing 2 propeller chips via wireless connections/communications.· In general I need data (sensor feedback, etc.)to be sent between the propeller chips (sensor feedback, updating displays, etc) at a rather fast·transfer rate·(max distance of 5 feet between transmitter and receiver).· I have a couple questions in regards to this issue.· Will I be able to use the:
Parallax 433.92 MHz RF Transmitter (#27980)

Parallax 433.92 MHz RF Receiver (#27981)

with the propeller chips at a rather fast speed or are they not compatible with the propeller·processor? Are there any other options that would work better or is this the right product for me?· If it is compatible, where can I find some sample code·for these·devices·in Propeller Spin Language?· In the pdf for these parts no code is included for the propeller chip...

Thank You

Technic-R-C

Comments

  • LeonLeon Posts: 7,620
    edited 2009-02-13 10:32
    How fast?

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
    Suzuki SV1000S motorcycle
  • sylvie369sylvie369 Posts: 1,622
    edited 2009-02-13 12:05
    Those units are compatible with Propeller chips, though whether they'll serve your needs is a separate question. They're simply serial devices, so you'd just communicate with them through the serial object of your liking.
  • MacGeek117MacGeek117 Posts: 747
    edited 2009-02-13 15:24
    Try using Linx Tech's low-cost LT series transeivers. They are less expensive than Parallax's RF products. (No offense, Parallax!)
    RoboGeek

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "I reject your reality and subsitute my own!"

    Adam Savage, Mythbusters
    www.parallax.com
    www.goldmine-elec.com
    www.expresspcb.com
    www.jameco.com
    ·
  • Technic-R-CTechnic-R-C Posts: 117
    edited 2009-02-17 00:17
    Thank you guys.. another question..

    Lets say that i have a propeller·chip·in my hand and a propeller chip connected to a scooter below me...
    So with the parallax transmitter and reciever (i believe i would need a transmitter and receiver connected to each propeller (total of 2 transmiters and two receivers) to be able to send signals back and forth between the chips (bidirection communication)? is this correct) would i be able to transfer a·signal (say a potentiometer numerical value), from my handheld propeller·board,·to the scooter telling it how fast to drive and then a signal from the scooter (encoder numerical value·measuring speed for example) to my handheld propeller which will then display the speed of the scooter on a sophisticated uoLED display from parallax?· In other words im trying to get two propellers to communicate with each other efficiently (realtime - when i press button, something instantaneously happens on the other propeller board (distance between transmitter and receiver = max 5 feet)).. Can this be done? or do i have to look into other transmitters and receivers?

    Thanks

    Technic-R-C

    Post Edited (Technic-R-C) : 2/17/2009 8:25:42 AM GMT
  • CannibalRoboticsCannibalRobotics Posts: 535
    edited 2009-02-17 18:28
    Look at the comm section of my Rover controller posted today.
    JIm-

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Signature space for rent, only $1.
    Send cash and signature to CannibalRobotics.
  • Technic-R-CTechnic-R-C Posts: 117
    edited 2009-02-19 05:12
    That is a very interesting project and means of communications, however I was wondering if the Parallax specific transciever package would be able to send fast and reliable signals as described above.· Can anyone provide some input on my question?

    Thank you

    Technic-R-C
  • Mike GreenMike Green Posts: 23,101
    edited 2009-02-19 05:52
    Depends on your definition of fast and reliable. These are specified for Bauds up to 19200 Kbit/s. Each character cell takes 10 bits, so you can transmit and receive up to about 2000 characters per second. There's no error checking, so you'd have to add some and that slows things down, particularly if there are errors. There are other devices that include error checking and retransmission on error, things like xBee transceivers. These can be slower in that data is packetized ... held in a buffer until the buffer fills up or a time limit expires, then transmitted, checked, retransmitted if necessary, and unpacked on the receive end. It does provide a transparent wired serial replacement.
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2009-02-22 12:26
    I have been working on wireless comms for over a year now and I have a box of parts that never quite did what I wanted. Raw RF modules certainly will send data but they are not a replacement for a wire. When a wire is not transmitting data, it is 'off', (either high or low). When a raw RF module is not receiving any data, its output is white noise (ie hiss between radio stations).

    If you want to send a byte, you need a way of determining what is happening at the start of that byte, ie is a low to high transition really the beginning of a byte or is it just another random fluctuation from white noise?

    One way to do this is to send a series of the character "U" first, which in binary is 01010101. If you send 5 of these, it is usually enough to synchronise a uart so it is ready to get some bytes.

    Then it helps to send a unique sequence of numbers, eg "ABC" for one board, "XYZ" for another board, so that many boards/systems can share the same bit of RF spectrum.

    Then you can send your single byte.

    And then to be doubly sure it will get there reliably, send a checksum byte, which might be the same byte again, or maybe the sum of a number of bytes.

    With a bit of care and the right modules you can get a reasonable range, eg I've got 300 metres through trees.

    But for a little more money there are modules coming out which are becoming true replacements for wired connections. They are not much more expensive than raw RF modules (which is pretty amazing considering they have a microcontroller on board). Maybe $25 for a transceiver. I've initially started with the ones at the bottom of this page http://www.hoperf.com/rf_fsk.asp and these make data comms a breeze compared with raw RF modules. You don't need the wakeup "U"s and the bytes go through so reliably you don't need checksums either.

    More recently, I've pushed those modules to the limit and discovered they send data in 32 byte packets. I'm currently working on sending whole files eg 10k to 40k in size via wireless, and when you do that you need a protocol that has error correction and the ability to resend dropped packets. Such a protocol exists in the form of XMODEM and it was written in the 1970s. I have some examples of xmodem code in z80 assembler and in 2009 vb.net. This uses packet sizes of 132 bytes, and I've had a great deal of success with these modules http://www.yishi.net.cn/index.asp?id=47

    There are a range of different powered modules depending on the range you want and the price for the lower powered ones is around the $25 mark. You can use 10mW modules or you can up the power to watts if you want (and it is legal in your country). In practice, use the minimum power you can get away with and to be polite, keep the RF within your property boundary. 10mW is a "good neighbour" sort of power range. These modules extend the range by having good sensitivity on the receiver rather than by having high power transmitters. It helps to check the sensitivity as -108db is very good, but -93db is pretty deaf.

    The advantage of using transceiver modules is you can drop in the serial code already written for the prop without having to do any rewriting.

    Post Edited (Dr_Acula (James Moxham)) : 2/22/2009 12:34:48 PM GMT
  • Technic-R-CTechnic-R-C Posts: 117
    edited 2009-02-22 20:26
    Dr_Acula (James Moxham)
    Thank you for your detailed and well thought out response,

    I am currently on hold with this project for a couple of days up to a couple of weeks but I was looking through the websites containing the RF transcievers and they look great.· I will take a more in depth look at them when I get some free time and I will be sure to have some questions in regards to wireless communication between the Propeller Chips.
    More recently, I've pushed those modules to the limit and discovered they send data in 32 byte packets. I'm currently working on sending whole files eg 10k to 40k in size via wireless, and when you do that you need a protocol that has error correction and the ability to resend dropped packets. Such a protocol exists in the form of XMODEM and it was written in the 1970s. I have some examples of xmodem code in z80 assembler and in 2009 vb.net. This uses packet sizes of 132 bytes, and I've had a great deal of success with these modules http://www.yishi.net.cn/index.asp?id=47
    Absolutely amazing!· (transferring 10-40k files is quite a feat!)· I will look·into these modules and decide which one best fits my needs.

    Thank you again,

    Regards

    Technic-R-C
  • dbpagedbpage Posts: 217
    edited 2009-02-22 22:59
    Does anyone know if the Parallax Embedded Blue module (#30068) is a possible solution?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Dennis B. Page
  • Mike GreenMike Green Posts: 23,101
    edited 2009-02-22 23:07
    Sure they are. So are the xBee modules (which are cheaper).
  • Mike HuseltonMike Huselton Posts: 746
    edited 2009-02-22 23:30
    Maxstream, recently acquired bt DiGi International, sells the Xbee for $20-25. I have been using these for five years now. All of the good things Mike mentioned are built-in.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    JMH
  • Luis DigitalLuis Digital Posts: 371
    edited 2009-02-23 00:45
    Hello,

    Someone have used these products with good results?

    Thanks.
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2009-02-23 02:14
    Luis - nice find!

    Price looks good too. I've used lots of other products from Sure and they work well, though not these ones in particular (it seems my requirement for a buffer of 132 bytes (for xmodem) is a bit unusual, these modules have a 64 byte buffer). The buy it now price is $36 with free shipping for 2 modules, which means you get two transmitters and two receivers for that price. I don't know if you need a bi-directional link, but even if you don't it is a good price as it includes the "filtering" as well.

    The use was for a scooter, right? In which case it is worth noting that these modules with inbuilt microcontrollers are more immune to noise. You might not have any RF noise in your shed when testing as a shed acts as a Faraday cage, but out on the road, turn on a scanner at 433Mhz at 8am and it sounds like a field of crickets as everyone opens their garage door. You don't want the scooter going into hyperspeed just as you go past someones garage! So what ever you use, it does need to have a checksum or send the byte a few times and the receiver has to get the same byte several times.

    It depends also on how you think a project might grow. If it truly is just one byte and you want a cheap solution, a picaxe and a raw RF tx and raw rf Rx will work fine. 'Sure' sell the tx and rx for a couple of dollars each, as do many other suppliers. I have found though that the prebuilt transceiver modules seem more immune to effects like antenna coupling from a human body and/or nearby metal. There is nothing more frustrating than a RF link only working when you have your arm in a certain position!

    One other little note - some modules have a minimum range as well as a maximum one, and won't work under 1 metre as the RF input stage gets overloaded. You can get round that by leaving out one antenna or delibarately making one antenna not 1/4 of the wavelength to reduce its efficiency.

    Post Edited (Dr_Acula (James Moxham)) : 2/23/2009 2:25:36 AM GMT
  • Luis DigitalLuis Digital Posts: 371
    edited 2009-02-23 02:41
    Thanks James,

    In which frequency there is less noise (433MHz or 915MHz)?
    I imagine that will depend on the place, truth?
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2009-02-23 10:37
    Hmm 433 is garage door openers and 915 is cordless phones... so 433 will be noisier in the morning as everyone goes to work and 915 in the evening when the missus gets on the phone... woops, scratch that.

    Seriously, I suspect 433 is more data and 915 is more voice, so probably less chance of data interference at 915. But then again, 433 goes round trees better. 2.4Ghz is real bad for going round trees. Much more line of sight at those frequencies. A bit of bending over the terrain is handy - I've got 433 to bend over a gentle hill out of direct sight but 2.4Ghz won't do that. 915 has a shorter antenna. Who knows? Personally, I prefer 315Mhz or 433Mhz.
Sign In or Register to comment.