I want to hook up the RF 2.4 G to a small pic and transmit a nimber (lets say) 259), and to have this setup for 5 - 10 of this devices and be able to recieve these numbers when the devices are in range. Should i transmit on different channels on each one or i can transmit on the same channel all of them and be able to recieve seperate number from each ? How should i do this?
Are these devices beacons that transmit their code frequently? A critical factor will be data collision if more than one device is reporting at the same time. Any design should address collision issues. One approach is to have each device send its code 2 or 3 times with a delay between codes that is unique for each device. The will minimize that likelihood of having two or more transmitters on at the same time. If that occurs, having a different delay for each device makes it much more likely that the second or third time that the device sends its code, it will be in the clear.
Another, more complicated approach, requires the transmitters to wait for a “send your id” signal from the receiver. This is what I did for an IR beacon I built awhile ago. The receiver would send an “Is anyone out there” IR burst. Any receivers in the area would detect the signal from the receiver, wait its unique delay time, and then send its code. It worked very well, but I don’t know if this approach would be suitable for your use.
Your receiver would be looking for a valid signal from a transmitter. If noise or a data collision creates garbage on the output, ignore it. The next time the tranmitter sends the code, it should be detected properly.
I'd suggest that the transmissions include a 'sequence number', which is an arbitrary number that is the same for each repeated message. Then the receiver can tell the difference between getting two copies of the same message, and two different messages (which may happen to have the same payload).Your receiver would be looking for a valid signal from a transmitter. If noise or a data collision creates garbage on the output, ignore it. The next time the tranmitter sends the code, it should be detected properly.
Pete
Si i can transmit on the same channel from all transmitters at the same time?
Yeah, I’ve been through some of this, developing (and wanting to understand it all) my protocol.
The sequence number Saipan said is a good idea for recognizing duplicate packets. Another thing to avoid collisions is to wait a random amount of time before each transmission and, provided that you can see when a collision occurs or the channel is busy, retry with an increasing waiting-time (still random though). Concepts borrowed from Ethernet !
HTH
Tnx for the help guys, much appriciated.
No, the techniques described in the previous replies are ways to *not* have more than 1 xmtr transmitting at the same time. When 2 (or more) xmtrs are on at the same time, the receiver probably sees "garbage".So i can transmit on the same channel from all transmitters at the same time?
Pete