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.

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.ComponentsDistributorLink To Buy
1Battery 12VAmazonBuy Now
2LEDsAmazonBuy Now
3ResistorAmazonBuy Now
4Raspberry Pi ZeroAmazonBuy 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.ComponentsDistributorLink To Buy
1Battery 12VAmazonBuy Now
2LEDsAmazonBuy Now
3ResistorAmazonBuy Now
4Raspberry Pi 4AmazonBuy 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.ComponentsDistributorLink To Buy
1Battery 12VAmazonBuy Now
2LEDsAmazonBuy Now
3ResistorAmazonBuy Now
4Raspberry Pi 3AmazonBuy 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.ComponentsDistributorLink To Buy
1Battery 12VAmazonBuy Now
2LEDsAmazonBuy Now
3ResistorAmazonBuy Now
4Raspberry Pi PicoAmazonBuy 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:

Where To Buy?
No.ComponentsDistributorLink To Buy
1Battery 12VAmazonBuy Now
2LEDsAmazonBuy Now
3ResistorAmazonBuy Now
4ESP32AmazonBuy Now

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:
    • ESP32TEP.IDX
    • ESP32TEP.LIB
  • 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:

Where To Buy?
No.ComponentsDistributorLink To Buy
1Battery 12VAmazonBuy Now
2LEDsAmazonBuy Now
3ResistorAmazonBuy Now
4ESP8266AmazonBuy Now

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!!!

Home Security System using Arduino UNO in Proteus

Hello friends, I hope you all are doing well. In today's tutorial, we are going to design a Home Security System using Arduino UNO in Proteus software. It's the most commonly designed engineering project, especially in electrical, electronics and mechatronics engineering. Normally engineering students design it as a semester project during their engineering course.

So, today we will design a home security system from scratch in Proteus software. I have given the complete project below to download but I would suggest you to design it on your own so that you could understand it better. So, let's get started:

Where To Buy?
No.ComponentsDistributorLink To Buy
1Battery 12VAmazonBuy Now
2BuzzerAmazonBuy Now
3LM7805AmazonBuy Now
4OptoCouplerAmazonBuy Now
5RelayAmazonBuy Now
6Keypad 4x3AmazonBuy Now
7LCD 20x4AmazonBuy Now
8Flame SensorsAmazonBuy Now
9MQ-2AmazonBuy Now
10PIR SensorAmazonBuy Now
11Arduino UnoAmazonBuy Now

Home Security System: Project Description

  • Before going into the detail, let's first download the complete Proteus Simulation with Arduino Code, by clicking the below button:
Home Security System using Arduino UNO in Proteus

Let me first give you a detailed project description i.e. what we actually want to design? We want to build a Home Security Project, which should follow these security protocols:

  • Fire alarm: It should be able to detect the fire and sound an alarm to alert everyone at home.
  • Smoke alarm: It should detect the gas(smoke) and turn on the alarm(if detected).

The above-mentioned security protocols will be followed 24/7. Moreover, there will be two security modes in the project, named:

  • Secure Mode.
  • Normal Mode.

Let's have a look at both of these modes, one by one:

1. Secure Mode

  • This mode should be selected, when owners want to completely secure their home i.e. they are leaving home or while sleeping at night.
  • If the Secure Mode is selected, the project should follow the following security protocols:
    • Intruder Detection Alarm: It should detect the presence of any human being in the occupied premises.
    • Windows Security Alarm: If someone tries to break through the windows, the project should sound an alarm.
    • Door Security Alarm: If any intruder tries to break through the main door, it should again sound the alarm to alert everyone.

2. Normal Mode

  • This mode should be selected, when owners are at home and just want to take the basic security measures.
  • In this mode, only the Fire Alarm & Gas Alarm will work, while all other alarms will remain on standby.

Other Features

  • There should be an LCD, to display values of all parameters.
  • It should have a buzzer to generate an alarm, in case of emergency.
  • There should a Push Button to make switches between these security modes.

Here's the final simulation, which we are going to design in today's lecture:

So, these are our requirements, which we want to achieve in this Home Security Project. Now let's have a look at the components selected for this project:

Home Security System: Components Selected

Now let's have a look at the list of components, which I have selected for this Home Security Project. I will also briefly explain the purpose of using each component.

1. Arduino UNO

  • As clearly it's an Embedded Systems Project, so first of all we need to select a Microcontroller for our project.
  • As I have mentioned earlier, we will use the Arduino UNO Microcontroller board for designing this project.
  • Arduino UNO will act as the brain of the project and will control all sensors and modules.

2. Flame Sensor:

  • A flame sensor is used to detects the presence of fire.
  • The sensor basically consists of a photo-diode that detects the Infrared rays that emit from the fire. When it detects a fire, its output goes HIGH.

3. Gas Sensor (MQ-6)

  • MQ-6 Gas Sensor is used to detect the concentration of gases in the environment.
  • The sensor produces a potential difference proportional to the concentration of the particular gases.
  • The type of gas that it detects depends upon the material used in the sensor.
  • There are many gas sensors available in the market i.e. MQ-2, MQ-3, MQ-4 etc.
  • These sensors are available as ready-made modules for easy interfacing with the microcontroller.

4. PIR Sensor(HC-SR501)

  • HC-SR501 PIR sensor is used to detect any human being(intruder) in the Secure Mode.
  • It detects the IR radiations from the human movement & generates a pulse on its output.
  • The time period of the pulse could be varied by using the potentiometer on the sensor.

5. Vibration sensor(SW-420)

  • The SW-420 vibration sensor is used to detect any forced entry through windows.
  • In Secure Mode, if someone tries to open the window, the sensor will detect vibrations and will send a HIGH signal to the microcontroller.

6. Infrared Sensor

  • An infrared sensor will be placed at the door and someone tried to enter through that door, the sensor will detect it.
  • It consists of an IR transmitter and a photo-diode that are placed close to each other.
  • If any object movement occurs in front of the sensor, the IR rays hit the object and return back with a particular angle called incident angle.
  • This pulls the comparator output to ground or logic LOW.

7. LCD 20x4

  • LCD 20x4 will be used for displaying the values of all these sensors.
  • It will also display useful information i.e. which mode is selected.

8. Buzzer

  • A small 5V Buzzer is used to sound the alarm.

9. LM7805

  • LM7805 is a voltage regulator and is used to convert voltage from 12V to 5V.
  • Power sources(i.e. battery, adapter etc.) available are normally 12V, as it has become a standard.
  • Moreover, many components also operate at 12V like a buzzer or DC motor.
  • While microcontrollers and sensors work on 5V, so in Embedded projects, it's quite necessary to design a voltage regulator from 12V to 5V and in some cases 3.3V.
  • I normally prefer LM7805 for converting voltage from 12V to 5V.

10. Resistances(1kohm)

  • We need to use a few resistances of 1kohm.

11. Small LED

  • We will also use a small LED for power indication.

12. Capacitors(100uF)

  • We will also use few capacitors of 100uF, as it removes any noise/ripples.
So, these are the components, we are going to use for designing Home Security System. Now let's get started with designing the Proteus Simulation:

Proteus Simulation of Home Security System

As I have told you earlier, I am going to use Proteus software for designing this project. Proteus is an excellent simulation tool, where we will not only design the circuit of this project but will also test its output. I always design my programming algorithms on simulations as working on real hardware is too time-consuming. You should remove all your programming bugs in simulation and once confirmed then design your project in real hardware. So, let's start:

Install Proteus Libraries

Once you added all the libraries, now open your Proteus software.

Designing Circuit Diagram in Proteus

  • Now we need to design a circuit for our project, so select these components from Proteus Components Search Box.
  • First of all, let's design the voltage regulator circuit using LM7805, which will be simply converting the voltage from 12V to 5V.
  • As you can see in the above figure, I have used 12V Battery, while the output of LM7805 is showing 5V and I have also placed an LED for power indication.
LCD Interfacing with Arduino:
  • Next, we need to interface 20x4 LCD with Arduino UNO, so design the circuit as shown in the below figure:

Next, we need to interface five sensors with Arduino UNO, so let's add them to our Proteus simulation:

Sensors Interfacing with Arduino:
  • These are simple digital & analog sensors and are all powered up at 5V.
  • So, simply connect them as shown in the below figure:
  • The Flame Sensor is connected to pin A0 of Arduino UNO.
  • Gas Sensor is connected to pin A1 of Arduino UNO.
  • PIR Sensor is connected to pin A2 of Arduino UNO.
  • The Vibration Sensor is connected to pin A3 of Arduino UNO.
  • The Infrared Sensor is connected to pin A4 of Arduino UNO.

For simulation, ensure all hex files are uploaded to each sensor for proper working. You can upload the source code hex file to the Arduino, by pressing Ctrl+E or by right click --> Edit properties.

Buzzer & Push Button:
  • Finally, we need to add the Buzzer to sound the alarm in emergency cases, I have connected it to Pin A5 of Arduino UNO.
  • I have also connected a push-button for switching the modes, connected to Pin 7 of Arduino UNO, as shown in the below figure:
  • Here's the image of the complete Proteus Simulation for Home Security System:

Now let's design the Arduino programming code for Home Security Project:

Arduino Code for Home Security System

In the previous section, we have designed the Proteus simulation of the project, now let's design its Arduino Code to make it alive. Let's get started:

Initialization LCD Arduino Code

  • First of all, we need to define all our variables, as you can see in the code shown in the right figure.
  • I have included the Liquid Crystal Library, which is used to operate LCD.
  • Next, I have defined all my sensors to the respective pins and then initialized boolean variables for storing the output of sensors.
  • In the Setup loop, I have made the sensors' pins input pullup using the pinMode Arduino command.
  • Finally, displayed an initialization message on the LCD screen i.e. "Home Security System using Arduino UNO By TEP".
  • The message will display for around 1 second and then LCD will be cleared and the SensorDisplay function will be called, which will simply write sensors' names on the LCD screen.
  • Now compile your code and add the hex file in Arduino UNO and run your PRoteus simulation.
  • If everything goes fine, you will get results as shown in the below figure:

So far, we have just displayed the sensor's names, now let's read the sensors' data in the loop section:

Reading Sensors' Data

  • In the loop section, first of all, we need to read the sensors' data using the digitalRead command, as shown in the code.
  • After reading the sensor's data, I have called the SensorValues function, in which I have placed a check on each sensor's value and updated it on LCD.
  • It's quite straightforward code, if the sensor is giving HIGH output, I am displaying Yes on LCD and if it's LOW, I am simply printing No.
  • We haven't yet defined the modes, so the project will keep on reading the sensors and will display their respective value in the LCD.
  • As you can see in the below figure, if the TestPin of the sensor is HIGH, its respective value on LCD is showing "Yes" and if it's LOW then "No" is written.
  • Now, if you change any sensor's value, its respective value on LCD will be updated.

So, we have successfully interfaced our sensors with Arduino UNO and now it's time to add operational modes to our project.

Two Operational Modes

  • As I mentioned earlier, we need to add two operational modes in our project, and the push button will be used for conversion from one mode to another.
  • So, I have simply added an If loop in my code, as shown in the figure on the right side.
  • In normal mode, I have simply displayed the name of the mode at the first line of LCD.
  • While in secure mode, I am checking if either of the sensors goes HIGH, simply turn ON the Buzzer.
  • Although, you won't be able to hear the Buzzer sound in the below figure, but you can see Buzzer's Pin is HIGH because two of the sensors are giving a response. Check the video for Buzzer working.
  • We normally need to use an optocoupler or relay driver in between the buzzer and microcontroller as buzzers normally operate at 12V, but 5V buzzers are also available.
  • Here's the complete Arduino Code:
/* * All rights reserved to TEP www.TheEngineeringProjects.com */ #include const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2; LiquidCrystal lcd(rs, en, d4, d5, d6, d7); #define Flame A0 #define Gas A1 #define Pir A2 #define Vib A3 #define Ir A4 #define Buzzer A5 #define Switch 7 boolean Fire, Smoke, Intruder, Window, Door; boolean Mode = false; void setup() { pinMode(Flame,INPUT_PULLUP); pinMode(Gas,INPUT_PULLUP); pinMode(Pir,INPUT_PULLUP); pinMode(Vib,INPUT_PULLUP); pinMode(Ir,INPUT_PULLUP); pinMode(Switch,INPUT_PULLUP); pinMode(Buzzer,OUTPUT); lcd.begin(20,4); pinMode(Buzzer, OUTPUT); lcd.setCursor(0,1); lcd.print("HOME SECURITY SYSTEM"); lcd.setCursor(0,2); lcd.print(" USING ARDUINO UNO "); lcd.setCursor(7,3); lcd.print("By TEP "); //delay(700); lcd.clear(); SensorDisplay(); } void loop() { Fire = digitalRead(Flame); Smoke = digitalRead(Gas); Intruder = digitalRead(Pir); Window = digitalRead(Vib); Door = digitalRead(Ir); Mode = digitalRead(Switch); SensorValues(); if(Mode==false) // Normal mode { lcd.setCursor(4,0); lcd.print("Normal Mode"); } else // Secure Mode { lcd.setCursor(4,0); lcd.print("Secure Mode"); if((Fire == HIGH) || (Smoke == HIGH) || (Intruder == HIGH) || (Window == HIGH) || (Door == HIGH)){ digitalWrite(Buzzer, HIGH); }else{ digitalWrite(Buzzer, LOW); } } } void SensorDisplay() { lcd.setCursor(0,1); lcd.print("Fire:"); lcd.setCursor(10,1); lcd.print("Smoke:"); lcd.setCursor(0,2); lcd.print("Door:"); lcd.setCursor(10,2); lcd.print("Window:"); lcd.setCursor(0,3); lcd.print("Intruder:"); } void SensorValues() { if(Fire == true){ lcd.setCursor(6,1); lcd.print("Yes");} else{ lcd.setCursor(6,1); lcd.print("No ");} if(Smoke == true){lcd.setCursor(17,1); lcd.print("Yes");} else{lcd.setCursor(17,1); lcd.print("No ");} if(Intruder == true){lcd.setCursor(11,3); lcd.print("Yes");} else{lcd.setCursor(11,3); lcd.print("No ");} if(Window == true){lcd.setCursor(17,2); lcd.print("Yes");} else{lcd.setCursor(17,2); lcd.print("No ");} if(Door == true){lcd.setCursor(6,2); lcd.print("Yes");} else{lcd.setCursor(6,2); lcd.print("No ");} }

Future Scope of Home Security System

  • Embedded has taken over the whole world because of its user-friendliness and low cost.
  • Instead of hiring security guards(which is quite expensive), now smart homes in modern societies are equipped with such home security systems.
  • Modern Home Security systems are even linked with local police or security agencies for emergency help.
  • Moreover, these security systems are not bound to homes only, nowadays offices, banks, shopping malls etc. are all equipped with such smart security systems.

Future Work on Home Security System

  • Today, we have designed a very simple Home Security System, where we interfaced few sensors and have only placed a Buzzer.
  • We will continue this project and will add smart features to it.
  • Let's have a look at few features, which we can add to this project:
    1. We can interface the GSM module to send messages, in case of emergency.
    2. We can add more sensors i.e. ultrasonic sensors, different types of Gas sensors in it.
    3. We can also improve our code by using interrupts instead of polling.
    4. We can also add a camera for facial recognition.
    5. To improve the security, we can add a keypad and only authorized persons will have the access to enter.
    6. The fingerprint sensor can also be used for identification purposes.

So, that was all for today. I hope you guys have enjoyed today's project. If you have any questions/queries, please ask in the comments and I will try my best to resolve them asap. Thanks for reading, take care. Bye :)

2 Relay Module Interfacing with Arduino

Hello everyone! I hope you all will be absolutely fine and having fun. Today, I am going to provide a detailed discussion on 2 Relay Module Interfacing with Arduino. First of all I would like to explain you that what is relay and how to use it and then we will move forward towards 2 relay module interfacing with Arduino. I have already controlled relay with 555 timers. 2 relay module consists of two relays. Relay is basically an electronic device or a switch which is used to open and close the circuits electronically. A relay controls an electric circuit by opening and closing contacts in another circuit. When the relay contact is normally open (NO), there will be an open connection when the relay is not energized. When the relay contact is normally closed, there will be a closed connection even when the relay is not energized. We can use relays to control the smaller currents in different electronic circuits. 2 relay module has two relays. One relay can control two AC/DC device simultaneously. That means 2 relay module can control four AC/DC devices at a time. 2 relay module is normally used to control the DC motors in different projects e.g. robotics, automation, embedded projects etc. It can control two DC motors simultaneously. Moreover, we can also use it for different applications e.g. to control DC/AC fans, AC/DC lights, AC/DC bulbs and a lot more. The further detail about 2 relay module interfacing with Arduino will be given later in this tutorial.

2 Relay Module Interfacing with Arduino

2 Relay Module is an electronic device consists of two relays as its major components. Relay is a switch which makes or loses the connection between two different circuits. A single relay is capable of controlling two AC/DC devices simultaneously. So, 2 relay module is able to control four AC/DC devices at the same time. Mostly it is used to control the DC motors. It can also be used in different projects e.g embedded projects, robotic, automation, power etc. 2 relay module is shown in the figure given below.
1. Relay Proteus Simulation
2. 2 Relay Module  Components
  • A complete list of the components used while designing 2 relay module is shown in the figure given below.
3. 2 Relay Module  Input Pins
  • 2 relay module has five (5) input pins in total, each perform different action.
  •  All of its pins are provided in the table shown in the figure below.
4. 2 Relay Module  Input Pins Description
  • We must know about the functions of each pin.
  • 2 relay board/module input pin functions are listed in the table shown in the figure below.
  • Both IN1 and IN2 comes from the micro-controller (Arduino UNO in this case).
  • IN1 pin controls the 1st relay attached on 2 relay module.
  • IN2 pin controls the 2nd relay attached on 2 relay module
5. 2 Relay Module  Output Pins
  • 2 relay module has three (3) output pins for each relay.
  • Its output pins are given in the table shown in the figure given below.
6. 2 Relay Module  Output Pins Description
  • Each output pin of 2 relay module has its own functions.
  • 2 relay module pin functions are listed in the table given in the figure shown below.
  • NO pin is normally open pin and device attached to this pin will not work if the relay is not energized.
  • COM is a common pin i.e. ground pin.
  • NC is normally closed pin and device attached to this pin will start working even if the relay is not energized.
7. 2 Relay Module  Compatibility
  • 2 relay module is compatible with different micro-controllers.
  • Some of those micro-controllers are provided in the table shown in the figure given below.
8. 2 Relay Module  Circuit Diagram
  • Circuit diagram of 2 relay module is given in the figure shown below.
9. 2 Relay Module  Interfacing with Arduino Wiring Diagrams
10. 2 Relay Module  Interfacing with Arduino Actual Diagrams
  • I have provided the complete wiring diagram for 2 relay module interfacing with Arduino.
  • Wiring diagram is shown in the figure given below.
11. 2 Relay Module  Interfacing with Arduino Source Code & Description
  • If you are new to Arduino software then you must have a look at How to write Arduino code.
  • You just need to copy and paste the source code given below in your Arduino software.
  • The complete source code for 2 relay module interfacing with Arduino is given below.
int relay1 = 6;
int relay2 = 7;  

void setup() {
  
  pinMode(relay1, OUTPUT); 
  pinMode(relay2, OUTPUT);
}

void loop() {

   digitalWrite(relay1,LOW);
   delay(1000);
 
   digitalWrite(relay1,HIGH); 
   delay(1000);
   
   digitalWrite(relay2,LOW); 
   delay(1000);
   
   digitalWrite(relay2,HIGH); 
   delay(1000);
}
  • First of all I have defined relay pins.
  • Then I have changed the mode of these pins to output.
  • After that I have turned on and off both of the relays with the delay of 1 sec or 1000 msec.
  • So, that was the brief description about the source code for 2 relay module interfacing with Arduino.
  • You can download the wiring diagram and complete Arduino source code here by clicking on the button below.

12. 2 Relay Module  Features
  • The most common features associated with 2 relay module are provided in the table shown in the figure given below.
13. 2 Relay Module  Application
  • 2 relay module applications are given in the table shown in the figure below.
In the tutorial 2 Relay Module Interfacing with Arduino, we have learnt about the components used in the design of 2 relay module. We have also learnt about the 2 relay module interfacing with Arduino. I have provided the complete Arduino source code, you can control this module using the same code. I hope you have enjoyed the tutorial. If you have any problem you can ask us in comments. Out team is 24/7 available for you. I will share different informative engineering topics in my upcoming tutorials. So, till my next tutorial, take care and bye :)

Stepper Motor Speed Control using Arduino

Hello everyone! I hope you all will be absolutely fine and fun. Today, I am going to tell you that how to make a simple algorithm for Stepper Motor Speed Control using Arduino. I have already discussed with you about DC Motor Direction Control using Arduino, Matlab and NI LabVIEW. Moreover, I have also discussed the DC Motor Speed Control using Arduino,Matlab and LabView. If you are working on Stepper Motor, then you must have a look at Stepper Motor Direction Control using Arduino, Stepper Motor Direction Control using Matlab and Stepper Motor Direction Control using NI LabVIEW. Now, in this tutorial I will explain you about the program which will helpful for Stepper Motor Speed Control using Arduino. Before going into the details of this tutorial you must have go through my previous tutorials because I am using the same hardware. So, they will be a lot helpful for the better understanding of this tutorial. In this tutorial I will explain you about making an Arduino program for Stepper Motor Speed Control using Arduino with the help of the serial communication. If the stepper motor is rotating at its maximum speed and you are continuously sending the command through the serial port to reduce its speed, it s speed will be reduced in proportion to the number of command sent through the serial port. Similarly the same procedure will be followed to increase the speed of the stepper motor.

Stepper Motor Speed Control using Arduino

In the tutorial Stepper Motor Direction Control using Arduino, I will explain you about making an algorithm to run the stepper motor at different speed. If the stepper motor is already running at its maximum speed and you want want to accelerate it further then nothing will happen to the speed of the stepper motor. If the stepper motor is rotating slowly and you enhance its speed, then the speed of the motor will increase in proportion to the number of accelerating command sent through the serial port.
  • You can download the complete Arduino source code here by clicking on the button below.

Download Arduino Code

  • Download .rar file, extract it and enjoy the complete source code.
Flow Chart
  • I have made a flow chart so that you can easily understand the entire algorithm because sometimes it becomes difficult to understand the algorithm with the help of the source code.
  • Flow chart for the Stepper Motor Speed Control using Arduino is shown in the figure below.
  • First of all we need to start the serial port so that our communication could be started.
  • Then there is a method to check the speed, if the speed is greater than the maximum speed of the stepper motor then the program will wait for the next command.
  • If the stepper motor is not rotating with its maximum speed then we can increase its speed.
  • Similarly if the minimum speed of the stepper motor is reached then the program will rotate for the next commands.
  • If the minimum limit of the speed of the stepper motor is not reached then we have a option to reduce its further.
  • At the end we should close the serial port so that exchange of unnecessary commands through the serial port could be avoided.
Block Diagram
  • Block diagram will be helpful for use for the better understanding of the exchange of information.
  • It tells us that how the information is exchanged sequentially among all the components used.
  • Block diagram is shown in the figure below.
  • Arduino UNO communicates with the L298 motor controller to control the speed of the stepper motor.
  • L298 Motor controller manipulates the Arduino's commands and starts to control the speed of the stepper motor.
Arduino Code Description
In this section of the tutorial Stepper Motor Speed Control using Arduino, I am going to elaborate you about the Arduino source.
  • I have made two different functions for increasing (accelerating) the speed of the stepper motor and for decreasing (deaccelerating) the speed of the stepper motor respectively.
  • I have declared a variable named as count.
  • In Accelerate function, you have to send the command through the serial port to increase the speed of the stepper motor.
  • In this function, I am continuously increasing the value of the count i.e as many times you send the command the speed of the stepper motor will increase continuously.
  • The source code of the Accelerate function is given below.
   void Accelerate_Motor()
   { 
    count=count+10; //Speed will increase continuously as we continue to press H
    if (count>120)  //Speed must not be greater than 120
    {
      count=120;
      }
    Serial.println("Accelerating"); //printing on the serial port
    Serial.println("");//prints blank line on the serial port
    myStepper.step(stepsPerRevolution);//counter clockwise rotation
    myStepper.setSpeed(count); //Updating the speed of the motor
    lcd.setCursor(3,0);//setting LCD cursor
    lcd.print("Acelerating"); //printing on LCD
   }
  • In Deaccelerate function, you have to send the command through the serial port to increase the speed of the stepper motor.
  • In this function, I am continuously reducing the value of the count i.e as many times you send the command the speed of the stepper motor will reduce continuously.
  • The source code of the Deaccelerate function is given below.
void Deaccelerate()
{
  count=count-10; //reducing the speed of the motor
  if (count<20) //speed of the motor must not be less than 20
  {
    count=20;
    }
  Serial.println("Deaccelerating"); // prints on the serial port
  Serial.println(""); //prints blank line on the serial port
  myStepper.step(stepsPerRevolution);
  myStepper.setSpeed(count); //Updating the speed of the motor
  lcd.setCursor(3,0);  //setting cursor on LCD
  lcd.print("Deaccelerating"); //prints the command on LCD
  }
  • In the main source inside the loop I am calling both of these Accelerate and Deaccelerate functions.
  • The executed commands will also be printed on the LCD (Liquid Crystal Diode).
  • The main source code is given below.
#include <LiquidCrystal.h>//Library for LCD
#include <Stepper.h>     //Library for Stepper motor

const int stepsPerRevolution = 255;  

// initialize the stepper library on pins
Stepper myStepper(stepsPerRevolution, 4, 5, 6, 7);
char data;
int count = 120;
//LCD pins assigning
LiquidCrystal lcd(8, 9, 10, 11, 12, 13);
void setup() {
  // set the speed at 60 rpm
  myStepper.setSpeed(60);
  // initialize the serial port:
  Serial.begin(9600);// rate at which the arduino communicates

lcd.begin(20, 4);//LCD type

lcd.setCursor(3,0);//setting LCD cursor and printing on it
lcd.print("Stepper Motor");
lcd.setCursor(6,1);
lcd.print("Speed");
lcd.setCursor(5,2);
lcd.print("Control");
lcd.setCursor(2,3);
lcd.print("via Arduino UNO");

delay(3000);

lcd.clear ();//Clearing the LCD screen

lcd.setCursor(0,2);
lcd.print("www.TheEngineering");
lcd.setCursor(4,3);
lcd.print("Projects.com");
}

void loop() {
  if(Serial.available())
  {
    data = Serial.read(); //Reading the data from serial port
  }
  
    if(data == 'C'){Clockwise();}      //Clockwise rotation
    if(data == 'A'){AntiClockwise();} //Anti-clockwise rotation
    if(data == 'S')                  //stopping the stepper motor
    {
      data = 0; 
      lcd.setCursor(3,0);
      lcd.print("No rotation");
      Serial.println("No rotation");//print on the serial
      }   
     if(data == 'H'){Accelerate_Motor();}
     if(data == 'L'){Deaccelerate();}
}
Complete Hardware Setup
  • In this section of the tutorial, I will show you the complete hardware setup that I have used for this project.
  • Hardware consists of 12V power supply, Arduino UNO, L298 motor controller.
  • When you upload the code to the Arduino board the system will look like the figure shown below.
  • When you press to increase the speed of the stepper motor, the statement accelerating will be printed on the LCD.
  • The printed executed command is printed on the LCD and is shown in the figure below.
  • When you press to reduce the speed of the stepper motor, the statement Deaccelerating will be printed on the LCD.
  • The printed executed command is printed on the LCD and is shown in the figure below.
That is all from the tutorial Stepper Motor Speed Control using Arduino. I hope you all have enjoyed this tutorial. If you face any sort of problem regarding anything you can ask me anytime without even feeling any kind of hesitation. I will try my level best to solve your issues in a better way if possible. I will explore Arduino by making further projects and I will share them with all of you as well in my later tutorials. So, till then, Take Care :)
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