I have a project requiring one master and several "slave" devices

veewee77

New Member
Hello!

I have a project (I can't disclose what the project actually is due to NDA requirements) where I will have a central computer (likely a Raspberry Pi, eventaually, but probably a PC to start with) that needs to talk to several slave devices, over a wireless link up to about 500 feet. Each slave device will be sensing data and sending the data back to the master in real time and based on the sensed data at the slaves, the master sends control data back to the slaves.

Example: Say you have water level sensors on several pools of water. You have a master computer that talks via rs232 wirelessly to each sensor at each pool and if the level is over a certain amount, the master tells the slave to stop the pump filling that pool.

There could be any number of slaves (in my project, 10 to 15).


I was thinking of using the RFA020 module for the comm, but I have no idea how to make them "adressable" or whatever so that I only need one RFA020 unit on the master and each slave have it's own RFA020 unit.

Can anyone point me in the right direction with this?

Thank you for any assistance in advance.

Doug
 
Last edited:

veewee77

New Member
Thank you for the info. I will look into the xBee and see about them, however, my actual project has nothing to do with ponds and water, and will need to be mobile and inexpensive to make. I was thinking of using the RFA020 for the wireless connection mainly due to the cost to purchase. Each "set" of my project will have one master and at least 10 slaves so at the $45 the xBee costs, that will be an expensive proposition just for the comm part of it. $495 just for the comm part of the set. Opposed to the RFA020 which can be purchased for around $20 bringing that part of it down to $220 per set of one master and 10 slaves. Could be that the xBee is easier since using the simple serial connection afforded by the RFA020 would mean I would have to devise some kind of addressing scheme for listening and talking to each slave independently, in a round-robin fashion. Not out of the question. Thank you for your reply! Any ideas I hear will help!
 

BESQUEUT

Senior Member
Xbee 2mW costs only 23$ and range is very similar to RFA020 range via line of sight.
But you cannot expect such range in real live !
If you really need 500 feet, with walls and noise (from the pump motors...)
the specifications would be at least 1000 feet !

But depending on your topology, a 2mW Xbee can deal with 200 feet actual range or less because it's a mesh network.
Doing that with RFA020 is a lot of work !

Xbee have TX and RX buffers. I do not know for the RFA020.

You can at least read the user manual for the xBee : even if you chose to do it yourself, you will read a lot of specifications of interest for your project.

How often do you expect to send data ? How many bytes do you send each time ?
You will need a checksum to ensure that data are not corrupted.
 
Last edited:

srnet

Senior Member
Can anyone point me in the right direction with this?
Yes, you need to be a great deal more specific on exactly what you mean by '500 feet', its a completly meaningless requirement unless the environment is known.

Few people appreciate the enormous differance there is between line of sight communications (where the TX and RX have nothing in the way between them) and a typical Urban situation where buildings and the like get in the way.

The difference really can be as much as 1000:1, in that a system capable of 100m comunication across a typical urban area, it likely good for 100km where there is good line of sight.
 

BESQUEUT

Senior Member
The difference really can be as much as 1000:1, in that a system capable of 100m comunication across a typical urban area, it likely good for 100km where there is good line of sight.
It depends from the wavelength.. . For indoors 900 Mhz is better than 2,4 Ghz
Here, Firemen are working with 40 Mhz to be able to communicate within buildings...

With 11 transmitters, there is chance to build a network with short jumps. But studying that needs a map...
You can mix pro and regular Xbee to optimise costs.

With RFA020, you cannot use a good antenna...
 
Last edited:

srnet

Senior Member
It depends from the wavelength..
It does, but the user was asking about 433Mhz to 915Mhz modules, which was the context of my answer. The Preformance of these types of modules is similar and will approximate to a 1000:1 rule.

Of course one can make assumptions about the intended setup, but for meaningful answers as to what is suitable, you really do need to know the environment in which the system will be used.
 

srnet

Senior Member
My actual project has nothing to do with ponds and water, and will need to be mobile and inexpensive to make. I was thinking of using the RFA020 for the wireless connection mainly due to the cost to purchase
More details would help, remember people on here are giving you advice for free.

This sounds like a commercial product, and if its to be in volume, then there are significant benefits in using very low cost modules (circa $4 each) even if these require more effort on the software side.
 

Goeytex

Senior Member
I was thinking of using the RFA020 module for the comm, but I have no idea how to make them "adressable" or whatever so that I only need one RFA020 unit on the master and each slave have it's own RFA020 unit.
Forget about them. They won't have the necessary range and they are the wrong frequency for USA. 433MHz is NOT an ISM band in USA. Since you have an Non Disclosure Agreement with a client, I will assume this is a commercial project and that you are getting paid not to make mistakes like using an illegal RF frequency or an illegal power level. 433MHz and 868MHz will be illegal for your app here in USA.

Addition: Unless REV-ED offers these RFA020 modules hardware optimized for 915 Mhz there will be a performance hit of several DB when these are programmed for 915 MHz. 500 feet may be doable even with with the degraded performance but I cannot vouch for that. It depends upon if the chip antenna and other parts (filters) are optimized for 868MHz or 915MHz. It can't be both. (Technical please advise.)

Also the chip antenna may not be ideal for LOS operation, depending upon the location of the modules and obstacles such as walls, trees, etc.

To be legal here in the USA, you should be probably be looking at either 915Mhz or 2.4Ghz. And has been noted by others we need more details bout the operating environment such as are there walls to penetrate or will the RF be line-of-sight?

IF for a one-off project I would suggest using Smart RF modules with an RS232 interface. These have a microcontroller on board to interface between the PC and the RFIC or between a microcontroller and the RFIC. They drastically simplify code but are "expensive" relative to a "front end module". These cost between about $15 to $30 each depending upon source and brand.

A front end module is the same as above without the microcontroller. These are typically configured via an SPI interface and are complicated since you must write the code to program the RFIC registers and control the RF transmission and reception. But they are cheaper at about $6 to $12 each.

Unless your client is a cheapskate, I would use the smart modules. These can be purchased from several sources and include Hope RF and Dorji RF and possibly the RAF020 from Rev_Ed. If your client balks at the cost of the RF devices, explain that he will save tens to hundreds of hours in programming cost. (You are charging a decent rate?) If he still balks, I would walk away from the project as you will either get stiffed or end up with something you may not want your name associated with. .

The link below is an example of a very nice RF Transceiver module with RS232 interface.

http://www.hoperf.com/rf/data_link_module/HM-TRLR-D.htm

Edit: If you chose to use "front end modules" and program the Picaxe to control them via an SPI interface, you will need to use a Picaxe 20X2 or higher in order use hardware SPI.

You will also find that sourcing a 915 MHz front end module nearly impossible on Ebay as these are all optimized for 433 MHz which is illegal in USA except at the very lowest of TX power ( not enough for 500 ft).

Here is a USA source for 915 MHz Front End Modules

Embedded Wireless Solutions

You may want to give these folks a call for advise on acceptable USA Frequencies and modules suitable for your application. Ask for Beau Roodell

Correction: Dorji does not yet understand the USA market and only offers 915MHz optimized modules if you order in bulk. However 868MHz modules will work at 915, but again with somewhat reduced performance. But at 20dBm TX power 500 ft should not be a problem.

DORJI RF

Dorji Ebay Store
 
Last edited:

veewee77

New Member
Yes it is a commercial product. What kind of serial comm modules are there that will go that far for $4 each? the RFA020 is the least expensive I could find.
I am sorry but I cannot get too specific with the actual application since anyone listening who knows more than I do could steal my idea before I even get it off the ground.
There will be a central controller, with up to 12 slave devices that react when something happens and send back a status report. The controller then decides what to do with the report.
There will be 4 bytes each transmission, and I hope to be able to use an interrupt driven system so that they aren't all talking unless spoken to. I think I have that part worked out hence the three bytes. One is escape, one is the address of the device, one is the status and the last is the address of the controller (in case there were more than one controller, future expansion). All devices use the same dataset for control and reporting.
 

veewee77

New Member
Addendum: I have done some more research and would like to be able to do communication based on this example only using RF instead of the single wire with ground. Is this possible?
Here is the example:
http://letsmakerobots.com/content/inter-picaxe-serial-communication

My project is not robotics, but that is what I would like to be able to do. One master and a number of slaves.
Thank you all for your input! This project is coming along. I did a lot of the programming this weekend, based on being able to use this method over a serial RF link. If not, I will have to back up and punt.

The NDA I am under is self-imposed. I am partnering with another guy. It was his idea, but I am developing it and we are equal partners in it. This is why I cannot be too specific about what I am doing.
 

techElder

Well-known member
I am sorry but I cannot get too specific with the actual application since anyone listening who knows more than I do could steal my idea before I even get it off the ground.
:) :) I sure wish I had some money for every time I've heard that line! (Even from myself!) :) :)
 

hippy

Technical Support
Staff member
What kind of serial comm modules are there that will go that far for $4 each?
$4, £2.64, E3.65 seems quite a low figure for what you are looking for. Lowest costs usually come from economies of scale so committing to a million pieces will usually get the cost down from buying just a dozen or so. It usually also becomes a 'whole item' cost issue rather than individual component pricing.

Probably the best people here can do is offer suggestions for what they know is available and then it's up to you to see if suppliers can deliver those at the price you are seeking.
 

srnet

Senior Member
What kind of serial comm modules are there that will go that far for $4 each?
I doubt you could get a serial module for that, I never said you could.

There are Si4432 modules readily available delivered in one off Qs for $3, I cant imagine how low a volume price would be, $1 maybe ? Si4432s are not serial, but if the product is produced in volume then it may be worth the extra effort to drive them with a PICAXE, which is actually not hard at all.
 

srnet

Senior Member
Never tried... but exist...
I tried, my max distance with a handheld yagi on the receiver, dipole on the transmitter, 100mW, 1200km.

Good line of sight on Earth, tuned 1/4 wave wires, 10mW (UK Limit for ISM stuff), expect around 12-15km.
 

Goeytex

Senior Member
What kind of serial comm modules are there that will go that far for $4 each?
$4 is an unrealistic RF Modules price target for your application. You can get good RF "front end" modules for about $8-$10 each. These are Serial SPI not Serial RS232. You will need to write the code to program the registers. The code is not trivial and success will depend upon your understanding of the RFIC Datasheet(s) and your programming skill.

Suggest you look at HOPE RF Modules as these are generally compliant to US regulations. Something like the HopeRF RFM63W (915MHz) should work OK.

Another option is to order a pair of CC1101 (868/915) modules from Ebay for evaluation. They may reach 500ft Range LOS.

Remember that 433MHz is not an ISM band in the USA. It is a HAM ((repeater?) band and you need a HAM license to operate in this band at other than microwatt RF Levels.

Your final product, if for sale in the USA, will need to be FCC Certified. This costs about $3,000 to $5,000 US. You may be able to get around that if you offer the final product at as a Kit. I am not an attorney so seek proper legal advise before committing to final production. You do not need FCC Certification for R & D, however RF TX levels should be kept to a minimum while doing proof of concept, & testing and evaluation. Only use TX power levels sufficient to reliably test the system.

If your product is successful and there is a real market for it, it is likely that your idea will be stolen anyway, (even if patented,) as many overseas opportunists overtly ignore intellectual property rights and work with legal impunity. Witness the many fake/counterfeit chips/products that continue to be sold on Ebay and Alibaba/AliExpress with apparent impunity.

On another note. we all want to keep costs down on our projects, however if "cheap" is your main specification, it is unlikely that your final product will be very successful.

Contact me via Private Message if you want more info.
 
Last edited:

srnet

Senior Member
Suggest you look at HOPE RF Modules as these are generally compliant to US regulations
Glad you agree, the Hope RFM22B, is available in a 915Mhz, and has been a very popular RF module for quite a while.

One off prices are in the $4-$5 range.
 

Goeytex

Senior Member
Here is a Link to Hope RF (USA Distributor) This shows available modules and prices for 915Mhz modules.

http://www.anarduino.com/?cid=5

The HM-TRP 915Mhz RF FSK Transceiver is Rs232 Serial enabled which will drastically reduce programming and development time. Priced at $8.40 Each.

The RFM69HCW-915S2 and RFM69HW-915S2 are both front end modules priced right at $4 each. Will require programming via SPI.


The RFM22B (915) is not listed. As I understand it, the Silabs Si4432/31 RFIC is being phased out and is no longer recommended for new designs, Therefore future supply may not be available. Too bad because this is it a nice RF chip with a wide RF Frequency range and is the one I cut my teeth on.

However the 868 version is available and can be programmed for the 915 band with only about a 2 dBm loss. So 500ft LOS should be no problem at all.
 
Last edited:

srnet

Senior Member
As I understand it, the Silabs Si4432/31 RFIC is being phased out and is no longer recommended for new designs, Therefore future supply may not be available
Yes, Si have been saying that for a while. They seemed to want to force people to use the RFM69 instead, but that device is a complete and utter PITA to program, so they have likely miscalculated the demand for the Si4432, which still seems to be readily available.
 

veewee77

New Member
Ok.

So all of these posts are great. But I am a newbie, here and need something that works, connected to and 08M2 and I don't have to do a lot of dickering with to make it work. I looked at HopeRF's the RFA020, and several others. If anyone has some they are actually using in a point-to-multipoint and has wiring diagrams and sample code, that would be the best help available. I am not looking to just sponge here. I am just at a loss as to what to use and how to use it.

Thank you to all for your assistance!
 

techElder

Well-known member
... don't have to do a lot of dickering with to make it work.
But that's what we do here!

You won't find any ready-made solutions laying around these forum walls. Perhaps at the big box store?
 

hippy

Technical Support
Staff member
Using serial master to slave comms should be fairly easy. You could start by identifying slaves as "A" to "Z" and then send a slave ID plus a one byte (letter) command from the master to instruct that slave to do something, a start of packet, end of packet indicator and a bit of error detection won't go amiss.

So, say "A" and "Y" turns a LED on for slave A, "A" and "N" turns it off, the following should have the slave flashing its LED ...

Code:
Master:
  Do
    b0 = "A" : b1 = "Y" : SerOut TX_PIN, TX_BAUD, ( "[", b0, b1, "]" ) : Pause 1000
    b0 = "A" : b1 = "N" : SerOut TX_PIN, TX_BAUD, ( "[", b0, b1, "]" ) : Pause 1000
  Loop
On the reciever side, that can either be pre-programmed to accept commands only to A or read which slave was addressed and only accept things for A ...

Code:
Slave:
  Do
    SerIn RX_PIN, RX_BAUD, ( "[", "A" ), b1, b2
    If b2 = "]" Then
      Select Case b1
        Case "Y" : High LED
        Case "N" : Low  LED
      End Select
    End If
  Loop
Code:
Slave:
  Do
    SerIn RX_PIN, RX_BAUD, ( "[" ), b0, b1, b2
    If b0 = "A" And b2 = "]" Then
      Select Case b1
        Case "Y" : High LED
        Case "N" : Low  LED
      End Select
    End If
  Loop
That's a simplistic example to show the principles. It is usable as is but you would probably want to expand on that to suit what data you actually need to send.
 

veewee77

New Member
Thank you

Thank you for this. I have a system worked out for communication in a wired network but your examples gave me some ideas for improvement.

My system uses a one-wire (plus ground) setup to do comms. It works great and the devices are all addressable. What I need now, is to make this setup work over a serial wireless connection. It looks like I am not going to be able to utilize the one-wire approach with the wireless modules. I will be doing some testing to see if I can get a workable solution using two wires (plus ground) but not sure how to do the interrupts that way.

Still plugging along. . .

DS

Using serial master to slave comms should be fairly easy. You could start by identifying slaves as "A" to "Z" and then send a slave ID plus a one byte (letter) command from the master to instruct that slave to do something, a start of packet, end of packet indicator and a bit of error detection won't go amiss.

So, say "A" and "Y" turns a LED on for slave A, "A" and "N" turns it off, the following should have the slave flashing its LED ...

Code:
Master:
  Do
    b0 = "A" : b1 = "Y" : SerOut TX_PIN, TX_BAUD, ( "[", b0, b1, "]" ) : Pause 1000
    b0 = "A" : b1 = "N" : SerOut TX_PIN, TX_BAUD, ( "[", b0, b1, "]" ) : Pause 1000
  Loop
On the reciever side, that can either be pre-programmed to accept commands only to A or read which slave was addressed and only accept things for A ...

Code:
Slave:
  Do
    SerIn RX_PIN, RX_BAUD, ( "[", "A" ), b1, b2
    If b2 = "]" Then
      Select Case b1
        Case "Y" : High LED
        Case "N" : Low  LED
      End Select
    End If
  Loop
Code:
Slave:
  Do
    SerIn RX_PIN, RX_BAUD, ( "[" ), b0, b1, b2
    If b0 = "A" And b2 = "]" Then
      Select Case b1
        Case "Y" : High LED
        Case "N" : Low  LED
      End Select
    End If
  Loop
That's a simplistic example to show the principles. It is usable as is but you would probably want to expand on that to suit what data you actually need to send.
 

Jeremy Leach

Senior Member
In your original pool example, the slave would know if the water level was too high so wouldn't need the master to tell it to stop filling. So I'm just questioning, based on your pool example (which I know isn't the real system), if there really is a need for two way comms between master and slaves if the master is just gathering report data and the slaves have in-built logic? Plus there isn't necessarily a need for handshaking between master and slave for the slaves to all transmit - just need some randomness in transmissions to avoid clashes plus checksums to detect when there was corruption.
 
Top