from research and a bit of help i've decided that I'm using RS485 protocol for daisy chaining my sensor network for home automation and now I need a bit more help
Requirements for project:
Ability to have 100 sensors/devices (32 is OK for starters)
Total sensor network range of around 50-100 meters
Ability to use shielded cables
No more than 10€ per sensor for communication modules
Using only 1 daisy chained cable
Raspberry Pi as control unit, Arduinos as sensor nodes
Ability to support whole bunch of sensors such as:
-DHT22 temp/hum
-HC-SR501 motion sensor
-Photosensitive Light Sensor
-8 channel relays
-4 channel relays
-Float water level sensors
-water flow sensor, and so on...
I have concluded that RS485 is ideal for my requirements
What about solid state relays, how to get those working with RS485, I suppose 1 at the time would work? I suppose it is just problematic when there are many relays together on board.
Which type of connector would you use for ease of use? I might do this for a couple of friends of mine, so i want cables to connect to some nice plugs so that we can move sensors around if we want. I was potentially looking for XLR microphone cables or some other microphone cables. They have standardized jacks and are shielded
I havent quite figured out how to daisy chain these sensors together. Would i need 2 of MAX485 modules per sensor or what do I need?
I am buying these following items... Have I missed something?
Any help whatsoever is greatly welcome.
Im basically trying to do something similar to Growtronix, which daisy chains sensors for agricultural environment, for growing vegetables
For a beginner and with something as complex as this, the most important thing is to use devices that come with comprehensive documentation and example code specifically for the Arduino/Raspberry Pi.
While places like Aliexpress and Ebay are cheap, often the documentation is lacking, out of date or has just been copied from some other product. These sellers offer little, or in most cases, no support for their products.
It's very easy to end up with a bunch of hardware that sits in a shoe box for several years because you don't have knowledge to be able to use it.
Cheap cable is often cheap because it has been made with substandard materials, for example replacing the copper with aluminium or copper plated steel. If the specs are minimal or missing, steer clear. For example, the cable you link to doesn't say if it's twisted pair, give the DC resistance or impedance.
Think big, but start small.
Buy a small number of parts from a reputable supplier then see if you can get two arduinos, or a Raspberry Pi and an Arduino to reliably talk to each other over a half duplex RS485 cable. Add another Arduino and suddenly you realise that things are a lot more complex than you first realised.
That cable isn't twisted pair, but it would do for testing over short distances (like across your desk) if you don't have any other crappy cable/wires floating around.
There are some other issues. Are you planning to supply power to 100 nodes via that size cable? That limits you to an average of 10mA per node. The relays in the link you provided take 30mA each when energised.
If you want to actually daisy chain then you'll need 2 sensors per node. Potentially you could hang more than one device off the comms bus, datasheet suggests 32 devices: http://datasheets.maximintegrated.com/en/ds/MAX1487-MAX491.pdf
But who knows what's in the USB converter, it may not work well with 31 other devices.
I won't mention isolation... (non of that kit has any, one false move and potentially the whole lot is knackered, tell me, what voltage are those relays switching? Wire falls off and hits the comms cable scenario...)
I don't have 30 locations in my house, let alone 100! I'd go for local sensor hubs, perhaps using RS485 for local sensors, then Ethernet/wifi back to the main controller from each hub. Obviously you'd need localised power for each bub, but at least the hubs would be isolated from each other in the event of a disaster.
Whichever route you take, you might want to consider how you will identify the sensors at the controller (location and what sensor it is).
yes you guys are right, im getting a bit ahead of myself with cables and connectors... I will just use PC power cables whom I have plenty at home to create RS485 bus, they are 1 meters in length, and i will solder them together and between each one i will put sensor node for testing purposes. Either crocodile clips or i'll solder them. I just really hate breadboarding stage, I'm a perfectionist, I hate seeing all those ugly jumper wires everywhere so I like to skip it... and sometimes it works, sometimes it obviously doesn't.
nono. I wouldn't supply power to all 100 nodes from 1 cable. But to 32 nodes, that is a possibility. I dont have 100 locations in my home either, but I will maybe fill it up to 20, but i just want to have possibility of potentially going for more later on If i change places... and that is possible with RS485.
relays have external power supply of 220v and also AC-DC step down regulator to power relays switching. So power requirement of them on RS485 bus I think would be less than 30mA, will need to check that.
I know that 1€ usb adapter sounds very fishy... so thats why i've been also looking at 9€ RSB485 USB adapter and 12€ RSB485 USB adapter
I'll look into some of more reputable sites also such as adafruit etc... but their stuff is several times more expensive.
For library I already said that im using nick gammon's library which is at bottom, that rolling master tab... seems really good.
My plan for right now is to buy 1€ usb RS485 adapter and also either 9€ one or 12€ one too.
Then im also buying 10x MAX485 for starters...
Arduinos will all be powered locally from a nearby power-adapters for starters. I got plenty 5+ volts ones
I'm also buying 5 arduino nano's... I have a few arduinos already, but a few more wont hurt anyone