π¬ Building a wired RS485 sensor network
-
@hek I was wondering if it could be useful to have an extra sensor that a bridge between the wireless and wire network.
This bridge is made between the SPI dealing with the wireless network and the hardware serial that is dealing with the wire network.
It would allow you to connect a remote wired network.IF the CE pin for the radio (9) could be user defined, a 2nd thought (based on the bridge idea).
Canβt something similar be done for the serial gateway and make that one suitable for wired and wireless network in the same gateway? -
Cable will always be better that wireless, so if you can go with cable. I tried NRF24 but with those smd modules I can't get more than 6-7 meters. I have to try to add a longer antenna
@gohan
In some cases 'with cable' is the better option. In some cases wireless is the better option. I totally disagree with you on your statement that cable will be ALWAYS be better than wireless. that's nonsense!There are good NRF24 modules out there and there are worse variants, maybe fake ones. I've bought from several ebay stores throughout time. I found out the hard way that some perform good with a 100uF capacitor attached (the simplest variants, costing no more than $0.85), and other perform better with a smaller size capacitor (4.7uF). I get distances with these modules over more than 25 mtrs. with all kinds of obstructions (even faraday alike) in between. All it takes is some (hobby) time to find out what works best (e.g. move a node 1 meter to the left or right or align the antenna somewhat...)
I never ever modified an antenna, never needed to do so. I once bought 2 nrf24L01+-PA-LNA antenna's for wider coverage as I thought I would need that for better/wider coverage, but now, 2 years later, they still are lying around in my workshop.Maybe good to say that these distances can only be achieved with a speed set at 250 kBs and this is only possible using the nrf24L01+ modules!
If I can, I use wireless, as it is cheap, simple, and convenient, but the best reason for going wireless is that I don't need to use a cable! Simple as that.
For the sake of staying somewhat on topic ("Building a wired RS485 sensor network")...
There are occasions in which a wired (RS485) network would be the better choice. In my opinion one occasion is when you need instantly acknowledge that a command really was delivered to a node.BR,
Boozz
-
@gohan
In some cases 'with cable' is the better option. In some cases wireless is the better option. I totally disagree with you on your statement that cable will be ALWAYS be better than wireless. that's nonsense!There are good NRF24 modules out there and there are worse variants, maybe fake ones. I've bought from several ebay stores throughout time. I found out the hard way that some perform good with a 100uF capacitor attached (the simplest variants, costing no more than $0.85), and other perform better with a smaller size capacitor (4.7uF). I get distances with these modules over more than 25 mtrs. with all kinds of obstructions (even faraday alike) in between. All it takes is some (hobby) time to find out what works best (e.g. move a node 1 meter to the left or right or align the antenna somewhat...)
I never ever modified an antenna, never needed to do so. I once bought 2 nrf24L01+-PA-LNA antenna's for wider coverage as I thought I would need that for better/wider coverage, but now, 2 years later, they still are lying around in my workshop.Maybe good to say that these distances can only be achieved with a speed set at 250 kBs and this is only possible using the nrf24L01+ modules!
If I can, I use wireless, as it is cheap, simple, and convenient, but the best reason for going wireless is that I don't need to use a cable! Simple as that.
For the sake of staying somewhat on topic ("Building a wired RS485 sensor network")...
There are occasions in which a wired (RS485) network would be the better choice. In my opinion one occasion is when you need instantly acknowledge that a command really was delivered to a node.BR,
Boozz
-
@gohan
In some cases 'with cable' is the better option. In some cases wireless is the better option. I totally disagree with you on your statement that cable will be ALWAYS be better than wireless. that's nonsense!There are good NRF24 modules out there and there are worse variants, maybe fake ones. I've bought from several ebay stores throughout time. I found out the hard way that some perform good with a 100uF capacitor attached (the simplest variants, costing no more than $0.85), and other perform better with a smaller size capacitor (4.7uF). I get distances with these modules over more than 25 mtrs. with all kinds of obstructions (even faraday alike) in between. All it takes is some (hobby) time to find out what works best (e.g. move a node 1 meter to the left or right or align the antenna somewhat...)
I never ever modified an antenna, never needed to do so. I once bought 2 nrf24L01+-PA-LNA antenna's for wider coverage as I thought I would need that for better/wider coverage, but now, 2 years later, they still are lying around in my workshop.Maybe good to say that these distances can only be achieved with a speed set at 250 kBs and this is only possible using the nrf24L01+ modules!
If I can, I use wireless, as it is cheap, simple, and convenient, but the best reason for going wireless is that I don't need to use a cable! Simple as that.
For the sake of staying somewhat on topic ("Building a wired RS485 sensor network")...
There are occasions in which a wired (RS485) network would be the better choice. In my opinion one occasion is when you need instantly acknowledge that a command really was delivered to a node.BR,
Boozz
I said it's better because in terms of stability and reliability you can't beat cable and I also added that if he can use a cable to go with it otherwise wireless it's still an option, but as you said it takes time and trial and error to make good use of those nrf24 especially for the reason that there are lots of clones on the market that behave slightly differently from one another and thus adding more complexity to the project.
In addition once you have a cable you can also use it for power.
Of course cable is not the universal solution for all the problems, but if I had to choose between a wired or wireless security system I'd choose wired and if I would need to have a temperature sensor that reports data every now and then I'd go most likely wireless -
I said it's better because in terms of stability and reliability you can't beat cable and I also added that if he can use a cable to go with it otherwise wireless it's still an option, but as you said it takes time and trial and error to make good use of those nrf24 especially for the reason that there are lots of clones on the market that behave slightly differently from one another and thus adding more complexity to the project.
In addition once you have a cable you can also use it for power.
Of course cable is not the universal solution for all the problems, but if I had to choose between a wired or wireless security system I'd choose wired and if I would need to have a temperature sensor that reports data every now and then I'd go most likely wireless -
@Reza
There are many options for detecting fake radio's. For me it works best to test them in a node that has a good working radio attached (preferrably far as far away from its parent node as possible) and exchange it with the suspected fake one.There's also a thread in this forum that describes a method to test the quality of nrf24L01+ connections. It's a quality meter. I know for sure you can find this one using the search function.
By the way; about the wiring distance between a node and gateway: the fastest way to get an answer is to get multiple answers on such questions is using an universal search engine: www.google.com
-
@Reza
There are many options for detecting fake radio's. For me it works best to test them in a node that has a good working radio attached (preferrably far as far away from its parent node as possible) and exchange it with the suspected fake one.There's also a thread in this forum that describes a method to test the quality of nrf24L01+ connections. It's a quality meter. I know for sure you can find this one using the search function.
By the way; about the wiring distance between a node and gateway: the fastest way to get an answer is to get multiple answers on such questions is using an universal search engine: www.google.com
-
for wiring , is this true ?
rs485...............arduino
vcc......................5v
gnd....................gnd
DI.........................9
DE........................2
RE.......................10
R0........................8 -
for wiring , is this true ?
rs485...............arduino
vcc......................5v
gnd....................gnd
DI.........................9
DE........................2
RE.......................10
R0........................8 -
DI and DO depends on your board type.
Look at AltSoftSerial_Boards.h
DE and RE should be connected together and connected to pin,
which is defined in your program:
#define MY_RS485_DE_PIN 2 -
@Reza No. You need to have your gateway inbetween. Your controller can't "talk" directly with you MySensors network. Wee the picture from kimot.
-
@Reza No. You need to have your gateway inbetween. Your controller can't "talk" directly with you MySensors network. Wee the picture from kimot.
@wimd we can build a gateway with raspberrypi without arduino . @gohan saying true . but i have to use gpio for serial gateway because when i use a usb serial port after turn on/off or reboot raspberry can not detect my gateway... but with gpio i test and this is true, so i have to use gpio for gateway
-
@wimd we can build a gateway with raspberrypi without arduino . @gohan saying true . but i have to use gpio for serial gateway because when i use a usb serial port after turn on/off or reboot raspberry can not detect my gateway... but with gpio i test and this is true, so i have to use gpio for gateway
