Light Sensor Hand Washing Timer (Improved)

by carina_c in Circuits > Arduino

189 Views, 0 Favorites, 0 Comments

Light Sensor Hand Washing Timer (Improved)

IMG_0251.JPG
IMG_9868.JPG

During the COVID-19 epidemic, hand-washing is an indispensable step for epidemic prevention. Combined with school topics, I searched for other people’s works on the Instructable website and improved them to practice program editing.

My source of reference transformation:

Non-Contact Hand Washing Timer, published at Jun 13th, 2020, by R Jordan Kreindler

My transformation on this topic includes the sensor used in the device and the application of electric lights. The original Kreindler device used an infrared sensor, but because the parts provided by the school did not have this sensor, but to meet the problem, "no contact", because I changed the infrared sensor to a light sensitive sensor. It can also be more accurate in sensing, and will not start when a mosquito flies by. In addition, because you should focus on your hands instead of the screen when washing your hands, I added the application of electric lights. Because the peripheral light of human eyes is particularly sensitive to color changes, it can be used as a reminder. [The above is my mid-term topic]

The main users of this device are young children. Adults often tell children how long it takes to wash their hands before the bacteria die out, but at the same time the children do not have a clear concept of time, which will lead to a sloppy hand washing process, and the bacteria are left on the hands. Therefore, at the end of the term, I chose to make improvements for the children, making the appearance more interesting, making the sensor the appearance of the steering wheel, and adding the horn sound effect. While increasing the fun, it also increases functionality. [End-term topic]

Translated in Chinese:

在COVID-19流行期間,洗手是預防流行的必不可少的步驟。 結合學校主題,我在Instructable網站上搜索了其他人的作品,並對其進行了改進,來進行程序編輯練習。

我的參考資料轉換來源: 非接觸式洗手定時器,由R Jordan Kreindler於2020年6月13日發布

我在此專題的改造有裝置所使用的感應器和增加了電燈的應用。原先Kreindler所做的裝置使用的感應器是紅外線感應器,不過因為學校所給的零件沒有此感應器,但為了符合題目,”無接觸“,因我將紅外線感應器改為光敏感應器,這樣在感應上也能更加準確,不會因為一隻蚊子飛過而啟動。另外,因為在洗手時應該要專注在手上,而非螢幕上,因此我增加了電燈的應用,因為人眼睛的余光對顏色的變化特別的敏感,所以能夠有提醒的作用。「以上為期中專題」

此裝置的主要使用者是年紀小的小朋友。大人常常會對小朋友說洗手要超過多久細菌才會死光,但同時小朋友又沒有明確的時間觀念,因此會導致潦草的洗手過程,而細菌都遺留在手上。因此期末專題我選擇為小朋友進行改良,將外觀改的更加有趣,將感應器做成方向盤的外觀,並增加喇叭音效。在增加樂趣的同時,也增加功能性。「期末專題」

Supplies

For my project, I had used

- an I2C 1602,

- an Light Sensor,

- a Breadboard,

- Dupont cables to connect components,

-a Green light bulb,

- a Metal film resistor,

- a Carbon film resistor,

- a Steering wheel

- a Horn (speaker)

- a box

- an Arduino Leonardo.

Set Up the Circuit Board

圖像-1.jpg
截圖 2021-04-18 下午10.20.11.png

"BreadBoard"

  • 5V ~ (+)
  • GND ~ (-)

"I2C 1602 LCD"

Download the file from the link to work the LCD board, Directly Download

The positive and negative poles must be specially confirmed, and must not be reversed, which will cause the chip to burn out

  • GND ~ (-)
  • VCC ~ (+)
  • SDA ~ SDA
  • SCL ~ SCL

“Light Sensor”

Before coding make sure the number of your light sensor detect. By checking "Arduino serial plotter".

  • Left leg ~ (+)
  • Right Leg ~ MFR and A0
  • MFR ~ (-)

"Green Light Bulb"

  • Longer Leg ~ D12
  • Shorter leg ~ CFR
  • CFR ~ (-)

"Horn (Speaker)"

  • Red line ~ D11(~)
  • Black line ~ GND

Changing the Coding

Arduino.cc link

/*
  Wash Hands Timer
  Written June 14, 2020
  by R Jordan Keindler
  Uses an I2C 1602, An IR Obstacle Avoidance Module,
  and an Arduino UNO
  Adapted Apirl 18, 2021
  by Carina Chiang
  Used an I2C 1602, An Light Sensor, and an Arduino Leonardo
*/
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2); // Set I2C address to 0x27

int delay1 = 1000;
int i;
int val;
void setup()
{
  lcd.init(); // initialize the lcd
  Serial.begin(9600);
}
void loop(){  // put your main code here, to run repeatedly:
  if ( analogRead( A0 ) < 750 ) { //“改”將原本的紅外線感應變成光敏感應器
    tone(11, 440, 1000); //buzzer or speaker frequency 
    lcd.backlight(); // Turn on the backlight
    digitalWrite( 12 , LOW ); //"改" 裝置啟動時,燈會暗掉
    lcd.clear(); // Clear the LCD and place cursor at first position on first line
    lcd.print("Wash Hands Timer"); // Print "Wash Hands Timer" on first line of LCD
    lcd.setCursor(0, 1); // Position display cursor on second line
    lcd.print("Elapsed time: "); // Print "Elapsed time: " on second line of LCD
    for (i = 1; i <= 60; i++) { // Count the seconds
      lcd.setCursor(14, 1);
      lcd.print(i);
      delay(delay1);
    }
    lcd.noBacklight(); // Turn backlight Off
    digitalWrite( 12 , HIGH ); //“改”當時間到時會亮燈提醒
    tone(11, 440, 1000); //buzzer or speaker frequency 
  }
}

Testing

期中改良

期末改良

Decoration!

IMG_0249.jpg
IMG_0250.jpg

I used the used mask box, which is not only environmentally friendly, but also called for wearing a mask and washing hands frequently during the COVID-19 epidemic prevention period. [期中專題]

In order to increase the fun of the installation, I attached a steering wheel to the box, with the sound of the horn, giving the child a sense of simulation experience of driving and honking the horn.(為了增添裝置的樂趣,我在盒子上貼上了一個方向盤,配合喇叭音效,讓小孩有種開車按喇叭的模擬體驗感。)「期末專題」

Final Product !

期中專題

期末專題