Wireless communication


Closed Thread
Results 1 to 8 of 8
  1. #1
    Pedro Pinto's Avatar
    Pedro Pinto Guest

    Default Wireless communication

    Hello Community

    It is possible to realize a wireless solution with 40 pic device anyone connected to RFM12 Moduls that all send data to the PC
    40 pic's connected to 40 RFM12 moduls that send data to a receiver RFM12 modul on the PC side

    How it is with conflicts if more RFM12 device sent data on the same time?

    If it possible, welcome sugestions

    Thanks

    Regards
    Sato

  2. #2
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,807


    Did you find this post helpful? Yes | No

    Default

    Of course it is not possible to enable more than one transmitter at a time!

    Don't you think this is obvious?

    You have to check if the channel is free and then transmit. Or even better have the PC to ask each of the 40 PICs to send the data. So you have to use a pair of Tx-Rx modules on every point. If this is too complicated for you then you might consider a XBee module that is transparent serial tranceiver. Up to 1 mile!

    Ioannis

  3. #3
    Join Date
    Dec 2005
    Posts
    1,073


    Did you find this post helpful? Yes | No

    Default

    Assuming that you are referring to the RF12 modules from http://www.hoperf.com/pro/rfm12.html, and that you don't have lots of data from each transmitter, the low cost way to accomplish what you want is to use a single receiver and have the transmitters transmit at intervals, using a protocol that identifies each transmitter and that will allow you to detect collisions. That's the way most wireless alarm systems work. While 40 transmitters are a bit more than the typical alarm system, you should be able to make it work. See the PBP code that I link to at http://davehouston.org/RFTipsTricks.htm. Use the first byte pair for the ID and the second byte pair for data. The built-in error detection will catch any collisions. X-10 and most wireless alarm systems have used this or similar techniques for 30+ years. If you use the internal oscillators, slight variations will prevent any two transmitters from synchronous transmissions - while they might collide for a few consecutive transmissions, they will slowly drift apart. Most countries/regions specify that any single transmitter can only transmit for some small fraction of the total time available.

    If you have a lot of data and/or cannot afford to miss a trasmission, you'll need to use more costly methods and hardware. If you can provide more details about your application, you'll likely receive more detailed responses.

    BTW, Hope Microelectronics has a nice range of products. Where do you buy them?

  4. #4
    Pedro Pinto's Avatar
    Pedro Pinto Guest


    Did you find this post helpful? Yes | No

    Default

    Hello DHouston

    Thanks for your support
    What i need to do is this:
    A machine have a optocopller on one part that everytime this part are moving i have one impuls and this impuls i want to count and increment and send the total value to the PC everytime this impuls appears, and this on all 40 machines.
    (I don't have control how mutch times and when the impuls appears).
    So, i can show in realtime the total count of every machine on the PC

    Yes, i mean the RFM12 from http://www.hoperf.com/pro/rfm12.html, or know you other low cost device?

    Do you think that the code of the method of your link can work with this?

    Thank you again

    Regards
    Pedro

  5. #5
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    If everybody is transceiver equipped, use the "main" to poll each "remote" station.

    Each remote station have their own "address" and they hold/wait to send their data 'till they're ask to do so.

    Using this will save some possible collision.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  6. #6
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,807


    Did you find this post helpful? Yes | No

    Default

    Since you have to count and transmit the total, I insist on using the tranceiver method. You can leave every of the 40 pic as Steve stated in a polling state and when the address is valid for each station, then this station report back. No collisions this way.

    From the PC side you have to implement a way to address each one of the 40 pics in circle.

    For example in a loop:

    for i=0 to 39
    send address i
    gosub receive from station i
    next i

    Ioannis

  7. #7
    Join Date
    Dec 2005
    Posts
    1,073


    Did you find this post helpful? Yes | No

    Default

    If you have to update whenever any machine changes state, polling will not work since a machine may change state more than once between polls, especially if you have 40 machines to poll. Nor will just letting each machine transmit as it changes, as you are sure to have collisions and lost data. And, a loop which polls each of 40 machines will violate every European regulation on how often any one transmitter can transmit. OTOH, if you can accumulate counts locally and transmit the total periodically, polling or independent transmission will work. An occasional collision can will not matter as an accurate count can be sent with the next transmission. It all depends on how frequently each count changes and whether you need to have each change registered immediately. If you can live with independent transmitters, you can use much cheaper hardware. What distances are involved? As this sounds like a factory floor, my guess is it's not very RF friendly with lots of metal surfaces and maybe lots of interference. I'd look at a wired RS-485 network.

  8. #8
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,807


    Did you find this post helpful? Yes | No

    Default

    Yes Dave. You are right about regulations but we lack of some specs by Pedro Pinto, so only guesses we can make.

    Absolutely agree for the 485 solutions. Rock solid communications.

    Ioannis

Similar Threads

  1. Wireless serial communication question
    By Ahmadabuomar in forum Serial
    Replies: 3
    Last Post: - 21st December 2009, 03:49
  2. Simple Wireless Communication
    By jhorsburgh in forum General
    Replies: 6
    Last Post: - 27th March 2008, 11:02
  3. Replies: 2
    Last Post: - 29th September 2007, 06:49
  4. RS 485 wireless communication
    By Armadus in forum mel PIC BASIC Pro
    Replies: 22
    Last Post: - 26th January 2006, 19:30
  5. Wireless communication gear.
    By toalan in forum Off Topic
    Replies: 5
    Last Post: - 17th March 2005, 16:33

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts