Window Sill Data Collection
For our final project, we decided to create EZ Entrance. The purpose of EZ Entrance is to analyze the sound (measured in volts) and motion (measured in binary as MOTION DETECTED (1) or NO MOTION DETECTED (0)). It is wired with an MKR1000 and SD card shield to a ping sensor and a microphone. It then plots the data in ThingSpeak and in an SD card.
The main purpose of this project is to collect real time data of motion and sound at a particular area of interest for the user. For us, we find that places on campus get busy—in particular, it takes some time to get into the Quad at certain times of day. As a result, we placed the EZ Entrance around the Quad to test its data collecting abilities. This product would be useful to a wide range of people interested in collecting activity data at a particular location. Be it a restaurant owner looking to bring more overall activity into their shop, transportation managers who wish to predict bus and train activity at certain times in the day, or everyday students interested in the best way to get across campus, EZ Entrance is capable of gathering the necessary data to make these things possible.
In designing our product and idea, we considered the project requirements regarding sensors and internet connections, and decided to go with an audio sensor (microphone) and ping sensor which both worked to collect data in ThingSpeak. Through these sensors, we would be capable of acquiring the reliable area data that our product sought to obtain. ThingSpeak helped with placing the data in a chart that was organized and easily understood for those who understand the product’s functions.
The overall process to create the project first started when we came up with several ideas on our own; considering our personal interests, as well as feedback from the TAs, we decided to go with EZ Entrance. Our interests are represented by our majors in both CIS and SSE, so although we didn’t have much experience with real, physical engineering, we were very interested in a project involving data collection. And although our TA Matteo didn’t have much experience working with IoT, he was incredibly willing to learn it alongside us, and help us create a project we were passionate about. All things considered, EZ Entrance was the best project for us to take on together.
Our first task was to complete the wiring of the breadboard, which can be seen in the picture on the website. After this, the code was created with basis from Labs 4 and 5, as well as the Arduino website with a wide range of useful coding libraries. Using the serial monitor and a digital multimeter to test, we uploaded our code and altered the wiring. We repeated this step until the desired output—printing the recorded sound and motion data, as well as printing “Data Sent” to indicate ThingSpeak was —was displayed on the serial monitor.
When it came down to creating the hardware, the parts we used included an MKR1000 and SD Card Shield, the two sensors, two LEDs (that will light up with response to sound and motion every minute), two resistors, a breadboard, and several wires. Essentially, the MKR1000 is wired to the ping sensor and microphone; every minute, it would detect the average sound (measured in volts) around it, whether or not there was motion. It would then plot this data into ThingSpeak through its WiFi connection, and record it in the SD card for potential future analysis. For wireless data gathering, we also used a 3.7 V lithium battery that allowed the device to function without being connected to a computer.
In terms of physical design, there were only two considerably different iterations of the project. Our working prototype was the first iteration, which was wired to an Arduino Uno instead of an MKR1000 and wasn’t connected to WiFi at all. The purpose of this iteration wasn’t to gather the data just yet, but to ensure that the sensors—including a sound sensor we had no experience using—were both functioning as intended. When this was confirmed, we created the final physical board with all the parts listed above. However, the software went through three separate iterations: the first was for the working prototype and its functions, the second was to incorporate WiFi and SD card logging, and the final iteration included ThingSpeak connectivity that graphed the data online as well.
There were several design challenges that came with creating this project. First, it was difficult selecting an Arduino board to work with. Although we had more experience wiring variants of the Arduino Uno, the MKR1000 not only had WiFi capabilities but an internal RTC that would be helpful in data logging. Thus, we decided to forego an Arduino Uno WiFi in order to work with the latter board. In addition, when using the MKR1000, it took a while to realize that certain portable batteries do not work with the device. We had to test and recharge multiple portable batteries—including plugging in multiple devices for testing—to determine that a 3.7 V lithium ion battery was the most feasible way for it to perform wirelessly. Finally, there were issues with placement of the EZ Entrance as the location had to be good enough to catch movement and sound, but couldn’t be in a place where people could touch it and mess up the data collection. This worry was overcome by placing the device on the window sills of Brooks and Leidy in Fisher; here, it could still easily detect audible sound and motion, but was also placed far enough from people so that nobody could mess it up unintentionally.
As a group, we learned what it means to work together and separately. For instance, the two of us had different interests—one wanted to work in software, the other hardware. Thus, we complimented each other very well as we divided the work based on these interests. We also learned how to adapt code from various sources in order to better suit the unique devices we wish to create. We got more comfortable with the serial monitor, using it to test our code and then printing every minute with the data we were collecting simultaneously. Testing the code was hard and frustrating, but finally learning how to be able to see where our issues were was rewarding.
We have several plans to expand EZ Entrance to make it a marketable product in the future. Most importantly, the product needs to be more compact and portable for easier use. One of the ways to do this is to make a compact box that will securely hold the product and allow it to be moved around more effectively. Also, we would like to find a way to gather the motion data in a more qualitative way (analog), thus making it more comprehensive for EZ Entrance users. A phone app compatible with the product could also be created to enhance its experience, allowing users to know how long the product has been collecting data, and providing all the data they need right at the touch of their fingertips.
Include any code + pictures (can provide a link to an external source)
The arduino code is provided here: link
Promotional Video: https://youtu.be/xdVvyCnkai4