i just wanted to check with you experienced Arduinoers if I am tinkering up the wrong tree here or if it seems feasible.
Basically I am planning on building a complete burglar system for a fairly large house. As for the programming and tinkering part, I believe I have that covered since I do it by profession.
Now, the different sensors I am going to use will range from IR movement sensors to gas and water sensors. As far as I can tell, there's basically no point in expecting that you can have one central board and then long cables to all sensors (even if it's a good quality cable). There could be interference and I would like to be able to trust all readings not to get false alarm etc, so basically I want digital serial communication between all sensors and the central unit.
So what I've though of so far is:
1x UNO board with an Ethernet and a GSM shield.
1x Mega board.
1x micro or nano board at every sensor.
I would then connect all the sensor boards to two digital pins each on the mega for serial communication and do the same with the UNO board to communicate with that. So I would use the mega board as a central hub to communicate back and fourth with all the sensor boards and the UNO board.
Does this make sense? I am aware of the expense of having a small board at every sensor obviously, but it would still be much cheaper than a finished system and I will have so much more flexibility with this.
raschemmel:
The English translation for UNO bd is still UNO (not ONE) because that IS the name of the board.
You are right. Weird, I actually translated that without thinking about it. I'm even half Italian so you could expect me to be at least a little bit nationalistic and keep the original name
raschemmel:
Do you plan to use I2C , RS232, or RS485 ?
Well unless I misunderstood something, I can use a digital pin to do my own communication right (as long as I program for that obviously)?
I was looking at I2C, but I don't want to daisy chain the boards, I want a central hub setup. I also want the possibility to do active two way communication.
The serial link on the Arduinos is at TTL voltage levels. This is not good for long distance runs. You really should be considering a balanced line protocol like 485. This will give you better noise rejection as it can travel through a cat 5 twisted pair and cancel out noise from the line.
I was going to use digital pins for communicating (since I want to connect several peripheral Micros/Nanos to the central Mega), but I assume the problem with low voltage is the same there in any case.
With I2C you don't have to daisy chain them. One master and the rest slaves. In fact 1 or more masters and slaves. A board can be a master and a slave. Very flexible and easy to set up. I'm using this set up for a three board weather station. Also a alarm system that uses a land line phone.
steinie44:
With I2C you don't have to daisy chain them. One master and the rest slaves. In fact 1 or more masters and slaves. A board can be a master and a slave. Very flexible and easy to set up. I'm using this set up for a three board weather station. Also a alarm system that uses a land line phone.
Oh, I must have misunderstood the capabilities there then.
steinie44:
With I2C you don't have to daisy chain them. One master and the rest slaves. In fact 1 or more masters and slaves. A board can be a master and a slave. Very flexible and easy to set up. I'm using this set up for a three board weather station. Also a alarm system that uses a land line phone.
Yes but I2C is generally for inter-board communication or between ICs not long distance communications over cables. You could get some line buffers in there but that would negate the design of the system the OP is proposing.
Correct, just because it has an RJ45 connector does NOT make it Ethernet, BUT it is used so that you can use standard Ethernet cables (cat 5 twisted pair) to connect them together with.
Correct, just because it has an RJ45 connector does NOT make it Ethernet, BUT it is used so that you can use standard Ethernet cables (cat 5 twisted pair) to connect them together with.
Are you based in the UK ?
Cheers Pete.
Thanks. I live in Italy.
So basically I can make my own RJ45 hub and just wire them together? Besides the A and B wires in the RS485 I assume you connect together the gnd and vcc ones as well?
so I've been reading some more and unless I misunderstand the recommendations and specs for RS485 and I2C, they are not suitable for a star topology, only a bus setup due to termination and reflection issues.
So how should one go about when a star layout is actually needed? I mean having a bus layout when it comes to a burglar alarm isn't really feasible. You will have one central somewhere and lines coming in to it from various places.
As mentioned, I will have Minis at every sensor and connecting those to the main Arduino is the problem. I don't mind using one digital port for each and every mini, I can use more than one Arduino in the central if needed.
But even with this setup, by default the voltages won't be enough for 10-20m cables (even if it is digital).
Is there anyway of amplifying the digital communication for this purpose?
I don't mind programming the system so I have each mini on a set of different pins. In one way it's actually nicer, so I can communicate back and fourth with them individually without issues.