Example of Use of Gesture Sensor ADUX1020 - Key Lock Authentication System

Article Source
Macnica Engineer

Example of Use of Gesture Sensor ADUX1020 - Key Lock Authentication System

Gesture Sensor Use Case - Key Lock Authentication System 

Gesture sensors are gaining attention as a new user interface to replace mechanical buttons and switches. However, many people don't know which application the gesture sensor is suitable for.

Applications that benefit from the use of gesture sensors as a user interface can be in areas of hygiene concern, such as food and medical. When the ADUX1020 gesture sensor is used as a user interface in these fields, it is possible to operate the equipment without touching it. This not only improves hygiene, but also eliminates the need to wash and disinfect hands every time the user touches the equipment, thereby increasing work efficiency. In applications where water and dust resistance are important, there is no need to provide a mechanical button or switch in the user interface. For example, by covering the enclosure with a transparent case, water and dust resistance can be enhanced.

In this article, as an example of an application using the gesture sensor ADUX1020, I will introduce a key lock authentication system that releases the lock when the PIN and the number match.

Unlike the conventional key-lock authentication system in the user interface, the number input is performed without contact, so there is no need to worry about the security code leaking due to the dirty buttons, and the user can operate even when both hands are occupied.
 

Product configuration considerations

Per creation, we first imaged the overall configuration.

After the key authentication is performed, the key authentication is performed and whether the PIN number matches will be transmitted to the PC via wireless.

In addition, when the door is damaged by an impact, an acceleration sensor for detecting the shock is applied and transmitted wirelessly to the PC. In addition, when an impact is applied to the door to force it open, the acceleration sensor for impact detection responds and transmits it to the PC wirelessly.

Configuration image

Following devices are used other than ADUX 1020 for gesture detection.

  • Acceleration sensor for shock detection : ADXL345
  • 7 segment (2 digit) LED display for display of security code entry result: A-552SR-A
  • Red LED : OS5RPM5111A
  • Blue LED : OSB56A5111A
  • Result Radio Module : ESP-WROOM-02
  • Overall control MCU : ADUCM360

Operation sequence study

For the gesture detection sequence

  1. Monitor LED reflection intensity at 4 points : X1, X2, Y1, and Y2
  2. Calculate the intensity of light from the received data as follows
  3. I=X1+X2+Y1+Y2
  4. The processing method is determined according to whether the light intensity exceeds the threshold value C continuously A times or more and continuously B times or more. 

 

  • If the light intensity falls below threshold C within B times ⇒ Increase the number of the 7 segment LED display by one
  • When the light intensity exceeds the threshold value C continuously for B times or more ⇒ Proceed to the judgment operation

※A、B、C  are decided after preparing the substrate and confirming the actual operation.

 

Regarding the judgment operation

This time, the judgment operation is performed with the security code set to "5".

  • When the 7 segment LED display shows 5.
    • Turn on the 7 segment LED display on the ADUCM 360 and send the result to ESP-WROOM-02.
    • After reception, ESP-WROOM-02 turns on the blue LED and wirelessly transmits "OK" to the PC, which then displays the character on the screen.
  • When the 7 segment LED display indicates anything other than 5
    • Turn on the 7 segment LED display ADuCM360, return the number to 0, and send the result to ESP-WROOM-02.
    • After receiving the message, the ESP-WROOM-02 turns on the red LED and sends a "WARNING" message to the PC, which then displays the message on the screen.
    • Other

When a vibration of 2.5g or more is detected, the 7 segment LED display is turned on by the ADUCM360 and the number is returned to 0. The result is transmitted to the ESP-WROOM-02. After receiving the signal, the ESP-WROOM-02 turns on the red and blue LEDs and wirelessly transmits "DANGER" to the PC, which then displays the character on the screen.

Functional block diagram

Start building!

As specifications were determined, we actually created a substrate, but one problem arose.

I was thinking of controlling the 7 segment LED display A-552SR-A with the GPIO terminal of the ADUCM360, but it turned out that the GPIO terminal was insufficient to display all 2 digits from 0 to 99. This A-552SR-A requires 1 GPIO terminals for ON / OFF of 1 LEDs, and a total of 15 GPIO terminals of 7 xx + power supply are required to display all 2 digits from 0 to 99.

However, there were only 10 available GPIO terminals, so the number of GPIO terminals was reduced to 0 to 19 by displaying only 10 digits as 0 and 1, and the number after 19 was changed back to 0.

After the circuit board was completed, we held our hand in front of the door to determine the threshold value of the reflected light intensity and the number of detections, and to determine the condition of the numerical count UP.

When the power was turned on, it was found that the reflected light had a value of about 70% of the maximum value of the measurement range before the hand touched, and it was found that the offset correction of the X1, X2, Y1 and Y2 ch was not made and then proceeded.

After the offset correction, the reflected light of each channel before the hand was held over was less than 1000, and the total reflected light was less than 4000. When the hand was held over the channel, it responded to the distance, and the reflected light was detected up to approximately 15 cm. Through trial and error, the condition of the numerical count UP was detected 5 times in a row when the total reflected light was 6000 or more, and the judgment operation was made more than 150 times.

Completed key-lock authentication system

Completion

Now that the parameters have been determined, I have checked the operation. The operation of the 7 segment LED display was performed according to the specifications when the number and security code were correct or incorrect.

Left:Judgment operation executed when other than "5" is displayed. / Right:Judgment operation executed when "5" is displayed

When impact is applied to the door

It can be applied to a wide range of applications depending on ideas

For gesture detection, this time it was a case that crossed the front of the sensor, but you can also detect the direction in which you hold your hand from top to bottom, bottom to top, right to left, and left to right.

References

Applicatoin Note AN-1410.pdf
Extended reading Easy! Gesture sensor : Run ADI ADUX1020

For more information: