12/2/2021

Ultrasonic Library Arduino For Proteus 8 Professional

30
  1. Ultrasonic Library Arduino For Proteus 8 Professional Software
  2. Proteus Library Download
  3. Ultrasonic Library Arduino For Proteus 8 Professional Download
  4. Arduino Library For Proteus
  5. Ultrasonic Library Arduino For Proteus 8 Professional Product

This library is for the HC-SR04 ultrasonic ranging module . The module is very easy use , now with the library , user just need a function then he can get the distance .

HCSR04 ultrasonic sensor. Allows an Arduino board to use HCSR04 module. This library allows an Arduino board to use multiple HCSR04 sensors for get current distance in cm. To do that, you should have Proteus already installed on your computer system, then add Arduino and ultrasonic sensor libraries to the Proteus library folder, once you have done that, you open Proteus and draw the circuit diagram as shown below. Figure 1: HC-SR04 simulation on Proteus.

Library includes 3 functions for user :

Ultrasonic(int TP, int EP)

This is a initial function for ultrasonic ranging module, choose the pins for module Trig and Echo pin. You need using this function before Setup() to define the pin map.example: Ultrasonic(13,12);then you define the digital pin 13 of Arduino for the Trig pin of HC-SR04. And the pin 12 for Echo pin.

long Timing()

Trigger the ultrasonic ranging module work and return the duration that Echo pin keep high level.example: long time; Ultrasonic hcsr; time = hcsr.Timing();Then you start the HC-SR04 for ranging and you get the time the Echo pin keep high, you can change the time corresponds to the distance : Distance = ((Duration of high level)*(Sonic :340m/s))/2

long Ranging(int sys)

If you don't want to change the time into distance yourself , this function will help you get the distance immediate. And the function has a parameter sys, you can use CM or ICN , than you get the distance show as centimeter or inch. This function will call the Timing() and you don't need to use the Timing() before it.example: long distance; Ultrasonic hcsr; distance = hcsr.Ranging(CM);

;) Hope it help.

Simulation of HC SR04 Ultrasonic Sensor with Arduino in Proteus to Measure Distance

  • 2,693 views
  • 0 comments
  • 0 respects

Components and supplies

Ultrasonic Library Arduino For Proteus 8 Professional Software

Arduino UNO
×1
Ultrasonic Sensor - HC-SR04 (Generic)
×1
Alphanumeric LCD, 16 x 2
×1
Single Turn Potentiometer- 10k ohms
×1

About this project

Simulation of HC SR04 Ultrasonic Sensor to measure distance and is calculated in cm. The numerical value gets displayed on the LCD screen as well as on the Virtual Terminal, the data in the virtual terminal can be used to light up alarming LED Red, or Sound for blind.

Code

Schematics

Author

sumanskd

Proteus Library Download

  • 6 projects
  • 5 followers

Published on

June 2, 2020
Write a comment
See similar projects

Ultrasonic Library Arduino For Proteus 8 Professional Download


Ultrasonic

Arduino Library For Proteus

you might like

Ultrasonic Library Arduino For Proteus 8 Professional Product

Table of contents

Write a comment