SparkFun Forums 

Where electronics enthusiasts find answers.

All things pertaining to wireless and RF links
By hcker2000
#79137
I am wondering if 3 of these sparkfun wireless transmitters can all send data directly to a single wireless receiver?

I want to have multiple wireless sensors all report back to one microcontroller for display and logging.

Also with that set up is there any chance of two transmitters sending at the same time and causing problems on the receiving end?
By stevech
#79147
hcker2000 wrote:I am wondering if 3 of these sparkfun wireless transmitters can all send data directly to a single wireless receiver?

I want to have multiple wireless sensors all report back to one microcontroller for display and logging.

Also with that set up is there any chance of two transmitters sending at the same time and causing problems on the receiving end?
did you consider 802.15.4 modules? Such as Digi XBee (series 1, sold here)? With these, network addressing, multiple access to same channel (CSMA), error correction, are all taken care of by the protocol. But if the radios have to be dirt cheap, you must roll your own from scratch, in firmware. That's a long trip.
By hcker2000
#79157
Needs to be cheap so the xbee is out. Any tips on rolling my own?
By stevech
#79180
research. Research. Don't reinvent a wireless protocol that's robust.

If your link is unidirectional, you need a protocol that has some way for error correction via FEC or frequent-enough retransmission, but with error DETECTION in either case. This is minimally a half-sum but better, a simple CRC8

Projects section on AVRfreaks
PIC projects

These cheap on-off-keying radios (OOK) rely on an average voltage level at the data slicer, meaning the integrated data stream needs to have about equal numbers of 1s and 0s in sequence. Often, this is done with Manchester coding in the transmitter.

If you are just sending fixed datums, like on, off, up down, then use one of the coding chips made for this. If you are sending bytes with highly variable data, then you need the scheme discussed above - and implemented in a tiny microprocessor.

etc
By theatrus
#79183
hcker2000 wrote:Needs to be cheap so the xbee is out. Any tips on rolling my own?
You don't want to.

Xbee is one direction. nRF24 is another option if you don't mind a slightly lower level interface.

Those 433MHz transmitters are bare-bones. They simply provide a way to pass your own digital carrier over the airwaves. Transmitter control, etc, is going to be a challenge.
By hcker2000
#79201
the good news is that it will not be bi-directional and simply needs to send an ON state if the sensor detects any thing.

I could probably get by with out handling any cross talk because by nature the sensors are going to be far apart and there is very little chance of them all tripping at once.

So what coding chips are we talking about?
By riden
#79207
Holtek and others sell encoder and decoder pairs that are designed to work with these inexpensive transmitters and receivers. Have a look at the Rentron site to get you started in your search:

http://www.rentron.com/PicBasic/RemoteControl.htm
By hcker2000
#79227
Thanks very much for the link.

So I read over some of the info there as well as from the manufacturer. I did not see any thing specific about multi transmitter to single receiver.

Do the chips send a unique address bit or byte that way I would know which sensor has tripped?
By riden
#79228
The receivers and transmitters are matched by address. But, set the single receiver and all transmitters to the same address and have each transmitter "press" a different button. That should give you four or eight transmitters depending upon the chip set you buy. You do need to manage collisions between transmitters, but you would have to do that anyway, and you shouldn't have any issues with false positives.
By Philba
#79229
For roll your own stuff, use a simple protocol with a checksum at the end of the packet. if the check sum on the receive end is correct, then the packet is good. If it's wrong, then toss the packet. You'll need that for more than just your transmitters stepping on each other.

Make sure that the transmitters have random delays between sending packets. Or at least make consecutive delays different.

Wireless comm is tricky - lots can go wrong.
By hcker2000
#79232
riden wrote:The receivers and transmitters are matched by address. But, set the single receiver and all transmitters to the same address and have each transmitter "press" a different button. That should give you four or eight transmitters depending upon the chip set you buy. You do need to manage collisions between transmitters, but you would have to do that anyway, and you shouldn't have any issues with false positives.
Thats right each encoder chip has 4 or 8 input pins. So on each sensor i would use a different input is what your saying correct?
By riden
#79235
hcker2000 wrote:Thats right each encoder chip has 4 or 8 input pins. So on each sensor i would use a different input is what your saying correct?
Yes, that is right. Unless all the transmitters are on all of the time (and that would be in violation of FCC Part 15 in the U.S.), this approach should work.
By hcker2000
#79238
riden wrote:
hcker2000 wrote:Thats right each encoder chip has 4 or 8 input pins. So on each sensor i would use a different input is what your saying correct?
Yes, that is right. Unless all the transmitters are on all of the time (and that would be in violation of FCC Part 15 in the U.S.), this approach should work.
Na they will only be on to transmit if the sensor has sensed some thing. I got to thinking about it and I dont even really have to know which sensor has been tripped but it would be very nice.

Dose any one know where to get the encoder chips for cheap? I am trying to keep the cost of the sensors down so far with sensor + pic + transmitter I am at about $13 each. The chips are going to add like $5 to each one :(
By riden
#79242
Yes, the chips add about $5 each to the project, but they are actually PIC devices with firmware that has been designed to address the issues that people have discovered with these inexpensive RF links. Bruce at Rentron has worked very hard to deliver a quality product. However, if you want to use stock Holtek chips, they can be bought cheaply from Futurlec and more expensively from Digikey (and probably other U.S. distributors).
By TheDirty
#79247
For $4 you can get a 433Mhz or 915Mhz RFM12B transmitter/receiver. With proper programming you could then create a very simple peer to peer network, polling or time slicing. These modules or pretty sophisticated and if you Google them you can see some people playing with simple network protocols for them.

For no money you can simply implement manchester encoding yourself with those cheap rf transmitter/receivers you already have or 2byte -> 3byte encoding in software and skip the hardware encoder/decoder all together.

For the cheap modules I had a simple 2byte -> 3byte scheme written for my microcontroller based on white paper source code from radiotronix. Then I replaced it with code from an Arduino library called VirtualWire. It's an Arduino library, but if you google it, you can find the C source code and it's easy to adapt to any uC, all you need to do is attach it to a hardware timer set to 8x your required bitrate.