WAZIRI UMARU FEDERAL POLYTECHNIC,
BIRNIN KEBBI
Department of Computer Engineering
INTRODUCTION TO MICRO AND ASSEMBLY LANGUAGE
LAB MANUAL (CTE 241)
TOPIC: HOW TO ADD AND SIMULATE ULTRASONIC
SENSOR LIBRARY IN PROTEUS
BY:
Engr. Umar Yahaya
Department of comp. engr
Name of the Student: MUHAMMED MARYAM SANI
Matric No: NCT/23/0045
Year/Sem/Class: 2025/2ndSem/ND Two(2)
1
The Ultrasonic Sensor also called “Ping Sensor” is used to detect the objects in
front and measure the distance between the sensor and object. In this post, I will
show you how you can simulate an ultrasonic sensor in Proteus and how to use
it to measure the distance. But first, let’s see how to add and simulate Ultrasonic
Sensor library in Proteus.
How to add Ultrasonic Sensor Library to Proteus?
STEP 1: First of all have your Proteus application on your desktop
Click here to download the .zip file
STEP 2: Download Arduino library (ARDUINO.LIB) and Ultra Sensor Library
***Don’t have an Arduino library? Click here to download.
***Unzip the zip folder and install the application
STEP 3: Ultra Sensor Library? Click here to download
***Upzip the zip folder and you will obtain three files
1. UltrasonicTEP.LIB
2. UltrasonicTEP.IDX
3. UltraSonicTEP.HEX
STEP 4: Copy the first two files(1 & 2) and paste them in:
2
“C:\Program Files (x86)\Labcenter Electronics\Proteus 7
Professional\LIBRARY”
Next Copy the “.HEX” file and paste it in:
“C:\Program Files (x86)\Labcenter Electronics\Proteus 7 Professional\BIN”
STEP 5: Open Proteus and click on “pick from libraries” :
1. And search for ultrasonic in the tab, you will see ultrasonic sensor, select
it and paste anywhere in the panel
2. Double click on the sensor and the add the ultrasonic sensor HEX file and
add to the it as shown below
How to simulate Ultrasonic Sensor with Arduino in Proteus?
PROJECT: Measuring distance using Ultrasonic Sensor Library with
Arduino Library in Proteus.
COMPONENT NEEDED IN PROTEUS APPLICATION
1. Arduino UNO (4.0)
2. Ultrasonic sensor
3. Potentiometer
4. DC
3
5. Ground
6. Virtual terminal
STEP 1: Steps of creating the circuit diagram.
Go to “Pick Library”
And search Arduino Uno and add to the front panel
Go to “Pick” or use the shortcut “P”
And search pot-HG (potentetiometer) and add to the front panel
The go to the terminal mode and select the “ground” and add to the front
panel
Go to sine wave and add DC and and to the front panel ( and double click
on the DC and change it to 5v)
Go to virtual instrument mode and add virtual terminal
Then connect each component together like this:
Ultrasonic Sensor With Arduino in Proteus
STEP 2: Open your Arduino IDE
And add the code on the IDE
STEP 3: Go to preferences (if the code fail to verify and brings error)
4
Check “Compilation” CheckBox
STEP 4: Click on verify (compile)
STEP 5: After compilation is complete copy the HEX file path
STEP 6: Go back to proteus application
1. Double Click on the arduino
5
2. And paste the hex file
STEP 7: Run the simulation, change the connector to potentiometer to see the
different reading.
6
7