Hello world! Here’s what we accomplished in week 8!

DAY 1 

Monday, 1/7/24:

We tested out our ultrasonic sensors with different types of materials, to see if it could still accurately detect distances between itself and the various materials. While everything else worked fine, we realised that soundproof materials did not work well with the ultrasonic sensors. This is because ultrasonic sensors work by emitting sound waves at high frequencies and measuring the time it takes for the sound waves to bounce back after hitting an object, similar to how bats use echolocation!

However, soundproof materials like cushions absorb sound waves and scatter them instead of reflecting them back to the sensor, causing ultrasonic sensors to fail at detecting them. Also, since ultrasonic sensors emit fan-shaped sound waves, as seen in the image below, we felt that this would not be most suitable as trash below the threshold of a full bin could potentially be detected by the sensor.

Considering these limitations, we discussed and decided to try out different sensors such as infrared ones which do not have the limitations that ultrasonic sensors have.

DAY 2 (2/7)

We tried our infrared distance sensors but we discovered that the distance between the transparent materials and the distance sensor could only be accurately detected when they are placed perpendicularly to the distance sensors. However, once these transparent materials were slanted at an angle, this distance could no longer be detected. Since we had 2 of these sensors, we tried using one side as an emitter and the other as the receiver to form a makeshift beambreak sensor but still, transparent materials slanted at an angle could not be detected

 

This could be because of angle of incidence and reflection, total internal reflection and refraction.

  • Angle of incidence and reflection: When the transparent material is perfectly vertical, the infrared light hits the surface perpendicularly. This allows a portion of the light to pass through while some of it is reflected straight back towards the sensor, which can be detected by the sensor. Once the transparent material is slanted, the angle of incidence (the angle at which the IR light hits the surface) changes. According to the laws of reflection, the light will be reflected at an equal but opposite angle. This means the reflected light is not directed back towards the sensor but is instead scattered away, making it difficult for the sensor to detect the reflection.
  • Total internal reflection: In certain conditions, when light passes through a transparent material and hits the boundary at a steep angle (greater than the critical angle), it can undergo total internal reflection, causing it to bounce inside the material rather than reflecting back to the sensor. At a perfect vertical orientation, this effect is minimised because the light primarily reflects back in a straight line.
  • Refraction: Transparent materials bend (refract) light as it passes through them. The degree of refraction depends on the angle at which the light enters the material. When the material is slanted, the IR light might refract in a direction that causes it to miss the sensor upon exiting the material. With a vertical orientation, the refraction effect is more predictable, and the light is more likely to travel back to the sensor.

Hence, from experimenting with the ultrasonic and infrared sensors, we discussed about which wave type we would like to use [ultrasonic/infrared], placement in the bin [top/side] and their configuration [beam break/reflective].

Ultimately, we felt that the infrared sensors posed greater limitations, as in a trash bin, there would definitely be many more transparent materials slanted at different angles as compared to soundproof materials. Also, when we tested how wide the angle of the fan in which the ultrasonic waves were emitted, it was quite a small angle, which reduced the limitation of the ultrasonic sensor. Therefore, in terms of wave type, we opted for ultrasonic ones.

Here’s a table which shows the overall pros and cons of the ultrasonic and infrared sensors:

For placement and configuration, we chose to put them at the side as the ultrasonic sensors were deemed inaccurate when measuring the distance from the top of the bin to the surface of garbage below. Accurate readings were only detected when surfaces were perpendicular to the waves emitted by the sensor as tilted surfaces could cause waves to bounce in unpredictable directions.

For the configuration, we decided to test out a grid of ultrasonic emitters and receivers on different sides of the bin. When uninterrupted, a pulse emitted from one emitter should reach a specific receiver at a narrow range of values. If any object in the bin obstructs this pathway, the reading at the receiver would be longer than expected. We hope that such a grid will also help us detect the fullness of the bin in a foolproof manner!

 

DAY 3

Wednesday, 3/7/24:

Today we tried out our electromagnetic lock which will lock the bin once the bin is detected to be full. We tested out the logic, such that when the distance from end to end in our ‘bin’ was detected to be less than 17cm, which meant it was disrupted by trash, the lock will be activated. This logic worked!