Go Down

Topic: Some ideas for a domestic antitheft system... and probably more. (Read 18304 times) previous topic - next topic

Marco Signorini

Hi all. I'm thinking about use a Arduino framework to build up my domestic antitefth system... and probably to produce a new Arduino board that could be useful to the Community.
Here is a quick note of my ideas:
- Some "free" digital input/output pins and some relays on board. The input/output could be used to read window sensors and for tamper limes; It could be also used to read shutters position; A relay could be used to drive an acustic alarm, to move up/down shutters and/or turn on/off lights and so on.
- A 485 transceiver onboard. This wil be used to connect to other nodes and to the "master" node (that could be implemented by a standard Arduino/Netduino or whathever with a RS485 shield). I would like to power the board through the 485 connector.
- Compatible with most of the shields already present on the market
- The smallest possible... best would be if it could be fitted in a standard 503 box.
- Atmel onboard
- Connector for external programmer (the same used on Arduino Ethernet). I think is the best solution to save some money if a lot of units are placed in a house because the same programmer could be used for more than a unit

My idea is to have one unit for each window pairs.

I've attached a screenshot of what I'm proposing. On the board is a Atmel 328, some logic, an I2C extender. The latter was added to save the I/O pins fom Atmel so it will be possible to use them for the normal shields.

Suggestions? Opinions?

Thanks!



veseo

#1
Mar 19, 2012, 11:50 am Last Edit: Mar 19, 2012, 03:22 pm by veseo Reason: 1
Hi Marco,

nice idea, at now there is one project that I've started that provide a framework for communication and logic interaction. Is an home automation framework and from the next release will include also logic for the anti-theft.

The project is called Souliss, using this framework a network of nodes that share data and execute distributed logics is build in 50 lines of code. A JSON interface allow interaction with user interfaces client (the Android one at this link) or external supervisioning system (like Freedomotic).

As now, the communication is supported via 2.4 GHz (AT86RF230) and Ethernet (W5100) but new drivers are in development, actually Ethernet via EN28J60 and a tocken ring via RS485 are in working. One target hardware is this board.

One of the main goal of the project is build a dedicated board, for cheap and easy home automation and so also for anti-theft. It would be nice start a collaboration on this.

To read somenthing about
Topic in Home Automation forum
Topic in Italian forum
Source code on SourceForge
Souliss - Open-source Distributed Home Automation with Arduino and Android

http://www.souliss.net
Follow at @soulissteam

@veseotech

Marco Signorini

Hi Dario.

I've read the links you provided and I'm very impressed. This is something I was thinking about when I've started to develop the board presented in my previous post.
It's amazing. I'm exited to have it working on the board I'm developing.

I've attached a picture where there is a preview of the layout. I've started a first batch for a PCB prototype and it will be ready in a few weeks.
As from the previous post, the board has an Atmel 328 onboard and will be "compatible" with the most of the shields already on the market. It has a 485 transceiver onboard and an SPI extender that provides 5 generic input/output pins (routed to a screw connector) and three relays output. It has an ICSP and an external programmer connectors so people could program it through a standard AVR programmer and/or an Arduino compatible serial programmer.

It's 79,5x63mm sized... so it could be fitted on a standard 503 box (I hope... I'll be sure as soon I'll have it on my hands) or in a standard 4 modules din rail enclosure.

Thanks!

veseo

Hi Marco,

nice hear your interest in Souliss. If you want your board can became supported by the project, we have just to define the required time deadlines.

In these days we are starting to plan the hardware, we plan to have supported and official boards. Now we are starting the supporting for KMTronic DINo boards.

From the layout looks that your board allow a stackable shields, the most important is the Ethernet one, that will allow direct interaction with the User Interfaces, now an Android client, one for iPhone and the integration with Freedomotic are in working.

Some question on your boards:
1) Does the inputs are insulated?
2) Does the inputs allow powered and not powered mode?
3) Which is your target price?

As you prefer, we can start to discuss on the forum or via email.

Regards,
Dario.
Souliss - Open-source Distributed Home Automation with Arduino and Android

http://www.souliss.net
Follow at @soulissteam

@veseotech

veseo

A nice idea could be the support for RFM22 as in sparkfun shield. Could be a solderable option in order to add multiple frequencies support. It will allow wireless extension or radio remotes support.

Regards,
Dario.
Souliss - Open-source Distributed Home Automation with Arduino and Android

http://www.souliss.net
Follow at @soulissteam

@veseotech

Marco Signorini

Hi Dario.

Quote

Some question on your boards:
1) Does the inputs are insulated?

No. Inputs are not insulated. There are two type of inputs: the first are coming from the Atmel 328 and behave exactly like the pins on a standard Arduino board; the second type of inputs are coming from the SPI expansion chip so... they could be output. I mean, they are programmable lines. Is up to the user to define what type of line needs: output, input, with or without pull-up resistor.
For this reason I did non inserted any optocouple device.

Quote

2) Does the inputs allow powered and not powered mode?

I'm not sure if I correcly understood what do you mean with "powered mode". Input lines are coming from the SPI expansion chip.. so they could receive either a VDD or be grounded to VSS. They provide a programmable pull-up resistor. They could be used either with active sensors (providing 0 and 5V) or with normal pushbuttons/relay/reed contacts etc.

Quote

3) Which is your target price?

It's not yet defined... but it will be a "reasonable" price, i hope.

For what's related to the RFM22 support, the board will be compatible with the most part of the shields... so I suppose the RFM22 module could be plugged through a shield like on "normal" Arduinos.

Thanks!

veseo

Hi Marco,

I've read before the attached schematic, only now I found there most of my answers.

Going back to the discussion, in the automation field is called "powered" an input channel that supply also the attached device, otherwise is "not powered". Tipically in case of dry contacts (like pushbuttons, switches, ...) a powered input channel is required.

As per you schematic, you have to connect multiple wires in X4-1 to get the power and use as return X4-3,7 setting a pulldown resistor in the I/O extender. A clean solution could be have a dedicated supply screwed pins for each channel, but I know that this may lead to space problems.

One more critical issue may be the power supply, I saw that you use relays with 5V coil. If you have multiple boards on the same line, the required amperes to supply may became too high.
My suggestion is use 12/24V coils in order to lower the current required by the relays, futhermore a DC/DC converter will help you to avoid high temperature in the linear voltage regulator.

As result you can get a 24V capable device (as per industrial standard) and lower the overall consumption.

Last, regarding the RFM22B is a small and cheap radio that works at different frequencies. If you have space on the bottom of your PCB, you may provide the wiring and a PCB antenna. So, your board may became a wireless one just soldering the small radio on the PCB.

As result, you may interact with 433 MHz remote that are cheap and common (expecially for garage doors and similars), or use the same radio to build a wireless connection between boards and avoid (partially or totally) the wiring.

Note that Souliss yet provide bridging functionalities, but as now doesn't include the RFM22B drivers.

Regards,
Dario.
Souliss - Open-source Distributed Home Automation with Arduino and Android

http://www.souliss.net
Follow at @soulissteam

@veseotech

Marco Signorini

Hi Dario.

Thank you for your feedbacks.

Quote
As per you schematic, you have to connect multiple wires in X4-1 to get the power and use as return X4-3,7 setting a pulldown resistor in the I/O extender. A clean solution could be have a dedicated supply screwed pins for each channel, but I know that this may lead to space problems.

I'm with your opinion. Unfortunately the space left on the board is not so much so I think it's impossible to have three screw pins for each input/output. This will raise the required screws from 7 to 15...

Quote
My suggestion is use 12/24V coils in order to lower the current required by the relays, futhermore a DC/DC converter will help you to avoid high temperature in the linear voltage regulator.

You're right. Having at least 12V coils is a better solution than using 5V relays. I'm not sure if 12V relays will reduce the overall Amps taken from the DC connector (the current sink from the relays is not related to the voltage but it's something proper to the relay mechanics). Having 12V coils will helps to reduce temperatures on the onboard DC power supply. I'll investigate this solution.
Actually the board is provided with a DC linear voltage regulator with an input voltage up to 20V but it's mandatory to reduce the current drawn by the circuit to be able to run at this maximum voltage.

Quote
Last, regarding the RFM22B is a small and cheap radio that works at different frequencies. If you have space on the bottom of your PCB, you may provide the wiring and a PCB antenna. So, your board may became a wireless one just soldering the small radio on the PCB.

This will be sure an option for next board... this one is targeted to RS485.

Yesterday I was able to have the prototype working and running with the optiboot bootloader. It's amazing  :)
I'm writing a library to allow users to easily interact with relays and inputs/outputs pins and RS485.
I've attached some pictures of the prototypes.

Are you interested on test it with Souliss project? I have two prototypes in my hands. As soon I'll terminated to test them and to write the library I can send them to you ... What do you think about?

Thanks!

Marco.

veseo

#8
Apr 24, 2012, 01:31 am Last Edit: Apr 24, 2012, 01:34 am by veseo Reason: 1
Hi Marco,


I'm with your opinion. Unfortunately the space left on the board is not so much so I think it's impossible to have three screw pins for each input/output. This will raise the required screws from 7 to 15...


Yes I can imagine, space is a big constrain. Your boards are really small, nice.


You're right. Having at least 12V coils is a better solution than using 5V relays. I'm not sure if 12V relays will reduce the overall Amps taken from the DC connector (the current sink from the relays is not related to the voltage but it's something proper to the relay mechanics). Having 12V coils will helps to reduce temperatures on the onboard DC power supply. I'll investigate this solution.
Actually the board is provided with a DC linear voltage regulator with an input voltage up to 20V but it's mandatory to reduce the current drawn by the circuit to be able to run at this maximum voltage.


Yes, the rated current for the coil is bigger for lower voltages. Basically the energy required to act on the relay is the same, so lower voltages are compensated with bigger currents.
For example, if you look at this datasheet you will found that the 12V coil required almost 60% less current.

I've saw the linear regulator, but my concern is about the overall consumption where more boards will be powered from the same power supply. As you know, with a linear regulator all the exceeding power is converted in heat.

If you will really move to a 12 or 24V relays, the linear regulator shall be integrated with a DC/DC one to lower the voltage without "burn" all the power, otherwise the consumption will not raise down.

The problem of the linear regulator is that if your board require 500 mA @ 5V, the current drawn before the linear regulator is always 500 mA regardless the input voltage. So, if you power at 24V you will "burn" (24-5)*500 mW that means a supply efficiency of 25%.

I know very few components, that tipically I've saw on other boards, Texas Instrument has a DC/DC switching regulator (MC33063ADR) that is small and require some external components, you can find here the datasheet.


This will be sure an option for next board... this one is targeted to RS485.


Nice, if you are willing to revise the PCB take as option the possibility to solder on the rear the RFM22B radio. You will build a bridge and introduce remote radio and other possibility at lower price.



Yesterday I was able to have the prototype working and running with the optiboot bootloader. It's amazing  :)
I'm writing a library to allow users to easily interact with relays and inputs/outputs pins and RS485.
I've attached some pictures of the prototypes.

Are you interested on test it with Souliss project? I have two prototypes in my hands. As soon I'll terminated to test them and to write the library I can send them to you ... What do you think about?


Sure that I will!

In the project agenda there is the support for RS485, that means build a collision advoidance in the software, because Souliss require P2P.

Now the work is focused on two main jobs: including the ENC28J60 in Souliss and the Android client. The first one is carried out by me, and will allow the support of KMTronic DINo boards; the second one is carried out by shineangelic that care of user interfaces.

Is just a matter of time, I hope to end the work for the ENC28J60 in one month and later I could start with the RS485. Let me say that we can agree some dates to get the Souliss support within the market starting date of the board.

Thanks.

Regards,
Dario.
Souliss - Open-source Distributed Home Automation with Arduino and Android

http://www.souliss.net
Follow at @soulissteam

@veseotech

shineangelic


I'm not good as you with hardware and pcbs, anyway I'll support on Android client every kind of Souliss improvement with new screens and controls to make it easy, for end-user, to interact with security features.

As for now, I'll follow your talk.
twitter: @shineangelic

Marco Signorini

Hi

@shineangelic: thank you and nice to meet you!

@veseo: I've just received two days ago the components I've ordered to play with the switching DC/DC converter. As soon I'll have tested I'll try to replace the linear regulator. I've followed your suggestion and I've ordered the MC33063ADR. The only problem I can see is that it requires bigger capacitor respect a linear regulator so I'll have to understand if there will be space left on the PCB. It will also costs a little bit more than the linear regulator but it will be able to run up to 30V without problems.
I've a question for you: as you suggested I'll replace the relays with models working at 12 or 24Volts. Do you think that a separated regulator for that units should needed? My opinion is that is not required but I would like to have your feedback on that.

I think that a reasonable idea should be to propose two versions of the board working at 12 or 24 Volts. The latter would be preferred for domotics installations; the first for other standard usages. What do you think about?

Thanks!

veseo


Hi

@shineangelic: thank you and nice to meet you!


Shine is a co-founder of Soulis, it care of user interfaces and is the developer of the Android application for Souliss. I've asked him to join the discussion :)


@veseo: I've just received two days ago the components I've ordered to play with the switching DC/DC converter. As soon I'll have tested I'll try to replace the linear regulator. I've followed your suggestion and I've ordered the MC33063ADR. The only problem I can see is that it requires bigger capacitor respect a linear regulator so I'll have to understand if there will be space left on the PCB. It will also costs a little bit more than the linear regulator but it will be able to run up to 30V without problems.
I've a question for you: as you suggested I'll replace the relays with models working at 12 or 24Volts. Do you think that a separated regulator for that units should needed? My opinion is that is not required but I would like to have your feedback on that.


On my side it will not require a regulator at all, the inlet power will be 12V or 24V that is basically yet stable, so it could power directly the relays' coil via the transitor. So, you will have a direct input at 12 or 24V connected on the transistor collector.

I'm really happy that you decided to move on higher voltages, because a long line with 5V supply may result in excessive drop of voltage over the line.

The DC/DC require a filtering circuit, that why it use bigger capacitor. The MC33063ADR is used by Olimex in many of its open hardware boards, you can look at to find out some ideas on spare arrangement and circuits.


I think that a reasonable idea should be to propose two versions of the board working at 12 or 24 Volts. The latter would be preferred for domotics installations; the first for other standard usages. What do you think about?


If you found 12 and 24V relays with the same footprint and supply the relays' coil directly from the inlet supply, you shall just change the relay to get a 12 or 24V board.

Thanks.

Regards,
Dario.
Souliss - Open-source Distributed Home Automation with Arduino and Android

http://www.souliss.net
Follow at @soulissteam

@veseotech

Marco Signorini

Hi Dario.

Quote
On my side it will not require a regulator at all, the inlet power will be 12V or 24V that is basically yet stable, so it could power directly the relays' coil via the transitor. So, you will have a direct input at 12 or 24V connected on the transistor collector.


That's what I was thinking too. So we have the same opinion. Ok. I'll do like that!

Quote
I'm really happy that you decided to move on higher voltages, because a long line with 5V supply may result in excessive drop of voltage over the line


You're right. I've really appreciated your feedback. That's what I was searching from this discussion on the forum. Thanks!

Just a quick update about libraries. I wrote a library that abstracts to the input/output pins and relays and seems working fine. It's able to use some hardware feature built in the SPI expander (like enable/disable the pull-up for each input, reverse the polarity, read the "onchange" event and so on). I'm satisfied about that.
I've added also an abstraction layer for the RS485, trying to automagically generate the Tx enable with no user intervention. This last feature, unfortunately, is not completed. I've found some limitations on the arduino serial core library code that prevents the possibility to easily inherit from the serial class in order to auto generate the Tx signal. Actually I've a working set of functions (like, for example, the write(string)) but not all.. For example the writeln and write(float) is not working as expected. I know what's the problem but I'm not able to fix it without changing the arduino core library (and I don't want to do that).
I've found other users in the forum with the same problem. I'll investigate a little more when I'll have time.

I'm actually too busy in other projects so I've to stop the library development for some time.

Ciao!
Marco.


veseo

Hi Marco,


That's what I was thinking too. So we have the same opinion. Ok. I'll do like that!


Thanks nice.


Just a quick update about libraries. I wrote a library that abstracts to the input/output pins and relays and seems working fine. It's able to use some hardware feature built in the SPI expander (like enable/disable the pull-up for each input, reverse the polarity, read the "onchange" event and so on). I'm satisfied about that.
I've added also an abstraction layer for the RS485, trying to automagically generate the Tx enable with no user intervention. This last feature, unfortunately, is not completed. I've found some limitations on the arduino serial core library code that prevents the possibility to easily inherit from the serial class in order to auto generate the Tx signal. Actually I've a working set of functions (like, for example, the write(string)) but not all.. For example the writeln and write(float) is not working as expected. I know what's the problem but I'm not able to fix it without changing the arduino core library (and I don't want to do that).
I've found other users in the forum with the same problem. I'll investigate a little more when I'll have time.


in Souliss the support for RS485 will be based on custom drivers and not the Arduino ones. This let me have a stable software that is not addressed during the IDE releases and at same time I can modify the same as per my requirements.

For example, the W5100 drivers are based on the Sockets/W5100 libraries but not on the Ethernet from the IDE.

If you would like to share the problem that you found, it will let me easy do the job. I hope to end as soon the uIP integration for ENC28J60, so I will move on the RS485 side.

Regards,
Dario.
Souliss - Open-source Distributed Home Automation with Arduino and Android

http://www.souliss.net
Follow at @soulissteam

@veseotech

veseo

Hi Marco,

I know that there isn't space available, but maybe during the re-design for 12/24V operation, you may found space for the holes of a UEXT connector.

http://en.m.wikipedia.org/wiki/UEXT

You can provide just the holes and let people solder it themself if required.

This may embeed in your board nice features like IrDa or 2.4Ghz wireless.

Regards,
Dario.
Souliss - Open-source Distributed Home Automation with Arduino and Android

http://www.souliss.net
Follow at @soulissteam

@veseotech

Go Up