Arduino Light Blocking Sensor (Photo Interrupter Module) - Keeping Your Cards Safe (Prototype)

by Rucksikaa_R in Circuits > Arduino

4907 Views, 1 Favorites, 0 Comments

Arduino Light Blocking Sensor (Photo Interrupter Module) - Keeping Your Cards Safe (Prototype)

Screenshot_2019-09-14-15-02-21-542_com.miui.videoplayer.png
Screenshot_2019-09-14-15-02-36-732_com.miui.videoplayer.png
Screenshot_2019-09-14-15-02-53-613_com.miui.videoplayer.png
IMG_20190914_145128.jpg
IMG_20190914_145146.jpg

This project is a prototype and in this project I will be discussing about how your cards - such as credit cards, debit cards, gift cards - can be kept safe. Take a look at the pictures above to see how this project works.

Let me give you a glimpse of this project. When I press the push button, the colour of the two-colour LED module changes colour from Orange to Green. The light blocking sensor is activated and when the card is kept within its U-shaped gap, the sensor senses that there is an object within the gap which is blocking the light. This sends a HIGH signal. When the card is displaced, the light is not blocked and the sensor sends a LOW signal and according to my codes, this triggers a buzzer alarm and the two-colour LED module changes colour from Green to Red.

To see further details about how this project works, please watch the YouTube video which I have embedded in the 'Final Look' section of this page.

Supplies

  1. Arduino Uno R3/ Arduino Nano
  2. Solderless Breadboard - Full size
  3. Jumpers
  4. Jumper wires - [Male-to-Male] 30cm and 10cm (x7 each)
  5. 9V battery
  6. 9V battery terminal
  7. Active buzzer (KY-012)
  8. Light blocking sensor - also known as Photo Interrupter module (KY-010)
  9. Push button - also known as Key switch module (KY-004)
  10. Two colour LED module (KY-011)

Setting Up Your Hardware

IMG_20190914_145844.jpg
IMG_20190914_145851.jpg

Your hardware setup must look similar to the that shown in the picture above. For more guidance on setting up your hardware, please watch the YouTube video found at the last section of this page.

Connections

IMG_20190914_145900.jpg

  1. Buzzer - D3
  2. Light blocking sensor - D4
  3. Green LED - D5
  4. Red LED - D6
  5. Common cathode (Two-colour LED module) - GND (Ground)
  6. Push-button - D7

Coding

cs.png

*Note: The codes are incomplete. To get the full version of codes, please contact me at arduinoprojectsbyr@gmail.com

Final Look

Arduino Light blocking sensor - Keeping your cards safe (Prototype)

For more Arduino projects, please visit my blog: https://arduinoprojectsbyr.blogspot.com/

If you have further questions regarding this project, please contact me at arduinoprojectsbyr@gmail.com.