As the Nano Alarm Panel already exposes a serial interface the logical choice was to connect the Raspi using the GPIO serial port. However its being widely discussed that the GPIO 3.3v can't supply much current therefore powering the XRF board from the PI may not be possible. Instead I opted to use one of the usb ports because these should be capable of supplying up to 100mA. I used a cheap FDTI serial to usb adaptor which fortunately also had 3.3v output pins to the supply the XRF board.
The XRF powered up with any problems and there have been no stability issues with it powered from the Raspi USB port. This is probably mitigated by the fact the XRF uses a relativity low power RF MCU in the form of the CC1110, looking at the datasheet peak current consumption is less than 40mA.
The next step was to soak test the Nano Alarm Panel code which currently was just dumping the alarm sensor triggers to the serial port. I wrote some C code on the Raspi which read the serial port and dumped the sensor trigger data to a MySQL database. This was complemented with some php scripts running under to lighthttpd to view the data in a browser. The Raspi proved valuable because it allowed me to run numerous long running tests (12 to 24 hours) replacing a PC consuming 200-300 watts of power. These tests resulted in me finding a number a bugs in the Nano Alarm Panel code. Below is the sample output collected while running my tests showing the sensors triggered through a short period in the day. Collecting the sensor triggers can be useful for example I can roughly determine how long my morning runs are by the front door contact trigger.
So .... the end results are the Raspi ran 24x7 for over 8 days, collecting around 2700 data readings. Best of all this is running using a £1 ipod power adapter and min usb cable. I stopped the tests after this period so that I could continue developing as I wanted to create additional code to arm/disarm from my phone which should be covered in my next blog. Here's the uptime for the Raspi and the number of data points.
This is a great idea for the rasberry pi to intergrate an alarm system into it. I shown my friends the preview for the system but they aren't really techies and they thought it was rather useless. Hopefully stuff like this will prove them wrong, and with a bit of DIY it could probably save you a lot of money. I need to get my hands on one of these to attempt to intergrate a secure intruder alarm panel although getting it to call the police is probably going to be a problem laden nightmare.
ReplyDeleteI'm glad you like the idea for Raspi. When I get the time I will post more on the development.
DeleteWould you mind to share the source code?
DeleteI haven't worked on this for quite a long time due to little demand for it. So I have to check if I still have code or not.
Deletewell I'd guess that only now demand picks up due to availability of eve RF board for RaspberyPi from ciseco. Also this site is referenced as an example on openmicro forum http://openmicros.org/index.php/component/kunena/11-open-cc-project/967-re-nano-alarm-panel?Itemid=0#2523 and should give your blog more hits. Maybe worth to check the web statistics :)
DeleteI like what you are doing with the Raspi and would like to talk to you. Please find my contact details on my web site at ipalarms.net
ReplyDeleteThis comment has been removed by a blog administrator.
ReplyDeleteNice post ! This really helps me to find the answers to my question. Hoping that you will continue posting an article having a useful information. Thanks a lot ! this is useful article i like it.
ReplyDeletevivint review