August 2

Development

Progress of project for week # 1-2

Our team had an online zoom session for our group’s risk assessment. Risk assessment is extremely important for us to ensure that we are aware of the possible hazards around us as we are carrying out our activities! Due to the current COVID situation, we could only meet online for this exercise, but we all sure did learn more on how to conduct our own personal risk assessment using the system provided by NTU! #safety

 

Progress of project for week # 3

In this week, our team met up to discuss and prepare for our 1st draft presentation! Fun fact, some of us learned how to properly read resistors from their bands today!

In case you readers would like to know how to determine the resistance of the resistors from their color bands, the above chart will be your best friend! According to our electrical components expert, aka Junyoung, this chart has saved the lives of many electrical engineers and will continue to save future EEEians to-be. #learningthroughtheprocess.
 
Progress of project for week # 4
 
In week 4, our team had to split up and send 2 of our members for the electrical circuits workshop held on the 2nd of June @ the M&T Lab. In the workshop, we were firstly briefed on the various common and possibly implemented electrical components by both Tony and Justin, where we learned to recognize how certain circuit components actually looked like, and how they were to be soldered onto the printed circuit board (PCB). Afterward, we were then tasked to make our own mini digital clock, which required soldering components onto the PCB provided. 
 
Thankfully, even though it was both Minseo’s and Yi Xian’s first experience with soldering, they both managed to pull it off and successfully made a working digital clock without any injuries! According to them, the lab staff were extremely patient and rendered their guidance whenever they needed it. So thank you, lab staff! With the added knowledge on circuitry, we are ever so slightly more confident in handling the circuitry that we hope to implement into our M&T Project!
 
Attached below is a short video showing the finished digital clock made at the end of the workshop:
Mini Digital Clock Project!
 
 
Progress of project for week # 5
 
This week, our team gathered for the workshop on 3D Printing, also held @ a lab near the M&T Lab, conducted by Hanyang! Hanyang taught us how to create simple bodies using FUSION360, and also how to convert what we want into a sliceable gcode file using Cura that can then be utilized to make our 3D models and components! Additionally, he also brought the team around the M&T Lab’s 3D printing stations to show us around and let us know about the DOs and DONTs of 3D printing!
 
The team also began working on the computer vision model to be implemented into the Raspberry Pi that we have bought for our project and managed to get it hooked up to our laptop’s camera for a simple demonstration!
 
Attached below are photos and videos taken from this week:

 
 
Progress of project week #6
 
This week, we finally got our Raspberry Pi 4, wires, stepper motors, and camera module delivered to us. Earlier in the week, while the members were not together due to the COVID restrictions, we all set out to do our part so that when we do meet up on the Thursday and Friday of the week the discussion would be more fruitful. For example, Junyoung and Minseo worked tirelessly on the Computer Vision (CV) model and the setting up of the RPi, while Chester and Yi Xian worked on the preliminary hardware design possibilities and sketches.
 
Delivery of Orders!
 
When the group met up and finally got access to the M&T lab, the group then set out to print our very first component, which was a linear gear mechanism for translation using a stepper motor! It surely was an exciting experience to see the sketch on the online designing software becoming a reality with the help of the Creality Ender 3!
 
3D Printing Slicing Image Estimated Time for the Print! Creality Ender 3 3D Printing In Progress!
 

 

 

 

 

 

 

 

 

While waiting for the print, the group found out that for the camera module to be in focus using the raw camera module, the focal length would be very small. In order to solve this problem, our group considered many possibilities like switching the camera module to a better one with an inbuilt zoom function or macro capabilities, but as the discussion went on, we realized that we could then make use of those clip-on macro lenses that are cheap and readily available! This simple yet easy solution helped to solve the problem of focal length is too small, and also helped to save on quite a bit of money! #savemoneyforarainyday

 

 

Progress of project week #7

 

Building on the macro lens, we found out that the lighting had a very significant influence on the computer vision image captured for the model to process and calculate. The lighting affects the shadows and also due to resistors having relatively reflective surfaces, a diffused and yet strong and equal light source will then have to be made. As a trial test, we made use of the classic office standard white printing paper as a diffusing filter for a single led.

 

Testing out White LED using a breadboard!

 

With this, the group then sought out to design a case that can encase the camera module together with the diffused light source. To design the camera module, we made use of the Fusion360 designing software to quickly design a casing like shown below.

 

 

 

This week, our group also set out to conduct rapid prototyping to have a sense of what we want the product to look like. We made use of the spare materials left around in the M&T Lab to create the prototype within a couple of hours! Here is a photo of our prototype with Chester posing together with it. #reducereuserecycle #savetheplanet.

 

Rapid Prototyping Using Spare Materials & Chester

 

Progress of project week #8

 

In this week, the group sought to design the hardware components needed for the physical setup of our product. These components would be responsible for holding up our camera module that is connected to the RPi. In the meantime, as a proof of concept, we made use of some of the spare 3D printed parts to build a temporary structure for conducting our tests of our CV model. These unwanted spare 3D printed parts were found in a cardboard box in the M&T lab, which our group has nicknamed, “The Graveyard”. Below are some photos of how we made use of the spare parts as a temporary structure!

 

 

While we were testing the software side of things, we also began work on the design of the parts we wanted to get done up by the week. . Some of our design considerations include using a slide-in component over the traditional screws due to the line of action of force being parallel to the screws for the top bracket, and also choosing to create a slimmer camera housing to reduce the bulk and weight of the camera module. 

 

 

The above images are snippets of our group’s progress of converting our sketch into Fusion360, and then actually printing it out and trying it out on our product itself. Here’s how it looks like when assembled together!! #0.2mmgap #fitslikeaglove

 

 

As for the camera housing, to avoid extra bulk and weight, we thought of making use of a snap-in fit for the camera housing. For this case, we had to make multiple prints in order to find the optimum gap that would allow a snug and tight fit befitting of its purpose. While we did have a lot of failures (AKA broken pieces because we wanted a thin casing), we also learned a lot. For this snap-in and also the sliding component, it allowed us to make use of some of the theoretical concepts that our CBE friends learned in their “Intro to Multidisciplinary Engineering”, which included theory on how fits (interference/clearance and transition fits) are important in the design process for choosing the right components and parts for assembly. The process of designing these few parts definitely was enlightening. Below are some photos of the design of our snap-on casing! #applyingtheoryinreality #trialanderror

 

 

 

 

 

 

 

 

 

 

 

 

LIGHTING WOES

 

Lighting has proven to be problematic for our group. We explored making use of ambient light, a single white LED, using our own smartphone torchlights, 2 Neopixel strips, 4 LED bulbs from each corner, and now are making use of a Neopixel ring strip which has 12 LED bulbs. Lighting is extremely important for our project as it affects the shadows and also reflection off the resistor surface. With a strong bright and diffused light source, our group can then shift all of our focus onto the software model and adjust the necessary segments of the code for detection of the resistors. Examples of some of the light sources we tried using are shown below.

 

 

Progress of project week #9

 

With the hardware side of our project starting to come alive, for this week, we shifted our focus onto the testing of the computer vision model, in hopes of being able to have some successful resistor detection and make the necessary changes and updates to the code prior to the progress update later that week. With our new setup, we then shifted our usual project meetings into the physics lab where we could test out the effectiveness of a ‘black box’ concept for our detection.

 

However, during the testing, we found out that the ambient lighting (or lack thereof) had no real significant impact on the resistor detection due to the short distance between the resistor and the camera. At this moment, we were rather stumped and hence looked into how we could improve the setup to achieve successful detection using the computer vision model. During this process, we then revisited the one time we had a successful detection several weeks back when we made use of a cylindrical paper cone as a light diffuser, as shown in the image below.

 

 

We noticed that the amount of reflection coming off the resistor was significantly reduced and hence led us to look more into using translucent materials as a temporary diffuser to not only block and prevent direct illumination of the resistor with the Neopixel ring LED strip, but also to provide consistent lighting that we need for testing. For this matter, we tried using plastic cups by cutting them up, and also paper strips to make cones and cylinders for testing. From our testing, we then arrived at the conclusion that using a paper cone (as of now) would still be the best solution for providing the decently bright diffused light source which we so very dearly needed.

 

With a consistent diffused light source, we then worked on the code by adjusting the HSV color bounds ranges for the color bands that can be found on resistors. Initially, we approached the color detection problem broadly, by looking to adjust the ranges for all of the colors at once. However, we realized that this more often than not led to incorrect yet inconsistent color detection. The inconsistency of the color detection then led us to wonder if the lighting still is not good enough for the purpose of resistor color band detection. This definitely was a frustrating point for our group and led to a kind of ‘programmer’s block’ situation.

 

 

But thankfully, after taking a break and chatting with other people from other groups, our group then realized that maybe we should change our approach toward this problem and narrow down our scope. #take1stepbacktotake2stepsforward

 

From that, we focused our color detection on the primary colors (red, blue, green). Turns out that by approaching the problem this way, we managed to achieve consistent resistor color band detections for the 3 primary colors! It was an extremely exciting moment for all of us when we saw the correct resistor value printed out on the screen. Below shows the screenshot we took when we managed to detect this resistor value rather consistently! #eurekamoment

 

 

Additionally, we also printed a box and a lid for containing our wiring and microprocessors in a secure location and to keep the prototype compact. This print took us the longest time so far (about a day to print), which was why our group decided on printing it over the weekend. Junyoung also began to work on the circuit diagram for all of the components which our project uses. #circuitdesign

 

 

Progress of project week #10

 

LCD screen, box, circuit arrangement and hardware 90 percent complete, printed bracket to contain the joystick and butt

 

This week, the group began working on hooking up the 7-inch LCD display to the RPi, together with the assembly of the parts that we 3D printed over the weekend. With the box, we finally could begin arranging and thinking of how we want our prototype to look like and how we should place the joysticks for fine-tuning of the focus, and also the button to control the lighting. After our discussion and team brainstorming, we eventually came up with the sketch for a bracket that would be used to hold the joysticks and also a mini housing that will contain the button. The rough sketch looked as shown below.

 

 

Given that the dimensions of the button housing being rather small, we decided that it would be good to first test out the size of the housing by printing that particular small piece separately, to prevent wastage of not only material but also PRECIOUS TIME. So that’s what we ended up doing. The piece came out to be a little bit too small, which was an extremely valuable finding because it tells us that we should edit the STL file and adjust the sizing accordingly.

 

smol print button housin fusion360

 

After adjusting the sizing, we then printed out the following STL file, and it turned out that the joysticks and button.

L bracket fusion360

 

With our freshly printed bracket the group then proceeded to work with the wiring also made use of the hot glue gun available in the M&T lab to glue this bracket to our setup and it ended up looking like this!

 

 

Progress of project week #11-12

 

In these few weeks, our group focused solely on improving the color detection of our model. With our model able to consistently detect red, green and blue, we then set our sights toward obtaining some of the intermediate colors. To correctly identify a suitable HSV range for specific colors, we firstly made use of many images (which we took using our phones and cameras) of resistors in different lighting conditions, and color-picked several pixels representing different shades of the same color! We then compiled the RGB values from color picking and converted them into the HSV color space for use in our computer vision code! Example of color picking is shown in the image below!

 

 

After we did the color picking, we also found an existing repository of a big range of colors from an online color detection repository, which we made use of to compare the commonly available colors that are found on resistors with the color range that we obtained from color picking prior. #crossreferencing 

 

Using this process we were able to successfully improve the color detection from just R/G/B, to being able to identify black and purple as well! (we also did get some brown color detection, however, it had problems with consistency due to some overlap with red and even black). Below shows some of the screenshots we took of the successful detections of purple, black and brown!

 

Screenshot of first successful purple band detection post color-picking and cross-referencing!

 

Successful detection of both purple and black bands (3 resistors all at once on a typical circuit board)!

 

Successful detection of brown band (2 resistors in the frame)!