Introduction: Intruder Detection Using Intel Edison
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.
Step 1: Hardware Components We Will Use in Our Demo
- Intel Edison Development board with a network connection
- Logitech USB Camera
- USB and Power cables
Step 2: Software We Will Write
Step 3: Build the System
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).
Step 4: 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
And that’s it! You are now logged into Ubilinux running on your Edison.
Step 5: 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:
P.S. To copy the whole folder use WIN SCP or file transfer for linux using SCP.
Follow the link here:
Step 6: Run the Python Script
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.
Step 7: 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.
We have a be nice policy.
Please be positive and constructive.