Table of Contents - Southeastern Louisiana University



Vision-Based Motion Sensor381008286755 September 2017Jackie DavisMichael LedetCollege of Computer Science and Industrial TechnologySoutheastern Louisiana University500 W University Ave, Hammond, LA 70402Table of ContentsAbstract............................................................................................................................................2Introduction…………………………………………………………………………………….….3Objective………… ……………………………………………………………………………..4-5Progress………………………………………………………………………………………....6-8Deliverables………………………………………………………………………………..…..9-10References …………………………………………………………………………………….....11AbstractThe concept for our project is to design a device that detects human presence, using an optical sensor and image analysis concepts. The purpose of this project is to incorporate concepts from previous courses and to demonstrate skills gained at Southeastern Louisiana University. IntroductionHome security is a vital part of all property owners’ lives. However, security options for home and office security are not always affordable or accurate. Most of these security sensors are non-optic based. There are a few drawbacks to non-optical motion sensors, such as less accuracy and less features than optical sensors. The reason why people use non-optic based sensors is because they are cost effective. Optical Sensors, as previously stated, are typically much more accurate and have a wide variety of capabilities. Unfortunately, most of the optical sensors for security systems tend to be very expensive. The only feasible solution to this problem is to design a cost effective optical motion sensor.With advances in modern technology, more compact devices are invented to provide rigorous options for home security. Our design takes this into consideration and allows for an integrated system that has both of these characteristics. This feat is accomplished by using small, cost effective technology in junction with creative programming. For this project, our team will have to research and construct a product that delivers performance, user friendly features, and high accuracy. In order to achieve this, we will have to use concepts of image processing while learning to interface with optical sensors. ObjectiveThe objective is to make an optical, motion detecting device that is small, efficient, and cost-effective, using a single-chip microcontroller. The purpose of this project is to use the knowledge we have gained to create a low-cost motion detection device that will detect a human entering or exiting an area to create a better security system.One of the main underlying concepts of this project is image analysis. This is the extraction of useful information from a digital image. Typically, the information is then passed to a computer to be evaluated by a program which can make responses based on the information received. Our design will use this concept to construct our human motion detecting device. We hope to design a program which can go to the picture file location and compared to subsequent pictures, in order to detect motion. If we can detect pixel changes with certain qualities, such as being human sized and shaped, then we can declare that it is human motion being detected. This detection confirmation will be sent to an output to notify the user. The system will tie a pinhole camera, or “spy-cam,” in with the microcontroller with a view to detect motion made by a human being. The camera is controlled through the microcontroller to scan a predetermined area for distortion in the pixels of the camera. To detect human beings alone, the microcontroller can be programmed to recognize patterns of distortion in the shape of a person from a relatively far distance. The camera will record a video or take a picture depending on the setting selected by push buttons that are integrated into the system. After recording the still image or video, the microcontroller will send the image or video to a phone through text message. The entire system should not be noticeable at first glance so it must be small. The camera we plan to use is 6.2mm x 6.2mm x 4.4mm which is tinier than a thumbnail. The microcontroller is also very minuscule, so we should be able to fit everything into a rectangular casing with dimensions 2in x 3in x 2in or less.Once we finish researching the microcontroller, camera integration, how to 3D print the housing, and how to convert C language to assembly language, we will begin setting up a prototype circuit. The circuit will also have to be soldered.There may be some obstacles in building the system. One obstacle could be the SMS messaging system. Another obstacle could be having the camera detect motion without the use of PIR, or passive infrared sensor. We will most likely have to use photoresistors and LEDs or general laser lights. We could also have issues with soldering the wires; the connections may fail multiple time if not done correctly.Michael and Jacaqueta will, both, oversee writing, modifying, and troubleshooting the code that will be used for the microcontroller. Michael will oversee building the circuit and soldering it as well as troubleshooting and modifying a 2D drawing of the circuit. Jacaqueta will oversee conducting extensive research on the components and 3D rendering of the housing for the system as well as communicating research findings to the rest of the team.One of the original concepts, when designing the program, is to keep in mind that we would like to use an algorithm that detects significant pixel change. For instance, we do not want the detector to be triggered by an insect or a cat. So, we will look for larger distortion pattern; those that can be brought on by humans. Furthermore, we do not want the motion detector to be triggered by wind movement. Therefore, our program will look for large changes in concentrated areas. These limitations will allow us to design a system that is much more like to only be triggered by humans. The process will begin with interfacing so that the team can familiarize themselves with how these specific types of microcontrollers operate. We plan to do this for the first month, upon receiving the microcontroller. Once we have familiarized ourselves with how the microcontroller operates, we can begin to interface it with the optical sensor. The goal is to have an optical sensor picked out by the time we have completed the basic interfacing with the microcontroller. The next objective to begin, after interfacing with the optical sensor, would be to look into the at file structure and organization of the image format. Every optical sensor has an image format into which it outputs its data. Our team will have to become familiar with the file structure and organization that manipulates this data before we begin programming. We plan to conclude the spring semester with researching and interfacing the microcontroller and the optical sensor. Our team will become familiar with these two devices and how they work together. Also, we plan to have an in-depth understanding of the image format file structure, for the optical sensor output data. Then we will begin the coding process, and likely conclude the Spring semester with this progress.ProgressAfter laying out the concept of our project, we needed to decide on the materials to use. The first objective was to decide on what microprocessor and optical sensor we wanted to use. It was important that we decided on these two simultaneously, because they needed to be compatible with each other. After a great deal of time researching all our options, we had narrowed it do to three, which all had similar features. These features are embedded in the underlying concept of our project: small, cost effective, and sufficient. Ultimately, we decided to go with the Trinket-Mini (figure 2), mainly because it was the most cost efficient for project. It has enough computing power to do what was needed, yet it did not have any of the extra features we did not need. Ultimately, for being such a small component, this micro-controller really packages a lot of power and features.3095625942975Figure 1. Adafruit Trinket-Mini.The Trinket can run at 8MHz or at 16MHz by setting the software-set clock frequency. The dimensions are small at 31mm x 15.5mm x 5mm and the weight is 1.85 grams. It can be coded by using the Arduino IDE. There are several reasons why this microcontroller was chosen over other potential candidates. Firstly, the controller is simple in design and small than most of the other microcontroller we evaluated, however, it was significantly bigger than the PIC microcontrollers we originally planned to use. This controller had enough functionality to work within the parameters of our concept design. It also had enough computing power to deal with the image analysis, which is the root of our project, yet the controller is not so powerful that it would be considered overkill. Furthermore, this specific controller is very compatible with the optical sensor that was chosen. The optical sensor we decided to use is the Adafruit Mini Spy Camera (figure 3). The photo format is generic JPEG and the video format in AVI and can be directly connected to a lithium battery. The camera is overall very basic and has little in terms of “features” but its simplicity is what made it a great choice for our project. The dimensions of the casing for the sensor is 28.5mm x 17mm x 4.2mm. The sensor lens has dimensions of 6.2mm x 6.2mm x 4.4mm. The total weight of the sensor is 2.8 grams. It has a fairly high resolution module with 480p video quality and 1280 x 720 pixels for photos. This was more than sufficient for our project design because having a incredibly crisp image was not very important. The purpose for this optical sensor was to take pictures which can be used in making comparison values, which does not require ultra-high resolution photo quality. Overall, and like our chosen microcontroller, this camera has a decent variety of options for such a small package.3533775752475 Figure 2. Adafruit Mini Spy Camera.There are several reasons why we ultimately decided to go with this optical sensor as opposed to the other potential candidates. Firstly, it was the smallest and the most flexible. It can be arranged in a variety of different ways and it can fit into a very small space which is perfect for the parameters of our project. Also, it is very simplistic which is good for us because it typically equates to maximum control through our own program design. It uses JPEG, which is a common and simple file format, to store its photos. This makes it great for our team because we will be able to design a program, with much more available resources as compared to if the optical sensor used a different file format. We have downloaded the proper drivers and libraries for the trinket to program it using the Arduino IDE. We uploaded a basic Blink LED test code to insure the complete functionality of the trinket microcontroller. We wired a single LED to a breadboard in series with a resistor and connected it to the trinket. The circuit worked perfectly, proving there are no complications with our microcontroller or software. With this complete, we can continue to work on our project without having to worry about defective board. As we continue through this process, it is important to eliminate any probable faults. This will ensure the least number of obstacles as possible and maximize efficiency.Figure 3. Camera size compared to safety pin.2343150847725The next task we accomplished was interfacing the camera with the trinket. The camera can be directly connected to a PC but we are not using it in a webcam format so there is no need. We captured still images of the LED being lit as well as camera connected to the trinket (Figure 5). There is also a size comparison relative to a U.S. penny and a regularly sized safety pin Figures 3 and 4). We have already developed a code in Arduino to begin diagnostics for motion detection capabilities of the camera. Our current code iteration is just to test the capabilities of taking pictures from the camera. While we continue to study this, our team will gain insight on how the camera captures and stores its data. Additionally, we have also started a design in Solidworks software in order to model and 3D-print the housing for our completed system.From this point, our team can begin to analyze the file structure of the camera. In order to implement our design, we will have to be very knowledge of the file structure in place because our design requires manipulation of the files stored. This will be a major component to understanding how our final product will function. This process will also tell us what obstacles we will have to overcome in order to reach our goal of a working product. Figure 4. LED being lit during Blink function.5715038100One of the most important factors of this project is dealing with the image analysis process. The basic concept is to take two consecutive photos, and write a program that compares the images. This process may seem simple, but it is important to remember that this will have to repeat during the entire duration while seeking human motion detection. In other words, this process will have to happen continuously for long periods of time. However, since this is only a proto-type, our objective is to be able to reach human motion detection before progressing into the more detailed matters.DeliverablesDescriptionStartFinishResponsibilityStatusFinish Research and decide on a specific PIC microcontrollerJanuary March Jacaqueta, MichaelCompletePractical interfacing with microcontroller; learning its capabilities and limitationsArrival of PartsAprilJacaqueta80%Decide on Optical Sensor for Motion DetectionMarchApril MichaelCompleteInterfacing with Optical SensorArrival of PartsAprilJacaqueta, Michael50%Researching file organization and manipulation of image format used by optical sensorAprilMay Jacaqueta30%Programming for Motion DetectionAprilNovemberJacaqueta, MichaelStartedProgramming for File ManipulationSeptemberNovemberMichaelStartedComplete a Circuitry Diagram for each individual system.October November JacaquetaComplete a Circuitry Diagram for integrated system October NovemberJacaqueta, MichaelDesign final prototyping interface layout for the integration of all partsOctober November MichaelTroubleshooting and DebuggingSeptember November Jacaqueta, MichaelOngoingIntegration of all separate systemsOctober NovemberJacaqueta, MichaelDesign and print 3-D sketch for enclosure of Integrated System November NovemberJacaquetaReferencesMurphy, Mike. Photo of PIC 16F877A (top), PIC 16F737 (left), PIC 16F747 (middle), and US Dime for scale. Digital image. Wikipedia. N.p., 29 Sept. 2006. Web. 22 Feb. 2017. < Mini 5V < Sensor<;. ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download