Add to cart
Board Type : GerberFile :
Layer : Dimensions :
PCB Qty :
Different PCB Design
PCB Thickness : PCB Color :
Surface Finish : Castellated Hole :
Copper Weight : 1 oz Production Time :
Total: US $
Elecrow community is a shared platform and we are not responsible for any design issues.

PCB Assembly

PCBA Qty: BomFile:
NO. OF UNIQUE PARTS: NO. of Components:
Assembly Cost: US $
Elecrow community is a shared platform and we are not responsible for any design issues.
Add to cart
3dPrintingFile : Size :
Unit : Volumn :
3D Printing Qty : Material :
Total: US $12.99
Elecrow community is a shared platform and we are not responsible for any design issues.
Add to cart
Acrylic Type : AcrylicFile :
Dimensions: Engrave:
Acrylic Qty :
Acrylic Thickness:
Acrylic Color:
Total: US $12.99
Elecrow community is a shared platform and we are not responsible for any design issues.
closed
user-img

Lily lee

Published: Apr 02,2024

DIY Mask/QR Code Recognition Smart Access Device W Raspberry Pi

ccc ccc
Copyright Info

Attribution-ShareAlike (CC BY-SA)

Read More⇒
  344
  0
  0
cover-img
 
  • thumbnail-img
 

Hardware Components

  • Raspberry Pi 4B

    X 1 fenxiang
  • 7 inch Screen

    X 1 fenxiang
  • Infrared module

    X 1
  • Camera

    X 1 fenxiang
  • recognition module

    X 1 fenxiang
  • QR code recognition module

    X 1 fenxiang
  • Device casing

    X 1
  • MLX90640 Thermal imaging module

    X 1
  • Buzzer module

    X 1
  • MP3 module & Speaker

    X 1
  • SD card

    X 1
  • Battery

    X 1
  • Switch

    X 1
  • Dupont Wires

    X 1 fenxiang

Story

Supplies

Supplies

Raspberry Pi 4B x1 ---> I will use it as my main control board. It has a powerful configuration, can run OpenCV, and its performance is much smoother than the 3B+ (before this, I tried to run OpenCV on the 3B+, but the image was very slow).

7 inch Screen x1 ---> "This screen fits perfectly with the size of my case, and the image is very clear. It is also touch-enabled, although I haven't used the touch function yet. During my testing, I found that the touch screen is very responsive, which surprised me.

Infrared module x1 ---> "I will use it to help me determine whether a phone is approaching after the prompt 'Please show the health code'.

Camera x2 --->Camera 1 is used for recognizing faces and masks, while Camera 2 is used for recognizing health codes. However, I recently discovered that Elecrow has launched a QR code recognition module. This means that after completing this small project, I can eliminate one camera and use the QR code recognition module to replace it.

Device casing x1 ---> The case is not custom-made, so everyone can design it according to their own preferences or use a similar case. Implementing the functionality is our primary goal and the most enjoyable part of the project.

MLX90640 Thermal imaging module x1 ---> I will use this module to implement thermal imaging functionality, and it can help me measure the body temperature of the user. It looks very cool.

Buzzer module x1 --> It will make a 'beep' sound after taking a photo of the health code.

MP3 module & Speaker x1 ---> It will play the voice prompt that I have pre-recorded and stored in the SD card, to guide the user on what to do.

SD card x2 ---> One is used to run the Raspberry Pi system, while the other is used to store MP3 files.

Battery x1 ---> I plan to use a battery to power my device, and I must strictly follow the power requirements of the Raspberry Pi, which is 5V and 3A.

Switch x1 ---> A switch that helps me control the power on and off.

DuPont wires xN --->The tool that helps me connect modules together.

Step 1: Make the Case

Make the Case
Make the Case
Make the Case
Make the Case
6 More Images

To speed up the process of making my device, I bought a case online that was close to what I needed. I then modified it to fit my requirements better. Here's what I did:

First, I cut a small hole in the case to make sure the screen's wires wouldn't be blocked. I smoothed out the edges with a file.

Next, I noticed that the case didn't close properly when I put in the Raspberry Pi. So I had to cut off a few pillars on the back cover of the case. After that, I could easily close the case even with the Raspberry Pi inside.

Lastly, I made a hole on the case bigger so that I could fit my switch button.

Step 2: Make and Connect the Switch

Make and Connect the Switch
Make and Connect the Switch

When I was planning it out, I totally forgot about the on/off switch. It wasn't until I was halfway through making it that I suddenly remembered. I realized that if I didn't include a switch, it would be a real pain to turn the thing on and off - I'd have to keep opening up the box and plugging/unplugging the power cord. But if I put in a switch, it would be way easier to control the power.

Step 3: Connect All Modules Together

Connect All Modules Together
Connect All Modules Together
Connect All Modules Together

After preparing the case, you can start connecting all the modules together. This step is crucial and requires careful attention. Make sure you don't connect the wires incorrectly, especially the positive and negative poles. If there is a short circuit, it may damage the modules or even your Raspberry Pi!

In addition, there are two cameras that you need to connect to the Raspberry Pi. One is a QR code camera that can be plugged into any USB port on the Pi, and the other is a mask recognition camera that should be connected to the Pi's default CAMERA interface.

Here is the wiring diagram that I prepared. You can follow this diagram to connect the modules. Please make sure you don't connect them incorrectly.

Step 4: Fixing and Assembly

Fixing and Assembly
Fixing and Assembly
Fixing and Assembly
Fixing and Assembly

First, let's use some hot glue to stick the screen and QR code camera onto the front of the case. This will make things easier when we're putting everything together later. Then we can fix all the other parts onto the back of the case. I decided where to put them based on the case I'm using, but you can arrange them however you like as long as everything can connect properly and the case closes up completely.

Step 5: Wrtie the Image

Wrtie the Image

I've finished the hardware part, and now in this step, I need to download an image onto my computer. Setting up the environment is a bit complicated and if I make a mistake, it could mess up the software and I'd have to start all over again, which takes a lot of time. That's why I highly recommend using the image I'm providing.

Before I can burn the image, I need to download and install a software called "Win32 Disk Imager," which will help me burn the image onto an SD card. After I've installed the software, I'll open it, find the image I'm using, choose the SD card, and click "Write" to burn the image.

Once the burning process is complete, I'll insert the SD card into the Raspberry Pi, and then it's ready to be turned on!

Step 6: Set Up WIFI

because my program requires internet access to upload the health code photo taken to a cloud-based API via HTTPS, wait for the API to recognize the code and return the result, and then display the result accordingly.

To set up Wi-Fi, first execute the command:

sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

Locate the following code:

network={

ssid="YOUR_WIFI_NETWORK_NAME"

psk="YOUR_WIFI_PASSWORD"

}

Replace "YOUR_WIFI_NETWORK_NAME" and "YOUR_WIFI_PASSWORD" with your own Wi-Fi network name and password.

After modifying the Wi-Fi network and password, save the file and exit the editor, then restart. The Raspberry Pi will automatically connect to your Wi-Fi network.

Step 7: Power It Up !

Power It Up !
Power It Up !
Power It Up !

I have placed the program in the directory "Mask_nd_Temp/New_jkm" on the desktop. If you don't want the program to automatically run at startup, you can go to the "/etc/rc.local" file.

Locate the following code:

sudo bash /home/njl/runapp.sh

put a "#" in front of it, and then save the file. This will disable the automatic startup.

 

After completing all of the above steps, I can see the same effect as shown in the video. Isn't it amazing? And it only requires a Raspberry Pi 4B to achieve such a cool function, which impressed my colleagues and made me very happy. It also helps remind my colleagues to wear masks and reduce the risk of infection.

Finally, I wish all my friends who have read this good health and happiness every day!

user-img

Lily lee

+ Follow

Topic

View All
  • Comments( 0 )
  • Like( 0 )
/1000
Upload a photo:
You can only upload 1 files in total. Each file cannot exceed 2MB. Supports JPG, JPEG, GIF, PNG, BMP

You May Also Like

View All