Champaign-Urbana Community Fab Lab
Illinois Informatics and School of Information Sciences
Champaign-Urbana Community Fab Lab

Final Project: Sonar

Final Project

For the final project, I decided to use an arduino and the HC-SR04 ultrasonic sensor. Although the sensor was quite basic, I have not used it before, so I decided to use it for the final project. Another reason I used the ultrasonic sensor is because I wanted to create a sonar system with the arduino, as the sonar does use ultrasonic sounds and sensors. I also decided to create the very familiar sonar visuals we see in movies and tv shows. As I am not really well versed in making visualizations, I thought this would be a nice challenge for me.

 

Process and Finished Product

 

 

The first compromise that I knew that I had to make was to make the sonar a semicircle instead of a full circle, due to the limitation of the servo motor. I also initially tried using d3.js, a visualization engine for javascript. I chose this as it was my TA Dot’s suggestion, and also because I thought that I could use the d3.js skills that I would gain from this project, and apply it to a different project that I was working on at the time. Unfortunately, connecting the arduino to d3.js proved to be very challenging, and after a bit of searching on the internet, I decided to use Processing instead, as getting data from the arduino was more straightforward.

 

My first learning goal was to learn how to use the HC-SR04 ultrasonic sensor. Although it is included in the basic arduino kit in class, I have never thought of using it, and had never felt the need to use it. Using the sensor proved to be fairly straightforward, but synchronising the ultrasonic sensor to the servo movement was a bit challenging. Due to the nature of how the HC-SR04 sensor worked, the time it took to take a measurement varied based on how far the object was from the sensor. Eventually, I discovered a library called NewPing, which allowed me set the maximum distance to scan for, and maintain the same scanning time for each scan.

 

My second learning goal was to challenge myself to create visualizations for data. I have never been a very artistic person, and creating any kind of visuals, whether it be drawings, or UI design, was very difficult for me. However, as I had something to base my design on, I thought that creating the sonar visualization would not be too bad. Furthermore, when creating the visualization, I worked up from tools that I was familiar with. Once I had a rough design and sketch based on what I could find on the internet, I first started with creating a svg file for the acrylic print. As I did not have to worry about colors, I could just focus on the layout of the visualization, and I think it really helped me to get a solid layout that I could utilize in the graphical visualization. Then I moved onto creating the actual screen visualization. My initial attempts with d3.js did not work out, as getting the data proved to be a problem. So, I quickly switched over to Processing. Although I did not know any Processing, I was able to get a basic grasp fairly quickly, and create the visuals. As I already had a layout for the visualization, all I had to do was copy over the design, make color changes, then add dynamic visualization elements, that would interact with the data from the Arduino.

 

As a whole, I am quite satisfied with the project. I was able to achieve my main goals, which were to learn how to use the HC-SR04 ultrasonic sensor, and to create a sonar visualization that would show what the sensor was reading. I was also able to create a physical representation of the sonar visualization, so that any object that was placed on the physical representation could show up in the Processing visualization. Although my final project does not really have a practical use, I am really happy about the way it turned out, especially the visualization.

 

Looking back at this class, I realize that I’ve become to embrace failure and learn from it. I’ve been the model student in most of my classes all the way up to highschool, and even at the University of Illinois, I have never really struggled with academia. That being the case, failure wasn’t really something that I experienced often, or even at all. Throughout this class, however, I was exposed to numerous failures, which was not something that I was used to. For example, during the 3D printing section, I had to reprint, and improve my 3D model, either because the print did not work out well, or because the print did not fit the raspberry pi that I had. Even in the end, I had to file the finished casing, so that it would fit my raspberry pi. Another example is the locomoting pom pom bots. In this assignment, I had to do a complete redesign of the bot, as what I thought would work, ended up not working at all. Even with the new design, I still had to make improvements so that it would actually work.

 

One thing that I was surprised about was how much I enjoyed sewing. I have never used a sewing machine until this class, and honestly, I was not too excited for sewing. However, I ended up really enjoying sewing, and the assignment on sewing took the most time out of all assignments, simply because I enjoyed it. Sadly, the finished project wasn’t perfect, but I was still proud of myself for being able to learn a completely new skill, and being able to apply it in a functional product.

 

This class showed me that with the right tools, and within a reasonable range, I could make anything I wanted. I also learned a lot of tools and software skills to aid me, and that I could usually find them at makerspaces. Furthermore, I learned that when I don’t know how to use a certain tool, people at the makerspaces were very willing to help out. I also think the hands-on learning fits the class very well, as we all had to use what we learned in the class, to make our projects.

 

I had no idea what a maker was, but this class gave me a good definition on what being a maker is like. I don’t think I’d be able to give a concise definition of the word “maker”, but throughout this class, I have experienced to a full extent, what being a maker is all about. Being a maker is doing a lot of hands-on work, creating prototypes and projects that I can think of. Although something might not work out, makers try and try again until it turns out better. Even when you achieve what you set out to be, you then soon think of ways to improve your project. Most importantly, you get to have fun while doing it.

Tags: , ,