Ultrasonic Based Access System

2,899

16

8

Introduction: Ultrasonic Based Access System

This time I present you an ultrasonic based access system I think it could be interesting.

It is based on ultrasonic waves so it is a contactless access system that doesn't need any other electronic device but whatever object even your hands to try to grant access to whatever you want.

The basics of the system: an ordered sequence of measured distances forms a key

I hope you like

Step 1: How It Works

The system uses an ultrasonic sensor to measure distances to an object placed in front of it.

Let's suppose we configure the system to admit 6 specified distances: 1/2", 1/5", ... and we define a sequence of 5 measured distances as access key, then the set of different combinations would be 6x6x6x6x6 = 7776

Playing with the numbers of specified distances and the lenght of the access key we can configure an access system with a huge number of combinations.

The system is always measuring distances.

If a valid distances is measured by the sensor during a specified time interval, the sketch saves it and lights up a white led during a brief time interval.

After that the sketch checks if all the distances previously saved matches in the same order with the configured access key.

If so, the sketch will light up the green led and will open the barrier.

Step 2: Supplies

  • One HC-SR04 ultrasonic sensor
  • One ARDUINO NANO or compatible microcotroller
  • One micro servo motor
  • One ARDUINO LCD
  • One I2C ARDUINO LCD adapter
  • One protoboard
  • Three 5 mm leds: white, red and green
  • Wires
  • Plywood
  • Cardboard

Step 3: Fritzing Diagram

Step 4: Building the System

The steps I have followed to build the system are the following:

  • Open several holes on the plywood to install the ultrasonic sensor, the micro servo motor, the ARDUINO LCD and the three leds.
  • Wire all components and connect to the microcontroller as you can see in the pictures.

Step 5: The Code

Several points to take into account in the sketch:

  • The constant string variable "accessequence" stores the value of the access key
const String accessequence = "234";
  • The distance value you can see on the ARDUINO LCD is not the distance value measured on inches or centimeters but the value of a "distance group". I mean if the distance measured by the sensor goes from 0,78" to (0,78" + step_distance) the "distance group" value is 1 and so on.
  • You can modify the constant integer "step_distance", the "min_distance" and the "max_distance" to adjust the system precision.

Step 6: Testing the System

Be the First to Share

    Recommendations

    • Furniture Contest

      Furniture Contest
    • Explore Science Challenge

      Explore Science Challenge
    • Home Decor Challenge

      Home Decor Challenge

    8 Comments

    0
    Mohammad AweshH
    Mohammad AweshH

    Question 1 year ago

    can you please add details of how to do the coding part,as i can see there are several programs, i am completely new to it.

    0
    TecnoProfesor
    TecnoProfesor

    Answer 1 year ago

    Ok.
    Just download the rar file and extract the content. You will see a new folder called "Acces_Control". After that open the ARDUINO IDE, go to new folder and open the file "Acces_Control.ino". Select the board and the port you are going to use to load the sketch.

    0
    BarsomM
    BarsomM

    1 year ago

    thats great ;)

    0
    TecnoProfesor
    TecnoProfesor

    Reply 1 year ago

    Thanks for your message

    0
    FIRE95959
    FIRE95959

    1 year ago

    Nice!

    0
    AnnaMai
    AnnaMai

    1 year ago

    good, bro.

    0
    TecnoProfesor
    TecnoProfesor

    Reply 1 year ago

    Thanks for your comment