念慈菴

【RA】Network fingerprint lock based on RA7F2E1

 
Overview

ON!

IMG_0640.JPG

Tangtang town building (

QQ screenshot 20220502100435.jpg

Keywords: ESP-12F, Blinker, serial communication, servo, stepper motor, DCDC, fingerprint unlocking, offline voice assistant, WS2812, download guide

Update

The PCB layout has been updated on 2022.5.3, the copper covering under the DCDC inductor has been cleared, and the speaker wiring silk screen has been added.
A BUG was discovered on 2022.5.4 . When the light is turned off, pressing it a few times to turn off the light may cause it to freeze. It is speculated that the break within the ws2812 function causes the outer loop to be interrupted (fixed)
2022.5.5 Blinker’s fingerprint registration function has been improved and the functional requirements have been met.
2022.5.8 Updated the schematic diagram. The servo uses MCU to output PWM without going through the MOS tube.
The PCB has been updated on May 16, 2022 , and the ESP automatic download circuit has been added. Now there is no need to pull down IO0 to start and then flash in; the 3D shell has been drawn and will be verified in 3 days.

BUG

2022.5.4 Every time a different command is sent through ESP8266, the light will be reset. Because of the detection program design, the fingerprint module must first add one by itself (fixed)

For Future

The network lock function is completed! The following are expanded DLC functions and are not necessarily complete!
Display indoor temperature and humidity (to be completed)
Time stamp delivery through 8266, and RTC real-time display of the clock (to be completed)
Show who opened the lock (to be completed)
Delete the specified fingerprint template (to be completed)

What's ON?

ON is a network lock. ON usually means switch, which includes the excitement and excitement when using a fingerprint to open the door. It is also the key to open my hardware open source life. In the past, fingerprint locks were registered and deleted by entering a password by pressing a button. , but ON is different. It communicates with ESP8266 through HTTP through the Blinker application on the mobile phone (that is, no matter where you are, as long as ESP8266 has a network, you can operate it, which is very convenient!), and then ESP8266 communicates with RA2E1 Perform serial communication to send commands! Then RA2E1 performs different functions through the obtained instructions!
SHELL

QQ screenshot 20220516113948.jpg
ON_Structure.jpg

Module function explanation:

ESP8266

IMG_0648(20220509-110549).JPG

ESP-12F (ie ESP8266) is a commonly used WIFI communication module. BLINKER communicates with MCU through HTTP protocol. BLINKER is the firmware module of ESP8266. It is simple and convenient to operate and supports various voice assistants on mobile phones! I am also new to BLINKER and it took me less than an hour to get started! The overall process is to declare a function, set the function callback, and initialize the function . I have set the following buttons by default. The functions include registering fingerprints and opening the door (because sometimes dirty hands may not be recognized), 12 types (plus 3 button states in total) 12 types) Lighting special effects (customizable), and who opened the door (subject to update) Since ESP8266 has so many functions, why not use it alone? This is what happened, even I was shocked when I said it!IMG_0655.PNG

voice assistant

IMG_0650(20220509-110753).JPG

In order to be able to use the voice function offline, I added the SU-03T voice assistant module. Why did I choose it? Mainly because it can customize the firmware, including serial port commands, PWM, and GPIO functions. What I use is serial port 9 to receive and send commands. This way, there are many more customizable functions. I can find more details on Taobao, but I don’t know much. No more details.

WS2812

IMG_0652.JPG

The Adafuit Neofixel library has been ported. The available instructions are: fill, set_color, rainbow, and at the same time! There is also the HUE algorithm! While the colors are bright, turn down the brightness! Protect your dog’s eyes!
SPI driver , SPI driver WS2812 is realized through the duty cycle of data. As long as the transmission period is adjusted to 1.25us, the WS2812 logic signal can be sent. For example, sending the WS2812 1 signal is 11111000, and the duty cycle is 60%! Comply with WS2812 high level signal!

DHT22 (to be summarized)

A4988 stepper motor module (program to be improved)

IMG_0651(20220509-110815).JPG

A commonly used stepper motor drive module, why should we add a stepper motor module? Because the ordinary servo module cannot support large torque, a stepper motor must be added to support unlocking places that require large torque. I don't often use motors, so there may be errors in the circuit design . RST and SLP are connected to make the motor in normal working mode (RST is pulled up by default, SLP is activated by connecting to high level, shorting these two pins will be in normal working state), DIR controls the direction, and STEP input pulse can be stepped , I added pull-down resistors to the subdivision pins, and connected the MS to the MCU. In other words, I can control the subdivision number without jumping the cap, which is very convenient!

CH9102X serial port download

CH9102X is a high-performance serial port chip from Qinheng, with a download speed of up to 4M! At the same time, it is a QFN-28 package, smaller in size! There is an external 2X3 pin header. You can use the pin header to choose to download to ESP8266 or download to RA2E1. At the same time, you can also communicate with the MCU through the serial port for debugging. This pin header must be added, otherwise it will be directly connected to the ESP8266 and If it is RA2E1, the download to RA2E1 will fail!

Power supply/power supply

DCDC step-down is used to power the MCU , WS2812B and servo . The actual power supply is normal at full brightness (the ripple is not measured because the oscilloscope can’t queue it up for me)! **But it is still recommended that the maximum brightness of WS2812 is around 128! **Two LDOs are used, one LDO supplies power to the fingerprint module (as for why it needs to be independent, it is written in the manual), and the other supplies power to the ESP8266 and voice assistant. It can be said that the power supply is very sufficient and comes with USB protection. The circuit supports USB and 12V power supply at the same time, so I no longer have to worry about burning my computer!

Fingerprint module

IMG_0649(20220509-110727).JPG

What I use is the Hailingke FPM383C fingerprint module ( actually other fingerprint modules also support other modules, which may not have enough performance and may not respond quickly, so an error message will be sent (5.3 update)). It costs 28 yuan each, very cheap, and has a good pass rate. It is still very high. It adopts the automatic verification fingerprint mode, that is, sending a series of instructions EF 01 FF FF FF FF 01 00 08 32 01 FF FF 00 04 02 3E will automatically verify the induced fingerprint. The identification logic I adopted is to put my hand On top (high level) -> MCU sends instructions -> fingerprint module verification, sends a string of data -> MCU receives variable length data strstr and finds the desired string segment -> correct identification/error return

Download guide

I use JLINK-V9. I typed it myself and it cost 50 yuan, or I bought it on Taobao for 90 yuan each. In order to take care of students who don’t want to buy JLINK, I have brought my own (serial port) download module, which supports 921600 download baud. Because the download file is usually not large, the actual speed experience is similar to that of JLINKV9. You only need to connect the communication pin of CH to the MCU through the jumper cap, and first adjust the BOOT toggle switch to BOOT- (the arrangement at the boot You can use a toggle switch for the pins, any pin pitch is 2.54), then press the RESET button, and then use RA's serial port download tool to download! If it is JLINK V9, you can omit the above step and download it directly with JLINK-LITE.

Finally, I would like to thank Jialichuang and RA for their platform, which allows me to do what I like, and I would also like to thank all the big guys in the group for their support during the training camp.

参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-05-14 19:30:12

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
community

Robot
development
community

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号