Intruder Detection Using Intel Edison

by ShreyasUpasane-DIGIT in Circuits > Gadgets

787 Views, 12 Favorites, 0 Comments

Intruder Detection Using Intel Edison

BeFunky Collage.jpg

This article demonstrates using Intel EDISON with Logitech USB camera and an open source cloud in an intruder detection application. Specifically, we will be gathering video from the USB camera attached to Edison and will detect if any motion occurs in-front of the camera. If any motion is detected by the camera, a small clip is uploaded over the open source cloud where user can see if any unauthorised access is occurred or not.

This autonomous combination of hardware, software and networking is now being referred to as IoT (Inter-Operability of Things). This article assumes you have experience working in python and login to the Edison board using putty.

Hardware Components We Will Use in Our Demo

dc-200_1.jpg
getimage.jpeg
c270glamour-lgsilver.png

  • Intel Edison Development board with a network connection
  • Logitech USB Camera
  • USB and Power cables

Software We Will Write

  1. Intel Edison running UbiLinux
  2. A python script running on Intel Edison.

You can download the code samples here.

P.S. This instructable will work on UbiLinux installed on Edison only.

For installing UbiLinux on your Edison, please follow the guide here from sparkfun.

Build the System

Screen Shot 2016-08-02 at 11.38.17 AM.png

1. Connect the USB camera to USB type A port on edison.

2. Connect the micro usb vable to edison OTG connector.

3. Connect the micro usb cable to edison serial port connector.

4. SW1 position towards usb type A (i.e. USB camera).

Connect the Intel® Edison Board to Your Computer

Connect your Edison board with all the cables described above to your computer and open Run PuTTY, select the “Serial” option, change the COM port number under “Serial line,” and set the “Speed” to 115200.

Enter the default login credentials:

ubilinux login: edison

Password: edison

And that’s it! You are now logged into Ubilinux running on your Edison.

Copy Codes Folder to Edison

To run this instructable, you will need to copy the codes folder ("vision") you have downloaded from above to directory:

"/root/<folder you have downloaded>"

So the path would be:

"/root/vision"

P.S. To copy the whole folder use WIN SCP or file transfer for linux using SCP.

Follow the link here:

http://rexstjohn.com/use-win-scp-to-copy-files-to-intel-edison/

or

https://software.intel.com/en-us/articles/intel-iot-platforms-file-transfer-for-linux-using-scp

Run the Python Script

smartcam_iotfy.png

Once you complete uploading your codes folder "vision" to /root directory, it's time to run the python script.

1. Go to the directory "/root/vision" from serial terminal

2. Type ls you will see number of "pyc" files and a "vision.py" file.

3. Run: su and hit enter, it will ask for edison password. Type in edison.

4. Run: python vision.py and hit enter

USB camera will turn on, wait for 1 minute.

Now if any movement is detected in front of camera, a clip will be recorded and uploaded to a cloud.

Attached screenshot of cloud and video above.

P.S. Make sure edison is properly connected to internet. Video will not upload without internet and will be saved locally on edison.

Also any open source cloud can be used. We have used iotfy in this application. iotfy is an open source cloud platform and python script is provided in codes folder.

Summary

You can then embed your application directly within an end product. The real-world application of these principles is just as easy as what you saw. The task complexity is limited only by how much python code you are willing to write. Edison seamlessly manage all of the processing handling intricacy in the middle.