Pages

Thursday, February 27, 2020

Week 5: Parsing the PDF

Through our most recent endeavor into data management, there were some issues regarding our ability to parse a PDF containing user-filled data forms. Hours of experimenting with different PDF-to-text classes provided some form of text output but the entered form data was missing. A band aid over the issue was to fill out the form then use the print to PDF function found on most devices, flattening the document into just a layer of text. This presented other unexpected issues that did not provide the results we needed, including blank or unreadable output.

Through some experimenting, I was able to find a parser that will pull just the form data and nothing else. Using a doc parsing class, I was able to pull form data without having to save to a new file or print to PDF.

In order to gather the form data in a way that organizes it for upload to the database, the doc class must arrange data in a way that prepares it for assignment to the appropriate cells. Browsing through the class structure and understanding how it performs text collection from documents shed some light into modifying it to insert delimiters between each parsed form field.

You can think of a delimiter acting as a cell wall like those found in spreadsheets, but instead data is separated by a text character. Using character delimiters allows scripts to easily recognize the start and end data points and can easily isolate what comes before/after/between the delimiters.

In its default state, the doc class uses the space character as a delimiter, which makes organizing data difficult. Using the standard comma delimiter can be useful here, but what if your data points must include commas? This can pose a problem or require limiting the scope of acceptable characters in a form field.Using an uncommon character as a delimiter ensures that almost all characters can be included in the data points, giving much more freedom of choice to the user.



 The resulting combination of code now spits out a delimited string that can be easy converted and organized into an array, that can then be sent to the database.

Saturday, February 15, 2020

Week 4: Jet Propulsion Laboratory

Long post, but ever since starting this blog I have found it to be an opportunity to preserve memories I am making through my journey in STEM. I hope you all enjoy the read but if you like just browse the photos!

Monday:


Skipping the small stuff, we arrived at JPL with about half a day to spare. Our team called Navy Nova was assigned randomly so we had to get to know each other quickly. There were 40 students in total, and I was the only one that wasn't from California due to an unusual last-minute change (Coach Luu you were tough but it led to an upgrade, so thanks). Most of the day was spent with introductions to our staff, the competition, and objectives. All of the team mentors were mechanical engineers who have worked on the Mars 2020 project. Our mentor Amiee had worked on the Mars Helicopter, and is now working on the Europa Clipper! Wow!


With backgrounds in physics, math, computer science, mechanical engineering, and chemistry, everyone understood their strengths and weaknesses so positions were assigned with little issue. I was elected team lead for being the only one with previous Lego EV3 experience (shout out to Mr. Villicana and ECE103!) and some public speaking under my belt, so it helped us get the ball rolling quicker. Roles are designed so that if any one person fails to do their job, it can cost the entire project their points to win the competition.

In summary, the project is broken down into building, testing, and deploying a Mars rover made with Lego EV3 kits, while producing progress reports, financial reports, and a final presentation meant to simulate bidding for a NASA contract. This requires thorough planning/testing of mechanical and software designs, including part research, software concepts, and applications for using sensors. Our budget starts at $500 million and we have to keep record of inventory, use of each part, marketing costs, bonuses, and fines. Parts are bought once they are connected to any piece meaning no test builds unless you want to keep them.

As for rules, all sensors in the EV3 kit were allowed except for the proximity sensor, a bit of a setback since it is the primary tool for object detection. Use of a sensor during a retrieval results in double points. The device must have a minimum of three wheels, which should all be touching the ground (roller ball does not count as a wheel). The course will have a square within the starting tile that we call home base. The rover is allowed to be picked up and positioned while within the tile, but once we run a program, the rover must be able to retrieve an object and navigate back to home base without any human intervention. Failing to return to base results in a 30-second penalty where the rover is reset cannot be touched until the time is up. We have a total of 10 minutes to run each course. Beforehand, we are given a 1-hour test period to rent materials similar to those on the course at a cost from our budget. Prior to the missions, we are given a 2-minute period to view the course, and an hour to plan accordingly. Finally, just before the mission, we get a 2-minute test period and another 2 minutes to make any changes.

The white climate-controlled box houses the Mars 2020 rover, seated in a force-dampening structure for protection.
On the way back to the hotel, it was drawn to our attention that the Mars 2020 Rover and its kit were packed for transport earlier in the day, and that it was leaving for Florida that evening! Too bad we didn't get to see it up close, but we still got to see $1.8 billion in a box!

Throughout the rest of that night, I was able to introduce the software team to the fundamentals of EV3 programming as well as the basics of sensor usage. We stayed up late brainstorming on how to accomplish the tasks assigned for the next day, quickly learning that sleep was to be had after the trip was over. Since we had to work with our lack of object detection on the course, our best bet was to retrieve rocks that would be available with a direct, clear path. Since we would be able to rent course tiles and different rock sizes for an hour beforehand, the software team planned on measuring the tiles and using the Pythagorean theorem to get a direct distance to an object. By calculating the circumference of the tire, we would divide the distance to travel by the tire circumference (one wheel rotation) to get an exact number of rotations to travel to an object. The rover would then engage its capturing mechanism and reverse back to the home base. The night ended with a good tone and we had a clearer idea of how to accomplish our goals.

Tuesday:

The Dream Team!

Feeling confident but tired, we arrived at location to begin working right away. This was our longest day to work, as the next day would be spent touring JPL and having discussion panels. The mechanical team quickly began assembling the rover and came up with a sturdy reverse trike design that had enough stability to climb obstacles without rolling over, and would allow us to have freedom to rotate once incorporated. The software team began work on making master code that would be duplicated with variable changes for each distance once we had our 2-minute preview of the course.

Olympus the Mars Rover
Nearing mission time, as per the rules, we were given an opportunity to rent materials if we wanted to use our budget for it. We all agreed that any real mission from NASA included thorough testing of all possibilities with realistic physical elements, so we rented the entire suite of rocks and two tiles to test our range. We created a unit of measurement using 1 tile length, and that became be the fundamental unit for converting into centimeters for our rover commands. Running our various tests, we were able to pull single rocks of each size, and even the entire set of rocks with the first set of code and custom parameters, capable of stopping at measurements down to the centimeter.

Map compiled from the 2-minute preview
During the 2 minute preview, we saw various obstacles on the course and Olympus Mons in the center of the 4 x 4 tile course. Funny enough, Olympus Mons had a stone on top worth the entire board, which was probably an ego test, and we weren't falling for it. We divided the course into 4 sections, and paired up to do detailed drawings of each sector (no photos). After compiling the map drawings, we had rough calculations of X and Y tile lengths for the Pythagorean theorem formula. Each rock's position was numbered and a custom program derived from the master code was made to drive to each rock, totaling in twelve unique programs along with some programs based on single tile lengths. The back quadrant was excluded since there were no direct navigation routes available, and time to refine the turning code wasn't available before the mission.

Since each retrieval that used a sensor would result in double points, I proposed the idea of using the gyro sensor to detect if the rover was on a flat surface before grabbing rocks. If the rover was detected to be sitting flat on the tile, it would lower the mechanism and return to base as normal. If the rover was uneven due to one wheel resting on a rock, it would make a single wheel rotation forward, lower the claw, one single rotation backward to fix the offset, then continue with the reversal to base. Since our trike design and strong claw allowed us to drive over anything and also pull it back on reversal, our rover could attempt to position itself into a better spot before returning. Incorporating this as a necessary step before any action with the claw was taken made the sensor check orientation on every single run regardless of the situation, giving us bonus points no matter what.

 



During the run tensions were high, but our 2-minute test run seemed to go as planned. Realizing the short time to do anything significant, we opted to just speak on strategy during this time instead of scrambling through changes. Running the course the first few times with some misses, we grabbed the first few rocks with no issues. However, we soon found that some of the rocks were taped to the tiles, and caused an offset to our rover's backtracking maneuver. This resulted in three 30-second penalties, which were used to discuss the next steps until we could touch the rover again. After all was said and done, we collected nine rock samples, roughly half of the board. Although we didn't know the other team's totals, our confidence was high. Apparently we were the first team to ever use a map (?!) so that added our natural high of a job well done.

Wednesday:

Now for the really cool stuff. The JPL tour took up most of our day, and a large portion of that was for the gift shop (it was necessary). Our tour consisted of The Charles Elachi Mission Control Center, the Mars mechanical testing room, and the Microdevices Laboratory. To keep it short, check out the photos:

The Charles Elachi Mission Control Center, where all spacecraft
communication throughout the universe converges into one place.
Known affectionately as The Center of the Universe

 

If you have ever seen a Mars mission during entry and landing, you have seen this room!

JPL's lucky peanuts, held my many famous people!

Real-time data visualization coming from various spacecraft! So cool!

Room with clones of Insight, and Mars Curiosity for mechanical testing.
When the Insight drill became lodged on the surface of Mars, test methods to safely remove it were attempted here!



Microdevices Laboratory with history of accomplishments











After the tour, we had another rental practice session, and were given a rover to capture instead of rocks. Test runs went as planned, and we decided on two very minor changes of removing the rubber ring around the wheel to assist with pivoting and removing a piece from the claw. We were warned the day before that the next course was going to be harder, and after the 2-minute course preview, we could see what they were talking about although we had prepared for something similar. The new course had a displaced tile housing one of the rovers, there were more sand bags, and alignments of rocks blocked most of the direct paths to the rest of the rovers except for one. Knowing that we could get away with capturing one rover, we had to quickly plan to navigate for the other three.

The master code was modified to account for 90-degree turns. Instead of storing a single variable to track total distance, up to four variables were used to store the segments of each straight distance to travel. Our mapping gave us multiple options to design routes, and the software team decided on what they thought was best for simplicity. They decided on keeping the original programs and adding twelve additional options that included turning routes.



Hamming it up with Olympus

During the run, we felt that we had a good chance of getting two rovers, and at the least were very confident on getting one. The other two rovers were in highly compromised positions, and would only be attempted after grabbing the first two. The stress of the situation added up and a few runs were made prematurely, or with the wrong program selected. We suffered three penalties in the first 5 minutes, which gave us time to think clearly about our next move. 

After the first rover was retrieved, we focused on the one that was tucked in a rock quarry. To clear a path, we attempted to use one of the original programs to go straight and peel away rocks, essentially excavating the area before rescue. The attempt failed as we found out that the rocks were coated with a sticky substance and were partially adhered to the tile. The only thing left was to use the original turning route, and it worked to pull the rover into an empty area but clipping some rocks rerouted us into Olympus Mons. To our surprise the rover was strong enough to move the mountain! This gave the rover its name, Olympus.

We were happy to see that the targeted rover was now out in the open and in a direct path for retrieval. A quick selection of one of the old programs gave us our second retrieval, which had us feeling elated. The odds that other teams would have grabbed more than two were slim, so we felt we were in a great position overall.

Although it was a job well done, there was no time to celebrate. We spent the rest of the night on our NASA pitch and sacrificed sleep to practice our parts and make slides worth presenting. We were given creative control over how to do the presentation, and based on my ECE103 experience, I suggested that we treat it as being real. Our teams made descriptions of  EV3 components by using real-world technology references, such as radio isotope power generation for the battery and aerial imagery for our hand-drawn maps. Our marketing manager had been working social media, planned for presenting an outreach program, and created an awesome intro that showed off the rover. It was a nice touch that really made the presentation shine.

Thursday:

To keep it short, we crushed it with the presentation. Now that everything was over, we were able to discuss the results with other teams before the winning team was announced. Through speaking to other teams, we learned that our team had the highest retrieval score in the first mission due to bonus points, as well as the highest score and rover count during the rescue mission. Once financial reports were released, our team was the only one to have ended with a surplus over the original budget due to bonuses, and although we had incurred the most fines. Our ending budget was roughly $740 million!


I am happy to say that we won the competition! Our team received some cool memorabilia, placards, and Phil from our software team (operating the rover) was declared the team MVP, with a commemorative coin made from Curiosity Rover test metal. The experience was a roller coaster, and I made some great friends for life while learning so much about engineering and professionalism.

With the knowledge JPL has given me, I feel that I have a stronger vision and I am more prepared for what the future has ahead. I have insight from professionals who were once in my position, have learned about being a better job applicant, had a chance to apply my skills in leadership under pressure, have tips on what companies like JPL look for in a resume, all while seeing some of the most remarkable engineering in human history. I hope that I get to see some of my team mates in the near future, as we have some great memories to share.

Thanks for reading!

Saturday, February 8, 2020

Week 3: Scripts, Hermanas, and Space Stuff



It has been a hectic week, but I am starting to get the hang of PHP. I have gone through the structure of the bat server line by line and retyped it, so I get how the mechanics work now. In the lab I met James who had a great idea for submitting data through a PDF form: Parse the file with a script and distribute the form data to the appropriate database entries. Using an Acrobat PDF with text forms will create a reusable form that can be filled out and emailed on any platform, without a public server! Brilliant! Along with James and David, I am exploring whats scripts are available on the web to get this done and how to properly insert them into web pages. With enough poking and prodding I will get it done!
Grabbing text from forms using PHP and HTML
Friday morning, STEAM Club participated in the Hermanas Conference. Hermanas is a program dedicated to introducing young women to STEM careers through interactive experiences. In the Fall, I had the opportunity to host an Arduino and circuits workshop, and had a great time showing kids something I am passionate about. This semester, I was able to join in on the Makey-Makey workshop, which was also an introduction to circuits! Makey-Makey kits let beginners hook up just about anything conductive (even fruits!) to a controller module, which works plug-and-play style for any computer with a USB connection. It's safe, educational, fun, and unleashes creativity!

Making Play-Doh controllers using Makey Makey kits

Around the lab this week, prep work is being done as we are still waiting on some materials. We discussed how to cut weight on the payload, which would leave room for more instruments or other improvements. Javier and Gen are making progress on their PCB designs, and the video stabilization team got the servos working with the accel/gyro/compass modules. Sorry for the lack of photos, but next week I will get some good ones!

A note for those who want to apply for ASCEND Fall 2020: I have been assigned to create some summer challenges that applicants can participate in to get a feel for the program and learn more about high-altitude ballooning. If you are interested, let me know!


Finally, I am writing this blog post a bit early since I will be absent all of next week. Through the NASA Community College Aerospace Scholars (NCAS) program, I have been invited to Jet Propulsion Laboratory in Pasadena to participate in an on-site engineering challenge! I will have the opportunity to visit with NASA employees, get to know them a bit, and even hand them my resume! No expectations, but it would be cool to land an internship! I am just grateful to be part of such a unique experience and create some great memories. This opportunity comes around twice a year, and applications will be opening up for the Fall session soon. I highly encourage anyone with an interest in space research (all aspects of STEM) to apply for this program. I will post more information on here as it comes out. If you are interested in the details I would love to speak with you!



Have a great week and I will see you all again soon! Wish me luck!


Wednesday, February 5, 2020

Week 2: PHP, VR, and ASCEND progress

I've had to begin learning PHP quickly to get up to speed with the bat project. Using Codecademy, I have been able to learn the basic syntax for the language and it feels very familiar to the other languages I have used. As I continue to work through the course, I believe I can get the hang of it within another week or so. In my spare time, I've been recreating the existing web page from scratch to understand how each instruction works and to become more familiar with the current design. David has been guiding me through the basics and has been very helpful. I haven't had an experience like this one before, where I had to jump into the middle of a long-standing project, but it prepares me for experiences in my career and gives me a better understanding of my job roles.

Learning PHP through Codecademy
As a side note, I have been learning to use Unity and work with augmented reality (AR) libraries. AR allows a user to view a scene through their mobile camera or VR headset, and have software project any image/3D model into the scene appearing as if it exists in reality. This has huge potential for immersive learning experiences and adding the third dimension to digital exhibitions. Most people are struck with amazement if they have never seen it before. I will post screenshots of my test program in action soon so stay tuned.

Tuesday I was able to spend some time teaching ASCEND team members how to solder. This skill is essential when working with circuits and microcontrollers. It can be a bit intimidating at first, but it's really just melting small bits of metal with a hot rod. With good practices the skill can build quickly.

Constantino soldering an Arduino module while I observe his technique

Our first conference call with Arizona Near Space Research (ANSR), the organizers behind the balloon launch, took place Wednesday evening. The call involved team leads from each participating college speaking with members of the organization to discuss plans for the semester. We discussed our goals, improvements from the previous build, and our expectations for size and weight. We also reported plans for radio communication, which PC is actually known for throughout the program. We are one of two colleges that utilize long distance radio tracking, and the only college that has a motorized tracking system! Thanks to Paul Ronquillo and the other former team leads, we are able to build upon their amazing work to keep PC ahead of the curve.

It was cool to see that the current team lead for Arizona State University (ASU) was a former Phoenix College (PC) ASCEND team member, who was taking over the position from another former PC team member! I hope to follow in their footsteps and serve the ASU team once I transfer.

During our main session on Friday, the team was in full gear for work. Our first wave of orders was sent out ahead of schedule, so now the waiting begins. In the mean time, the different teams are still able to plan out their strategies and develop other parts of the payload design.

The ASCEND team hard at work in the engineering lab


Our power distro and atmospheric profiling teams began working with EAGLE to design custom printed circuit boards (PCBs) used to connect electrical components. The mechanical team began working on the structural design by creating 3D models, the video streaming team worked on the radio tracking system, and the video stabilization team familiarized themselves with Arduino programming.
Constantino and Shanis design a payload prototype using 3D modeling software
Left: Protective housing  Right: Storage structure for internal components

I am so proud of the hard work the team has put in, and we are just getting started! Everyone gets along well and is willing to work with one another. I can't wait to see the final product!

Although this semester is turning out to be a lot of work, I am so happy with all of the experiences I get to take part in. Having the opportunity to contribute something to research projects is so cool, and I am putting in my best effort to make sure I'm doing my part.

Have a great week and see you again soon!