rpiforfun
Posts: 28
Joined: Wed Jan 15, 2014 11:25 pm

Security Camera project completed

Wed Jan 15, 2014 11:31 pm

I'm interested in building a security camera "robot" as my first project. At this time I'm reviewing the possibilities, primarily using arduino or raspberry pi. I've also review COTS products, but I'd rather play a bit more. :) Below is my project specs and Raspberry Pi outline. I'd like to get your feedback please on the specs below and help me (a total noob at this) make sure I am getting compatible parts as well as spending money wisely.


And the #1 answer I need - Is this a realistic project for Raspberry Pi that will not provide a weak solution? Just because it can function isn't what I'm after, I really want a very robust solution.

Big picture:
I feel strongly that cameras are the path to the smart home. All these cute wrist sensors and tags are all fads. They may work, but I am not tagging every item in my house. Cameras and processing of the related imaging is where the future lies. This project is the first of many I hope to take on. Instead of putting smart things in the house, you need to make the house smarter.

Personal infoz:

* Can't solder, don't want to start with that. I hope this project can be done without solder
* Rent my place so no physical bldg changes allowed.
* Info Tech, so computers, linux and writing some code aren't a huge deal.
* I have no clue about arduino or Raspberry Pi really yet.


Tech infoz:

* No power source near main door.
* Power source ~15ft away, with small shelf for the kit.


General concept: Guard bot, capable of seeing activity occur around it and responding to it.


Goals:

* Identify the residence door opening and/or someone entering.
* Email me screenshots/video/voice data. (needs to be some type of wireless)
* Disable monitoring if I am home. (detect phone via bluetooth)
* optionally - Vocalize a response. Probably a phase 2 idea.
* optionally - Prompt for identification from a moving object. Probably a phase 2 idea.


Raspberry Pi parts:

* Rasberry Pi examples
- http://www.codeproject.com/Articles/665 ... nce-camera
- http://through-the-interface.typepad.co ... art-2.html
* OS expected: Raspbian
* FYI: I've already done a POC on my Ubuntu system for the camera work using motion and some scripts. Its not finalized but it gives me confidence in a RPi solution.

* Raspberry Pi Model B board - $40
- http://www.adafruit.com/products/998
--- (or optionally) CuBox-i1 board - $50
* Miniature WiFi (802.11b/g/n) Module - $12
- https://www.adafruit.com/products/814
* Raspberry Pi Camera Board - $30
- http://www.adafruit.com/products/1367
--- OR Logitech HD Webcam C270 - $20 - http://www.amazon.com/Logitech-Webcam-W ... B004FHO5Y6
* 5V 1A (1000mA) USB port power supply - $6
- http://www.adafruit.com/products/501
* Adafruit Assembled Pi Cobbler Breakout + Cable for Raspberry Pi - $8
- http://www.adafruit.com/products/914
* Pi Shell - Clear Raspberry Pi Model A or B Case - $10
- http://www.adafruit.com/products/1140
* Adjustable Pi Camera Mount - $5
- http://www.adafruit.com/products/1434
* PIR Motion Sensor - $10
- http://www.adafruit.com/products/189 OR https://www.sparkfun.com/products/8630
* HDE 7.1 Channel USB External Sound Card Audio Adapter - $3
- http://www.amazon.com/Channel-External- ... 0027EMHM6/
* USB to TTL Serial Cable - Debug / Console Cable for Raspberry Pi - $10
- http://www.adafruit.com/products/954
* Adjustable Pi Camera Mount - $5
- http://www.adafruit.com/products/1434
* Breadboarding wire bundle - $6
- http://www.adafruit.com/products/153

optional USB power:
* Anker Astro 3E 10000mAh Dual USB Backup External Battery Pack - $40
- http://www.amazon.com/10000mAh-Smartpho ... B009USAJCC



Total cost: $145 + shipping

Total cost with USB battery power: $185 + shipping
Last edited by rpiforfun on Sat Jan 25, 2014 10:42 pm, edited 1 time in total.

rpiforfun
Posts: 28
Joined: Wed Jan 15, 2014 11:25 pm

Re: Help please - Security Camera project feedback

Sat Jan 18, 2014 4:51 pm

Bump - any chance for some feedback here? I'm mostly trying to avoid spending $150 to find out the hardware requires soldering or is incompatible.

User avatar
FLYFISH TECHNOLOGIES
Posts: 1750
Joined: Thu Oct 03, 2013 7:48 am
Location: Ljubljana, Slovenia
Contact: Website

Re: Help please - Security Camera project feedback

Sat Jan 18, 2014 5:05 pm

Hi,
rpiforfun wrote:Bump - any chance for some feedback here? I'm mostly trying to avoid spending $150 to find out the hardware requires soldering or is incompatible.
I guess nobody cares about your shopping list...

However, here are quite some people who can (and will) help you if you have exact technical-related questions. Additionally, you can drastically increase the chance to get answer here AFTER uncle Google gives up.


Best wishes, Ivan Zilic.
Running out of GPIO pins and/or need to read analog values?
Solution: http://www.flyfish-tech.com/FF32

rpiforfun
Posts: 28
Joined: Wed Jan 15, 2014 11:25 pm

Re: Help please - Security Camera project feedback

Sun Jan 19, 2014 3:15 pm

well...thanks for the response. I'll avoid asking for too much in the future, don't doubt that.

The purpose of this thread is mostly moot as I feel confident enough with my own googling over the past week to pull the trigger on the order. Not to mention the hours put in on the POC on my Ubuntu system.

Thanks everyone!

kyb
Posts: 11
Joined: Wed Mar 28, 2012 11:33 am

Re: Help please - Security Camera project feedback

Sun Jan 19, 2014 8:56 pm

Ahh, does it have to be a "self moving" device?
I'm doing something similar (not finished yet, though).
You could mount the Pi and its camera on the wall opposite of the door. To power it you could use a cheap PoE-Injector, which would take care of your wall outlet problem. You would only have to find a route for your LAN-Cable, which also adds to the aspect of reliability over a WLAN connection.
If you don't want to solder, you could use the modules from Tinkerforge for motion detection, which don't need soldering and are easy to program in almost any programming language of your choice.

Such a setup is much simpler than your moving one. Such an installation is also removable without leaving traces (after a repainting of the walls).

rpiforfun
Posts: 28
Joined: Wed Jan 15, 2014 11:25 pm

Re: Help please - Security Camera project feedback

Sun Jan 19, 2014 9:25 pm

Thanks kyb! I am NOT looking at a mobile platform for this. I agree it is much simpler that way. My usage of "robot" was misleading. It;s a computer watching my door. I hope to add on audio output and feedback eventually.

My (expected) next project will probably be a autonomous roaming rover to charge itself and provide a security cam as well. I've just realised a possible issue with the idea - open windows will show "change" (as will rover movement) . Currently not something I have to concern myself with. That project looks like it will take me a year. :/ This one I hope to be done this time next week. :)

rpiforfun
Posts: 28
Joined: Wed Jan 15, 2014 11:25 pm

Re: Help please - Security Camera project feedback

Sat Jan 25, 2014 10:42 pm

My security camera project is finished. As expected the software migration from my ubuntu POC to the raspberry pi wasn't too difficult. This could be useful for folks who want to dabble first. The packages I selected on Ubuntu were general avaiable on the OS I chose for the Raspberry Pi (Raspbian).

I'm not providing copies of my scripts as they are simply hacks of the scripts already out there. It does seem that everyone has their own needs and so you will end up pulling from a few different places to build your design.

My biggest design element was using mutt so I could have multiple email attachments from the files in a directory. There are probably many ways to solve this, but none of the examples worked as easy as this. I was hoping to have a python script or two here. :)

SpyPi (or PiSpy or you like)


Project update:
To be clear, I now effectively have two of these, one running from my ubuntu desktop which I leave on 24/7 anymore. That runs in one of the rooms in my place. Each run independently.
I've removed the hub as I had no need for it when deployed.
I've mounted it on my wall, which changes the video aspect ratio to vertical, which is better for my usage.

Image

Image

Other improvements planned/desired :
- script to verify that motion is functioning. Had something on ubuntu, just need to tweak and setup on SpyPi
- improved video resolution and speed (as folks figure it out)
- night vision capability (probably replacing the camera with the noir version for $30) and buying several IR leds with a small rig to flood, then turning them on with a schedule.

Hardware Requirements:
  • Raspberry Pi Mobel B
    Case for Raspberry Pi
    Pi Camera Mount
    Raspberry Pi Camera Board
    SD Card ~4GB
    4 port self powered USB hub with power brick
    usb cable for the raspi power to regular hub port
    usb cable for the raspi to hub port connection
    + usb wall jack
    + usb cable for the raspi power to usb wall jack
    Bluetooth usb dongle
    Wifi 802.11n usb dongle
Hardware cost: ~$105 plus plus tax and shipping


Software requirements:
  • OS: Raspbian
    Email: mutt
    Motion detection: motion-mmal (variant of motion)
    Scripts:
    - Bluetooth detection script determines if my bluetooth device is present, enables motion-mmal if not, kills it if I arrive. Runs as cron
    - media uploader/email script looks for media in the output folder and sends all files found as email attachments using mutt. Runs as cron
    Libraries/apps needed:
    - mutt, bluez, python-gobject, bluez-utils
    - For motion - libjpeg62 libjpeg62-dev libavformat53 libavformat-dev libavcodec53 libavcodec-dev libavutil51 libavutil-dev libc6-dev zlib1g-dev libmysqlclient18 libmysqlclient-dev libpq5 libpq-dev
Last edited by rpiforfun on Sat Jan 25, 2014 10:46 pm, edited 1 time in total.

rpiforfun
Posts: 28
Joined: Wed Jan 15, 2014 11:25 pm

Re: Security Camera project completed

Sat Jan 25, 2014 10:45 pm

by shuckle » Sat Jan 25, 2014 2:42 am
Did you manage to get it work in low light? In the night in other words.
Not really. I am not too concerned about it, but I will be building out my list of enhancements. Night-vision may well be one. Looks like the noir camera model could be useful. I didn't buy it though :(. Wasn't sure if it would affect regular usage which was more of my usage concern.

Other improvements planned/desired :
- script to verify that motion is functioning. Had something on ubuntu, just need to tweak and setup on SpyPi
- improved video resolution and speed (as folks figure it out)
- night vision capability (probably replacing the camera with the noir version for $30) and buying several IR leds with a small rig to flood, then turning them on with a schedule.

HeroS_NL
Posts: 17
Joined: Mon Nov 04, 2013 10:07 pm

Re: Security Camera project completed

Mon Jan 27, 2014 3:34 pm

I have quite the same project running as what you have. I use wifi to check for my phone's MAC Adress instead of bluetooth. Also I use pushover to send notifications to my phone if the system is armed or not. For uploading the media I use the MEGA service.

I am also running motion-mmal but it cannot provide me smooth video's. If you have a solution for I am glad to hear it! (you can pm me if you know it!) Using 480p recording.

Return to “Automation, sensing and robotics”