Engineers Garage

  • Projects and Tutorials
    • Circuit Design
    • Electronic Projects
      • 8051
      • Arduino
      • ARM
      • AVR
      • PIC
      • Raspberry pi
      • STM32
    • Tutorials
    • Components
  • Articles
    • EG Blogs
    • Insight
    • Invention Stories
    • How to
    • What Is
    • News
      • EE Design News
      • DIY Reviews
      • Guest Post
      • Sponsored Content
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • EE Resources
    • DesignFast
    • LEAP Awards
    • Oscilloscope Product Finder
    • Video
    • White Papers
    • Webinars
  • EE Learning Center
  • Women in Engineering

How to design a touchless bell push using Arduino

January 8, 2021 By Nikhil Agnihotri

The COVID-19 pandemic has severely affected the lives of millions across the world. It has caused a significant increase in the awareness of health and better hygiene. As a result, the electronics industry has experienced a rapid demand for touchless devices and appliances, such as contactless sanitizer or soap dispensers and automatic doors.

For this project, we’ll design a touchless bell push, which can be useful in homes or offices. The bell uses an ultrasonic sensor that can be easily assembled with little cost.

We’ve prototyped the touchless bell push using Arduino, which means the code can be ported to any Arduino-compatible platform.

Required components

1. Arduino UNO x1
2. HC-SR04 ultrasonic sensor x1
3. Buzzer x1
4. Breadboard
5. Connecting wires/jumper wires

Circuit connections
To assemble the touchless bell push, an HC-SR04 ultrasonic sensor and a buzzer are interfaced with an Arduino board. Arduino UNO is used for this project.

The HC-SR04 ultrasonic sensor has four terminals: VCC, trigger, echo, and ground. The sensor’s VCC and ground terminals are connected with a 5V DC supply and ground from Arduino. The sensor’s trigger and echo terminals are connected with Arduino’s pins 8 and 9, respectively. The buzzer is connected to Arduino’s pin 7.

Circuit diagram

Arduino sketch

How the circuit works
The touchless bell push lets a user ring the bell without touching it. The HC-SR04 ultrasonic sensor is interfaced with Arduino to allow for contactless operation. 

The sensor can detect an obstacle or object that’s up to 400 cm away. It consists of two ultrasonic transducers: one that transmits 40 kHz ultrasonic sound pulses and another that “listens” for the pulses that vibrate off of the obstacle or object. By measuring the width of these received pulses, the sensor assesses the distance from the object. 

The HC-SR04 is capable of non-contact detection at a distance ranging between 2 and 400 cm with an accuracy of 3 mm. The sensor requires 5Vs of operating voltage, which is compatible with most microcontrollers and Arduino boards. 

For this project, the HC-SR-04 is only used for non-contact detection up to 10 cm. This distance is adequate for use of the contactless bell as a doorbell or desk bell. 

A piezo buzzer is interfaced with Arduino and it works as the bell. It’s wired to ring when a LOW logical signal is output from Arduino’s interfaced pin. It stays silent when a HIGH logic is applied from the Arduino pin to the buzzer terminal. 

Arduino is programmed to ring the buzzer when the ultrasonic sensor detects interference at a distance of less than 10 cm. The buzzer sounds because of the application of a combination of square-wave frequencies at short intervals. These square waves are generated by Arduino’s GPIO digital output.       

How the code works
Begin the Arduino sketch by importing the NewPing library. This library is useful for interfacing the HC-SR04 ultrasonic sensor with Arduino. The library can be downloaded as a ZIP file from the above link. 

To install the library, simply open the Arduino IDE, go to Sketch > Include Library > Add .ZIP Library, and then select the NewPing ZIP file that you just downloaded. 

Follow this step with the pin assignments, interfacing the sensor’s trigger and echo terminals with the buzzer. 

Then, an object “sonar” (from the NewPing class) must be instantiated. And, a variable “distance” must be declared to store the distance of the non-contact detection and a variable “I,” which runs the counters. 

In the setup() function, the buzzer pin is set to output and raised to HIGH logic by using the digitalWrite() function. In the loop() function, the distance to any interference is detected using the NewPing class’s ping_cm() method. 

If the distance of the non-contact detection is less than 10 cm, the buzzer is rung by generating different square-wave frequencies. These square waves are generated by writing alternative LOW and HIGH logic to the buzzer pin — with different time delays. Finally, the buzzer is set to silent by applying a HIGH logic to the buzzer pin.   

Results

 

Related Articles Read More >

Arduino’s L293D motor driver shield guide
How to build an automatic watering system for plants using Arduino
Arduino Based Music Notes and Melody Generator with LCD
IR LEDs
Arduino-based optical proximity sensor using IR LEDs

Featured Tutorials

  • Screenshot of Raspbian OS on Raspberry Pi RPi Python Programming 03: Raspberry Pi as Linux System
  • Raspberry Pi Models RPI Python Programming 02: Raspberry Pi Models
  • Raspberry Pi 4 RPi Python Programming 01: Introduction to Raspberry Pi 4
  • RPi Python Programming 05: Introduction to Python
  • RPi Python programming 04 RPi Python programming 04: Setting up Raspberry Pi Linux computer
  • Python Basics RPi Python Programming 06: Python basics

Stay Up To Date

Newsletter Signup

EE Training Center Classrooms

“ee

“ee

“ee

“ee

Recent Articles

  • Arduino’s L293D motor driver shield guide
  • NXP launches its first Wi-Fi 6E Tri-Band system-on-chip
  • Nexperia launches industry’s first 80 V RETs for high-voltage bus circuits
  • TDK releases low-profile medical sensors
  • Getting started with Raspberry Pi
...

RSS EDABOARD.com Discussions

  • Power controll on 230V with zero switching and PWM?
  • hysteresis variation mc sim
  • Creepage distance from primary to secondary of offline SMPS
  • HSPICE Simulation refuses to match the Spectre Simulation
  • Same geometry but slightly different results

RSS Electro-Tech-Online.com Discussions

  • How do I find the value of an exploded ceramic capacitor?
  • Any advice on identifying the HV wires on an old flyback.
  • How are you managing with the Covid-19 pandemic?
  • zener diode problem
  • Where has the fun gone?
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • DesignFast
  • EDABoard Forums
  • EE World Online
  • Electro-Tech-Online Forums
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • 5G Technology World
  • About Us
  • Contact Us
  • Advertise

Copyright © 2021 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Projects and Tutorials
    • Circuit Design
    • Electronic Projects
      • 8051
      • Arduino
      • ARM
      • AVR
      • PIC
      • Raspberry pi
      • STM32
    • Tutorials
    • Components
  • Articles
    • EG Blogs
    • Insight
    • Invention Stories
    • How to
    • What Is
    • News
      • EE Design News
      • DIY Reviews
      • Guest Post
      • Sponsored Content
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • EE Resources
    • DesignFast
    • LEAP Awards
    • Oscilloscope Product Finder
    • Video
    • White Papers
    • Webinars
  • EE Learning Center
  • Women in Engineering