RF RX & TX Modules
I have been playing with a pair of the TX and a pair of RX modules for remote control of a robot and have managed to create a wireless serial link that can run at 4800 baud. It appears to be good for about 150 feet.
The problem is that the both TX modules are on the same frequency, so·you have to power one of them off to receive.
The other problem I have is that I can't work out any way of buffering the incomming data so you have to be listenning ( not transmitting) ·to catch it.
The solution I have come up with is to have one BS2 mainly transmitting and one mainly listening. When the listenning one gets a valid string it then burst transmits a reply 5 times in the hope that one of the return strings will survive CHKSUM.
I have not been able to find any sample code for bi-directional comms between stamps.
Has anyone managed to do better than 4800 ?
Istha
The problem is that the both TX modules are on the same frequency, so·you have to power one of them off to receive.
The other problem I have is that I can't work out any way of buffering the incomming data so you have to be listenning ( not transmitting) ·to catch it.
The solution I have come up with is to have one BS2 mainly transmitting and one mainly listening. When the listenning one gets a valid string it then burst transmits a reply 5 times in the hope that one of the return strings will survive CHKSUM.
I have not been able to find any sample code for bi-directional comms between stamps.
Has anyone managed to do better than 4800 ?
Istha
Comments
·
·· The trick to two-way communication in this situation is to designate a master and a remote.· The master will query or poll the remote unit for information, and when such information is required will then listen for a reply.· In this manner only one side is transmitting at any given time.· You can use timeouts to handle lost/corrupted data.· I hope this helps.· Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
It's been awhile since I messed with our RF units, but for a reference, I was able to modulate Audio over a 15kHz carrier frequency with our RF units.
...So greater than 4800 should be doable, however scoping the receiver I noticed that signal deterioration seemed to be in effect on the falling edge of the pulse. In other
words a communication protocol such as RS232 that relies both on rising vs. falling signal edges might not be as practical as something like FSK which is essentially what
I was doing with Audio transmission.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
I'll point you to some RF units I've been working with (and sell adapters for). They are uniquely addressable and have buffered flow control so that the BASIC Stamp doesn't miss that data. Potentially, you could have several thousand units, each with it's own address, and since they are a fully implemented protocol, they ensure 2 devices don't talk talk at once, and use retries and acknowledgements to ensure data gets across. Not to mention 250Kbps...
http://www.selmaware.com/appbee
Sincerely,
Martin Hebel
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Martin Hebel
Personal Links with plenty of BASIC Stamp info
StampPlot - Graphical Data Acquisition and Control
AppBee - XBee ZigBee / IEEE 802.15.4 Adapters & Devices
Oh, with this issue, the devices transmit with a logic 1 and don't with 0 I believe. If you switch to using inverted data, that will take care of this issue since inverted is idled low, and non-inverted is idled high.
-Martin
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Martin Hebel
Personal Links with plenty of BASIC Stamp info
StampPlot - Graphical Data Acquisition and Control
AppBee - XBee ZigBee / IEEE 802.15.4 Adapters & Devices
Thank's for the great suggestions.
I already have them set as master and slave effectively.
The main problem I have is that I need two way comms so the bandwidth can not all be one way.
It definitely works better inverted.
I guess my question has been answered. What I was really after is some examples of code for bi-directional comms with the modules.
That said, it is still a cheap way of basic wireless comms for a mobile bot.
Thank's again.
Issy
I only mention this, because some people really DO need full-duplex communication, where they 'talk' and 'listen' at the same time. When you do this you have TWO transmitter frequencies, but the complexity of the implementation goes up. And, as I said, the BS2 doesn't support this -- so it wouldn't make a lot of sense to invest in a much more expensive system when you may not really need it.
I have my comms working really well, HOWEVER when I disconnnect the RS232 (programming) cable from one of teh stamp boards, the boards stop communicating wirelessly, even though I am only using the cable to program.
This HAS to be a common thing.
I'm doing something dumb aren't I ?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The robot is going to lose. Not by much. But when the final score is tallied, flesh and blood will beat the damn monster.
Adam Smith