Sanity check for burglar alarm project

Hi,

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.

Any input is appreciated.

Thank you.

The English translation for UNO bd is still UNO (not ONE) because that IS the name of the board.

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 :slight_smile:

I edited the original post, thanks.

Do you plan to use I2C , RS232, or RS485 ?

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.

take a look at this RS-485 - Wikipedia

and then this https://www.sparkfun.com/products/10124

Cheers Pete.

Cheers for that, I will take a look at the links.

@Pete,
So we actually do agree on something. :smiley:

Robert

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.

raschemmel:
@Pete,
So we actually do agree on something. :smiley:

Robert

@Rob

I think you may find that we agree on quite a lot eventually :slight_smile:

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.

I any case, now I found also this http://yourduino.com/sunshop2/index.php?l=product_detail&p=323 which also looks interesting.
I'll have some reading/testing to do clearly :slight_smile:

Thanks all for your input, much appreciated.

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.

Cheers Pete.

Ok this might be a really stupid question, but since I am a complete newbie when it comes to RS485 I have to ask :slight_smile:

If I use something like http://www.ebay.co.uk/itm/WaveShare-RS485-Module-MAX485-RS485-TTL-Transceiver-Module-/141181191780?pt=UK_Computing_CablesConnectors_RL&hash=item20df0e0664 how do you connect several of them together, I assume you cannot use a regular Ethernet hub?

Yes but I2C is generally for inter-board communication or between ICs not long distance communications over cables.

Partly true. Depends on the cable you use. I have used I2c through a 100 ft. coax cable with no problem.

phunqe:
Ok this might be a really stupid question, but since I am a complete newbie when it comes to RS485 I have to ask :slight_smile:

If I use something like http://www.ebay.co.uk/itm/WaveShare-RS485-Module-MAX485-RS485-TTL-Transceiver-Module-/141181191780?pt=UK_Computing_CablesConnectors_RL&hash=item20df0e0664 how do you connect several of them together, I assume you cannot use a regular Ethernet hub?

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.

steinie44:

Yes but I2C is generally for inter-board communication or between ICs not long distance communications over cables.

Partly true. Depends on the cable you use. I have used I2c through a 100 ft. coax cable with no problem.

Did you run 2 lengths then, one for SCL, SDA, and a common ground tying all the RF shielding together or another configuration ?

Cheers Pete.

Did you run 2 lengths then, one for SCL, SDA, and a common ground tying all the RF shielding together

Yes

Bainesbunch:

phunqe:
Ok this might be a really stupid question, but since I am a complete newbie when it comes to RS485 I have to ask :slight_smile:

If I use something like http://www.ebay.co.uk/itm/WaveShare-RS485-Module-MAX485-RS485-TTL-Transceiver-Module-/141181191780?pt=UK_Computing_CablesConnectors_RL&hash=item20df0e0664 how do you connect several of them together, I assume you cannot use a regular Ethernet hub?

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?

Looked at this one http://arduino-info.wikispaces.com/SoftwareSerialRS485Example

Hello again,

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.

Thank you.