In today's world, COVID-19 is rampid and it is in our hands to stay safe and do our best to protect ourselves from it.
The Proximity Measurer is a way to determine if you are too close to someone. This Proximity Measurer uses an utrasonic sensor to determine the distance of a person by using sound waves. If you are within 6 feet (about 183 cm), the device with flash red and you will get a "Too close!" warning message that states your distance. If you are beyond 6 feet, the green light will flash, indicating that you are a safe distance away and you will get a "Safe!" message that has your distance in centimeters
In my major, Interactive Digital Media at Drexel University, I was taught the basics of Arduinos and circuit boarsds. This Internet of Things class was to introduce us to receiving/sending data from our physical build to the cloud or vice versa. This
The problem that I had thought of was the pandemic and how it has effected many people within this year. My plan was to create a device that would help with just that. During the process of building out this project I learned more and more about how to be safe while amidst a pandemic.
My ultimate goal was to create a device that would allow users to keep track and be aware of their distances from other people. This device would flash red or green online and sent a warning message or safe message along with thier distance to users in order to keep them updated. This would help with practicing social distancing, ultimately helping the user and others stay safe.
My first step was to figure out how I wanted to build my project. I looked at different projects on Arduino's database and I also found some on YouTube. I took inspiration from these projects and I came up eith my own blueprint that would work with the Arduino MKR WiFi 1010. I then used my ideas to simulate it in Tinkercad so I could see if it was any good and if it could actually work in a physical space.
Click here to see my Tinkercad simulator.
After simulating my project online I was sure that it works an what parts I should order. I ordered all of the needed pieces and put my board together. It was pretty simple to put together since I previously simluated it and I didn't have to guess if everything would work. The simulator also helped because I knew if I was using the correct resistors so that I didn't ruin any of my other pieces.
With my physical build built, I was able to move on to getting connected to Arduino IoT cloud. I used code that was taught in class in order to determine if my Arduino MKR WiFi 1010 was connecting to the IoT cloud. The code would print the connection to the WiFi and a message "looping" in the serial monitor. The code also updated the message in the dashboard messenger every 3 seconds.
The code for my project was a combination of local code that I simulated in Tinkercad simulator as well as code I had learned in class that connected my project to the IoT cloud. My code was pieced together from multiple projects I found and I changed it to fit the purpose of my project. I never used LEDs in my previous projects so I had to research as so how I can impliment it in my project and what code I needed for it to work. I also have never used an ultrasonic sensor so I had to do research for that was well.
While testing my code locally, I was able to add functions that would send the physical information to the IoT dashboard. It did take some trial and error but my functions did work and send that information.
Click here to see my code for this project.
During this project development, I have run into many issues. The first issue I ran into was simply having my sensor facing my wires. It was a problem and I wasnt entirely sure how to fix it. I was thinking way too much about it and the solution for it was very simple; flip the sensor so that the wires are not in the way.
After fixing that issue, I decided to move my sensor to the other side of the board, not realizing that the breadboard has a disconnected cut in the middle of it. That was a quick fix, I just had to move my sensor back near my pins.
The next issue I encountered was overloading my Arduino. I was not sure why it was happening because I followed everything that my simulator had and it worked perfectly there. I worked with my professor to help me figure out what was wrong and I doucmented my troublshooting process for future reference.
At this point I was ready to scrap this project and dig up an old project I had that I knew worked. The old project also used a sensor but it was a tilt sensor so I assumed it would work. The only difference is that the old project used an Arduino Uno. I set up my old project on the Arduino Uno just to make sure it worked and it did. I then did the same setup and wiring on the Arduino MKR WiFi 1010, and it did not work. I then decided to see if my Proximity Measurer code would work on my Arduino Uno, and surprisngly it worked perfectly.
I concluded that it wasn't and issue with my sensor, it was an issue with how that sensor was connected to the Arduino MKR WiFi 1010. I spoke with my professor about my discovery and we came up with a solution. The solution was to plug the TRIG and ECHO pins into the Arduino MKR WiFi 1010's analog inputs (A1, A2, A3 etc.)
This solution made my project work flawlessly and I was able to add the neccessary code to send the information to the IoT cloud.
As a final build, the project came together well in the end. I was able to get the physical Arduino build to operate with the Arduino cloud. Although I ran into many issues in the process, it was very fulfuilling to see everything work out in the end.
In the end, this project was a success. The idea that I orginally had was to track the distance of users and provide them a message that helps them understand their safe and unsafe distances. This was easily seen on the dashboard of IOT cloud. It was not complicated to see the LED lights and the warning messages which I think will be helpful for users. My future plans are to create a more compact design that would allow users to carry it around with them. I would also like to send notifications to the user's mobile device if they are within 6 feet of another person or appracohing 6 feet.