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:
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.
- 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:
- LCD 20X4
- LCD 16X2
- Arduino
- 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:
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.
Raspberry Pi Zero W Library for Proteus
Hello friends, I hope you all are doing great. As we are working on Raspberry Pi libraries for Proteus these days, so today, I am going to share another awesome library i.e. Raspberry Pi Zero W Libary for Proteus. We have already shared the Raspberry Pi Pico, Raspberry Pi 3 & Raspberry Pi 4 Libraries for Proteus, I hope you have already installed these libraries.
We have only designed the exterior look of this module, it won't be able to read the Python code. You can use this module to design circuit diagrams of your projects or to demonstrate your project in the presentation. Although, just for fun, we have added the Arduino UNO firmware to it. So, you can add the Arduino hex file in it. Something is better than nothing.
So, let's install the Proteus Library and simulate Raspberry Pi Zero:
Where To Buy? |
---|
No. | Components | Distributor | Link To Buy |
1 | Battery 12V | Amazon | Buy Now |
2 | LEDs | Amazon | Buy Now |
3 | Resistor | Amazon | Buy Now |
4 | Raspberry Pi Zero | Amazon | Buy Now |
Raspberry Pi Zero W Library for Proteus
- First of all, we need to download the Proteus Library zip file of Raspberry Pi Zero, by clicking the below button:
Raspberry Pi Zero W Library for Proteus
Adding Proteus Library Files
- Extract the content of the Proteus Library zip file.
- Here, you will find a folder named "Proteus Library Files".
- Open this folder and you will find below two library files in it:
- RaspberryPiZeroTEP.IDX
- RaspberryPiZeroTEP.LIB
- Place these two files in the Library folder of your Proteus software.
- You will find the Library folder at this location: C > ProgramFiles > LabCenter Electronics > Proteus8.
Note: For a better understanding, you should read How to Add a New Library File in Proteus.
Raspberry Pi 4 in Proteus
- So, after adding the Raspberry Pi Zero Library Files, open your Proteus software and if it's already open, then restart it so that it could index components from the newly-added Library.
- Now, open the Proteus components search box by clicking the "P" button.
- Here, make a search for Raspberry Pi Zero and you will get the below results:
- Now, double-click on this Raspberry Pi Zero module to add it in your project list.
- Place the Raspberry Pi Zero W module in your Proteus workspace and it will look like this:
- We have tried to keep it small in size so that other components could easily add up in the workspace.
Raspberry Pi Zero Simulation in Proteus
As I mentioned earlier, this RPi Zero module in Proteus won't be able to read the Python code. So, just for fun, we have added the Arduino firmware inside. I know it's not that helpful but that's all we have right now. I hope we will design the real Raspberry Pi Zero simulator one day. So, let's add the Hex File in Raspberry Pi Zero W:
LED with Raspberry Pi Zero W
- Now, let's design a simple circuit, as shown in the below figure:
- I have simply attached an LED along with a resistor with Pin # 13 of the Raspberry Pi Zero W.
- The LED attached has an analog Model Type and we need to change it to Digital, so open its Properties Panel by double-clicking on it.
- In the Properties Panel, you will find "Model Type", change it from Analog to Digital.
Code for Raspberry Pi Zero
Let's clear this thing up one last time, we can't add Python code in this simulated Raspberry Pi Zero, so just to have some interaction, we have added the Arduino Hex file in it. So, we need to get the Arduino hex file.
- So, open the Arduino IDE and open its LED Blink example from the File > Examples > Builtin.
- Compile the code to get its HEX file, which we will add in the Raspberry Pi Zero.
Add Hex File in Proteus
- Double-click Raspberry Pi zero in the Proteus software, to open its Properties Panel.
- In the Program Files Section, paste the Hex File Location, as shown in the below figure:
Raspberry Pi Zero Simulation Results
- Now let's run the simulation to get the results.
- So, click on the RUN button of Proteus software and if everything worked fine, you will get similar results:
So, that was all for today. I hope you will enjoy this Raspberry Pi Zero W Library for Proteus. If having any difficulty, ask in the comments. Thanks for reading. Have a good day.
Raspberry Pi 4 Library for Proteus
Hello friends, I hope you all are doing great. Today, I am going to share the Raspberry Pi 4 Library for Proteus. In our previous tutorial, we shared the Raspberry Pi 3 Library for Proteus and as we mentioned in that tutorial, these Raspberry Pi libraries will have dummy modules i.e. We have just designed the exterior but these boards won't be able to read the Python code. Although just for fun, we have added the Arduino firmware in these boards, so we can upload the Arduino code in it. As the legends say, something is better than nothing. We have given these boards an unofficial name "Arduino Pi".
You can use these Pi boards to design your circuit diagram or can also use it in your presentation/demonstration of your projects. I hope you will enjoy these simulated Raspberry Pi boards. Before going forward, let's first have a brief overview of Raspberry Pi 4:
Where To Buy? |
---|
No. | Components | Distributor | Link To Buy |
1 | Battery 12V | Amazon | Buy Now |
2 | LEDs | Amazon | Buy Now |
3 | Resistor | Amazon | Buy Now |
4 | Raspberry Pi 4 | Amazon | Buy Now |
What is Raspberry Pi 4?
- Raspberry Pi 4 is an advanced microcontroller board, designed by Raspberry Pi Foundation and is used in IoT and embedded projects.
- You should have a look at this Raspberry Pi 4 Pinout to get an in-depth understanding of this board.
So, now let's have a look at How to add this Proteus library and simulate Raspberry Pi 4 in Proteus.
Raspberry Pi 4 Library for Proteus
- First of all, we need to download the Proteus Library zip files by clicking the below button:
Raspberry Pi 4 Library for Proteus
Adding Proteus Library Files
- Extract the files from the Proteus Library zip file and open the folder named "Proteus Library Files".
- You will find two library files in this folder, named:
- RaspberryPi4TEP.IDX
- RaspberryPi4TEP.LIB
- Place these two files in the Library folder of your Proteus software. You will find the Library folder at this location: C > ProgramFiles > LabCenter Electronics > Proteus8.
- If you are having difficulty finding the Library folder, you should read How to Add a New Library File in Proteus.
- An LED Blinking Proteus Simulation of Raspberry Pi 4 is also present in this zip file.
Raspberry Pi 4 in Proteus
- After adding the Library Files, open your Proteus software and if it's already open then restart it, so that it could read the components from the newly added library.
- Click on the "Pick from Libraries(P)" button in Proteus and make a search for Raspberry Pi 4.
- If you have added the RPi4 library correctly, you will get the below result:
- Double-click on this Rpi4 board to add it to your project's components list.
- Place the Raspberry Pi 4 board in the Proteus workspace and it will look like this:
- I hope you will enjoy its look, as we put real effort into designing it and as you can see it resembles a real RPi4 board.
Raspberry Pi 4 Simulation in Proteus
Now let's design the Simulation of Raspberry Pi 4 in Proteus. As I mentioned earlier, we can't feed Python code to this RPi4 board. So, we have added the Arduino firmware to it. Thus, we need to upload the Arduino hex file in it. Let's attach an LED with Raspberry Pi 4:
LED with Raspberry Pi 4
- I have attached a Green LED along with a resistor to Pin # 13 of the Raspberry Pi 4, as shown in the below figure:
- Double-click on the LED to open its Properties panel, here you will find the "Model Type".
- Change the Model Type from Analog to Digital, otherwise, it won't glow.
Code for Raspberry Pi 4
- As it's important, so let's clear it up one more time. The Pi board won't read the Python code, instead, it will work on Arduino Code.
- So, open your Arduino IDE and get the LED Blinking Code from the Examples.
- Select Arduino UNO in the Tools > Boards section.
- Compile the code and get its hex file, as shown in the below figure:
Add Hex File in Proteus
- We need to add the hex file in Raspberry Pi 4, so double-click it to open its Properties Panel.
- In the Properties Panel, you will find a section named "Program Files".
- Add the hex file location in this Program Files section, as shown in the below figure:
Raspberry Pi 4 Simulation Results
- Now, let's run the simulation of Raspberry Pi 4 by clicking the RUN button in Proteus.
- If everything's correct, the LED will start blinking, as shown in the below figure:
So, that was all for today. I hope you will enjoy this Raspberry Pi 4 Library for Proteus and will use it in your projects. Let me know your feedback. Have a good day. Take care!!!
Raspberry Pi 3 Library for Proteus
Hello friends, I hope you all are doing great. In today's tutorial, I am going to share a new Proteus Library for Raspberry Pi 3 module. In my previous tutorial, I shared the Raspberry Pi Pico Library for Proteus. Similar to Pico Library, this RPi3 LIbrary won't operate on the Python code. We have just designed the front look to use in the circuit design. Although, we can upload Arduino code to these simulated Raspberry Pi boards.
This Raspberry Pi Proteus Library will have only the Raspberry Pi 3 board in it. We will design the other Pi boards soon. So, let's have a look at How to simulate Raspberry Pi in Proteus:
Where To Buy? |
---|
No. | Components | Distributor | Link To Buy |
1 | Battery 12V | Amazon | Buy Now |
2 | LEDs | Amazon | Buy Now |
3 | Resistor | Amazon | Buy Now |
4 | Raspberry Pi 3 | Amazon | Buy Now |
Raspberry Pi 3 Library for Proteus
First of all, we need to download the Raspberry Pi library files, by clicking the below button:
Raspberry Pi 3 Library for Proteus
Adding Proteus Library Files
- This Proteus Library zip file will have a folder in it, named "Proteus Library Files".
- Open this folder and you will find these two files in it:
- RaspberryPi3TEP.IDX
- RaspberryPi3TEP.LIB
- Next, we need to add these library files to the library folder of the Proteus software. So open C > PRogramin Files > Labcenter Electronics > Proteus 8 > Library folder and copy-paste these files into it.
- This zip file also has a Proteus simulation of the Raspberry Pi 3 board.
Note: Look at How to add a new Library in Proteus 8, if you are having any issues.
Raspberry Pi 3 in Proteus
- After adding the library files, open your Proteus software or restart it, if it's already open.
- In the components search box, make a search for Raspberry Pi 3 and you will get the below results:
- So double-click on this Raspberry Pi board to add it to your project.
- Place the Pi board in your Proteus workspace, as shown in the below figure:
Simulate Raspberry Pi 3 in Proteus
Now we are going to simulate this Raspberry Pi 3 board in Proteus. We will attach a simple LED to one of its pins. As I told earlier, we have just designed the exterior of this board. It won't read the Python code. We can use it to design circuit diagrams for our project. But just for fun, we have added the Arduino firmware to it. So, we can upload the Arduino hex file in this Pi board.
LED with Raspberry Pi 3
- I have connected a simple LED with resistance on Pin # 13 of the Pi board, as shown in the below figure:
- In the Properties panel of LED, change the Model Type from analog to digital, otherwise, it won't work.
Code for Raspberry Pi 3
- As I mentioned earlier, this Rpi3 board in Proteus won't read the Python code. We can only upload Arduino code in it.
- So, I am going to use the LED Blinking code and will select Arduino UNO in the boards' section, as shown in the below figure:
Add Hex File in Proteus
- In order to add this hex file, double-click on the Raspberry Pi 3 board to open its Properties Panel.
- In the Properties Panel, you will find a section named Program Files.
- Paste the hex file location in the Program Files section and click OK to close the panel.
Now, let's run our simulation to get the results:
Raspberry Pi 3 Simulation Results
- So, now let's run the simulation and you will see that the LED on the board will start blinking, as shown in the below figure:
So, that was all for today. I hope you will use this Raspberry Pi Library to design your projects. In the next tutorial, I will share the Raspberry Pi 4 Proteus Library. Till then, take care. Have fun!!!
Raspberry Pi Pico Library for Proteus
Hello friends, I hope you all are fine. In today's tutorial, I am going to share the Raspberry Pi Pico Library for Proteus. It's a dummy library, we have just designed the display. We can't add the Python Code to it, but we can make it work with Arduino code. A mixture of Arduino and Raspberry Pi, I have given it an unofficial name "Arduino Pi". It's better to have something than nothing. You can design circuit diagrams using this library and can also demonstrate your project in presentations by designing simulations.
So, let's have a look at How to simulate Raspberry Pi Pico by adding this Proteus Library:
Where To Buy? |
---|
No. | Components | Distributor | Link To Buy |
1 | Battery 12V | Amazon | Buy Now |
2 | LEDs | Amazon | Buy Now |
3 | Resistor | Amazon | Buy Now |
4 | Raspberry Pi Pico | Amazon | Buy Now |
Raspberry Pi Pico Library for Proteus
- First of all, we need to download the zip file of Proteus Library for Raspberry Pi Pico, by clicking the below button:
Raspberry Pi Pico Library for Proteus
Adding Proteus Library Files
- The Proteus zip file will have a folder named "Proteus Library File".
- Open this folder and you will get two library files, named:
- RaspberryPiPicoTEP.IDX
- Raspberry PiPicoTEP.LIB
- Now, open the Library folder of your Proteus software, normally present at C > Program Files > LabCenter Electronics > Proteus 8, and copy-paste these 2 library files into it.
- The zip file of Proteus Library will also have a simulation of Raspberry Pi Pico in it.
Note: Look at How to add a new Library in Proteus 8, if you are having any issues.
Raspberry Pi Pico in Proteus
- After adding the library files, restart your Proteus software so that it could index the components of the newly added library.
- Open the Proteus components section and make a search for "Raspberry Pi Pico".
- If you have added the library correctly, you will get the below result:
- So our Pico board is now available in the Proteus components list.
- Double-click on the Pico board to add it to your project.
- Close the components section and drag-&-drop the Pico board in the Proteus workspace, as shown in the below figure:
We have tried to keep it small in size so that other components could get more space.
Simulate Raspberry Pi Pico in Proteus
As I told earlier, we can't program this Pico board with Python, which is the actual programming language of this board. But just for fun, we have enabled it to read the Arduino code. Let's design a simple blink example to see how it works:
LED with Raspberry Pi Pico
- First, we need to design a simple LED circuit in Proteus, as shown in the below figure:
- Double-click on the LED to open its Properties panel and here, we need to change the Mode Type of LED from Analog to Digital.
Code for Raspberry Pi Pico
- Let's mention it one more time(as it's important), we can't program this board with Python code. We can only upload the Arduino Code in it.
- So, here's the LED blink code and as you can see in the below image, I have selected Arduino UNO.
Add Hex File in Proteus
- Now, we need to add this hex file to the Pico board of Proteus.
- So, double-click the Raspberry Pi Pico to open its Properties Panel.
- In the Properties Panel, there's a section called Program File, add the Hex file location here, as shown in the below figure:
Now let's run our simulation to check the results:
Raspberry Pi Pico Simulation Results
- If everything goes fine, the LED attached to the Pico board will start blinking, as shown below:
So, that was all for today. I hope you will enjoy this Raspberry Pi Pico Library for Proteus and will use it in your simulations. If you have any suggestions, use the below comment form. Thanks for reading. Take care!!!
ESP32 Library for Proteus
Hello friends, I hope you all are doing well. In today's tutorial, I am going to share a new Proteus Library of ESP32 embedded module. ESP32 is a microcontroller board used mostly in IoT projects. It's a successor of ESP8266 or NodeMCU. We have already shared the NodeMCU Library for Proteus and I hope you guys have enjoyed it.
Proteus software is not capable of handling WiFi or BLE technology, thus we can't implement these technologies in the ESP32 board. Though, you can use its input/output pins to interface embedded sensors and modules. You can also use it to design the Circuit Diagram of your Project.
So, let's have a look at How to simulate ESP32 board in Proteus:
ESP32 Library for Proteus
- First of all, download the zip file of Proteus Library for ESP32 board, by clicking the below button:
ESP32 Library for Proteus
Add Proteus Library Files
- In this Proteus Library zip file, open the folder named "Proteus Library File".
- In this folder, you will find two library files, named:
- We need to add these library files in the Library folder of the Proteus software.
Note: Look at How to add new Library in Proteus 8, if you don't know already.
ESP32 in Proteus
- Now open your Proteus software and if it's already open, then restart it. (it's necessary for Proteus to read the library files)
- Open the components Library of Proteus and search for "ESP32".
- If everything's fine, you will get the ESP32 board in the results section, as shown in the below figure:
- We need to double-click on this module to add it in our project.
- Now drag and drop the ESP32 board in the Proteus workspace, as shown in the below figure:
- We have tried our best to keep it as small as we can, so that you get more space for other components.
So, using this ESP32 Library, we have added the board in Proteus software. Now, let's simulate ESP32 in Proteus:
Simulate ESP32 in Proteus
We are going to simulate the ESP32 board by running Blink LED Example. As I told earlier, we can't add WiFi and BLE capabilities in this simulated ESP32 board. So, we are going to select Arduino UNO in the board section of Arduino IDE to get the hex file.
LED with ESP32
- First of all, design this simple circuit, where we have placed an LED at Pin # 13 of ESP32, as shown in the below figure:
- In the Properties Panel of this LED, change the Model Type from Analog to Digital.
Code For ESP32
- Open Arduino IDE and in the File>Examples, open the Blink LED example code, given below:
- As you can see in the above figure, I have selected Arduino UNO in the Tools>Boards section of Arduino IDE.
- Now compile the Arduino Code and get its hex file. Read this resource: How to Get the Hex File from Arduino IDE.
Add Hex File in Proteus
- Open the Properties Panel of the ESP32 board by double-clicking on it in the Proteus software.
- In the Program File section of the Properties Panel, add the hex file location, as shown in the below figure:
- Now, close the Properties Panel by clicking the OK Button.
ESP32 Simulation Results
- If you did no mistake, you will get results as shown in the below figure:
So, that was all for today. I hope you have enjoyed simulating ESP32 board in Proteus software. If you have any questions, ask in the comments. Till the next tutorial, take care. Have fun !!!
NodeMCU Library for Proteus
Hello friends, I hope you all are doing great. In today's tutorial, I will share a Proteus Library of another embedded module i.e. NodeMCU. NodeMCU is a microcontroller board and if you are new to this board, you should read Introduction to NodeMCU to get your hands dirty. NodeMCU is not present in the components library of Proteus and using this library you can easily simulate NodeMCU in Proteus.
We can't add WiFi and BLE capabilities to our module in the Proteus software, that's why it will just perform the basic functions i.e. sensors interfacing, PWM, I/O control etc. So, you can use it for simple code testing and can also use it to design circuit diagrams of your projects.
So, let's have a look at How to download NodeMCU Proteus Library and simulate it:
NodeMCU Library for Proteus
- First of all, download the Proteus Library zip file, by clicking the below button:
NodeMCU Library for Proteus
Add Library Files in Proteus
- Extract the zip file and open the "Proteus Library Files" folder.
- You will find two files in this folder, named:
- NodeMCUTEP.IDX
- NodeMCUTEP.LIB
- Place these two files in the Library Folder of your Proteus Software.
Note: Look at How to add new Library in Proteus 8, if you don't know already.
NodeMCU in Proteus
- After adding the NodeMCU files to the Library folder, open your Proteus software or restart it, if it's already running.
- In the components list, make a search for "NodeMCU".
- If you have added the Library files correctly, you will get the below result:
- Double-click on this NodeMCU module to add it in the list of your project components.
- Now place it in the Proteus workspace and it will look like:
- We have kept its size small as we got a lot of requests after Arduino Library to reduce the boards' sizes. I hope you will like this one.
So, we have successfully added the NodeMCU module to our Proteus software. Now let's simulate NodeMCU and for that, I am going to use the blink example:
Simulate NodeMCU in Proteus
LED with NodeMCU
- First of all, we need to attach an LED with Pin # 13 of NodeMCU, as shown in the below figure:
- Make sure to change the LED Model Type from analog to digital in its Properties Panel, otherwise, it won't work.
Code for NodeMCU LED Blinking
- Now it's time to get the NodeMCU LED Blinking code, given below:
Note: As you can see in the above code, we have selected Arduino UNO in the boards' section. As I have told earlier, this NodeMCU module is only going to use its pins, we can't add WiFi or BLE capabilities in the Proteus software. So, while compiling the code, select Arduino UNO board. Something is better than nothing.
Adding Hex File in Proteus
- Double-click on the NodeMCU module in Proteus software to open its Properties Panel.
- Add the Hex file from Arduino IDE in the "Program File" section of the Properties Panel.
- Click OK to close the panel.
- Now run the Proteus simulation and if everything goes fine, you will get results as shown in the below figure:
So, that's how you can easily simulate NodeMCU in the Proteus software. If you have any questions, please ask in the comments. I will resolve them as soon as possible. In the next tutorial, we will share the ESP32 Library for Proteus. Till then take care and have fun!!!
Current Sensor Library for Proteus
Hi Friends! Hope you’re well today. Today, I am going to share the Proteus Library of Current Sensor WCS1600. This sensor is not available in the Proteus Components Library and we’re sharing it for the first time.
The Current Sensor WCS1600 is used to measure the current flowing through the circuit and is used in embedded systems and robotics projects. If you are new to this sensor, you must first design its simulation before playing with the hardware.
Before we move further, let’s have a brief overview of WCS1600 Current Sensor:
Where To Buy? |
---|
No. | Components | Distributor | Link To Buy |
1 | LEDs | Amazon | Buy Now |
2 | Resistor | Amazon | Buy Now |
3 | ACS712 | Amazon | Buy Now |
What is WCS1600 Current Sensor?
WCS1600 comes with a drift linear hall sensor IC which gives precise and accurate values. The hall sensor IC is 9.0 mm in diameter through the hole and is incorporated with a temperature compensation circuit. To measure the passing current, the electric wire of the system should pass through the hole of this sensor.
Using this design, the system designers can monitor the current path of any length without affecting the layout of the original system. The integrated hall IC senses the magnetic field generated when current flows through the wire. That magnetic field is then converted into a proportional voltage.
Features:
- Product: WCS1600 current sensor.
- Sensitivity: 22mV/A
- Low operating current: 3mA
- Supply Current: 3.5 ~ 6mA
- Zero Current Vout: 2.5V
- Bandwidth: 23kHz
- Isolation voltage: 4000V
- Supply Voltage: 3 ~ 12V
- Operating Temp: -20 ~ 125°C
- Conductor Through Hole: 9.2mm
- Temperature Drift: +/-0.3 mV/C
- Output voltage proportional to AC and DC
- Wide sensing current range 0~100A at 5V volt
- For easy soldering on PCB, two bronze sticks are used
- Ratiometric output from the supply voltage
WCS1600 Current Sensor Library for Proteus
- First, download the Proteus Library zip file for WCS1600 Current Sensor by clicking the link below:
WCS1600 Current Sensor Library for Proteus
Adding Library Files
- After downloading this zip file, extract it and you’ll find the folder "Proteus Library Files".
- In this folder, 3 Proteus Library files are available, named:
- WCS1600TEP.HEX
- WCS1600TEP.IDX
- WCS1600TEP.LIB
- Copy these files and paste them into the Library Folder of Proteus Software, as shown in the below figure:
- After adding these files to the Library folder, open the Proteus Software, and if you’re already working on it, you need to restart it.
Note: You should read How to Add Library in Proteus 8, if you are having any issues finding the Library Folder.
Current Sensor in Proteus
In the components section, write ‘WCS1600 Current Sensor’ in the search bar and you’ll get the following result:
Now place this sensor in the Proteus workspace, as shown in the below figure:
You can see in the above figure, this current sensor carries 4 pins as follow:
- Vcc: 5V is provided to this pin.
- GND: This pin is grounded.
- D0: This is the output pin and it goes HIGH when current passes through the hole and will remain LOW when there is no current.
- A0: This pin will give the analog output.
- TestPin: As we can't use a current wire in Proteus, so we placed this test pin to indicate current. When this pin is HIGH, means the current is passing through the IC and if it's LOW, means no current.
Adding Hex File
Now double-click the sensor to open up its Properties Panel, as shown in the below figure:
Go to the ‘Program File’ section and browse for the file WCS1600TEP.HEX which you have already downloaded and placed in the Library Folder of Proteus.
Simulate Current Sensor
- Now we’ll design a simple circuit to use this WCS1600 Current Sensor in Proteus.
- The following figure shows the WCS1600 Current Sensor Simulation in Proteus.
- As you can see in the above figure, I have placed an LC circuit at the analog pin, that's only for the simulation to get the analog value. It won't be used in real hardware.
- Now run Proteus Simulation. You’ll get the result as shown below.
That’s all for today. Hope you’ve found this Library for Proteus useful. If you’re unsure or have any queries regarding the simulation of this sensor and how to use it in your engineering projects, you are welcome to get in touch with me in the section below. I’ll help you the best way I can. Thank you for reading this tutorial.
Up Down Counter using Arduino & 7-Segment Display
Hello geeks, welcome to our new project. In this project, we are going to make a very interesting project which is an Up-Down counter. Most of us who have an electronics background or studied digital electronics must know the counter. Counter is a simple device which counts numbers. As per the digital electronics, there are two types of counter, the Up counter which counts in increasing order and another is Down counter which counts in decreasing order. And every counter has a reset limit, on which the counter resets to its initial value and starts the counting again. The limit of every counter depends on the bits of counter. For example, we have a 8 bit Up counter which means it will count upto 255 and afterwards it will reset and will start again counting from zero.
Where To Buy? |
---|
No. | Components | Distributor | Link To Buy |
1 | 7-Segment Display | Amazon | Buy Now |
2 | Arduino Uno | Amazon | Buy Now |
Software to install
In this project, we will need two softwares first is the Arduino IDE which is used for Arduino programming. As we are going to make this project in simulation, we will use Proteus simulation software. Proteus is a simulation software for electronics projects. In this software, we can run the real time simulation of electronics circuits and debug them without damaging any real components.
And it is a good practice to make any circuit in the simulation first if we do that for the first time.
And Proteus has a very large database for electronics components but it lacks some new component libraries, for that we have to install some libraries for those components. In this, we have to install a library for the Arduino UNO module.
We should first download the Arduino UNO library.
Components required
We will need the following components for this project
- Arduino UNO
- 7 Segment LED display
- Two push buttons
- 2 Resistors
Components details
Arduino UNO
- Arduino UNO is an open source development board developed by Arduino.
- It uses the ATmega328 microcontroller made by ATMEL.
- ATmega328 has an 8 bit RISC based processor core with 32Kb flash memory.
- Arduino UNO has 14 digital input/output pins and 6 analog input/output pins.
- It has 1 UART, 1 SPI and 1 I2C communication peripheral on board.
- It has a 10 bit ADC which can give value from 0 to 1023.
- Operating voltage of ATmega IC is 5 volts but on the Arduino board, using the DC power jack, we can connect upto 9-12 voltage power supply.
- We can power Arduino UNO using the DC power jack or Vin on the Arduino UNO module.
- Here, we used the Arduino UNO as the main controller which works as a counter here and displays the same on the 7 segment LED display.
7 Segment LED display
- It is an LED display module, in which there are seven LEDs arranged in the rectangular form on which we can display single digit numbers from 0-9 and some alphabets as well.
- It has two types, one is common ground and another is common Vcc.
- There are 7 different pins for each LEDs and one common pin, this pin can be common ground or common Vcc depending upon type of the display.
- The pins on the display are noted as a,b,c,d,e,f,g.
- Common ground is also known as Common cathode, and common Vcc is also known as Common anode .
- In Common cathode type display, the LEDs will glow when LEDs pins are connected to logic HIGH.
- In Common anode type display, the LEDs will glow when the LEDs pins are connected to logic LOW.
- As they are simple LEDs so while using them in the circuit, it is mandatory to use some protection resistors with each of them if we are using Common ground type display and single resistor with the Common Vcc pin if we are using the Common Vcc type display.
- For the counter, we will follow the truth table of display for showing the numbers.
Push buttons
- In this we have used a simple momentary push button for setting the counter in UP counting or in DOWN counting.
- There are two pins in the push button.
- As we will use the push buttons in active low condition which means one side will be connected to ground and other terminal will be connected to the Arduino.
- So when we press the push button, it will close the circuit and set the pin.
- While using any push button, it is mandatory to use a pull-up or pull-down resistor with it, otherwise there will be some glitches in the operation.
- Because when the button is released, the circuit will be open and if there is no pull-up or pull-down connected to the other pin of the push button, then that pin will be in floating state and will give any random voltage, which will create an issue.
- Here, in this project we have used the pull-up resistor so that when the push button is released, the pin state will be in logic HIGH state.
Project overview
As we know counters are simple electronic circuits which count some values and after reaching the maximum value they will reset. In this project, we will make an Up-Down counter which means our counter will count from 0-9 and again after 9-0.
We will use the 7 segment display for showing the counter values. In this project, we have used the common ground type of LED display. And two push buttons to start the counter in up counting or in down counting. When we press the UP push button, then the Arduino will activate the pins as per the up counting and LED will display numbers from 0-9 and when we press the DOWN push button then the Arduino will activate the pin as per the down counting and LED will display numbers from 9-0.
To control the LEDs, Arduino will set the pins as HIGH and LOW as per the truth table for the common ground display.
Arduino will set the pins and LED will display the numbers.
Circuit diagram and working
Now we know the working of our counter so let’s make the circuit for the same:
- Open the new project in the Proteus and import all the required components in the workspace.
- Now let’s connect the push buttons with Arduino, for the push button we will use Arduino UNO’s digital pins D11 and D12.
- Connect the one side of the push buttons with the Vcc and another side with the Arduino UNO and on that side we will connect the pull-down resistors.
- Connect the pull down resistors with the Ground.
- Now, connect the pins of the 7 segment display with the Arduino UNO.
- Connect the pins of the LED display in the same order as A-2, B-3, C-4, D-6, E-7, F-8, G-9 and DP -5. Otherwise it will show the wrong data on the display.
Arduino Code for Up-Down counter
Now we will start writing the code of the Up-Down counter. The code of this project will be divided into three major parts. In the first part, we will declare all the required variables and pins. In the second part, we will set the modes of pins and set the initial states to pins and do the required configuration if needed and the last part we will write our main functionality of our project which we want to run continually.
- So let’s declare all the required variables. First of all, declare the variables for pins of the seven segment display and Up counter push button and down counter push button.
- Now declare all the required variables which we will use in this code.
- Now we declared all the required variables and pins so let’s start with the void setup function.
Void setup()
- It is one of the most important functions in the Arduino code structure. Without this, our code will not compile successfully and will show the error.
- In this, we will set the pin mode of each pin and set them to their initial values.
- This function only runs once every time when we restart the code so that we will write the part of code which we want to run only
- We will set the pinmode of seven segment LEDs to output mode as we want to control the LEDs from them.
- And set the pinmode of push buttons as input as we want to read their state in the application.
- For debugging purposes initialise the serial monitor also.
- After this, we will write the void loop function.
Void loop()
- This is also one of the most important functions as per the structure of the Arduino code, we can not write the code without using this function.
- In this function, we will write the code which we want to run in the continuous loop, so we will write our main application code in this section.
- As per the application of our code first of all, we will read the Up and Down counter push button states and when the state changes we will trigger the counter.
- Write the condition for the Up counter button, when the button is pressed then the state of the button changes and we will check the state of the push button. If it is HIGH then we will start incrementing the counter variable and using the “changeNumber()”, we will display the numbers on the seven segment LED display.
- Similarly, for the down counter push button, when the push button is pressed then the state changes and when the state of the button is high then we will start decrementing the counter variable and display the number on the seven segment display using the “changeNumber()” function
Void changeNumber(int buttonpress)
- This is a user defined function.
- We will use this function to display the number on the seven segment LED display.
- This function will set the state of the LED’s pins as per the number we want to display.
- It takes an argument as the number and with the help of switch-case, it will set the state of pins as per respective number.
- The state of pins is decided by the truth table of the seven segment LED display mentioned in the above image of the truth table.
Result and test
After the circuit and the coding part, we are all set to run the simulation:
- To run the simulation, we have to add the hex file of our application code.
- We have to generate the hex file from the Arduino IDE.
- To generate the hex file , goto “Sketch >> Export compiled binary” after that it will compile our application code and the hex file will be generated and will be saved in the same folder of the project.
- Now include that to the Arduino UNO module in the simulation.
- To add the hex file, click on the Arduino UNO module, then a window will be opened, from there browse to the location of the hex file and add that.
- Now run the simulation.
- At the start the LED display will show ‘0’.
- So, when we press the Up push button, then the counter variable will be incremented by one on every press and when we push the Down push button, then the counter variable will be decremented by one on every push and the same will be displayed on the Seven segment LED display.
Conclusion
I hope we have covered all the points related to this project. I think it will be a useful project for learning purposes and gives an understanding about working of counters. Please let us know in the comment section if you have faced any issues while making this project.
Thanks for reading this article. See you in the next project.