RF-wireless communication between PICs, what are my options

Thread Starter

David Fowler

Joined Feb 11, 2016
25
This is a bit of a follow on from my last question about PIC communication...

I've got a (potentially unlimited) number of devices that need to talk to each other in a multi master setup, they could be up to 10 metres or more apart. I was planning on linking them with wires but am starting to wonder if some sort of wireless communication would be easier to implement and be more practical.

Now comes the problem, I've got no experience at all with wireless comms so am appealing to the great minds on here for a nudge in the right direction. What are my options? I've seen, bluetooth and ethernet transceivers that might to the job, there's microchips MiWi or just a straight RF Tx\Rx pair.

The only real requirements is that I want it to be as low cost as possible, I'll be sending small packets (currently only 3 bytes but that'll grow when I add in error checking, parity, start\stop signals, so say 10 bytes tops) and data transfer speeds doesn't need to be particularly quick. I've ordered a bunch of cheap RF modules from China to play with but would love to hear other peoples thoughts on my options. Any pros and cons, any gotchas that I need to look out for?

Thanks in advance guys :)
 

John P

Joined Oct 14, 2008
2,025
My experience is limited to Bluetooth. A while ago I bought some little modules, and I can report that they were cheap and I got them working, module to module and module to PC. The problem from your viewpoint would be that they give you point-to-point communication, where you have to pair 2 units and once that's done, those two units can only talk to each other. I'd be interested to hear the best way to set up a multi-unit network.
 

Thread Starter

David Fowler

Joined Feb 11, 2016
25
I was looking into bluetooth but I think it'd be tricky to make work with multiple devices.

Simple RF modules look like the simplest to setup and would take much effort to adapt my existing code although I don't know what sort of range they're likely to have without having to attach an aerial.
 

Thread Starter

David Fowler

Joined Feb 11, 2016
25
that looks like a nice little module and at that price it'd be rude not to give it a try.

Multiple receivers is easy enough to deal with, each device is going to be assigned an address (how I actually do that is another issue altogether). As for who talks next, I'm thinking either some kind of token ring or just have them listen on the channel and only transmit when there's nothing else going on. Collision detection might be a little more tricky with a transceiver rather than an Tx\Rx pair where I was just planning on having the device compare what it sent out with what it's receiver picked up, if they differ then we know something's not right.
 

John P

Joined Oct 14, 2008
2,025
You might take a look at Roman Black's "Blacknet" protocol, which involves a group of processors all communicating on a single wire. It seems as if the timing of his system would apply equally to a radio-linked design, as long as each transmitter can be turned off to allow other devices to transmit. The scheme he describes might not be what you'd want, but he explains the reasoning behind the design very clearly. Roman Black used to be active here, but I haven't seen anything from him recently.

http://www.romanblack.com/blacknet/blacknet.htm
 

GetDeviceInfo

Joined Jun 7, 2009
2,192
The nrf24l01 are pretty easy to use. Range is limited, 10 metres no problem, but the 'more' needs to defined. Bluetooth modules are cheap and easy as well. The important thing here is that you can include your smartphone as an HMI, master, Internet access, etc. Take it one step further and look at the ESP8266 wifi modules. Build a local net where many devices can join, and, you could potentially reduce other components, utilizing the modules mpu. With that being said, I'm still struggling to find a dependable development platform for this device.

Is this a biking application? Recently for a local group I had mounted strain gauges onto cranks, and along with speed, built a route profile which they analyze for training purposes. Used the nrf24 to move info up to a data logger.
 

Thread Starter

David Fowler

Joined Feb 11, 2016
25
Thanks John. I came across the Blacknet protocol a while back and was basing my ideas around it. From what I have read about the RF modules, it's a good idea to keep chatter going between the devices as if there's no transmission the recievers start to increase their gain and will pick up noise. Also they can take a while to realise that a message is being sent and focus on it, resulting in some of the early bits getting lost. My thought at the moment although I've got no way of testing until the modules arrive is to have each device send a message in turn, even if that message is just 'I've got nothing to say', with a blank slot after the last device where any new devices can jump in and introduce themselves. Problem there is how to deal with that when the controllers also have other things to be doing, I'll probably need a separate controller to deal with the communication side of things.

I'm happy to call 10 meters the max distance between devices, I can't honestly imagine that it'd go over that.

Is this a biking application? Recently for a local group I had mounted strain gauges onto cranks, and along with speed, built a route profile which they analyze for training purposes. Used the nrf24 to move info up to a data logger.
Funny you say that... This particular project is for controlling and monitoring fish and reptile tanks but I am a cyclist and have been toying with the idea of building a power meter, I assume that's what the strain gauges on the cranks are for?
 
Top