Arduino Mega 1280 Library for Proteus V3.0

Hello friends! I hope you are doing great. Today, we are discussing the latest version of the Arduino Mega 1280 library for Proteus. This can be used in both versions (Proteus 7 and Proteus. We have shared the previous versions, which are the Arduino Mega 1280 library for Proteus and the Arduino Mega 1280 library for Proteus V2.0 with you. With the advancement in the version, these microcontrollers have a better structure and the design is closer to the real microcontrollers. 

In this article, I will discuss the introduction of the Arduino Mega 1280 in detail. Here, you will learn the features and functions of this microcontroller. Then, we’ll see how to download and install this library in Proteus. In the end, we’ll see a mini project using the Arduino Mega 1280 V3.0. Let’s move towards our first topic:

Where To Buy?
No.ComponentsDistributorLink To Buy
1Battery 12VAmazonBuy Now
2ResistorAmazonBuy Now
3LCD 20x4AmazonBuy Now

Introduction to the Arduino Mega 1280 V3.0

  • The Arduino Mega is a microcontroller board that is based on the ATmega 1280. It has a large structure and provides more I/O pins.
  • It has the following memory features:
  • 128KB of flash memory to store the programs in it.
  • 8KB of SRAM for dynamic memory allocation
  • 4KB of EEPROM for data storage
  • It has 54 digital pins, of which 14 are used as PWM outputs.
  • It has 16 analogue input pins
  • This microcontroller uses the ATmega16U2 microcontroller for USB-to-serial conversion
  • It has compatibility with Arduino IDE where it is programmed with C++ just like other Arduino boards.
  • One must know that the Arduino Mega 1280 V3.0 is an open-source microcontroller and it is a robust platform for building and experiencing a vast range of electronic projects.

Now, let’s see the Arduino Mega 1280 library V3.0 in Porteus. 

Arduino Mega 1280 V3.0 Library for Proteus

The download and installation process for Arduino Mega 1280 is easy. The Proteus software does not have this library by default. To use it, the first step is to download it from the link given below:

Arduino Mega 1280 V3.0 for Proteus

Adding Proteus Library File

  • The downloading does not take much time. Once it is complete, it can be seen in the download folder on your system.

  • You will see a zip file when it is extracted to a particular path of your choice. 

  • There are two files in the folder named:

    • ArduinoMega3TEP.IDX

    • ArduinoMega3TEP.LIB

  • Copy these files and paste them into the folder with the following path:
    C>Program files>Lab centre electronics>Proteus 7 Professional>Library

Note: The same process is applicable to Proteus 8 professional if you are using that.

Arduino Mega 2560 Library V3.0 in Proteus

  • If all the above steps are completed successfully, the Proteus has to start/restart so that it may load all the files.
  • The Arduino Mega 1280 V3.0 is present in the libraries so click on the “P” button at the left side of the screen to pick it from the libraries. It will open a search box in front of you.
  • Type “Arduino Mega 1280” there and you will see the following options in front of you:

  • Double-click on its name to pick it.
  • Now, click on the picked Arduino Mega and place it on the working area to see its structure:

You can see it has many pins and the structure and design are closer to the real Arduino Mega. There is no link to the website on this microcontroller and it has more details about the pins on it. These points are different from the previous versions. 

Arduino Mega 1280 V3.0 Simulation in Proteus

The Arduino Mega 1280 has many features and it is used in a great number of projects. But, as a beginner, we’ll check the work with the help of a simple project. In this project, we’ll use the LED with Arduino Mega 1280 V3.0 and print the message of our own choice. Follow the steps to perform this example:

  • Go to the pick library once again and write “LCD 20X4 TEP” there. Pick it to use it.
  • Similarly, pick the potentiometer by searching “POT-HG” in the search box.
  • Now, get the “Button” from the same search box.
  • Place the components of the project in the working area by following the pattern given here:

Go to the terminal mode from the left side of the screen, and then choose the default pins for the clean circuit. 

Set and label the pins according to the image given here:

The circuit is fine but it can’t be run without coding.

Code for Arduino Mega 1280 V3.0

  • Fire up your Arduino IDE.

  • Create a new sketch for this project. 

  • The upper side has a drop-down menu, choose Arduino from there. 

  • Delete the default code. 

  • Paste the following code into it:

#include

//Setting the LCD pins

LiquidCrystal lcd(13, 12, 11, 10, 9, 8);

const int buttonPin = 0;

boolean lastButtonState = LOW;

boolean displayMessage = false;


void setup() {

  pinMode(buttonPin, INPUT);

  //Printing the first message

  lcd.begin(20, 4);

  lcd.setCursor(1, 0);

  lcd.print("Press the button to see the message");

}


void loop() {

  int buttonState = digitalRead(buttonPin);

// Using if loop to create the condition

  if (buttonState != lastButtonState) {

    lastButtonState = buttonState;


    if (buttonState == LOW) {

      displayMessage = true;

      lcd.clear();

      lcd.setCursor(1, 0);

      //Printing the message on screen when buttin is pressed

      lcd.print("www.TheEngineering");

      lcd.setCursor(4, 1);

      lcd.print("Projects.com");

    } else {

      displayMessage = false;

      lcd.clear();

      lcd.setCursor(1, 0);

      lcd.print("Press the button to see the message");

    }

  }

}

  • The same code is also present in the zip file of the Arduino Mega 1280 V3.0 library folder you have downloaded. 

  • Click on the tick mark to run the code. It will take some moments to be loaded.

  • Once the loading is complete, click on the upload button to get the hex file address.

  • In the loading process, you have to search for the path to the hex file. In my case, it looks like the following image:

Add the Hex File in Proteus

  • Go to the proteus where we have created our project.

  • Double-click on the Arduino Mega 1280 V3.0 module.  It will open its properties panel in front of you. 

  • Paste the address of the hex file into the section named “Program File.".

  • Hit the “OK” button and close the window.

Arduino Mega 1280 V3.0 Simulation Results

  • There are some buttons at the bottom left corner of the screen. Out of these, you have to click the play button to run the project. 

  • If all the above procedures are completed successfully, you will see the output on the screen. 

  • When the button is opened, the LCD shows the message that you have to push the button to see the message.

  • Click on the button, and now you can see the message on the LCD. 

If all the above steps are completed successfully, you will see that you have used the Arduino Mega 1280 V3.0 to show the required message on the LCD. This microcontroller can be used in different complex projects and can provide the basic working according to the code. Now, you can try different projects on your Proteus. I hope you have installed the microcontroller successfully. Yet, if you are stuck at any point, you can ask in the comment section.

Arduino Library For Proteus V3.0

Hello friends! I hope you are having a good day. Today, I am sharing a new version of Arduino Library for Proteus(V3.0). I have already shared the previous versions of this library i.e. Arduino Library for Proteus(V1.0) and Arduino Library for Proteus(V2.0). This newer version is way better than previous versions because of its realistic design and better performance. I will discuss the comparison in detail in just a bit. This Proteus Library zip file has the following types of Arduino microcontrollers in it:

We will move towards the installation, but before this, let me share the basic introduction of Arduino.

Where To Buy?
No.ComponentsDistributorLink To Buy
1Battery 12VAmazonBuy Now
2ResistorAmazonBuy Now
3LCD 20x4AmazonBuy Now
4Arduino NanoAmazonBuy Now
5Arduino Pro MiniAmazonBuy Now
6Arduino UnoAmazonBuy Now

What is Arduino?

  • Arduino is an open-source family of microcontroller boards that is designed mainly for interactive projects by engineers.
  • It was presented to hobbyists, students, professionals, and developers for the experimentation of electronic and embedded systems.
  • Multiple sensors are interfaced with Arduino microcontrollers, and they can also drive the motors and switches for different circuits.
  • These are flexible, provide the platform for many types of embedded elements, and work as the heart of a project to control the work and automate the flow of the project.

Now, have a look at how to download and install this library in Proteus.

Comparing Arduino V3.0 with Other Versions

The latest version of Arduino is different from the previous ones because of the following reasons:

  • We have removed the website's link from these Arduino boards, as we received a lot of complaints from engineering students regarding it.
  • Reduced the boards' size to fit more components in the space.
  • We have used the original color for these Arduino boards to make them look more realistic and identical to real-world Arduino boards.
  • We have improved the layout of the pins for better wiring/routing.
  • Removed the unnecessary pins i.e. Power Pins & Reset Pin.
  • We have placed the Arduino logo on the boards.

Here are all the V3.0 Arduino boards:

Arduino Library for Proteus V3.0

  • The first step is to download the Proteus library for Arduino. For this, click the below link:

Arduino Library for Proteus

Adding Proteus Library Files

  • Once the download of the zip file is complete, extract the files from the zip folder.
  • Go to the “Library Files” folder, where you will find the following files:
  • ArduinoV3TEP.IDX
  • ArduinoV3TEP.LIB
  • Copy these files and paste them into the folder by following the path C>Program files>Lab centre electronics>Proteus 7 Professional>Library.

In case you don't know how to install the library, you can see How to Install the New Library in Proteus. Moreover, the installation process of this library in Proteus 8 is the same; you simply have to paste the files into the library folder of Proteus 8.

Arduino V3.0 in Proteus

  • Open your Proteus software, and if it was already opened, restart it. Now your Proteus can read the library files.

  • Click on the P button to pick the library from the system and the search bar, and type “Arduino V3.0 TEP”. All six libraries in Arduino V3.0 that you have just installed will be shown to you on the screen. 

  • Choose all of these by clicking them and closing the search window. 

  • Now, if you want to see the design of all of these, click on the name of the library, and then click on the working sheet to place the board.

  • Here is a simple view of all the files in the Arduino V3.0 folder.  

Arduino V3.0 Simulation in Proteus

Now, let us make a simple project with the Arduino UNO V3.0 to show you the workings of these libraries. All other boards can be connected to the components in the same way. So follow the steps to learn the workings:

LCD with Arduino V3.0

Let us create a simulation where the LCD display is controlled using Arduino V3.0. For this, we are using the LCD for Proteus V2.0. If you do not have this, you have to download and install the New LCD library for Proteus V2.0. Follow the instructions below to design the simulation:

  • Go to the pick library and get the following components:
    LCD TEP V2.0 (20X4)

    • POT-HG

    • Button

  • Set all the components on the working sheet. 

  • Go to Terminal mode>Default pin and set them with the components. 

  • Choose the ground and power terminals and connect all the components according to the image:


Code for Arduino V3.0

Open your Arduino IDE and paste the code given next into the Arduino. I have added the same code to the zip file. 

#include

//Setting the LCD pins

LiquidCrystal lcd(13, 12, 11, 10, 9, 8);

const int buttonPin = 0;

boolean lastButtonState = LOW;

boolean displayMessage = false;

void setup() {

  pinMode(buttonPin, INPUT);

  //Printing the first message

  lcd.begin(20, 4);

  lcd.setCursor(1, 0);

  lcd.print("Press the button to see the message");

}


void loop() {

  int buttonState = digitalRead(buttonPin);

// Using if loop to create the condition

  if (buttonState != lastButtonState) {

    lastButtonState = buttonState;

    if (buttonState == LOW) {

      displayMessage = true;

      lcd.clear();

      lcd.setCursor(1, 0);

      //Printing the message on screen when button is pressed

      lcd.print("www.TheEngineering");

      lcd.setCursor(4, 1);

      lcd.print("Projects.com");

    } else {

      displayMessage = false;

      lcd.clear();

      lcd.setCursor(1, 0);

      lcd.print("Press the button to see the message");

    }

  }

}

Add HEX file in Proteus

  • When the code is verified in the Arduino IDE, it will provide the hex file. Simply copy the main path of the hex file. 

  • Go to the Proteus and double-click the Arduino. It will open the properties panel. 

  • Paste the path to the hex file in the program file and click OK. 

Arduino with LCD Output

The code prints the link to the website on it. You can see the LCD gets power only when the button is pressed. 

When the button is unpressed:

When the button is pressed:

I hope you found this article useful. The Arduino library for Proteus V3.0 is more stylish, error-free, and easy to use. I have created other libraries, such as the Raspberry Pi 4, that are useful for embedded engineers. Feel free to ask any questions if you have any confusion.

Top Embedded Proteus Libraries V1.0 for Engineering Students

Hi readers! I hope you are having a creative day. Today, I am sharing the list of the top embedded proteus libraries in V1.0 especially designed for engineering students. Till now, you have seen blogs on different projects, components, libraries, and simulations. Yet, I am sharing the list of the first versions of these embedded libraries that will help the students throughout multiple projects. These libraries are highly useful in multiple domains of engineering, and if you don’t know how to download the new libraries , then you must see the link provided. 

This is the list of all new proteus libraries for engineering students . The zip files are present in the link to the related manual, which has details on how to download, install, and use these libraries. Now, let’s start learning about these libraries. 

Where To Buy?
No.ComponentsDistributorLink To Buy
1Battery 12VAmazonBuy Now
2ResistorAmazonBuy Now
3LCD 20x4AmazonBuy Now
4DHT11AmazonBuy Now
5DHT22AmazonBuy Now
6Flame SensorsAmazonBuy Now
7HC-SR04AmazonBuy Now
8Arduino NanoAmazonBuy Now
9Arduino Pro MiniAmazonBuy Now
10Arduino UnoAmazonBuy Now

Arduino Libraries V1.0

The involvement of microcontrollers like Arduino makes the embedded system more versatile and easy to use. Users can now install the Arduino library for Proteus and design multiple types of embedded system projects. The zip file of the Arduino library contains multiple Arduino versions. Here is the list of Arduino boards designed by TEP:


Geniuno Boards

The Arduino has developed another class of microcontroller named Geniuno that is sold under the umbrella of Genuino Labs. These are Arduino-compatible microcontrollers and have more affordable working mechanisms. These can be used with the Arduino software and hardware platforms and have a variety of models, as you can see in the below link:

Genuino Library for Proteus

Once installed successfully, you can access the following boards:

  • Genuino UNO
  • Genuino Mega 2560
  • Genuino Mega 1280
  • Genuino Mini
  • Genuino Pro Mini
  • Genuino Nano

Embedded Module Libraries

The embedded system libraries are highly useful for engineering students for projects related to the actuation, display, sensing, and communication of data. These libraries act like real components and help the students design real-time projects easily. Here is a list of the embedded libraries that you can download instantly:

LCD Library

There are multiple options to present the output of a circuit in an embedded system, but among these, an LCD is the most presentable and easy to understand. Proteus has multiple built-in libraries, but this LCD library provides the users with the best experience because it is easy to use and its pinouts are clean and easy to design. In the zip file, there are two versions of LCDs:

  1. LCD display (16x2)
  2. LCD display (20x4)

Both of these are extensively used in embedded circuits. Here is the download link for the new LCD:

New LCD Library for Proteus

This library can be easily programmed with Arduino code and hardware for embedded system projects. It is an alphanumeric LCD; therefore, it can show the numbers and alphabets based on the programming in the Arduino software. 

GPS Library

The Global Positioning System library is a useful component that provides versatility in embedded systems. Real-time GPS systems use satellites in space to provide information about the position of a particular object. In Proteus, the GPS allows the user to design projects, such as testing the performance of real GPS-based projects or simulating projects where the position of an object like a vehicle or a person is to be identified. Here is the link to download and install the GPS library:

GPS Library for Proteus

The design of this GPS system resembles the real GPS module. This library provides the system with two pins:

  1. TX pin
  2. RX pin

When the circuit is designed and the simulation starts, the module starts sending the NMEA data to the TX pin. At this moment, this data can be seen in the virtual environment connected to the GPS module. This is just a simulation module, so it does not provide clear longitude and latitude values. Therefore, there are some dummy values, but these are helpful to test the simulations. 

GSM Library

The GSM module is used for communication between the devices within the GSM network. This library allows users to work on projects related to the positioning and communication between the devices. The working of this GSM module is controlled with the help of Arduino software, where it can be programmed according to the requirements. The Arduino has the IDE manager library to be programmed with this module. Here is the download link for this:

GSM Library for Proteus

This library is designed in three colors and the user can choose any one or more than one according to the complexity of the project. 

XBee Library

It is another communication module that is used for wireless communication and configuration. This is a trending topic for engineering projects; therefore, I have designed it. This does not work exactly like the real XBee, but it helps a lot to provide the basic functioning in the simulation. Here is the link to download this library:

XBee Library for Proteus

This has two pins, TX and RX, and these are used to send and receive the data within XBee. The RX is usually connected to the output device, or Arduino, according to the circuit.

Bluetooth Library

The Bluetooth library has been one of the most demanding components of embedded systems for years; therefore, I have designed this to make it easy for students to use in Proteus. These modules are used for Bluetooth connectivity. This is the zip file for the module:

Bluetooth Library for Proteus

This has two modules of Bluetooth, which are:

  1. HC-05
  2. HC-06

Both of these have a similar structure, but their work is a little bit different. These modules have a limited range; therefore, they do not work well where communication is required for long distances. 

DS1307 Library 

This library provides the functionality of a real-time clock (RTC). it is used in projects where the current time is required, so it is a clock in the circuit that can be programmed once and used throughout the project implementation. This is the download link for the zip file in this library:

DS1307 Library for Proteus

Proteus has such libraries by default, but I have designed this library because it is more suitable for embedded projects and has different ways of working. The design is very similar to the real DS1307 library as it has a total of seven pins and a bright red colour with details on it. Out of these seven pins, X1 and X2 are used to add the crystal oscillator. This is used with devices like Arduino and PIC controllers. 

L298 Motor Driver Library

The L298 motor driver is designed to accept standard TTL logic levels and to drive the inductive loads. It is a dual full bridge driver that can bear high voltage and high current. It can drive relays, solenoids, stepping motors, etc. 

The module has been designed with bright colours and has small details just like the real driver. It is designed to control two motors at a time just like the real module. The link to download the zip file is given here:

 L298 Motor Driver Library for Proteus

Two sets of output pins are on the left and right sides used to connect the motors, while the input pins are at the lower right corner. Some other pins are also there to connect this module to the power source. 


SIM900D in Proteus

The main purpose of the SIM900D module is to control the GSM module with the help of a microcontroller so make sure you install all of these. This library has multiple functions that help provide the functionality of sending and receiving SMS messages, setting up the calls, and managing the GPRS data. Here is the link to install and use the SIM900D:

SIM900D in Proteus

It is relatively more complex than other experiments and requires more information about the component to work properly. 

C945 Library for Proteus

The C945 is a transistor library and as you expect, it has three legs named emitter, collector, and base. The first letters of these pins are mentioned on the module, and one must know it is an NPN transistor. It is a general-purpose transistor and is the main component of several electronic components. The installation of this module can be done through the following link:

C945 Library for Proteus

The simplest way to see the workings of this transistor is through the simplest output devices, such as an oscilloscope or LED.  

PC817 Library for Proteus

It is a safety component used with the microcontrollers and prevents the burning of the microcontroller because of the back EMF. It is an optocoupler/optoisolator that is used for the isolation of signals in electronic circuits. It is an important safety component of multiple embedded systems. Here is the download source for this library:

PC817 Library for Proteus

Just like the real PC817, the library has four pins, but to indicate the difference and directions of the pins, I have shown the symbols, so you will see the design is different from the real PC817. 

Embedded Sensors Libraries

Embedded sensors are devices that are used to interact with the physical world by sensing changes in the environment. The students can download multiple types of proteus sensors that are useful for creative engineering projects. These libraries have multiple pins; one is a TestPin through which the user can stimulate the sensor. Some of these are digital sensors, and some are analogue. We have made digital and analogue versions of sensors to provide more versatility in the student’s projects. These are the Version 1.0 of all the sensors:

Ultrasonic Sensor

The ultrasonic sensor is a device that measures distance with the help of sound waves. These send the sound waves in a particular direction and then measure the time it takes for them to strike any object, which is then reflected. The module is designed on the same principles. It is an analogue sensor, and usually, it is controlled with the help of a microcontroller. Here is the download and installation process:

Ultrasonic Sensor Library

This library allows the students to create more creative projects because it can be used for projects like proximity detection, distance measurement, liquid level measurements, etc. 

Flame Sensor Library

Now we are moving towards the specialized sensors particularly important for the Internet of Things (IoT) projects. The flame sensor is a basic need for almost every project of home automation. This sensor provides the signal at the output when it senses the flame. As a result, it can alarm the users, and it may be lifesaving. With the help of this library, it is now possible to test the simulation of such projects in Proteus. Here is the link to download it:

Flame Sensor Library

During the simulation of the project, the indication of flame is done with the testPin and the sensor responds according to the signals at this testPin. 

Vibration Sensor

This sensor detects the vibration and is useful in projects like security management because any vibration in a particular object can be sensed well. These are also used with mechanical products such as heavy machines because the continuous vibration can cause errors in performance or create other issues. This is the link to get this library:

Vibration Sensor Library

It is a digital sensor, and as soon as the input of this sensor is turned HIGH, it indicates the presence of the sensor. 

Capacitive Touch Sensor

The capacitive touch sensor is named so because it can detect the presence of the human finger on an object by sensing the change in the capacitance of the sensor. We know that capacitance is the measure of the ability to save charges, and when the finger touches the sensor, the values of the capacitance change, and as a result, the sensor indicates this change. Here is the link to get this library:

Capacitive Touch Sensor Library

I have made this digital sensor because, in real time, the capacitive sensor is very sensitive and can detect a slight change in the capacitance when the user touches it. 

HeartBeat Sensor

The purpose of these libraries is to enhance creativity and allow students to reach more domains. This is an important sensor in medical science because it counts the heartbeat of humans and provides the results. The starting and ending points of the heartbeat testing are controlled with the help of digital input. Here is the download and install link:

Heartbeat Sensor

The output of this heartbeat sensor can be shown with the help of an LCD or other suitable output devices. Students can use this output in different components of the projects. As a result, the output of the sensor may be used to stimulate other components such as when the heartbeat is high. The results are sent to the user or a document that displays the preventive measures. 

Gas Sensor Library

This is another ideal sensor library for projects like the automation of places. This module senses the presence of harmful gases in the surroundings and is one of the most important sensors for safe living standards. These are used in homes, offices, industries, and other places where there is a risk of gas leakage so they may indicate the danger. This library has a simple structure with all the basic pinouts. Here is the way to download and install the library. 

Gas Sensor Library

I have designed eight sensors for gases ranging from MQ2 to MQ9 because I have followed real gas sensors. The design and working of each of them resemble those of real sensors, as you can see the colour and components are the same. 

Magnetic Reed Switch

This library is particularly suitable for engineering students who have to create projects related to the magnetic field. This library is used to detect the presence of magnetic fields in the surrounding area. Magnetic fields affect the working of sensitive components; therefore, this library can save the whole circuit in some cases. To install this library, follow the link below:

Magnetic Reed Switch Library

Just like the real magnetic reed switch, it has two versions with red and blue colours. The real magnetic reeds have a difference in the number of pins, but I have designed them to work perfectly in the simulation and provided all the necessary features. 

Infrared Sensor Library

The working principle of an infrared sensor is similar to that of an ultrasonic sensor, but here, infrared waves are used to detect any obstacle or object in the way of these waves. A transmitter and a receiver are used in the structure of these sensors. This is a digital library; therefore, there is no need to attach the Arduino to test the basic workings of this library. Check the details of the infrared library through the link given below:

Infrared Sensor Library

This sensor can be used in various projects with a microcontroller because the coding process allows the student to use the output of this sensor for multiple processes. 

IR Proximity Sensor

This is another sensor that uses the waves to measure the distance to the presence of the object at a particular distance. The transmitter sends the infrared radiations to a certain direction and when these strike an object, these reflect to the receiver and it measures the distance between the object and itself through multiple calculations. Here is the link to approach this sensor:

IR Proximity Sensor

I have designed the same sensor in two colours and tried to make it easy to use. This is the digital sensor; therefore, the emission of infrared rays and their receiving time are controlled by the TestPin. 

Infrared Tracker Sensor

This is another infrared sensor that does not simply sense the distance; it measures the movement. The infrared waves are emitted from the sensor when it touches the object; it remembers the values and emits the waves again. In this way, the multiple emissions of the waves and their reflected angles are measured and compared. As a result, it can measure the change in the position of the same objects. Here is the download and install process:

Infrared Tracker Sensor

This is an important sensor that can be used in robotic line followers, security systems, gesture recognition, etc. 

Rain Sensor

The automation of places like homes, agriculture, and security systems are important Internet of Things( IoT) projects, and this is one of the most basic sensors in all the projects related to the same princess. This is a digital sensor and can detect the presence or absence of rain. Here is the link to fetch this sensor:

Rain Sensor Library

The process to use this sensor in the projects is simple and easy, and students wanted to use it in their projects; therefore, I created this to provide them with more options in the Proteus simulation. 

Sound Sensor Library

The sound sensor is one of the most basic sensors in embedded systems and other branches of engineering that catches sound signals and converts them into electrical signals. As a result, these electrical signals are then presented as the output of the sensor. Here is the link to download and install this library:

Sound Sensor Library

This sensor may be part of many interesting and trending engineering projects such as voice recognition, sound level measurement, robotics, etc. 

Soil Moisture Sensor

This is the most basic sensor of the IoT projects related to agriculture, landscape, and related fields. This sensor measures the amount of water in the soil and indicates the values. The basic principle of working with this sensor is to measure the electrical conductivity of the soil because water is the best electrical conductor. As a result, it provides information about the amount of water in the soil. Here is the link to get this sensor:

Soil Moisture Sensor

There are multiple types of such sensors, and the one I designed has the exact design of a soil resistance measurement. It has two probes and is an analogue sensor; therefore, it provides the exact amount of moisture in the soil. 

Analog Vibration Sensor

Just like the digital vibration sensor, this version also measures the vibration in an object, but I have tried to provide a more versatile working method; therefore, I made this analogue vibration sensor. The working of an analog vibration sensor is a little bit complex but it can be used with great versatility. Have a look at the installation process for this sensor:

Analog Vibration Sensor

Projects like musical systems, game controllers, robotics, and other such projects influence vibration. Students can easily design the limits of values using the microcontroller. 

Water Sensor Library

The water sensor is the basic sensor in different engineering projects. Water has the best electrical conductivity, and this sensor works by measuring the electrical conductivity of the water. As a result, it provides the amount of water in a tank or any other container. 

Water Sensor Library

Students are using this sensor in different creative projects such as water leakage detection, pool level monitoring, automatic irrigation systems, etc. 

Analogue PIR Sensor

It is the passive infrared sensor that detects the infrared radiation around it. The main job of this sensor is to sense the IR and then convert these signals into voltage. I have designed the digital PIR sensor as well, but this sensor has more functionalities. The following is the link to download and install this library:

Analog PIR Sensor Library

It has applications in different fields and projects like security systems, motion detection systems, and multiple medical devices. 

Flex Sensor

The flex sensor is used to measure the bend of an object and is useful in multiple fields of mechanical engineering. Another use of this sensor is in the field of robotics where it is used with multiple components and provides basic information about the bend. You can download and install it from the link below:

Flex Sensor Library

This is a digital library, and it simply checks for the presence of a bend in an object containing this sensor. The checking of the basic workings of this sensor does not require a microcontroller, but a simple LED is enough.  

Analogue Flex Sensor

The analogue flex sensor is the second version I have just discussed. This can measure the values of a bend of the component, and it is important information in multiple projects. As a result, this sensor has great scope in multiple fields. Download and install this through the link below:

Analog Flex Sensor Library

Just like other analogue sensors, students can provide the limits of the flex values and automate the project to work on a particular value of flex. 

Magnetic Hall Effect Sensor

This sensor is used to measure the magnetic fields around the sensor. For this, it uses the Hall effect and successfully measures the density of the magnetic field. The basic sensor in this regard is KY-024 and it is used in multiple types of sensors related to the detection and measurement of the magnetic field. I have used the same sensor in this design; you can see it in the link given below:

Magnetic Hall Effect Sensor(KY-024) Library

This library is present in four different colors but the design and other specifications are the same. 

Current Sensor 

This library is particularly useful for embedded systems and robotic projects that measure the total current flowing through the circuit. The electrical and electronic circuits use this module in their projects but require the module in Proteus to test the possibilities. Therefore, I have designed this library, and here is the link to use it in the Proteus simulations:

Current Sensor Library

The drift linear hall sensor in the real current sensor WCS1600 allows it to provide precise and accurate results. In this sensor, I have used the same design and worked to provide the best output. 

pH Sensor Library

The chemical properties of the liquid are important to know when dealing with liquid experiments. Therefore, I decided to create a pH level sensor in Proteus to provide the chance to enhance the domain of projects for engineering students. As it is a simulation, the input will be provided by the user, but this can be designed as a project to show the results on the output device. Here is the download and installation process for this library:

pH Sensor Library

This file has four versions of the pH levels with different colours. A potentiometer has to be connected to the pH sensor, and the programming through the microcontroller will allow you to set the range between 0 and 14 pH levels. This library works the same as the real pH meter and can be used to create a simulation of checking the pH of any liquid project. 

Power Module Libraries

The power electronic systems use multiple power modules to complete their circuits, and we have designed these sensors to complete and test the simulations. All the basic features of real-time power modules and their connection with other components are possible with these libraries. Here is the introduction to each module and their download manuals:

Solar Panel Library

The solar panel is one of the most trending sensors because students are moving towards renewable energy sources, and the solar panel is the need of the time. This library can provide the chance to convert the electrical generation components into solar panels and make the project modern. The download and installation process is mentioned in the link below:

Solar Panel Library

Just like the revolution made in the electrical industry with solar panels, this module has changed the trends in electrical and electronic projects for engineers. 

Lipo Battery Library

Lipo stands for lithium polymer battery, and it has the same workings as the batteries in Porteus but has a different basic structure. The real-time lip batteries are made with lithium-ion technology using a polymer electrolyte and are different from the liquid electrolyte batteries. Click the below link to download and install this library

Lipo Battery Library

Real-time lipo batteries have multiple advantages over normal batteries, such as high specific energy, low self-discharge rate, etc. 

Single Cell Battery

Single-cell batteries are one of the most common sources of portable batteries, and they are used for small electronic projects. Proteus has multiple types of batteries, but these libraries have a better representation of the cells and a better output. Here is the link to check out these batteries:

Single-Cell Battery Library

These designs make the circuit more presentable. The default setting allows these batteries to run on 3.7V, but students can change the voltage level through the properties of these batteries. 

CR2023 Lithium Coin Library

It is a lithium coin battery, and we have seen it in several small electronic projects, such as watches, calculators, and several wearable devices. The real CR2023 comes in different shades of silver. I have created three versions of this battery. You can see these at the link given next:

CR2032 Lithium Coin Library

It has a simple cell, a cell with silver casting and lead, and a cell with golden casting and leads. This provides the students with a chance to enhance the attraction of the project and get to know the workings of the cell at the same time. 

Conclusion

The embedded system requires a lot of components, and we have designed the basic and useful libraries for the engineering students so that they may design and practice real-time simulations of their circuits. These are the first versions of all the sensors, but the team is working on more improvements and functions according to feedback and trying to bring more libraries for you. We will discuss these soon; till then, happy learning.

Top Embedded Proteus Libraries V2.0 for Engineering Students

Hi readers! I hope you are doing great. Today, I am going to share the second version of the top embedded libraries designed for the proteus. Before this, we shared the first version of many libraries that engineering students are using in their projects. The interest of the students in these libraries has motivated us to design even better versions of them. These versions have a more realistic design and error-free working and are ideal for engineering students to use in their simulation in Proteus. 

If you don’t know how to download and use these libraries, then you must learn how to add a new library in Proteus . Moreover, if you are interested in learning the details of all the libraries, you must see the new proteus libraries for engineering students . The installation and application process of these libraries is simple, and we will share all the details through links in this article. So let's know about the first library. 

Where To Buy?
No.ComponentsDistributorLink To Buy
1Battery 12VAmazonBuy Now
2ResistorAmazonBuy Now
3LCD 20x4AmazonBuy Now
4DHT11AmazonBuy Now
5DHT22AmazonBuy Now
6Flame SensorsAmazonBuy Now
7HC-SR04AmazonBuy Now
8Arduino NanoAmazonBuy Now
9Arduino Pro MiniAmazonBuy Now
10Arduino UnoAmazonBuy Now

Arduino Libraries V2.0 for Proteus

Arduino is one of the most important microcontrollers that makes embedded systems more versatile and interesting. Installation of the Arduino board provides the facility to use these boards in multiple types of projects in proteus simulations. Here is the list of the Arduino libraries  V2.0.

Download the zip file and follow the procedure mentioned in these articles to use Arduino in the simulations. 

Sensors Libraries V2.0 in Proteus 

Sensors are the most important components to make the embedded project versatile. Real-time sensors are used to detect changes in the environment and provide the output in different forms. Just like the first version of these sensors, there are multiple pins to connect the sensor to the circuit. The most important one is the TestPin which is used to make changes to the sensors. Here is a list of some sensors with a brief description of each:

Sound Detector Sensor

The sound detector is used to detect any kind of sound frequency and then convert it into electricity. The real-time sound detector has a mic that converts the vibrations of the sound into electrical signals. These signals go through the amplification process, and as a result, these sounds are detected. In proteus, the presence of the sound or the change in the surrounding frequency is indicated by changing the values on the input pin of the detector. Following is the link to download the sound detector library:

Sound Detector Library for Proteus V2.0

Heartbeat Sensor

Embedded systems have applications in all fields, and those who want to create projects in the medical field can use the heartbeat sensor in the simulation to provide versatility and uniqueness to their projects. This sensor is a little bit difficult to deal with as compared to the other sensors on the list, but when the circuit is designed carefully, it can be used in multiple projects. This is an analogue sensor; therefore, the student can set the limits of the heartbeat to indicate any emergencies or alerts. Here is the download link for this:

Heart Beat Sensor Library V2.0 for Proteus

Soil Moisture Sensors

Students seem interested in emerging fields like the Internet of Things (IoT); therefore, we have designed one of the most important sensors for Porteus that will give them chances to work on agricultural automation projects. This is a versatile sensor that can be used in several projects related to agriculture and related fields. The zip file for this sensor has three types of sensors, and version 2.0 has a little bit of a fluctuating design to make it more realistic.

Soil Moisture Sensor Library for Proteus V2.0

These are the analogue sensors, and the design of these sensors is very similar to the real-time moisture detectors. We have chosen the best colours and details for each component to make it more user-friendly. 

PIR Sensor Library

The first version of the PIR sensor was digital; therefore, to provide more room for creativity, here is the second version, which has an analogue sensor with relatively better working. This sensor library has four sensors that are the same in functionality but have different colours to make them attractive. 

Analog PIR Sensor Library for Proteus

The properties of all these sensors can be changed through the property panel. Just like all other analogue sensors, the variable resistor is used at the input pin to change the values of the sensor and get the required output. 

Vibration Sensor Library

The vibration sensor detects the vibration of an object by sensing the change in mechanical energy. The real-time vibration sensors convert the change in mechanical energy into electrical energy that is fed into any type of indicator, such as light or sound. The sensor in the proteus is an analogue sensor that closely resembles, in design, the real vibration sensor. In vibration sensor V2.0, there are four types of designs available for the students. Here is the download link for the zip file:

Vibration Sensor Library for Proteus V2.0

The components in each sensor are the same, but the base and capacitor colours are changed.

LCD Library for Proteus V2.0

There are multiple ways to display the results, and Proteus and the LCDs are the easiest and most effective ways to do so. This version of LCD resembles the real LCD used in embedded projects. The pinouts are more clean, and the size and display are better than any other LCD libraries in Proteus. This version has two sizes of LCD, which are:

  1. LCD 16X2 V2.0
  2. LCD 20X4 V2.0

As a result, when students use it in their simulation, they are able to get the required output with minimum effort. Here is the link to the description for downloading and using the LCD V2.0 in Proteus. 

LCD Library for Proteus V2.0

The installation process for this library is the same as it was for the LCD library V1.0. 

Solar Panel Library for Proteus V2.0

Next on the list is the solar panel library, which helps the students work on more creative projects with renewable energy sources. The solar panel V2.0 has a better design and is easier to design. The students have to simply download the zip file, follow the instructions given in the following link, and connect it to the project. 

Solar Panel Library for Proteus V2.0

There are two designs for the solar panel in this version. Both of these work alike, but students can choose the best design according to their circuit. By default, both of these work on 12V because it is standard, but the user can change the voltage values from the properties panel. 

Conclusion

The embedded system is an important field in engineering, and we have designed the second version of some proteus libraries. These libraries are extremely useful in testing the designed simulations related to multiple fields. The Arduino, solar panel, LCS, and different sensors are loved by the students, and we have made these versions with better design and results. I hope you like it. Stay with us for more useful libraries.

PIR Sensor Library for Proteus V3.0

Hi learner! I hope you are doing great. Today, I am sharing version 3.0 of the PIR sensor library for Proteus. We have already shared V1.0 and V2.0 of the PIR Sensor Library. PIR Sensor V1.0 Library for Proteus adds a digital PIR Sensor in Proteus, while the PIR Sensor V2.0 Library adds an analog PIR Sensor to simulate. These libraries were loved by the users and this motivated us to work more on it.

PIR V3.0 is analog in nature, has an error-free structure and the Pinout structure is better organized. Moreover, the design is improved a little bit and we have omitted the website link from the sensor to make it look professional.

Same as the previous version, this PIR has four pins and the details of each of them will be discussed in detail later. Therefore, don’t worry if you have no experience with the sensors in Proteus. Let's discuss the basic introduction of the PIR sensor:

Where To Buy?
No.ComponentsDistributorLink To Buy
1Battery 12VAmazonBuy Now
2ResistorAmazonBuy Now
3LCD 20x4AmazonBuy Now
4PIR SensorAmazonBuy Now
5Arduino UnoAmazonBuy Now

Introduction to PIR Sensor

  • A passive infrared sensor or PIR is a motion detector that detects the changes in the infrared light radiating from the bodies.
  • When the body moves in the range of the PIR Sensor, the change in the environmental infrared waves is sensed by the PIR.

  • In the PIR Sensor, two pyroelectric sensors are placed behind the lens to detect the change in IR level.
  • PIR Sensors are called “Passive” because they don’t create any infrared light but are only used to detect it.
  • PIR sensors may be digital or analog. In the digital sensor, the output is always in the form of only two conditions ON or OFF (1 or 0) and gives only the detection of motion.
  • On the other hand, analog sensors give the degree of motion.

Here are a few of the Embedded Projects in which we have used PIR sensor, you should have a look:

PIR Sensor Pinout

Generally, the real-time PIR sensor has three pins and these are used for different purposes. It is important to connect all of these correctly to get the output. Here is the description of each pin:

  • The VCC pin is connected to the positive voltage supply, normally +5V.
  • The GND pin is attached to the negative voltage supply.
  • The output pin generates the signal only when the motion is detected.

If these pins are set properly, the circuit works fine. The sensor we have designed has a fourth terminal called TestPin. Proteus is the simulation software therefore, it is not possible to provide the motion. TestPin is used to provide the motion by the user.

PIR Senosr Library in Proteus

We know that Proteus does not have a built-in PIR sensor therefore, we have created this library so that you may use it in the circuits. For this, you have to download and install the PIR Sensor library in your proteus software. Here is the download link for the installation, simply download the zip file.

PIR Sensor Library for Proteus V3.0

Adding Proteus Library Files

  • Once the library is installed, go to the file location and extract the content.
  • Go to the folder named “Proteus Library Files” and open it.
  • Here, you will get two files for the library named:
    • PIRSensorV3.0TEP.IDX
    • PIRSensorV3.0TEP.LIB
    • PIRSensorV3.0TEP.HEX
  • Copy these files and paste in the Library folder of Proteus software. You will find it at C drive>Programming files>LabCenter Electronics>Proteus Professional>Library.
  • If you are facing any difficulty in installing the library, you can see the How to install a new library in Proteus.

The zip file has another folder named “Proteus simulations” where you can find the resources of projects containing simple working of PIR Sensor and PIR Sensor interfaced with Arduino UNO and LCD. 

PIR V3.0 in Proteus

Now, open your Proteus software and if was opened already, restart it to index the PIR sensor library with it.

  • Click on the “P” button to pick the components.
  • Write PIR sensor in the dialogue box, it will show you the options to select. I have downloaded the previous versions as well so I am getting all the options:

  • I am choosing all the PIR Sensor V3.0 by clicking on it one after the other. You can choose according to your choice.
  • Now, click on the PIR sensor and double-click on the working area Where you want to place the PIR sensor.
  • All the types of PIR Sensor V3.0 are the same but the color is different to make them more attractive. I am placing all of these on my working sheet to show you the difference.

Here, you can see it has the minimum text on it and the size is smaller than the previous version so that you may fix it in your large and complex projects without any problem. Now, I am deleting two sensors and will work only on the remaining two.

Providing HEX File for PIR Sensor V3.0

This sensor will not work unless you add the HEX file to it. For this, follow the steps given:

  • Double-click the sensor to open the properties panel.

  • Here, click on the folder sign. It will prompt you to the folders of your system. You have to provide the path for the PIRSensorV3.0TEP.HEX you have just extracted from the zip file.

PIR Sensor V3.0 Simultion in Proteus 

Now, we will design two circuits of PIR sensor V3.0. The first will be simply made with the basic components and the other one will have the Arduino UNO interfaced with the LCD so that we may get the more user-friendly results. Let's hover over your Proteus workspace to make the simple PIR circuit.

Components Required

The following Components are required for setting the PIR sensor.

  • PIR sensor
  • Inductor
  • Capacitor
  • Potentiometer

Go to the “Pick library” button type the names of the components one by one and select them.

Setting the PIR Sensor

  • Set the inductor and capacitor with the PIR Sensor’s output pin.
  • Take a potentiometer and set it with the TestPin.
  • Go to the terminal mode and get power and ground terminals. Attach these with the respected elements.
  • To check the output, we have to insert an AC voltmeter from the “virtual instrument mode”.
  • Connect all the components with the help of connecting wires.
  • Now your circuit must look like this:

The real-time PIR sensor does not require the LC circuit but in Proteus, the peak-to-peak values are generated which needs to be converted into RMS values and that's why we used this LC filter.

  • Now, hit the play button to check the values of the PIR sensor.

Interfacing Arduino with PIR Sensor V3.0

Now, if you want to make your project more user-friendly, an LCD is the best option. To link these, I have used the Arduino UNO and through the code, the values of the PIR reading are shown on the LCD. I have interfaced the TEP LCD 20X4 with the Arduino and simply connected the output of PIR with the analog pin of Arduino. The circuit now looks like the following image:

Arduino Code for PIR Sensor

Once your simulation is ready, you have to paste the code into Arduino.exe.Open your software and paste the given code there. 

#include

// initialize the library with the numbers of the interface pins

LiquidCrystal lcd(13, 12, 11, 10, 9, 8);

int SensorPin = A0;

void setup() {

  // set up the LCD's number of columns and rows:

  lcd.begin(20, 4);

  // Print a message to the LCD.

  lcd.setCursor(1,0);

  lcd.print("www.TheEngineering");

  lcd.setCursor(4,1);

  lcd.print("Projects.com");

  lcd.setCursor(0,2);

  lcd.print("Analog Value: ");

  lcd.setCursor(0,3);

  lcd.print("Voltage: ");

}

void loop() {


  int SensorValue = analogRead(SensorPin);   

  float SensorVolts = analogRead(SensorPin)*0.0048828125;   

  lcd.setCursor(14, 2);  

  lcd.print(SensorValue);

  lcd.setCursor(9, 3);  

  lcd.print(SensorVolts);     

  lcd.print(" V");

  delay(1000);

//  sensorValue = analogRead(sensorPin);

//  lcd.setCursor(4,2);

//  lcd.print(sensorValue);

//  delay(1000);

}

The same code is also given in the zip file you have downloaded.

Inserting the HEX File in Proteus 

When the code is run on the Arduino.exe, it provides the HEX file in the compilation details. You have to copy the address of the HEX file and insert it into the Arduino in Proteus. For this, follow these steps:

  • Verify the code by clicking on the check button. The compilation will start if there are no errors.
  • Go to the black compiler window at the lower area of the screen.
  • Copy the address of the HEX file.

Go to the Proteus and double-click on the Arduino to open the properties panel. Now paste the path of the HEX file here. The circuit is now ready to work. If you are stuck at this step, you should have a look at How to get Hex File from Arduino.

PIR Sensor V3.0 Results

Now it's time to run the simulation. So hit the Play button and you will see that the output is shown on the screen.

The analog values can be changed through the potentiometer of the testPin. The analog values of the motion sensor along with the voltages are shown on the LCD.  I hope your circuit worked the same as mine. If you are facing any type of issue, you can contact us.

LCD Library for Proteus V2.0

Hi learners! I hope you are doing great. Today, I am going to share the second version(V2.0) of the LCD library for Proteus. We have already shared the LCD V1.0 Library on our blog. Along with appreciation, we also get some complaints/suggestions about that library. So, we have designed a better version of the LCD library by keeping the suggestions in mind.

Version 2.0 has error-free working, better pinout prints, and is identical to the real-world LCD. We have also removed our website link from the LCD. This library includes two alphanumeric LCDs in it i.e. LCD 16x2 and LCD 20x4.

If you don't have any experience with the LCD, no need to worry as we will guide you from scratch. Before installing the LCD, let's first have a look at its brief introduction:

Where To Buy?
No.ComponentsDistributorLink To Buy
1Battery 12VAmazonBuy Now
2ResistorAmazonBuy Now
3LCD 16x2AmazonBuy Now
4LCD 20x4AmazonBuy Now
5PIR SensorAmazonBuy Now
6Arduino UnoAmazonBuy Now

What is Liquid Crystal Display?

  • A liquid crystal display or LCD is a flat board of liquid crystals that are sandwiched between polarizers. When the electric field is applied to it, this material rotates according to the polarization and allows the light to pass through it. As a result, the display is shown on the LCD board.
  • A simple 16x2 LCD is shown in the below figure:
  • The LCD is used in electrical/electronic projects to display sensors' data, statuses, alerts, notifications etc.
  • We can interface this LCD with any microcontroller i.e. Arduino, PIC, Atmel, Raspberry Pi, STM32 etc.
  • Some of the advantages are low power consumption, durability, and long life.

Let's have a look at the pinout of LCD:

LCD Pinout

Both of these LCDs(16x2 and 20x4) have similar pinouts and a simple basic circuit needs to be designed in order to operate them. There are a total of 16 pins present in LCD used for different purposes. The below table has the complete description of LCD Pinout:

Serial

Pin

Functionality

Description

1

VSS

Ground

This pin is connected to the ground terminal of the circuit. 

2

VDD

Power Supply

It is connected to the positive voltage(+5V) and is responsible for the power supply to all pins. 

3

VEE

Voltage Emitter

It is used to control the contrast of LCD. it applies the negative voltage and thus controls the electric field of the LCD. 

4

RS

Register Select

It selects the LCD register. LCD has two registers: an instruction register and a data register. 

5

RW

Read or write

The read-and-write operation is done through this pin. if set to HIGH then LCD is in reading mode and LOW means it is writing the data. 

6

E

Enable

Enables the working of LCD. If HIGH then allow the display and if LOW then disable it.

7-14

D0-D7

Data bits (Pins to deal with the data)

Data is sent to the LCD in a parallel manner. These pins send this data and out of these, D0 is the least significant and D7 is the most significant.

LCD Library For Proteus

The installation of the LCD V2.0 is simple. The first step is to download the library files. I believe you have Proteus installed. So, click the below button to download the Proteus Library zip file.

LCD Library for Proteus V2.0

Adding Proteus Library Files

  • Once downloaded, go to the file location and extract content from the zip file.
  • Open the folder named "Proteus Library Files" and here you will find two library files in it, named:
  • LCDLibraryTEPV2.0.IDX
  • LCDLibraryTEPV2.0.LIB
  • Simply copy these files in the Library folder of Proteus software. Go to your C drive>Program Files>LabCentre Electronics>Proteus Professional> Library.
  • If you are having any difficulty installing the library, you should a look at How to install a new Library in Proteus.

The zip file also contains the project, where we simply connected both the LCDs with Arduino, so that you could check their working. Moreover, code is also present in the file.

LCD V2.0 in Proteus

Once the Library is installed, you need to open your Proteus software. If it's already open, you have to restart it. Now follow the instructions.

  • Go to the pick library by clicking on the “P” button.
  • In the dialogue box, type "LCD TEP" and you will get the below results:

I have installed both versions therefore, I am getting four options. I will choose the LCD 20X4 V2.0 and LCD 16X2 V2.0.

  • Click on the components and simply place them on the working sheet of Proteus, it will appear as shown below:

  • I hope you guys will enjoy this new look without the site's link.

Now, let's design an LCD simulation in Proteus:

LCD Simulation in Proteus

Now, let's design a simple LCD simulation, where we will interface it with an Arduino UNO board. We will display our website's link on the LCD. So, let's design the circuit:

Interfacing LCD with Arduino

Go to the pick library and select the following components:

  1. LCD 20X4
  2. LCD 16X2
  3. Arduino
  4. POT-HG
  • Place the Arduino and other components in the working area, as shown in the below image:
  • Go to Terminal mode and select the Power & Ground terminal for both LCDs.
  • In order to design a neat circuit, I have connected the “Default” terminal with each pin, instead of wires.
  • The complete circuit diagram is shown in the below figure:

Now let's design the Arduino code to display data on these LCDs:

Arduino Code for LCD Simulation

Now, open your Arduino software, I hope you have it installed. Paste the below code in it, I have also added this code in the zip file.

#include

// initialize the library with the numbers of the interface pins

LiquidCrystal lcd(13, 12, 11, 10, 9, 8);

void setup() {

  // set up the LCD's number of columns and rows:

  lcd.begin(16, 2);

  // Print a message to the LCD.

  lcd.setCursor(1,0);

  lcd.print("www.TheEngineering");

  lcd.setCursor(4,1);

  lcd.print("Projects.com");

}

void loop() {

}

Add HEX File in Proteus

The next step is to get the Hex File from Arduino IDE and add in the Proteus. For this, follow these steps:

  • Verify the Arduino Code by clicking the "Verify" button and the output pane will give the location to the hex file, as shown in the below figure:
  • In the proteus software, double-click on the Arduino board to open its Properties Panel.
  • Paste the HEX file in the program file section and press OK.

LCD Simulation Results

  • Now, the LCD simulation is ready to run.
  • You can see in the code, we have printed the TEP link on the LCD screen.
  • Once you play the circuit, the LCDs will display the message, as shown in the below figure:

If you have followed all the steps, I am sure your project will run successfully. I hope it was helpful to you. You must practice it more and try to make different projects. So, that was all for today, will meet you guys in the next tutorial. Take care!!!

Raspberry Pi 2 Library for Proteus

Hello friends, I hope you all are having fun. In today's tutorial, I am going to share a new Proteus library for Raspberry Pi 2. We have already shared the Proteus Libraries of other Raspberry Pi modules i.e. Raspberry Pi 4, 3, Pico etc. and we discussed that these Pi modules won't be able to read the Python code. We have just designed the external appearance of these modules and you can use these Pi modules for circuit designing and project presentations.

We have also added the Arduino firmware in these boards, which is just to provide a bit of interaction with these boards. We have given these boards an unofficial title "Arduino Pi".

So, let's have a look at How to simulate Raspberry Pi in Proteus:

Where To Buy?
No.ComponentsDistributorLink To Buy
1Battery 12VAmazonBuy Now
2LEDsAmazonBuy Now
3ResistorAmazonBuy Now
4LCD 16x2AmazonBuy Now
5LCD 20x4AmazonBuy Now
6PIR SensorAmazonBuy Now

Raspberry Pi 2 Library for Proteus

  • First of all, we need to download the Proteus Library zip file of Raspberry Pi 2, by clicking the below button:

Raspberry Pi 2 Library for Proteus

Adding Proteus Library Files

  • Extract files from the Proteus Library zip file and open the folder named "Proteus Library Files".
  • Here you will find two library files, named:
    • RaspberryPi2TEP.IDX
    • RaspberryPi2TEP.LIB
  • We need to place these files in the Library folder of the Proteus software, normally at C > Program Files > Labcenter Electronics > Proteus 8 > Library.

Note: For a better understanding, you should read How to Add a New Library File in Proteus.

Raspberry Pi 2 in Proteus

  • We have successfully added the library files in the last step. So, now is the time to open your Proteus software.
  • Open the Components search box by clicking the "P" button in Proteus and here make a search for Raspberry Pi 2.
  • If you have added the library correctly, you will get the below result:

  • Add it to your project by double-clicking on it.
  • Place the Raspberry Pi 2 modules in your Proteus workspace, as shown in the below figure:

Note: Its design is quite similar to that of Raspberry Pi 3, although we added the name to differentiate between the two.

Raspberry Pi 2 Simulation in Proteus

As mentioned above, this Pi board won't be able to read the Python code. So, we have added the Arduino firmware in it to make it a bit more interactive. So, let's blink an LED with this Raspberry Pi 2 module in Proteus:

LED with Raspberry Pi 2

  • Before working on the code, let's first design the circuit diagram and as you can see in the below figure, I have connected an LED along with a resistor to Pin # 13 of the Pi board:

  • In the properties panel of LED, change the Model Type of LED from analog to digital.

Code for Raspberry Pi 2

  • As it has Arduino firmware, so we need to get its hex file.
  • So, open Arduino IDE and from Examples, open the LED blink code.
  • Compile the code and get its hex file, as shown in the below figure:

Add Hex File in Proteus

  • Open the Properties PAnel of Raspberry Pi 2 and here you will find an option "Program File".
  • Paste the Hex File location in its text box, as shown in the below figure:

  • Click Ok to close the Properties PAnel and now its time to run the Raspberry Pi 2 simulation:

Raspberry Pi 2 Simulation Results

  • Click the Play Button in Proteus to run the simulation and if everything goes fine, the LED will start blinking, as shown in the below figure:

So, that was all for today. I hope you have enjoyed these Raspberry Pi simulated modules. IF have any questions, please ask in the comments. Thanks for reading.

Car Parking System with Automatic Billing using Arduino

Hi Geeks, welcome to our new project. Our new project is one of the most common issues you’ve seen in your cities. In this project, we are going to make a car parking system with automatic billing. In the entire world, there are an estimated 1.4 billion cars on the road, which is absolutely great news if we are considering the development of the Automobile industry. But the most serious issue is that the number of cars exceeds the number of available parking places, resulting in traffic congestion. Damaged cars due to this lack of space, fewer parking locations, lack of parking signage, informal parking, and overcharging for parking are just a few of the issues.

People are still choosing manual parking methods, which have a number of drawbacks, such as searching for a vacant spot in a parking lot without knowing if the lot is full or not, resulting in time and fuel waste. Vehicle safety is also a concern that may be addressed. We've all been in a position when we've spent a long time looking for parking at a location just to discover that none is available. You would think that if you knew the slots were full, you would've ended up finding another parking spot.

Based on these scenarios, we came up with the idea of a Car Parking System with Automatic Billing which will also reduce manpower such as security, booth attendants, etc., required in parking lots. Everything in the modern day is automated, and with this project, we can automate this procedure using simple electronics components and Arduino. Let's get started.

Where To Buy?
No.ComponentsDistributorLink To Buy
1DS1307AmazonBuy Now
2Keypad 4x3AmazonBuy Now
3LCD 20x4AmazonBuy Now
4Arduino UnoAmazonBuy Now

Software to install:

Instead of using real components, we'll use the Proteus Simulation tool to design this project. It's also a good habit to experiment with simulations before attempting to build everything with real components. By simulating an issue that may develop when working on actual components, we may identify the problem and avoid any damage to our components.

Proteus is an interesting software that lets you model and build electronics circuits. Despite having a huge library of electronics components, Proteus software lacks pre-installed modules such as Arduino boards, Ultrasonic sensors, RTC modules, LCD modules, and so on.

Now, we’ll start installing the libraries, which is needed for our project:

By clicking the button below, you can download the entire project, including Proteus Simulation and Arduino Code.

Project Overview:

These are required components for Accident Detection, which are as follows:

  • Arduino Uno: Arduino Uno is a development board from the Arduino family, which is the main component of this project and acts as the brain. The Microcontroller i.e., Arduino is responsible for the decisions that are going to be processed in the project.
  • 20X4 LCD display: It is used to display the information regarding parking slots and shows the amount that has to be paid by the driver at the Check out time from the parking lot.
  • Ultrasonic Sensor: It is used to calculate the distance from the car to the entry gate and detects that a car has reached near the gate.
  • RTC Module: Real-Time Clock Module is used to calculate the time and plays a key role in determining the total amount for the parking slot.

Components Needed:

  1. Arduino Uno
  2. LCD Module
  3. Ultrasonic Sensor
  4. Keypad 3x4
  5. LED’s
  6. RTC Module

Components Details

Arduino Uno:

  • Any Arduino development board can be used in this project, however, we'll be using Arduino UNO development boards. The Arduino UNO is a programmable, open-source microcontroller board from the Arduino series.
  • It contains an ATMega328P microcontroller from Atmel, which has an 8-bit RISC processing core and 32 KB of flash memory.
  • The Arduino UNO includes 14 digital I/O pins i.e., D0 - D13, with a resolution of 10 bits, including 6 PWM pins and 6 analog I/O pins (0-1024) i.e., A0 - A5.
  • Only one hardware UART peripheral pin, one I2C peripheral pin, and one SPI peripheral pin are available on the Arduino UNO (however we can use other pins for UART communication using the SoftwareSerial package in Arduino).
  • The Arduino UNO can be powered from a voltage range of 7 to 12 volts, the voltage regulator embedded inside the board will reduce the excess voltage. however, not more than 9 volts is suggested since it might harm the Arduino board.
  • A USB-B cable (the same cable that we used to upload the sketch to Arduino UNO), a DC power jack, and the Vin pin on the board may all be used to power Arduino UNO.
  • Using the Arduino IDE Software, the sketch is written and uploaded to the Arduino UNO. It is completely free, simple to comprehend, and easy to combine with a variety of electronic components.

LCD Module:

In this project, an LCD display is used to present the information to the user.
  • LCD stands for Liquid Crystal Display, and it is a type of display that is made using Liquid Crystal technology.
  • LCDs come in a variety of sizes; in this project, we utilized a 20X4 size.
  • The 20X4 indicates that it can show 80 ASCII characters at once.
  • The LCD has 16 pins. In which the necessary pins are connected in the circuit.
  • It contains eight data pins, one Read/Write select pin, one Register mode pin, one Enable pin, two backlight pins, two power supply pins, and one contrast control pin.
  • In the LCD, there are primarily two types of registers: Command Register and Data Register.
  • When the RS(Register Select) pin is set to logic high, the data register mode is selected, and when it is set to logic low, the command register mode is selected.

The RS pin will be set to logic high to display the data on the LCD.

Ultrasonic Sensor (HR-SR04):

  • The HC-SR04 ultrasonic sensor employs SONAR to estimate the distance of an object.
  • The ultrasonic sensor sends out a signal wave that has a frequency of about 40 kHz, with a high pitch that humans are unable to hear.
  • From 2 cm to 400 cm (1" to 13 feet), it provides the detection of objects with high accuracy and the pulse will not be disturbed by sunlight or any climate conditions.
  • It consists of four pins, Trig, Echo, VCC, and GND.
  • The operating voltage of an Ultrasonic sensor is 5V. We can connect the VCC pin of the sensor with 5V output in Arduino and the sensor will work perfectly.
  • Ultrasonic sensors work on the principle of sound wave reflection.
  • The trig pin works as an ultrasound transmitter which emits the high frequency sound waves in pulses. And the echo pin works as an ultrasound receiver. It receives the reflected ultrasonic waves which are bounced back from the object.
  • We calculate the distance from the object and the sensor by measuring the time taken between the transmission and the reception of the signal.
  • To measure the distance of sound traveled from trig to echo,

Distance = (Time x SpeedOfSound) / 2.

Speed of Sound: 340 meters per second i.e., 0.034
  • The easiest way to calculate the distance in cm is using this formula,

Distance in Centimeters = (( Time taken by pulse signal (in microseconds) / 2) / 29)

Keypad 3x4:

  • A keypad button is used for user input.
  • The keypad's buttons are arranged as a matrix of 3x4. Which means it has four rows and three columns.
  • They work on the principle of membrane keypads. They are very flexible and feel like a push button.
  • The switch between a column and a row trace is closed when a button is pressed, allowing current to pass between a column pin and a row pin.
  • A copper padding and line beneath the pad connects each switch in a row to the other switches in the row.

RTC Module (DS1307):

  • The DS1307 IC is a low-cost, high-accuracy RTC that uses the I2C protocol as an interface.
  • The DS1307 features a backup battery mounted on the rear of the module to maintain track of time even if the main power supply is disconnected.
  • When necessary, the chip shifts between the primary and backup power sources.
  • The RTC records information such as seconds, minutes, hours, days, dates, months, and years.
  • This module includes a Reference clock, programmable Square wave output(SQW), SCL, SDA, VCC, and GND.
  • Automatic Power-Fail Detect and Switch Circuitry
  • Low Power Operation Extends Battery-Backup Run Time.
  • The RTC module works on operating voltage 5V.

Proteus Simulation of Car Parking System:

Now, it’s time to start the design of the Proteus Simulation of our Car parking system

  • Before you begin designing, make sure Proteus is installed on your computer and that you have downloaded all of the necessary libraries.
  • We'll need Arduino libraries and LCD modules for this project. Make sure you've read the section on using libraries in Proteus software.
  • Let's begin by creating a new project, and importing all of the required components, and placing them within the working area.
  • Select all of the components from the Proteus component library that we'll require.

Circuit Diagram and Working:

After importing all required components to the workplace, let’s move to connecting them.

  • Starting with the connection of LEDs, we are using digital pins 2,3,4,5,6 for LEDs. Connect the positive side of the LEDs to the Arduino UNO board.
  • After that, connect the Ultrasonic sensor module’s Trig pin and Echo pin to digital pin 8 and 7 respectively, Vcc to 5v volt power and GND to Ground.
  • In the simulation. it will not be possible to change the distance from the Ultrasonic sensor so for that we have connected a potentiometer with the test pin of the module.
  • Now start the connection of the Keypad, as this is a 3x4 keypad so it will use 3 pins for columns and 4 pins for rows.
  • As there are limited digital pins on Arduino UNO, we have to use the analog pins of Arduino UNO as digital pins.
  • Now let’s connect the row pins A, B, C, D with A0, A1, A2, A3 respectively and column pins 1, 2, 3 with digital pins 9, 10, 11 respectively. And we have to connect the pins in an exact manner.
  • RTC module uses the I2C protocol, so we will connect SDA and SCL pins to Arduino UNO’s SDA (A4) and SCL (A5) pins respectively. Vcc with 5v power supply and Gnd with the ground.
  • As there are no pins left for connecting the LCD module therefore we will use an I2C GPIO expander for connecting the LCD module.
  • Connect the SDA and SCL pins of GPIO expander with the SDA and SCL pins of Arduino UNO and we have to set the slave address of GPIO expander, for that we will connect the A0, A1, A2 pins with ground, that will set the I2C slave address to 0x20.

Now we have done the circuit, it’s time to move to the coding side of this project.

Arduino code for the accident detection:

  • We must add relevant libraries, which operate as header files in programming languages before we begin writing the code.
  • So, if the necessary libraries aren't already installed in the Arduino IDE, we'll need to download them first.
  • We can install Arduino libraries by going to 'Sketch > Include Library > Manage Library' in the Arduino IDE. In the library manager, we can now search for our essential libraries. The libraries can also be installed via zip files.
  • We can download the libraries from the above instruction, but if they are not available, we can use the following links to download the zip files of libraries.
  • Here we used “Wire.h” to enable I2C communication and it is pre-installed.
  • “LiquidCrystal_I2C.h” is used for the LCD.
  • “Keypad.h” is used for the integration of the keypad module.
  • “RTClib.h” is the library for RTC modules.
  • Let’s declare the pins for modules. We mainly use two pins i.e. Trig and Echo for the object detection and distance calculation. Here we have connected the Echo pin to D7 and Trig pin to D8 in Arduino Uno and an array for storing the pins for LEDs as D2, D3, D4, D5, D6. Two arrays for storing the pins for keypads such as rowPins for A0, A1, A2, A3 pins and colPins for D9, D10, D11.
  • Now, Let’s declare configuration related variables for the keypad. Here we are declaring variables to store the number for Rows and Columns. We will use a 2D char array named ‘hexaKeys’ for storing the symbols of keypad.
  • Now declare some general variables for storing the values for ultrasonic sensors, charge, total charged amount, check-in time and check-out time of vehicles.
 
  • Now, Let’s declare the objects of the modules.
 
  • The “customkeypad” is initializing an instance of class NewKeypad. The statement is going to map these symbols with the pins we have declared to connect with Arduino. Hence, it will map according to the row and column pins.
  • Next, we are initializing the LCD display with an I2C serial interface and setting the address to 0x20 Hex.
  • And we are declaring an object named ‘rtc’ for the “RTC_DS1307” module.

Void Setup():

  • The void setup() is an important function in the sketch that will execute only once in the whole program. The input, output, and other serial communication initializations are done inside the void setup. Let’s write the void setup sketch now.
  • In this setup function, firstly we have enabled the serial communication with “Serial.begin” with the default baud rate of 9600.
  • Next, we are initializing the LCD and turning on the backlight of the LCD.
  • We have already declared the Trig and Echo pins before in the declaration part, and now we are going to set them up as output and input pins respectively.
  • There may be a doubt why we have declared a Trig as output and Echo as input. That is because the Trig pin will generate the ultrasonic wave pulses and the Echo pin will work as a receiver for reflected waves.
  • We are using five led’s for the five slots in the parking lot and to make the logic simpler, declare the led pins as output mode.
  • Now, we are printing a line in the serial monitor and LCD. We are using the cursor function and printing “Made by” in the first row and “Tushar Gupta” in the second row. (0,0) is representing (column, row) in the LCD.
  • After printing the line, clear the LCD screen.
  • Now, we are trying to initialize the RTC module and if the RTC is not found, it will print that “Couldn’t find RTC”. and halt the further processing of code.

  • After successful initialization of the RTC module we will know if the RTC module is running already , if yes then we don’t have to set the time explicitly otherwise we have to .
  • We will use a “dist()” function to calculate the distance using the formula mentioned in component details.
  • For the calculation of distance, we will generate the pulses using the Trig pin.
  • To generate the pulses , switch the TRIGpin to LOW for 4 microseconds and then HIGH for 10 microseconds then again LOW .
  • By using ‘pulseIn’ we can calculate the time duration the wave has taken to travel back from the object.
  • “ distance = duration*(0.034/2); ” and here 0.034 is the speed of sound and with this formula, we can calculate the distance in cm and set the threshold values.
  • “pulseIn” takes two arguments, first pin number and second logical state. This will read the pin for logic HIGH and return the time period in which that pin was at a HIGH state.
  • For more knowledge of “pulseIN “ refer to this link: pulseIN function

Void loop():

  • It is the next most important function of Arduino code/ sketch. The “void loop()” will run after the execution of “void setup()”.
  • We'll write the code required to run in a continuous loop in this part. So here we'll write our main application code.
  • Here, we are going to first discuss the Automatic billing part near the gate in our parking system.
  • In the loop function, the Date and Time of that current time are set by “rtc.now”, and the user will enter his slot number in the keypad when he/she is exiting from the slot.
  • The user will click the allocated slot number on the keypad and we are collecting that in the “customkey” variable using the “getkey” function.
  • The serial monitor will print the custom key entered by the user. Then we will check the slot status by “digitalRead (led[i])”.
  • If the led status is HIGH which means the slot was occupied now we will generate the bill for that slot and display that amount on the LCD display for1 second after clear the LCD and set that slot LED to LOW state.
  • The next step we are going to do is to calculate the total amount according to his vehicle staying inside the parking lot. And for that, we can do the simple calculation that is “amount = charge*(gotime [i] - cometime [i]) ;”.
  • We have already declared the charge amount in the above sections of the program. The charge will be multiplied by “go time - come time”, which is the total time the vehicle stayed inside the lot. And the multiplied result of stay time and charge is the final amount the driver has to pay for his parking slot.
  • Now, the driver can pay the amount and exit through the gate. Here, after a second delay, we are clearing the LCD display.
  • “What if the driver pressed any wrong key which has a free slot?” That might be the question in your mind. Well, we can cover that condition with an else statement, where we can print “The slot is already empty” on the LCD and let the driver know that he has entered the wrong key in the keypad near the exit gate.
  • Till now, we have seen the Automatic billing logic near the exit gate. But let’s see what is the slot allocation process at the entry gate.
  • As we have already calculated the distance with the ultrasonic sensor using the “dist()” function, we can set the distance limit to 100cm before the gate, and when a car reaches the entry gate the allocation of the slot will be started.
  • The “for loop” here will see what are the slots showing Low/empty in the parking and allocate that empty one to the car by printing “Park your car at ” and “Slot i” in the LCD.
  • As this slot was allocated, we have to write this LED as High which indicates the slot is not empty. This is the reason where the slot led is high at the exit gate when the user pressed his slot number in the keypad. We are turning on the LED when we are allocating the slot to a car.
  • Now we also have to collect the “come time” by the RTC module for further calculation at the end or near the exit gate.
  • We are implementing an if statement where the all LEDs are high, which means all the slots are filled, the LCD should print (“No more slots”) and inform the driver and clear the LCD screen.

Results / Working:

We have completed the Proteus simulation circuit and Arduino code for the Car Parking project. And it is ready for testing.

  • Before going to start the simulation, we have to add the hex file of our application code in the Arduino UNO module in Proteus and a hex code for the ultrasonic sensor also.
  • To add the hex file, click on the Arduino UNO and a new window will open then click on the Program files, there we will browse to our hex file.
  • In the same way, we can add a hex file for the ultrasonic sensor.
  • Now start the simulation, on the first boot of the circuit, LCD will display the welcome message and the same message will be displayed in the serial terminal also
  • Just for debugging purposes, we are continuously printing the ultrasonic sensor values.
  • In the simulation to change the distance between the vehicle and ultrasonic sensor we have used a potentiometer. Now change the value on the potentiometer.

As we can see that for 50% value on the pot ultrasonic sensor value is near to 500 cm and for 77% value on the pot ultrasonic sensor value is near to 850 cm.

  • Let's test the condition when the vehicle approaches the sensor, to satisfy that condition the object must be at a distance of less than 100 cm. For that, we have to change the pot value. Set the pot value near to 10 %.
  • After that LCD will display a message if that spot is vacant like “Park your car at Slot 1” and LED for the same location will glow.
  • To take the bill for any location press the keypad for that location number let’s suppose here the location is 1 so we will click on ‘1’
  • After that, it will generate the bill with the total charged amount and the LED for that location will be turned off.
  • In case if we click any slot button which is already vacant then LCD will display the message for the slot is vacant.

Here it is not visible which button on the keypad has clicked but suppose we have clicked ‘1’ and if that location is vacant then it will display that message.

  • Let’s take another case when we want to park another car. Now slot 1 is already busy so we will park at slot 2.
  • This time when the sensor value changes less than 100 cm, then the LCD display will show “Park your car at slot 2” because slot 1 is preoccupied.
  • In the image, we can see that both LEDs are glowing as both slots are occupied now.
  • For billing, we will click the button on the keypad for the respective slot.
  • Let’s take a case when all slots are occupied. Here we can see all slot LEDs are glowing.
  • Now we will try to park another car. Then LCD will display ‘no more slot’ as there is no vacant slot available at parking.

I hope you have a good understanding of how our Car parking system project works and that you have liked it. Although it’s a tough nut to crack in the first read, I strongly recommend you to read the logic part twice for better understanding. I believe we have covered almost everything, please let us know if you have any questions or suggestions in the comments section.

Thank you very much for reading this project. All the best for your projects!

Smart Coffee Vending Machine using Arduino

Hello geeks, Welcome to our new project. As most readers have already seen the coffee vending machine or maybe you are drinking coffee while reading this article and if you are a tinker or a geek, it must have come to your mind how to make a coffee vending machine on your own. In today's tutorial, we are going to learn how to make a Smart Coffee Vending Machine using Arduino with Proteus Simulation for the same.

We can use this project for an engineering project’s showcase for electronics, electrical engineering students, and can be used in offices as well.

Coffee is the second most popular drink in the world and it is one of the oldest beverages of the world. According to Wikipedia, more than 2 billion cups of coffee are consumed every day in the whole world. As engineers or working professionals, we all know how coffee is very important for us. Having a good coffee makes our day better and refreshes the mood. Research shows coffee drinkers tend to live longer but when keeping it in moderate consumption. And making a good coffee is one of the most skillful jobs and time-consuming processes as we want our coffee in minutes. Now here our project comes to the picture, this smart coffee vending machine can make a good coffee in a couple of minutes. There are various flavors of coffee and our smart coffee vending machine can provide us with 4 different flavors which are the most commonly loved such as Latte, Cappuccino, Espresso, and Cafe Mocha. Here's the video demonstration of this project:

Where To Buy?
No.ComponentsDistributorLink To Buy
1DC MotorAmazonBuy Now
2LCD 20x4AmazonBuy Now
3Arduino UnoAmazonBuy Now

Software to Install:

As we are going to design this project using Proteus Simulation, instead of using real components. As in the simulation, we can figure out the issue which may occur while working on real components and that can damage our components.

Proteus is the software for simulation and designing electronics circuits. As Proteus software has a big database of electronics components but still it does not have few modules in it like Arduino boards or LCD modules etc.

So we have to install the libraries, which we are going to use in this project:

  • Arduino Library for Proteus: We have to add the Arduino boards to the Proteus components list.
  • LCD Library for Proteus: We have to add the LCD module to Proteus Suite.
You can download this whole project for example Proteus Simulation and Arduino Code, by tapping the below button

Smart Coffee Vending Machine using Arduino

These are required components for Smart Coffee Vending Machine, as follows:

  • 20X4 LCD display: It is used to display user-related messages like the state of the vending machine.
  • Arduino UNO: It is used as the brain of our project. All operations and decision-making will be done using this microcontroller.
  • DC motor: It is used for dispensing the ingredients of coffee and the mixer.
  • Buttons: It is used as a user interaction option.

As a suggestion, whenever we make a project, it should be like a product, as it should be user friendly and interactive, so considering that we have used an LCD module to display the messages related to available coffee flavors and their individual prices so that users can easily select them using buttons and DC motors to pour the ingredients related to coffee like water, sugar, coffee powder, and milk, and a mixer for blending the coffee.

We have connected the LCD using an I2C GPIO expander as we have limited GPIO pins to connect other peripherals with Arduino UNO. I2C Gpio expander requires only two pins as we know that I2C uses SCL(Serial Clock) and SDA(Serial Data) pins for communication.

Components Needed:

  1. Arduino UNO
  2. LCD display
  3. 4 Buttons
  4. 8 Motors
  5. PCF8574

Components Details

Arduino UNO:

We can use any Arduino development board but here in this project, we have used an Arduino UNO board.

  • Arduino UNO is one of the programmable, open-source microcontroller boards of the Arduino family.
  • It contains an Atmel’s Microchip ATMega328 or ATMega328P microcontroller which has Harvard architecture 8-bit RISC processor core and 32 KB flash memory.
  • Arduino UNO comprises 14 digital I/O pins out of which 6 are PWM pins as well and 6 Analog I/O pins with 10 bits resolution(0-1024).
  • Arduino UNO has only 1 hardware UART pin(but we can use other pins also for UART communication using SoftwareSerial library in Arduino), 1 I2C, and 1 SPI.

PCF8574:

We have used this IC as a GPIO expander for our project as we have restrictions on the availability of GPIO pins in Arduino UNO.

  • It is an 8-bit I/O, silicon-based CMOS GPIO expander.
  • It can be used to write data on the pins and also can read data on those pins.
  • It uses the I2C protocol for communication with the master device.
  • As we know that I2C protocol uses the slave address to send or receive data from slaves, so for that it has 3 pins A0, A1, A2 for setting the slave address.
  • Slave address for PCF8574 starts from 0x20 to 0x27. That means we can add only 8 PCF8574 IC directly to a master controller.
  • The following image explains the logic of the slave address of PCF8574.
  • It is used for connection for the LCD module with Arduino UNO in our project.
  • If you want to learn more about IC PCF8574, you can refer to the datasheet using the following URL: PCF8574 Datasheet

LCD display

The LCD display is used to show the user-related messages in this project.

  • LCD is a short form of Liquid Crystal Display which is basically built using Liquid Crystal technology.
  • There are different sizes of LCDs available, in this project we have used 20X4 size.
  • Here 20X4 signifies that it can display 80 ASCII characters at a time.
  • There are 16 pins in the LCD. We will not use every pin of LCD in this project.
  • It has 8 data pins, 1 Read/ Write select pin, 1 Register mode pin, 1 Enable pin, 2 pins for backlight, and 2 pins for power supply, 1 contrast control pin.
  • There are mainly two types of register in the LCD: Command Register and Data Register.
  • When we set the RS(Register Select) pin to logic High then it will select the data register mode and in logic Low, it will select the command register.
  • To display the data on LCD we will set the RS pin to logic High.

Proteus Simulation of Smart Coffee Vending Machine :

Now, it's time to start designing the Proteus Simulation of our Smart Coffee Vending Machine.
  • Most importantly, ensure that Proteus is installed on your PC and download all the required libraries for Proteus ahead.
  • For this project, we are going to need libraries of Arduino and LCD modules.
  • Make sure that you have read about how to use libraries in Proteus software.
Let’s create a new project, open the new project in Proteus and import all the required components which we are going to use, and place them within the working area.
  • We need the following components, so select all of them from the Proteus component library.

Circuit Diagram and Working:

  • Now let’s design our circuit, first place all the selected components in the Proteus Workplace, as shown in the image below:
  • We will start connecting the LCD module and PCF8574, as we are using only 4-data pin-mode of LCD.
  • After that, we will start the GPIO expander PCF8574 I2C connections, connect the SDA, SCL pins of PCF8574 to Arduino UNO’s SDA, SCL pins which are A4, A5 pins of the development board.
  • As we know, we have to set the slave address of PCF8574 using A0, A1, A2 pins. And in this project we are going to use the slave address 0x20, therefore for that, we have to connect all pins to the ground. (As we have already seen in the above PCF8574 addressing image)
  • In the next step, we are going to connect the buttons to Arduino digital pins D2, D3, D4, D5 as "Latte", "Cappuccino", "Espresso", "Cafe Mocha" flavors respectively and another terminal of the buttons is connected to ground. As we are going to use the buttons inactive low condition which means, when we press the button it will give us a logical LOW state.
  • There may be a doubt in your mind why we have not used any PULL-UP resistors with buttons because we will handle that in our code. Arduino UNO comes with an internal PULL-UP resistor of 20-50 KOhms.
  • Now connect the dc motors for each container, Water, Coffee, and Sugar container’s motors are connected with Arduino’s digital pins D10, D12, D11 respectively. Connect the coffee outlet motors for each type of Latte, Cappuccino, Espresso, Cafe Mocha with digital pins D6, D7, D8, D9 respectively. And at last, connect the mixer with the D13 pin.
  • As we have mostly completed the wiring part, the first thing which we must make sure of before going to start our simulation is that all components should have adequate power supply and ground. And ground must be common in the whole circuit.

Now we hope you have understood the connections and you have already done it, so it is time to move to the coding part of our project.

Arduino Code for Smart Coffee Vending Machine

If you already know about the syntax and structure of Arduino sketch, it's a good thing, but if you have not been familiarized yet, no need to worry, we will explain it to you step-by-step.

Arduino coding language mostly follow the syntax and structure of C++ programming language, so if you are familiar with C++, then it would be like a cup of cake for you to understand the code but still if you don’t have any background knowledge, you don’t have to worry again, we have your back.

Arduino Coding follows a strict structure, it has mainly two sections. we have to write our code in those two functions.

  • void setup()
  • void loop()

As we are going to explain the Arduino code, it would be easy to understand if you have opened the code in the Arduino IDE already.

Declaration code:

  • When we start our code, we will first include all the required libraries which we are going to use in this project.
  • So our first step would be to download the required libraries if they are already not pre-installed in the Arduino IDE.
  • Mainly we will use only two libraries, one for LCD display and the other for I2C communication.
  • And I2C related functions come in the Wire library which will be pre-installed in Arduino ID, we don't have to install it explicitly.
  • For the LCD module, we will use the Liquid Crystal_I2C library that we have to install.
  • We can install libraries related to Arduino from the Arduino IDE by going to ‘Sketch > Include Library > Manage Library’. Now in the library manager, we can search for our required libraries. We can install the libraries using zip files also.
  • >> Now, as we have installed all the required libraries. Let’s include them in our sketch.
  • After that, we will define the pins which we are going to use in our project.
  • We have to define them globally so that we can use them in all functions.
  • You must be having a doubt why we have not defined pins for I2C.
  • Because those pins are pre-defined in the Wire library, we can not assign any other pins for I2C communication.
  • Now we will define and declare all the variables which are required in our project.
  • There is an array for the price of a coffee with the size of 4, as we will only provide only 4 types of coffees and a string type variable for storing the name of flavors of coffee.

Arduino Setup() Function:

In this Arduino Setup() function, we will write a section of code that will only run once.
  • So mostly we will write the declarations, define the type of pins and initialize the peripherals such as the LCD module.
  • We want to take user input from the buttons therefore we will declare them as INPUT type.
  • We have not connected PULL UP resistors in buttons as you have read above, we will handle that in the code therefore we have declared it as INPUT_PULLUP mode.
  •  We have declared motor pins as OUTPUT mode because we want to control the motors.
  • After that we will initialize the LCD module then we will turn on the backlight of LCD, set the cursor to 0,0 index and using ‘lcd.print()’, we will print the welcome message on the LCD module.
  • In the setCursor function, the first argument is used for X-Axis and the second argument is for Y-Axis.
  • It will display the welcome message for 1 sec as we have given a delay for 1000 milliseconds after we clear the display.

Arduino Loop() Function:

Arduino Loop function runs after the the ‘void setup()’ function.
  • In this section, we will write the code which is required to run in a continuous loop. So we will write our main application code here.
  • So when the code reaches the void loop section, first we will display the flavor and the price of the coffee on LCD display as we want to show the user what type of coffee our vending machine makes and the price of those individually.
>> Now we will write the section for reading the user input from the buttons. As we have set that the condition will be true when the button will be logic LOW state. >> Now when the user will press the button, the state of the button’s pin state will be changed to logic LOW state and then our ‘if condition’ will be true and code and our operation will enter in the ‘if condition’ section. >> Here we will display to the user the current process stage of the coffee making. So we will clear the LCD display and then set the cursor to 0,0 index. After that we will display the message for collecting the ingredients.
  • As we have not cleared the display, it will display the same message.
  • After 1 second delay, we will start the water container motor for pouring the water for 2 seconds.
  • Thereafter we will set the water’s container pin to LOW and Sugar’s container motor pin to HIGH for 2 seconds, similarly for the coffee’s container pin.
  • Now we will start the motor for the selected flavor of coffee for 2 seconds and then stop it.
  • As now our selected coffee is getting ready so we will display the message for the same.
  • To display any new message, we have to clear our display with pre-occupied text.
  • Now we will start the mixer motor for 10 seconds to mix all the poured ingredients.
>> Now our selected coffee is ready. So we will clear the LCD display and set the cursor, and will print the message regarding the prepared coffee with the price of it.

Results/Working:

  • Below is the Flow diagram of coffee vending machine:
  • Let’s understand the code with an example, we will go with the starting step.
  • Power ON the device, the machine will display the welcome message that you can change from that code as per your choice.
  • That message will be shown for 1 second thereafter it will clear the display.
  • Now it will display the type of coffee as "Latte", "Cappuccino", "Espresso", "Cafe Mocha" and their respective prices.
  • Let’s suppose, the user wants to have a Latte today, so he/she will press the button for the same, thereafter our coffee-making process will start.
  • The first LCD display will show the message “Wait a Moment Collecting Ingredients” and it waits for 1 second.
  • Thereafter it will start pouring the water for 2 seconds, then it will stop that motor.
  • After that, it will start to pour sugar for 2 seconds, then stop that motor.
  • At last, it will start to pour the coffee for 2 seconds, then stop that motor.
  • It will start the motor of the selected type of coffee to dispense the coffee to the container and then it will wait for 1 second.
  • Now LCD will display the message for coffee getting ready as "Wait a Moment Your’s Rich Latte is getting ready…” as the user has selected Latte that’s why it shows “Latte is getting ready… “.
  • Now we will start the mixer to mix all the ingredients for 10 seconds.
  • Again we will clear the LCD display to show the message for prepared coffee as “ Your's Rich Latte is ready. Please Collect it Your's Amount - 5/-”.
  • Then it waits for 5 seconds and clears the display and again shows the price and the available types of coffee.
  • As Proteus requires the hex file of the code to run the simulation.
  • So for that, open the Arduino IDE and please verify your code before making a hex file by clicking on the ‘Verify’ button to remedy any errors.
  • To get the hex file from the Arduino IDE click on “Sketch > Export Compiled Binary”.
  • Your hex file will be generated successfully now put that hex file to the Arduino UNO board in the Proteus software.
  • Everything is now in place, it's time to run the simulation and get a nice virtual coffee.

I hope you have understood the whole working of our smart vending machine project and enjoyed it as well. I think we have explained pretty much everything but still if you have any doubts or improvements please let us know in the comment section.

Thanks for giving your valuable time for reading it.

Automatic Plant Watering System using Arduino

Hello friends, I hope you all are doing great. In today's tutorial, we are going to design a Proteus Simulation for Automatic Plant Watering System using Arduino. We have designed this project for engineering students as it's a common semester project, especially in electrical, electronics and mechatronics engineering.

The two most significant hazards to the agriculture industry are the need for extensive labor and a scarcity of water. According to the World Wildlife Fund (WWF) organization, water shortages might affect two-thirds of the world's population by 2025, putting both the ecosystem and human health at risk. The use of automatic plant watering systems eliminates both of these problems by watering plants at specified times and amounts while monitoring their hydration levels through measuring moisture in the soil surrounding the plants. Automatic plant watering systems can be used in homemade gardens and can also be deployed in fields for large-scale use. Whenever designing an automatic watering system, it is important to keep in mind that the system should be expandable, allowing for the simple integration of new devices in order to broaden the applicability of the system.

Where To Buy?
No.ComponentsDistributorLink To Buy
1BuzzerAmazonBuy Now
2LEDsAmazonBuy Now
3DS1307AmazonBuy Now
4LCD 20x4AmazonBuy Now
5Arduino UnoAmazonBuy Now

Software to Install

We are not designing this project using real components, instead, we are going to design its Proteus simulation. So, first of all, you should Install Proteus Software itself. Proteus software has a big database of electronics components but it doesn't have modules in it. So, we need to install Proteus Libraries of a few components, so that we could simulate them. So, these are the PRoteus libraries which you should install first, before working on this project: You can download this complete project i.e. Proteus Simulation & Arduino Code, by clicking the below button: Download Complete Project Note: You should also have a look at these other Proteus Libraries:

Project Overview:

Three main components of an autonomous watering system are:

  • Water Level Sensor: monitors the water reservoir level.
  • Moisture Sensor: monitors the soil moisture level.
  • RTC module: responsible for supplying water to the plant at predetermined intervals or at a predetermined time.
  • Arduino UNO: serves as a hub for connecting and controlling all these components.

It is necessary to integrate the water level sensor with the microcontroller before it can be installed within the water reservoir. The location of the water level sensor within the reservoir is variable and is determined by the user and the application for which it is being utilized. The Arduino receives continuous data from the water level sensor and warns the user when the water goes below a certain level, either by an alarm or a buzzer, as appropriate.

The soil moisture sensor operates in a manner similar to that of the water level sensor. The tip of the sensor is inserted into the soil near the plant, and the sensor is activated. In the case of a moisture sensor, the closeness of the sensor to the plant is also variable, and the user may adjust it depending on the features of the plant for which it is being used. In vast agricultural fields, a single sensor may be used for numerous plants if they are closely spaced and their hydration levels can be determined by measuring the soil moisture at one location that overlaps with another spot on the soil surface.

The RTC module operates on the same concept of time monitoring in the background as other electronic devices such as computers and smartphones; even when these devices appear to be turned off, they continue to keep track of the current time. The RTC module, on the other hand, is capable of exchanging time information with the Arduino board. On a specific day of the week, at a specific time of day, the Arduino is pre-programmed to turn on the water pump and turn off the water pump after a specified length of time.

Components Needed:

  1. Arduino UNO
  2. Water Level Sensor
  3. Moisture Sensor
  4. RTC Module (DS1307)
  5. LCD
  6. 4 LEDs
  7. Buzzer
  8. Relay
  9. Water Pump
  10. PCF8574

Component Details:

Arduino UNO:

  • Arduino UNO is a programmable microcontroller board.
  • It contains Atmel's ATMega328 as is based on that microcontroller.
  • The Arduino board also contains an in-built voltage regulator to protect it from burning out and supports serial communication to help programmers.
  • The Arduino board is culturally programmed through the Arduino App designed by the board's developers and the programming is done in C language.
  • The Arduino App compiles code and interfaces the firmware into the Arduino hardware.
  • Arduino UNO has 14 digital I/O pins out of which 6 are PWM pins as well.
  • Arduino also takes analog inputs and has 6 analog input pins.

Figure # 1: Arduino UNO

Soil Moisture Sensor:

  • The soil moisture sensor is a resistive sensor that consists of two electrodes with a small charge and the resistance in those electrodes is measured and then the resistance in between the soil is used to find the moisture levels.
  • A soil moisture sensor normally comes equipped with an amplifier such as LM393. It has a VCC, GND and analog output pin.

Figure # 2: Soil Moisture Sensor

Water Level Sensor:

  • The water level sensor is a module that helps calculate the amount of liquid in a container.
  • When a liquid is present in the tank, the Submersible level sensor detects the hydrostatic pressure generated by the liquid.
  • Since hydrostatic pressure is a measure of two variables, the first of which is the density of the fluid and the second of which is the height of the fluid, it is a useful tool.

Figure # 3: Water Level Sensor

RTC Module:

  • RTC stands for real Time Clock and as the name suggests the module keeps track of time even when the external power supply is cut off.
  • It has a battery cell installed within it for that purpose, moreover, it is capable of communication with other devices such as Arduino too.

Figure # 4: RTC Module

Relay:

  • Relays are basically electrical or electromechanical switches that operate on the principle of magnetic field controlling the switching within the relay.
  • A relay has two modes of operation, normally open and normally closed.

Figure # 5: 12V Relay

PCF8574:

  • The PCF8574 is a silicon-based CMOS integrated circuit.
  • Using the two-line bidirectional bus enables general-purpose remote I/O extension for the majority of microcontroller families (I2C).
  • It is used in our project for I2C communication of LCD.

Figure # 6: PCF 8574

 

Proteus Simulation of Plant Watering System

Now, let's design the Proteus Simulation of Plant Watering System first and then will work on the Arduino Code.
  • First of all, make sure that Proteus is installed on your computer and download all the necessary libraries for Proteus beforehand.
  • For this project, you will need libraries for Arduino, LCD, RTC Module, Water Level Sensor and Soil Moisture Sensor. Make sure that you read how to use each library in Proteus as well.
  • Open a new project on Proteus, import all the components required and place them within the working area or the blue line of Proteus.
  • Select below components from Proteus Components' library:

Circuit Diagram and Working:

  • Now, place these components in your Proteus workspace, as shown in the below figure:
  • For the water level and moisture sensor, place a variable POT(potentiometer) at the test pin and place an RC filter at the output pins. (This is only for simulation purposes)
  • Start with the input side of Arduino and connect the soil moisture, water level output pins to the A1 and A0 pins of Arduino respectively.
  • To use the LCD for I2C communication, Place PCF8574 and connect with LCD.
  • Connect the SDA and SCL pins of PCF8574 and the SDA and SCL pins of the RTC module with the SDA and SCL pins of Arduino.
  • For the output side of Arduino, Connect the D7 to the relay controlling the pump.
  • Connect the buzzer at D2 and the LEDs to their respective Arduino pins as well.
  • Make sure appropriate power and ground are provided to each component. With that the making of the circuit on Proteus is complete.

Figure 7 shows the circuit diagram of the system. Proteus was used to simulate the circuit and Arduino App was used for the simulation of the Arduino code. The circuit was designed in a way that is easy to understand and further integrated easily. We will now go through a step-by-step guide on how the circuit was built.

Figure # 7: Proteus Circuit diagram

Arduino Code for Plant Watering System

A normal Arduino code has two main segments:

  • void setup
  • void loop
We will look at both of them separately here.

Declaration Code

  • The first step in setting up our code is defining libraries, download if you don’t have any libraries already integrated in the Arduino App.

Figure # 12: Arduino Code

  • The next step in the code is tone definition for buzzer and pin definition of variables being used in the project.

Figure # 13: Arduino Code

  • After pin definition, the variables used must be defined so that Arduino knows where to find them and how to identify them.

Figure # 14: Arduino Code

  • The next step is defining the system messages that will appear on the LCD.
  • It is not necessary to define those messages in the setup, they can be easily defined within the main code but it is an easier way to define those beforehand and call them whenever needed.
  • This is especially useful when a system message is used multiple times in the code.

Figure # 15: Arduino Code

  • Now we define the objects being used in the project.
  • The two objects being defined are the RTC module and LCD. In the syntax below we used 20x0 in the argument for the LCD, that is because there are no libraries for I2C LCDs and we had to turn a simple LCD into an I2C LCD by the means of PCF8574.

Figure # 16: Arduino Code

Void setup:

Now we start the programming of void setup.
  • At first is the initialization of various components, such as initializing the RTC module and setting the time and date of RTC with respect to our computer.
  • Wire initialization and library are used for I2C communication.

Figure # 17: Arduino Code

  • The next step is defining the digital pins of Arduino being used as input or output pins and displaying the initial message on our LCD.

Figure # 18: Arduino Code

 

Void Loop:

  • The first step in the loop is to read the date and time from the computer through the RTC and read the values from the sensor.
  • Since this part of the program runs in the loop, Arduino will keep reading and refreshing the sensor inputs every time the loop starts.

Figure # 19: Arduino Code

  • In the next segment of the code, we will check various conditions of the sensor values and RTC and actuate our outputs on the basis of these conditions.
  • At first, we check the water level of the container, if it is below the set level, Arduino will actuate the buzzer to alarm the user of low tank on LCD.

Figure # 20: Arduino Code

  • In the next step, we check the values of the moisture sensor and place the conditions in three categories, namely, moist soil, soggy soil and dry soil.
  • The Arduino will light up the respective LED whenever its condition is true. Red LED for dry soil, yellow LED for soggy soil and green LED for moist soil.
  • The LCD will also display respective messages for each of those conditions.
  • The following code is for the condition of dry soil.

Figure # 21: Arduino Code

  • The following code is for the condition of moist soil.

Figure # 22: Arduino Code

  • And finally the code for the condition of soggy soil.

Figure # 23: Arduino Code

  • In the next step of the code, we check the condition of time, whether it is time to water the plants or not and the condition of the water reservoir to see its level as well.

Figure # 24: Arduino Code

If you see the code closely, you may see the function of the right hour, which is called various times in the main code. The function code in itself is written at the bottom of the main code. This function is used for displaying the time and date on the LCD and also for fixing the date and time.

Results/Working

  1. Open Arduino and generate a hex file for that program.
  2. Put the hex file in the Arduino UNO board placed in Proteus.
  3. Run the simulation.

Figure # 8: Proteus circuit simulation when soil is soggy

Figure # 9: Proteus circuit simulation when soil is moist

Figure # 10: Proteus circuit simulation when soil is dry

Figure # 11: Proteus circuit simulation when soil is dry and it is time to water the plant

As you can see from figure 8 that our simulation is running according to the program set at Arduino. You can increase or decrease the values coming from the sensors through the Potentiometer. So, that was all for today. I hope you have enjoyed today's lecture. If you have any questions, please ask in the comments. Thanks for reading.
Syed Zain Nasir

I am Syed Zain Nasir, the founder of <a href=https://www.TheEngineeringProjects.com/>The Engineering Projects</a> (TEP). I am a programmer since 2009 before that I just search things, make small projects and now I am sharing my knowledge through this platform.I also work as a freelancer and did many projects related to programming and electrical circuitry. <a href=https://plus.google.com/+SyedZainNasir/>My Google Profile+</a>

Share
Published by
Syed Zain Nasir