Vasudha’s Status Report for 04/29/23

This week, I spent time working more on the mechanics and helping out on the software model side. On Sunday, I worked on assembling and testing out a temporary set up that would allow me to perform end to end testing from the capture to platform turning. This setup was not completely built, with temporary parts such as a taped paper platform and the camera capture mounted on a separate table, but showed me what the results would look like once the mechanics were fully built. I then ran multiple tests to get last minute records of our device’s time and accuracy performance to put in our presentation slides. 

Later in the week on the mechanics side, I connected the acrylic door to the axle, powered the hardware, and ran tests to make sure everything was working. I also tested this set up with the newer clamps and ended up going with the older one as that was easier to integrate in terms of alignment. After testing the acrylic door, I found that it was definitely on the heavier side, and the clamp setup is not very stable. However, it works, and hopefully should be enough if we are not able to further develop the setup by the demo. I also worked with Ting to cut and build the camera mount, which was attached to the back of the servo frame, giving that frame some additional support at the same time. The overall structure of the device is not very stable, with the wooden parts often warping/disconnecting from the acrylic. Now that I have a better idea of how to assemble the frame, I have been thinking about redoing the connections and using bolts instead of screws to connect the wooden parts to the acrylic if there is time before the demo. 

On the software side, our model implementation has not been performing well. Therefore, I spent some time helping out with debugging, looking for newer datasets, and sorting through them to integrate into our current implementation. 

Schedule wise, I am somewhat on track in the sense that progress is being made, and our device is almost fully constructed and integrated even if the individual parts are not developed to their optimum levels. In terms of mechanics, the only crucial part that has not been implemented is the installation of the locks, which as a last resort solution we might end up taping to the system. 

Given the remaining time in the course, next week I plan to try and finish off the required finishing touches for the mechanics, help out with the software, go back and see if any mechanic parts could be improved, and work on the final submissions.

Team Status Report for 4/29/2023

For this week, the biggest risk lies in our YOLO model. With the new dataset added and trained on top of the old weights, its classifications are mostly showing up as “Glass Bottle” while the class number is 0 (which maps to trash). We believe that there is both a mapping issue and a pure performance issue. During debugging, we did realize that the performance, based on the confusion matrix, is quite low and it is largely due to imbalance distribution in training images. After we changed the yaml file and fixed other missing steps, however, the training performance is still not good.

Right now we have listed a few options:

  1. Use original weights and CV detection; for all images recognized by CV but not YOLO, consider them as trash.
  2. Find another dataset containing both trash and recyclables, train weights entirely from that
  3. Find another dataset that contains both trash and recyclables, train on top of old weights.
  4. Use images from two existing datasets and manually rebalance each class and re-train.

Among these options, we are currently pursuing the first two at the same time. For #1, we also implemented an alternative; instead of 2-stage FSM, the system accepts user input through the keyboard and takes pictures as users ordered. Because 2-stage FSM is quite time-sensitive, having this prototype is smoother. For the demo, we could ideally perform both. 

Simultaneously, we are also trying to find new datasets that contain all classes and have a more balanced distribution. We have already found a few potential datasets and are focusing on one for training now. If the performance is good (depending on confusion matrix), we could do trials using that model. 

Earlier this week, we have done an all integrated testing with #1. The overall accuracy is about 60% from 20 tests run. Because YOLO is no longer constantly running, the model boot time is present for each classification attempt. The overall operation time is around 20 seconds now. 

We made progress on the wooden frame, screwing in the back piece and platform that the camera sits on. We tested the height of the platform with respect to the main swing platform that the items will sit on. We discovered that we may have to redo some of the legs since we didn’t use angle brackets and they are angled at non 90 degrees now. Overall the main thing left to do with mechanics is to mount the side lock servos. We forgot to consider holes in the wood for this, but it seems fine to have the servos under the platform instead of inside the wood. For now the plan is to tape them on and test the hardware code integrated with the mechanics, then find a more permanent solution. 

Our unit tests on the mechanics side included placing different objects on the platform to see if its weight would hold up, such as light pieces of trash to heavier things like phones. From this we discovered we need to have the platform be very balanced in terms of the materials we were using to attach it to the shaft, or else the platform will flip easily. For overall system testing, we discovered that we had to keep holding the trash up to the camera when we tried putting it on the platform, so when we cut the wood for the backing remeasured and made it slightly shorter to account for that. 

For the hardware, unit tests were conducted for each component from the Arduino – each of the 3 servos for direction and amount of turn, Neopixels for color, and Piezo for audio output based on an input of 0 or 1 from the model. All binary output combinations were tested (00011011) as well as an initial alternate check. The components were then tested together with a similar input testing scheme. Next, this same test was done this time sending the inputs to the hardware from the Jetson. Lastly, after fully integrating sending the output from the model on the Jetson to the Arduino, the overall system was tested (ie. placing an object under the camera, running detection and classification, then checking the output). While at this point we were having issues with our model output, we made sure that the output being defined by the model was in fact resulting in the correct hardware reactions. Timing was measured for each of these tests along with accuracy. 

Our model issue was found through model unit tests, as we attempted to test a plastic bottle, a metal can, a glass bottle, a plastic clamshell box, a plastic bag, and a napkin individually with our detection system and eventually our detection + classification system.

We don’t have any changes to our schedule. On the mechanics side we are on track to finish, with there being only one aspect left to implement. On the ML side, things are less certain, but we have many options in the courses of options that we can take so I believe we are still able to do well.

Vasudha’s Status Report for 04/22/23

This past week, I mainly worked on the mechanical portion of the project. First, I spent some time marking out my pieces. I marked out the door and places to make holes for the acrylic piece, then the specific measurements for the wooden legs and door frame. I then learned how to use the laser cutting machine and the drawing tool, and marked out my specific measurements for cutting the acrylic on it. I cut the acrylic in three different sessions after seeing what I needed to connect the parts, one initially for the door, one for the frame holes, and one for the door holes. I then got some of the wooden pieces cut with the help of the TechSpark staff, and then cut the remaining pieces by hand using a hand saw. I then learned how to use a power drill, drilled holes into the wooden parts, and then tried screwing them together. I also added corner braces to the connected legs, and then connected the wooden frames to the servo and to the acrylic frame. After this, I tried working on the door, and while alignment was okay with the larger clamps to hold the axle, it was quite loose and hard to stabilize (used a lot of popsicle sticks and tape). To account for this, we have ordered smaller clamps to see if it will be easier to install. Additionally, when trying to put the servo frame + legs + door + acrylic frame all together, the overall frame was not very stable, and seemed better off if initially assembled without the legs (which were uneven and short due to the last wooden piece holding them up not being installed yet). Due to this, along with the fact that I have yet to cut holes to install the locks, and other complications with alignment, I will probably have to uninstall the legs and focus on fixing the rest of the pieces. 

Next week, I plan on finishing the basic lid assembly and start integrating it completely with the hardware so the overall testing of the mechanics can begin. This has already been done with the main servo, and I will focus on installing the locks and the door to the axle so everything can be tested together. 

In terms of schedule, while I was initially on schedule, due to complications and the learning curve for the tools, I think I have now fallen behind in terms of the mechanical building. However, now with a better idea of what I need to do and the remaining parts needed, I think I can make significant progress before the final demo. 

Vasudha’s Status Report for 04/08/23

This week, I spent time prepping for the interim demo and starting mechanical construction. For the demo, I focused on getting the hardware system ready. The main circuit and operation was constructed a few weeks back, and I spent some time making sure the integration of the Jetson and Arduino worked. I wrote a script for the Jetson to take the output of the model and send it to the Arduino rather than the initial hard-coded test script I was using. As the demo neared, I began having issues with the Arduino port switching when multiple model outputs in a stream were sent (when trying to have multiple rounds of waste being sorted). I spent some time attempting to research and fix the issue, and will continue later this weekend. On the mechanical side, I finalized the remaining parts that we needed and put an order in early in the week. I then used the Techspark laser cutter to cut our acrylic frame and door. Once the parts ordered arrived, I assembled our axle structure and aligned it to the servo so it turned the right amount and direction. 

My progress overall aligns with the newer schedule. However, I might need to spend a little more time on the Jetson Arduino integration, as while it works for one iteration before the port resets, it is important that it works for multiple inputs. Mechanical construction has also begun so I am on track for that as well. 

Next week, I plan to finish constructing a good portion of the main frame (making holes for the screws in the acrylic and hardware cables, connecting the door to the frame) so that we can start integrating the hardware, and see if I can solve the port issue. 

In terms of testing, I have been conducting a few tests as each part of the hardware subsystem was built, mainly in regards to operation accuracy (which is one of our most important requirements). While integrating each component (neopixels, speaker, and servos), I did them one at a time, and made sure they either displayed the correct color, produced the right sound, or turned the right direction. After this, I tested multiple components at once, initially making sure that the color, sound, and directions were correct, then adding in delays, specifically for the servos, so that the correct lock unlocked before the main servo turned so that the door doesn’t get stuck, and the lock closing after the door returns back to place. After making sure the logic for all the components together were correct based on the model value that the Arduino would receive (fulfilling the requirement for the correct alerts and door movement being produced), I started working on Jetson integration. First, I tested that the correct hardcoded value was being sent over serially, then tested multiple, then tested actual integration with the output of the model. As I work on the mechanical door, I will have to test and tune the angle and direction of the servo now with the additional parts attached to it. Additionally, once the door works, I will increase/reduce the delays currently inputted so that the door works properly and as fast as possible without getting stuck with the locks (another requirement). 

Going forward, once the system works accurately, I plan on testing individual times and attempting to reduce them so that overall system operation time is reduced as having our system operate each round in less than 5 seconds was one of our defined requirements. I will make sure the door operation takes less than 2-3 seconds, and the overall circuit begins to operate within one second of model output.

Vasudha’s Status Report for 04/01/23

This week, I focused on making sure the integration between the Jeston and Arduino worked and finalizing the mechanical design so that we can officially start building this following week. As of last week, I was only able to get 1 value sent from the Jetson/received by the Arduino. The Arduino was working correctly in response to the specific value it received. However, when testing a string of inputs from the Jetson, the Arduino seemed to only output the result of the first input, making it seem like there was some buffer issue. Eventually, I was able to fix this, however, the transmission+receive time is a little too slow, and was something that I continued to work on for the rest of the week to improve. On the mechanical side, a few things occurred. The acrylic piece that we had ordered for our previous door design arrived, the Professor had provided us with wood pieces for our frame, and I talked to people at Techspark regarding purchasing plywood from them. The plywood pieces at Techspark ended up being too small and thin for our purpose, while the acrylic seemed to look like the better option, with some tweaking with the wooden pieces. With all of this in mind, I once again modified the mechanical design to now use the acrylic piece as the lid and door, with wood pieces on each side to create for the axle to then be attached onto using clamps. The overall acrylic lid will be connected to the wooden frames. I made a few drawings (shown in the team report) and decided on measurements that we can then provide to Techspark next week so that we can start cutting out our pieces and start building.

We are on schedule, prepared for the interim demos this following week, with the software and hardware subsystems somewhat operating successfully (though the integration of getting actual model output values rather than a script being sent to the Jetson still needs to be implemented). While there are a few issues with our implementation that we will need to go back and resolve (ex. Further fine tuning and getting proper outputs from the model in a format that can be sent to the Arduino), the individual parts are showing some form of operation, which we hope to improve upon in the next few weeks as we continue to integrate. 

My next steps for the following week are to successfully complete the demo, start mechanical building, and help resolve the format issue regarding the model output and Jetson+Arduino integration.

Vasudha’s Status Report for 03/25/23

This week, in addition to the ethics assignment and lecture, I focused on setting up the hardware circuit and helping debug the camera set up. For the hardware circuit, I initially attempted setting up the circuit according to my simulated MVP design. However, I soon found that some of the parts were not exactly the same as the ones in the simulation, and therefore could not be connected the same way or use the same libraries. A big example of this was the neopixel strip, which was actually the “Dotstar” version that used SPI, therefore needing a separate clock and data line. I therefore had to move the neopixel strip pins to use 11 and 13, as those were the pins on the Arduino Uno that had  the MSIO and CLK SPI signals. Besides this, the speaker and the servos could be connected as per simulation. After some debugging, I was able to successfully connect and operate the neopixel strip, servos, and speaker. After this, I added code to have the Arduino accept and use serial input, connected the Aduino with a usb to my computer, and ran a python script to see if the Arduino would accept and correctly control the components based on the given input, which after some debugging, worked as well. The next step in this process will be running the input script on the Jetson itself to make sure the connection between it and the Arduino works the same way. 

After setting up the hardware subsystem, I helped Ting and Aichen debug the CSI camera connection. Although the device could recognize that a camera was connected, despite trying to install and use multiple streaming commands, none of them seemed to work. The errors produced by these commands seemed to  indicate that something might be wrong with the camera+Jetson connection itself, so we will try using the camera on the nano to see if there is an issue with the camera or the Jetson port, and temporarily use a USB camera in case the CSI one does not end up working.

I also worked on further fine tuning our mechanical design and specified measurements for the different parts of the frame and door. 

Schedule wise, we have now caught up in terms of hardware. We are behind on the mechanical side due to the constant revision of the plan and not having all the parts we need for the new design. We are also a little behind on the software side due to unexpected issues regarding the camera. Therefore, our plan is to focus our time fixing and fine tuning the software and the camera+Jetson subsystem so that we have that working with the hardware in time for the interim demo, and then focus more time on the mechanical portion once those parts arrive. 

This next week, I plan on testing the Jetson+Arduino integration and helping out with the camera/software debugging so that we get back on track and have everything ready for the demo the following week.

Vasudha’s Status Report for 03/18/23

Last week, I focused more on helping out with the software side, and worked on debugging our 1305 GPU setup and code. Since a lot of libraries were missing and our code was in a Jupyter notebook format rather than a Python file, I went through, installing what was missing, fixing dependencies, and trying to get the code to run. This set up is a backup plan to the Google Colab set up that Aichen and Ting are working on, and since the hardware components have arrived, I will be focusing more on that set up to catch up in regards to our schedule. However, the software debugging is still something I am currently working on, and hopefully we will be able to figure one of these solutions out before the end of next week so that we can then migrate this code to the Jetson. 

On the hardware side, some of our parts had finally arrived. I started working on setting up the Arduino and respective components, and hope to have this fully set up and operating the basic design before integrating the mechanical aspect. After attempting to connect and operate the neopixels, I found that the type we had purchased did not match the simulated component (uses SPI communication and therefore requires a different library and extra pin connection for clock). Therefore the respective simulated programming did not work as intended, and will need to be modified.

In terms of schedule, while we are quite behind in hardware due to the delay in the parts arriving, we caught up a little on the software side, and plan to devote more time to the hardware this week to catch up. 

As mentioned, next week I plan on finishing up the the hardware component assembly and implementation of the basic design, and finish ordering parts for our final mechanical design (which we modified once again after discussion with the professor).

 

Vasudha’s Status Report for 03/11/23

This past week, I mainly worked on finishing up the report and once again tuning the mechanical design based on feedback from the TA and Professor. For the report, I modified and consolidated our diagrams according to feedback to show both our use case requirements and design requirements, and created tables to organize some of the information in the report. Updated design can be found here: https://drive.google.com/file/d/15j3AFNqRnFr1QK4KOhniSD_vvZ2-SMlD/view?usp=sharing

I also worked on defining the abstract, design architecture, and information related to materials, hardware, and mechanical aspects of the project, and helped out with formatting to make sure all parts of the report flowed with each other. 

Earlier in the week, Ting and I met with Professor Mukherjee to set up the environment we needed to work on our project on the 1305 GPU machines. Using XQuartz, we set up pytorch using miniconda and created a shared afs folder to allow for our members to all access the project files. This setup process is something we had to learn in order to use the GPUs to train our model. 

The mechanical design and building aspect is something that we will need to continue to learn more about in order to properly execute our bin itself. During class, I worked with Ting to finalize the mechanical measurements for the bin given the newer set up with an axle. After feedback during Wednesday’s meeting, we found that the design that we had come up with (all acrylic, clamp to hold dowel on lid frame and other end glued/drilled into door) was mechanically weak due to the thinness of the material and the space we had we were attempting to drill into (ie. height and depth). We then decided to redesign the bin with as little change as possible to avoid having to switch up materials, this time having a wooden lid frame with support legs while maintaining the bin and acrylic door. This way we can more securely drill into the frame and not have the weight of the entire frame rest on the plastic bin below. I then looked into the new materials we needed for this implementation. 

In terms of progress, we are behind in regards to the mechanical and hardware portions since our ordered parts have yet to arrive. However, we have simulated the hardware parts and hope that by end of spring break, they will arrive so that we can begin building.

The week after spring break, I hope to have started the mechanical and hardware building and finish ordering any remaining parts from the new design so that we can catch up to our original schedule.

Vasudha’s Status Report for 02/25/23

This past week, I worked on finishing up the slides for the design presentation, adding last minute information regarding the hardware and mechanical design that I had been working on and helped Ting practice (since she was the speaker for this phase). After this, I updated our materials list with specifics needed after some design changes (ex. neo-pixel strip instead of singular pixel, dowel structure, etc.). I also took time this week to look into the design report, taking the presentation feedback into consideration to better define the design and update the diagrams accordingly. I looked into fine tuning the swing door design support of the swing door after realizing our last plan had the door being held up and controlled solely by a single servo. After looking into potential axle setups and talking to our TA about how we could implement this, we decided to go with a dowel supporting the ends of the door, with other designs in mind in case this support is not enough (ex. gluing an axel to the bottom of the door and having it lie on a loop connected to each side of the main frame, getting a new lid material that is thicker so that we can drill further into it, etc.). I updated the circuit simulation to reflect the hardware component changes. Additionally, I tried planning out a more detailed schematic regarding mechanical building by drawing out where connections with the hardware would need to be made, and then looking up possible implementations (screw placement, frame dimensions, placement, etc.).

As mentioned last week, my progress is now slightly behind on the hw/mechanical side due to the fact that our materials order was placed quite late. However, to account for this, I spent more time on simulating, improving our current design, and the design report to save future time and be more prepared for when the parts actually arrive. With these proactive actions, hopefully the time spent for building will be reduced so that we can still stay on track. 

In regards to actions for the next week, since our team has been struggling on the software side, I plan to help debug the model set up so that progress can be made while waiting for materials to arrive. Additionally, I plan to finish off the report early on in the week so that more time can be spent on the technical end before Spring Break.

Team Status Report for 2/25/23

This past week, our team worked on fine tuning our design, firstly for the presentation slides due last Sunday, then further details based on questions that came up during the presentation and feedback that we received afterwards. 

Looking at our current status in terms of progress and design improvements, the most significant risk that we have as of now is once again the mechanical operation of the swing trap door, as if this operation does not work, it takes away a large portion of our project goals, which advocates for a hands free recycle sorting system. Since we don’t have much experience with mechanical building, it has been a little difficult figuring out what exactly we need to make sure the door operates properly. However, to mitigate this risk, we have worked towards improving our design over the last few weeks with the help of our TA(Samuel) and Professor Fedder. We have multiple contingency plan designs such as a single open/close door or a non automatic but locked flap door rather than a swing door that while do not completely achieve our goal, can serve as a backup in case the current design doesn’t work out. 

After ordering parts, researching, and further detailing the swing door (ex. looking at measurements, operation, etc.), a flaw we found with the design we had lastly settled on is the lack of support for the door itself, which was being held up solely by the servo in charge of turning the door. Since we had already ordered other parts including the acrylic for the door itself, our solution had to account for this. Specifically, while we thought adding an axle would fix our issue, a problem with this solution is that the door material might be too thin to drill a hole and insert an axle all the way through. Therefore, the solution we have currently decided upon is drilling a small hole into the side of the door in which a small dowel on which the door can rotate upon while still having some support. Since we haven’t started building yet and the change only builds upon our current design, there isn’t too much of a cost except for the addition of the dowel itself. 

For the FSM, we implemented a detection algorithm (not YOLO which is only for classification) and did test runs. The code as well as logging of runtime could be found at the link under Aichen’s report. Overall, the runtime is much lower than what is expected of YOLO and we will do more test runs to set a threshold for declaring image change.

We also took in Samuel’s advice for setting a timeout and updated our design based on that. So right now, if no image change is detected at the waiting state for a certain period of time (set to be 5 seconds now), it will go back to the initial state.

Jetson has arrived this week; once the camera is also here, we are excited to set up continuous image capture and perform detection. We will then also verify if the camera is set up properly to capture the whole platform. 

We also decided on a number for the confidence threshold, which is referring to the number given by YOLO algorithm to show how confident it is that the object is what it says it is. This was a question that was brought up after our design presentation. We wanted a number that would balance not contaminating the recycling, while also not throwing too many items out that could have been recycled. We decided that .85 is a number that would allow for a good balance of these considerations. 

In terms of schedule, since we haven’t received our hardware and mechanical materials yet, we have not started to build. To account for this setback, we proactively simulated our hardware and fine tuned the design of the structure overall to make it easier to set up. We will be receiving a lot of things next week I expect, since we placed our orders this past week, so we look to start building this upcoming week. We are still behind schedule in terms of the ML as we were planning to start fine tuning this past week. We seem to still have some issues regarding debugging the training model, but we will take the next few weeks (before and after spring break) to really focus up on this aspect and get the code running and fine tuning started. After the code runs we don’t think it’ll be too much to train. 

To summarize our schedule updates:

  1. Moved construction of hardware from the week of 2/20 to 2/27 (shortened the construction time since a lot of the work has been covered through simulation).
  2. Moved construction of mechanical parts to the week of 3/13.
  3. Moved report writing from the week of 2/27 to starting the week of 2/20 and fine tuning the week of 2/27.
  4. Stretched the debugging + training of the ML model until the end of the week 3/13 at the latest.