Accident Detection System using Arduino

Hello everyone, Welcome to our new project. Our new project plays a very important role in our daily life as it is directly connected to our lives. In this project, we are going to design an Accident Detection module. Accidents are the most common thing we hear about in the news, and in social media. Everyone here or there has seen accidents or has been with one. So when any such incidents happen, we inform respective stations or hospitals in that emergency situation. But what about the accidents that happen at night, or in places where there is very less crowd or you are alone. So, to address this issue and provide a potential solution for that, we are going to learn how to detect an accident automatically and inform nearby aid/help stations.

We can use this useful project for an engineering project’s showcase for electronics, electrical engineering students, and can be used in real-life situations where it can help people in disastrous situations.

According to WHO, research says that in the current scenario, 1.3 million people are the victims of road traffic crashes, and 40% of these accidents of all fatal accidents occur at night. In most cases, the accidents are not reported immediately, or the injured doesn’t receive any help during that time. The time between the accident and the arrival of medical help for the injured can sometimes make the difference between his life or death. In the future, we can interface with the vehicle airbag system. This will optimize the proposed technology to the maximum extent and result in the finest accident detection system possible. In this Modern era, everything is being automated and with this project, we are going to automate this process with some electronic components and Arduino. So Let’s dive in. Here's the video demonstration of this project:

Where To Buy?
No.ComponentsDistributorLink To Buy
1NEO-6MAmazonBuy Now
2SIM900AmazonBuy Now
3Arduino UnoAmazonBuy Now

Software to Install:

Instead of using real components, we will design this project using Proteus Simulation. Working with simulation before attempting to make it with real components is also a smart practice. We can figure out the issue that may arise while working on real components and avoid any kind of damage to our components by simulating it.

Proteus is a very fascinating tool that allows us to simulate and create electronic circuits. Despite the fact that Proteus software contains a large library of electronics components, it still lacks pre-installed modules such as Arduino boards, GPS or GSM modules, and so on.

Let’s install the required libraries which, we are going to use in this project:

You can download this whole project for example Proteus Simulation and Arduino Code, by tapping the below button

Accident Detection System using Arduino

Project Overview:

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

  • Arduino Uno: Arduino Uno is a development board from the Arduino family, which is the main component of this project. The Microcontroller i.e., Arduino is responsible for the decisions that are going to be processed in the project.
  • Accelerometer: An accelerometer is a device that measures acceleration, which is the change in speed (velocity) per unit time. By measuring acceleration we can get information like object inclination and vibration which helps in detecting unusual activities/ accidents.
  • GSM: A GSM/GPRS Module is a device that is actually responsible for the wireless communication with the GSM Network, in this case, it is responsible for sending the appropriate information to rescue stations.

Components Needed:

  1. Arduino Uno
  2. GPRS Module
  3. Accelerometer
  4. GSM Module
  5. Bread Board
  6. Jumper Wires

Component details:

Arduino Uno:

  • The Arduino UNO is one of the Arduino family's programmable, open-source microcontroller boards.
  • It includes an Atmel Microchip ATMega328P microcontroller with an 8-bit RISC processing core and 32 KB flash memory from Atmel.
  • It has 14 digital I/O pins, including 6 PWM pins and 6 analog I/O pins with a resolution of 10 bits (0-1024).
  • It comes with one hardware UART, one I2C, and one SPI peripheral.
  • We can use the Arduino UNO with a voltage range of 7-12 volts, but not more than 9 volts is recommended because it may damage the Arduino board
  • To power the Arduino UNO we can use a USB-B cable (the same cable that we use to upload the sketch to Arduino UNO), a DC power jack, or the Vin pin on the board.

GPS Module:

  • The Global Positioning System (GPS) is a space-based global navigation satellite system that gives accurate location and timing in all weather and at all times around the world.
  • It sendLongitude, latitude, height, and time are the four variables that a GPS receiver determines.
  • Data determined by the module will be sent to the microcontroller (Arduino Uno) through the UART protocol.
  • With a USB interface, the GPS module is simple to operate. It operates on a 3.2 to 5V supply range, allowing it to interface with both 3.3V and 5V microcontrollers.
  • It has a default baud rate of 9600 and can be modified as per our requirement.
  • We have used this to get the current location of the user.

Accelerometer:

  • Accelerometer sensors are integrated circuits (ICs) that are used to measure acceleration, inclination, and various parameters regarding the x,y,z axes. It is the main component to detect the accident.
  • Here we used the MEMS (Microelectromechanical Systems) accelerometer. These types of accelerometers are used where we have to measure the vibration or shock without any fixed reference.
  • It monitors changes in the capacitance and converts that value to analog output voltage.
  • Gyro Range of the Accelerometer sensor is ± 250, 500, 1000, 2000 °/s (may vary depending upon the sensor).
  • Accelerometer Range of the sensor module is ± 2 ± 4 ± 8 ± 16 g (may vary depending upon the sensor).

GSM module:

  • This module is used to send the notification to the rescue station or the emergency numbers.
  • It communicates with the Arduino UNO using the UART protocol.
  • It works in a voltage range of 3.5 - 5 volts.
  • There are different types of GSM modules available but in this project, we have used the SIM900D module.
  • We operate them using the AT commands. As there are hundreds of AT commands but we will use some basic only just to send the message.

Proteus Simulation of Accident Detection Circuit:

Now, it is time to start designing the main circuit of Accident detection in Proteus Simulation software.

  • Most importantly, ensure that Proteus is installed on your PC/Laptop and download all the required libraries for Proteus ahead of starting the designing steps.
  • For this project, we are going to use libraries for Arduino Uno, GPRS Module, GSM module.
  • To add the libraries in the Proteus suite we have to go to the C drive then LabCenter Electronics >> Proteus 8 professional >> Data >> Library and paste the downloaded library files here.
  • The download links of all the libraries have been provided to you in the above sections, please go check them out.
  • Let’s start the making of a new project, open the new project in Proteus.
  • After that enter the name of your new project.
  • Now our working area will be open here we will import all the required components which we are going to use.
  • The following components need to be selected from the Proteus component library. We’ll connect the components and make the circuit complete.
  • Now we have imported all the required components for this project, after this, we will start connecting them.

Circuit Diagram and Working:

  • There are two modules GPRS and GSM modules, both communicate using the UART protocol but in the Arduino UNO there is only one hardware UART’s provision. Now, you may have doubts about how we are going to connect them. No worries, we will handle that on the coding side by declaring the different pins as UART pins.
  • We can use different pins for UART using the SoftSerial library of Arduino, which will be discussed in the code.
  • We will use the digital pins for UART connections, digital pins 2 and 3 for communication of the GSM module, which means connecting the Rx and Tx of the GSM module with the D2 and D3 pins of Arduino UNO respectively.
  • Connect the Rx and Tx of the GPRS module with the D10 and D11 pins of Arduino UNO respectively.
  • As modules are connected, now we will connect the accelerometer. As it will not be possible to simulate the accelerometer in Proteus so we have used the potentiometers to change the value of the X-axis, Y-axis and Z-axis.
  • You may have doubts about how we can replace the accelerometer with potentiometers. As we will use the MEMS accelerometer, which sends the analog voltages for each axis, so we can simulate that using the potentiometer because we will receive the same type of data.
  • We need three potentiometers, one for each axis. Potentiometers of the X-axis, Y-axis and Z-axis will be connected to A1, A2 and A3 pins of Arduino respectively.
  • We will connect a serial terminal for debugging purposes.

Arduino code for Accident Detection System

Before going to start the coding, it would be easy if you understood the circuit diagram connections.

  • When we start writing the code(called a sketch in Arduino IDE), we will first include all of the necessary libraries for this project.
  • So, if the essential libraries aren't already installed in the Arduino IDE, our first step would be to get them.
  • Here we use mainly two libraries, one for serial communication and parsing data from the GPS module.
  • By heading to 'Sketch > Include Library > Manage Library' in the Arduino IDE, we can install libraries related to Arduino. We can now search for our essential libraries in the library manager. We can also use zip files to install the libraries.
  • As we've installed all the specified libraries. Let’s include them in our sketch.
  • Now, we are declaring D2 and D3 pins for serial communication with GPRS modules and declaring GPS objects as well, which will pretty much do all the grunt work with the NMEA data.
  • After that, we will declare variables to store the GPS module data.
  • Now, we are declaring pins and variables for the accelerometer which we will use in our project. Here, we are using Analog Pins because we are reading the analog voltages from the potentiometer.
  • We need to declare two threshold values for change in acceleration when an accident is detected.
  • The min and max values can vary. So, it is highly recommended to measure the values by accelerometer for devices using.

Void Setup():

  • It is one of the most important functions which will execute only once in the whole process.
  • As we are using a GPS module in our project, We should first start serial communication between the components and Monitor them through “Serial Monitor” in the Arduino IDE.
  • “Serial.begin” is used to set up the serial configuration for the device which is connected to the Serial Port of the Arduino. Here, we will set the baud rate for that device i.e 9600 in our case.
  • “serial_connection.begin(9600)” is used to set up the UART configuration for the GPS module. As the GPS module communicates to the Arduino at the baud rate of 9600.
  • We are using an Accelerometer in the circuit and it was clearly explained in detail that it will sense the x,y,z coordinates of the device and send them to Arduino.
  • Here, we have initialized a for loop to collect the sample data for x, y, and z coordinates of the device in the ideal state.
  • Afterward, the sample coordinates have been successfully measured by the Accelerometer sensor, but we need an average value for smoothing the sample coordinate values. So here, we will calculate the average of each coordinate and print them in the serial monitor.
  • After the setup, we will write our main application code in the Void loop function.

Void loop():

  • It is the second most important function of Arduino code. It will come to action after the execution of “void setup()”
  • We'll write the code required to run in a continuous loop in this part. So this is where we'll write our primary application code.
  • As a result, when the code gets to the void loop portion, We firstly take the NMEA data from the GPS module and print it in the serial monitor.
  • Wait a minute, NMEA??, I can understand all the questions in your mind. Let us give you a simple explanation regarding NMEA and its applications.
  • The word NMEA stands for the National Marine Electronics Association, which is a mode of communication that existed before inventing GPS. NMEA-format GPS data can be accessed with a wide variety of GPS receivers, instead of creating a new custom interface every time. Thus, it makes our lives easier using the GPS Module.
  • When we are printing the NMEA data into the serial monitor, it will be printed in a specific structure. This NMEA data was output from a GPS receiver:

“$GPGGA,191605.00,4521.7785210,N,07331.7656561,W,2,19,1.00,674.354,M,19.900,M,0.90,0000*60”

  • All NMEA signals start with the ‘ $ ’ character and for every data field such as coordinates, and various parameters are separated by a comma. The data further includes Timestamp, Latitude, Longitude, Quality indicator, Number of satellites involved, Altitude, etc., which is not necessary to remember. Make sure to get the data from the GPS module. If we have succeeded in this step and get the data on the serial monitor, then we are good to go for further processing.
  • The “if” statement is to process the NMEA data and separate the data into the required format if there is any location updated to the GPS receiver.
  • As we have already received NMEA data in the previous step, the data will be separated into Latitude, Longitude and Altitude.
  • In the Loop function, the values of GPS and accelerometer will be continuously tracked.
  • Here, the analog values of x,y,z coordinates are being measured and printed in the serial monitor.
  • These are not the values we measured in the void setup, those were the values to take the readings in the ideal state of the device.
  • But in the loop, the values are the present x,y and z coordinates measured by the accelerometer.
  • This is the condition for accident detection, we have already discussed before that in the void loop the x,y,z coordinate values are continuously extracted and the “if” statement here compares the recent values with fixed min and max values of the coordinates.
  • If the recent values are indistinct or do not match with threshold values i.e., max value and min value, then it indicates that an accident has been detected.
  • When the accident detection condition is satisfied, the GPRS module will be activated and will call to rescue stations for aid/help and their home.
  • Here, we have programmed to give a call 5 times to the appropriate numbers in the “for” loop.
  • And the process also includes a messaging feature along with calling to rescue stations.
  • When the same accident condition is satisfied, the messaging feature will be activated and we are going to send the alerting message including the Location, Latitude, Longitude, and Google map location link by appending latitude and longitude values the to respective numbers.

Results / Working:

We have successfully completed our Accident detection project and it’s ready to test!
  • Before going to start the simulation, we need to import the hex files of Arduino code in the Proteus, to do so click on the Arduino and browse to the hex file of the code and select.
  • Now we need to add the program files for the GPS and GPRS modules.
  • Here we should note that we only need to upload the program files for the modules while we are working in simulation. In the real modules, they come up with pre-installed codes.

Now we have done all the prerequisites of simulation.

  • Let’s power the circuit and start the simulation, firstly the void setup function will run and it will initialize all the required pins and variables and will read the ideal state values of the potentiometer.
  • Now to simulate the accident case, we will change the values from the potentiometer, so when the potentiometer’s value changes and the falls in the Min and Max value range the if condition will be stratified.
  • After this GSM module will call the stored number 5 times and send the GPS location with Google maps link in that.
  • We have used some serial monitors for debug purposes, you can see the current state of the project using them.

I hope you have a good understanding of how our Accident Detection project works and that you have liked it. Although I believe we have covered almost everything, please let us know if you have any questions or suggestions in the comments section.

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

Smart Coffee Vending Machine using Arduino

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

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

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

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

Software to Install:

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

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

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

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

Smart Coffee Vending Machine using Arduino

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

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

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

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

Components Needed:

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

Components Details

Arduino UNO:

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

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

PCF8574:

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

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

LCD display

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

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

Proteus Simulation of Smart Coffee Vending Machine :

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

Circuit Diagram and Working:

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

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

Arduino Code for Smart Coffee Vending Machine

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

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

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

  • void setup()
  • void loop()

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

Declaration code:

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

Arduino Setup() Function:

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

Arduino Loop() Function:

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

Results/Working:

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

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

Thanks for giving your valuable time for reading it.

Automatic Plant Watering System using Arduino

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

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

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

Software to Install

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

Project Overview:

Three main components of an autonomous watering system are:

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

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

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

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

Components Needed:

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

Component Details:

Arduino UNO:

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

Figure # 1: Arduino UNO

Soil Moisture Sensor:

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

Figure # 2: Soil Moisture Sensor

Water Level Sensor:

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

Figure # 3: Water Level Sensor

RTC Module:

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

Figure # 4: RTC Module

Relay:

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

Figure # 5: 12V Relay

PCF8574:

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

Figure # 6: PCF 8574

 

Proteus Simulation of Plant Watering System

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

Circuit Diagram and Working:

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

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

Figure # 7: Proteus Circuit diagram

Arduino Code for Plant Watering System

A normal Arduino code has two main segments:

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

Declaration Code

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

Figure # 12: Arduino Code

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

Figure # 13: Arduino Code

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

Figure # 14: Arduino Code

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

Figure # 15: Arduino Code

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

Figure # 16: Arduino Code

Void setup:

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

Figure # 17: Arduino Code

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

Figure # 18: Arduino Code

 

Void Loop:

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

Figure # 19: Arduino Code

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

Figure # 20: Arduino Code

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

Figure # 21: Arduino Code

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

Figure # 22: Arduino Code

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

Figure # 23: Arduino Code

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

Figure # 24: Arduino Code

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

Results/Working

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

Figure # 8: Proteus circuit simulation when soil is soggy

Figure # 9: Proteus circuit simulation when soil is moist

Figure # 10: Proteus circuit simulation when soil is dry

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

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

Smart Home Security System using Arduino

Security systems are widely suggested for homes as well as other locations. Everybody wants to take necessary steps to prevent infiltration at home, thus this security is necessary. Intruders nowadays may take advantage of almost any illegal activity and wreak havoc on a property's security. The security of one's home is a critical concern that everyone faces in the current day.

While there are certain devices on the market that may considerably help protect your house, some of them are excessively costly and need constant maintenance. Many devices regarding smart home security systems are available in the market but these are not user friendly according to the budget, the device we designed provides the user with a better interface with the help of LCD. We have used enough sensors that make sure the security protocol.

So in this way, we designed a reasonable security system that has the features of gas and flame detection with the help of MQ-2 Gas Sensor and flame sensor respectively and also have installed a Motion detector sensor known as PIR sensor to detect the intruder's motion. For a better user interface an LCD and Alarm are installed to alert the user. The whole system is programmed using Arduino UNO. A proteus circuit is designed for this project as shown below:

  • You can download the complete project i.e. Proteus Simulation and Arduino Code by clicking the below button:
Smart Home Security System using Arduino
Where To Buy?
No.ComponentsDistributorLink To Buy
1LCD 20x4AmazonBuy Now
2SIM900AmazonBuy Now
3Flame SensorsAmazonBuy Now
4MQ-2AmazonBuy Now
5PIR SensorAmazonBuy Now
6Arduino UnoAmazonBuy Now

Components Required

For the home security system, we have used 3 sensors which are briefly explained as follows:

Flame Sensor

  • The flame sensor is used to detect the fire, it has 3 pins (Ground, VCC, OUTPUT) with operational voltages ranging from 3.3V to 5V.
  • This sensor may be constructed using an electrical circuit and a receiver similar to that used for electromagnetic radiation.
  • This sensor employs the infrared flame flash technology, which enables it to operate through a layer of oil, dust, water vapor etc.
  • There are several wavelengths of flame sensors normally in the range of 700 to 1100 nm from the source.
  • Normally flame sensors have an operating temperature ranging from -25? ~ 85? with several features like adjustable sensitivity, fast response time and ease to use.
  • Proteus doesn't have a Flame Sensor in its database, so you need to download this Flame Sensor Library for Proteus.

PIR Sensor

  • PIR Sensor is used to detect the intruder’s motion.
  • There are mainly two kinds of infrared sensors one is active and the other is passive.
  • The active infrared sensor emits as well as absorbs the infrared radiations whereas the passive infrared sensor simply absorbs not emit.
  • When an object enters or escapes the sensor's range, a passive infrared sensor is employed to detect it.
  • For adjusting the sensitivity and delay time, there are two trim pots supplied. You may alter them to meet your requirements.
  • The sensor produces a HIGH output when it senses movement within its range; otherwise, it generates a LOW output.
  • PIR also has 3 pins like a Flame sensor.
  • It has operating voltages of range 5V - 20V with output voltage generation of 0V-3V when the object is detected in the sensing range that is 7 meters.
  • Proteus doesn't have a PIR Sensor in its database, so you need to download this PIR Sensor Library for Proteus.

MQ-2 Gas Sensor

  • MQ2 gas sensors detect the presence of gases such as LPG, methane, ethanol and carbon monoxide in the air ranging up to 10000 ppm using electricity.
  • It is also known as chemiresistor for the MQ2 gas sensor.
  • The resistance of the sensing material changes depending on the amount of gas present.
  • When it comes to detecting gas, sensors use variations in resistance value that generates the output voltage.
  • When a sensor material is heated to a high temperature in the air, oxygen is adsorbed on the surface.
  • Because current can flow via the sensor, its analog voltage values may now be read.
  • The voltage values reported here may be used to compute the concentration of a gas. When the gas concentration is high, the voltage values are greater.
  • Proteus doesn't have a Gass Sensor in its database, so you need to download this Gas Sensor Library for Proteus.
 

Arduino UNO

  • Atmel's ATMega328 is used in the Arduino Uno, an open-source single-board microcontroller.
  • Either an external power source or a 5V USB connection may be used to power the device.
  • In all, there are 14 digital input/output pins on the board, with 6 of them serving as PWM outputs.
  • On the board, you'll find a reset button and six analog input pins. The Arduino software is used to program the board, which is written in C language.
  • When it came to controlling the home security system, the Arduino Uno's capabilities were found to be sufficient.
  • Arduino Boards are not present in Proteus, so we need to use this Arduino Library for Proteus.

Circuit Designing

  • This whole project is designed to provide a security system for the home in which multiple safety sensors can be installed with a Buzzer and LCD for a better user interface.
  • We won't design this project in real, instead, we are going to design its Proteus simulation.
  • If you are working on an electronics/embedded project, then it's always a best practice to design its simulation first.
  • In simulations, it's easy to debug your code and thus you can program quickly.
  • Once you are satisfied with your project's working, you can move forward to hardware designing.

So, let's design our Proteus Simulation for Smart Home Security System:

Proteus Simulation

  • These are the components, which we are going to use for designing our Proteus Simulation:
  • So, select these components from Proteus Components Library and place them in your workspace, as shown in the below figure:
  • Next, we need to connect these components' pins to complete our circuit, as shown in the below figure:
  • As you can see in the above simulation, we have used three sensors in total, which we have discussed above.

So, now we are going to design the Arduino Code for this simulation:

Arduino Programming Code

We have designed the circuit in our Proteus Simulation and next, we need to design its Arduino Code, in order to make it work.

LCD Initialization Code

  • First of all, we are going to interface LCD with Arduino UNO and will display the Project's name on the screen.
  • The code is shown in the below figure:
  • As you can see in the above figure, we have first initialized the variables.
  • Arduino board is programmed using Arduino IDE software which has mainly 2 sections void setup and void loop.
  • Before void setup, we have to declare the pins of sensors and actuators that we are using in our project.
  • Depending on the nature of sensors (analog or digital) the pins of sensors are connected to Arduino UNO accordingly.
  • #define is used to declare the pins of Gas, PIR, FIRE and BUZZER.
  • Initially, all the sensors have zero value that is stored by an integer variable.
  • In the void setup section, input and output sensors are defined.
  • GAS, PIR, and FIRE sensors are employed as input sensors to detect and activate the BUZZER, which is an output component.
  • LCD 20×4 is used and lcd.begin is used to initiate the LCD.
  • lcd.setCursor is used to cursor position on LCD and the name of the project is displayed on LCD Screen using lcd.print command.
  • Now, let's run our simulation to check the results, shown in the figure below:

Sensors Interfacing with Arduino

  • In Arduino IDE code execution, void setup runs once while the void loop executes again and again.
  • analogRead and digitalRead commands are used to read the value of analog and digital sensors respectively, while analogWrite and digitalWrite commands are used for sending commands or data.
  • As shown in the above figure, first, we have read the sensors' data and if all sensors are in LOW state, then have displayed the message "You are safe".
  • Let's run the code to check the output:
  • As you can see in the above figure, all sensors are at a LOW state and thus LCD is displaying the safe message.
  • Next, we have added the if loop for the case where all sensors are giving HIGH value:
  • The rest of the code has similar if loops for various conditions of sensors.
  • You can download the complete code and Proteus Simulation from the link, given at the start of this tutorial.
  • Now, let's run our final simulation and test the sensors and if everything goes fine, you will get results as shown in the below figure:

Future Recommendations

It deters the crime and notifies the user about the gas or fire problem. Home security systems are mostly utilized for safety reasons in residences, businesses, and educational facilities. Another option is to use a mobile device or the internet to send data to a remote location. Other modules, such as a wind sensor or a fire sensor, might be added to the system in the future. Voice alarm modules may also alert you to an intruder or a gas leak if you use them. We can increase the number of sensors to make it better. We can use the latest technology of the Internet of Things that makes our system wireless. A growing number of devices and goods are being connected to the Internet, which is referred to as the Internet of Things by the phrase. We can use the Internet of Things to produce a low-cost security system for residential and industrial applications that is especially useful for home security. When the door is opened or an unauthorized entry is detected, the system will send an alert to the owner. The user may take action after getting the notification. ESP8266 Wi-Fi module will connect to and interact with the Internet, while an Arduino Uno microcontroller keeps track of the system's status, as well as a magnetic Reed sensor for sounding the alarm. The principal advantages of this system are ease of installation, low costs, and low maintenance requirements.

So, that was all for today. I hope you have enjoyed today's project. If you have any questions, ask in the comments. Thanks for reading. Take care !!! :)

Smart Irrigation System using Arduino UNO

Hello everyone, we are back with a new project and we hope you all are doing well. In this article, we will discuss a project named Smart Irrigation System using Arduino UNO. We will use different sensors to measure the environmental and crop parameters which are responsible for good production. We will also make the water pump system automatic which will open the water valve automatically according to the soil moisture of the crop.

We will discuss all points and concepts briefly in this article and also provide a Proteus Simulation to observe how it will work in the real world. Complete fully explained code and simulation are also provided below as you go ahead in this article. You can download it from there.

Smart Irrigation System using Arduino UNO

Let’s start with an Introduction:

Where To Buy?
No.ComponentsDistributorLink To Buy
1LCD 20x4AmazonBuy Now
2LDR SensorAmazonBuy Now
3MQ-135AmazonBuy Now
4Arduino UnoAmazonBuy Now

Introduction 

In the late decades, there has been a quick advancement in Smart Agricultural Systems. Show that agriculture has great importance worldwide. Indeed, in India for example, about 70 % of the people rely upon the vital sector of agriculture. In the past, irrigation systems used to be dependent on the mills to irrigate the farm by conventional methods without knowing the appropriate quantities of these crops.

These old systems are a major cause of the waste of large quantities of water and thus destroy some crops because of the lack of adequate quantities of water. However, with the recent technological developments, there have been innovative systems for irrigation without the farmer interfering in the irrigation process. We will discuss it in brief below.

We will do a simulation on Proteus 8 Professional Software.

Working

The working of this project is like, we will use a Soil Moisture sensor for measuring the moisture of Soil according to which water valves are controlled. When the moisture level gets below a threshold value, valves will open with the help of a relay or solenoid till the soil is well moisturized.

  • The BMP180 sensor will measure the Atmospheric Pressure.
  • The DHT11 sensor will measure the temperature and humidity of the climate.
  • The MQ135 sensor will measure the Air Quality Index of the environment.
  • LDR will measure the sunlight intensity.
  • We will use a 20x4 LCD Screen for displaying the data gathered from the sensors.
  • And the main thing, we will use an Arduino UNO microcontroller as the brain of the project.

In a used case, when the moisture level gets below a threshold value, valves will open with the help of a relay or solenoid for a required time interval.

Block Diagram

  • Here's the Block Diagram of Smart Irrigation System:

Components Required

Here's the list of components used in this project:
  • Arduino UNO
  • BMP180 Sensor
  • DHT11 Sensor
  • LDR Sensor
  • MQ135 Gas Sensor
  • Soil Moisture Sensor
  • 20x4 LCD Display
  • PCF8574 remote 8-bit I/O expander for the I2C bus
  • Breadboard.
  • Jumper wires (Male to Male, Male to Female, Female to Male.)

Since we are designing a prototype of this project, we will use jumper wires instead of soldering.

  • Power Supply

You can use a Battery, Adapter or any DC source of 5-8v(recommendable).

Circuit Diagram

Since we are making a prototype of this project, we will make connections on the breadboard and avoid soldering the components. We will use male to male, male to female and female to female jumper wires. 

Pins Connections

These are the pin connections of all components.
Pin Connections of Smart Irrigation System
No. Sensor Pinout
1 Soil Moisture Sensor Data - A0 (Arduino)
2 LDR Sensor LDR-Resistor Junction - A2 (Arduino)
3 MQ135 Gas Sensor Out - A1 (Arduino)
4 DHT11 Sensor Data - D2 (Arduino)
5 BMP180 Pressure Sensor SDA-SDA (Arduino) SCL - SCL (Arduino)
 

Arduino Libraries Required

You need to install these third-party Arduino Libraries, in order to interface sensors:

  1. Adafruit_BMP085.h
  2. DHT.h
  3. LiquidCrystal_I2C.h

We have added comments in the code for better understanding so it can be understood easily.

Note - Change the Address of the LCD Screen while you run the code in Proteus, change it to 0x20 instead of 0x27 or anyone else. In the real experiment, we can alter the address of the LCD by changing the configurations of A0, A1 and A2 pins of the PCF8574 module.

Proteus Libraries Required

We will show you a demo of this project as a simulation. We are using Proteus 8 Professional Software for the simulation.

Proteus Simulation Connections

  • This potentiometer defines the soil water content in the proteus simulation.
  • When the resistance is maximum at the test pin, the circuit shows zero volts across the voltmeter, which means the sensor is either in the dry ground or taken out of the ground, i.e. giving zero moisture value of the water content.
  • And when resistance is zero, the circuit will show the maximum voltage across the voltmeter which indicates the sensor is inserted in a wet ground i.e. water contents in the soil are too high.
  • This is important. We have attached the output pin with an LC filter. This filter is not required in real hardware implementation.
  • We are using it in Proteus Simulation only as Proteus gives the peak-to-peak value and we have to convert that PP value into Vrms.
  • If you are working on a real sensor then you don’t need to add this LC circuit.
  • Similarly for Gas sensor, as we increase the potentiometer, in simulation it means good air quality.

Steps for Simulation

These are the steps for simulation. Follow them to create a fully working simulation.
  • Download the Zip Files given at the start of this tutorial.
  • Extract them in the LIBRARY folder. You will find it inside the Labcenter Electronics Folder.
  • Go to Arduino IDE and open the code, go to Tools and select the board Arduino UNO.
  • Go to Sketch and Click on Export Compiled Binary. It will create a compiled .hex file of the code which will be used as the main program in the simulation ahead.
  • Open Proteus software and add components by searching like Arduino, DHT11, BMP180, 20x4 LCD, etc.
You can see the components listed here.

Note - We used a simple LED instead of the valve because the valve component is not available in the Software, simply replace the LED with a valve in a real project. Make connections according to the circuit diagram and add virtual terminals to Serial pins to see the readings and Data.

  • Paste the Program File here for all the sensors.
  • Paste the Compiled Binary File as a Program file of Arduino UNO.
  • Run the simulation and you can see the readings by opening the virtual terminal.

Observations and Results

 
  1. In this simulation and project, you can see the sensor's information first in the terminal.
  2. After that, we are getting well organized and easily understood data on the terminal by every sensor according to code.
  3. According to the code, when the value of the soil moisture sensor gets less than a threshold value, the LED gets on.

This means when the soil gets dry the valve will open and water will be provided to the crops.

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.

No matter what happens, you should put safety first. Even a great security system won’t ensure full protection, which is why you might want to consider secondary measures. Hiring fire watch security will assist you on a daily basis, performing tasks that machines cannot. These veterans will protect your home or office, addressing potential hazards as they appear.

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 :)

7 Best Arduino Starter Kits for Beginners

Hi Guys! Hope you’re well today. I welcome you on board. In this post today, I’ll detail the 7 best Arduino starter kits for beginners.

Arduino boards are particularly introduced for people with little to no knowledge about programming and electronics. These boards are the improvised version of microcontrollers. If you’re a student or someone planning to get your hands dirty with some electronic projects, Arduino boards are a great way to whet your appetite. Arduino kits house many essential components required to start working with Arduino boards. These kits are developed for people who struggle to get a hold of the nitty-gritty of programming Arduino boards. These Arduino basic kits come with instruction manuals that detail the step-by-step process to make the Arduino projects with the given components. I suggest you read this post all the way through as I’ll walk you through the starter kits to make a range of Arduino starter kit projects. Let’s get started.

7 Best Arduino Starter Kits for Beginners

The following are the 7 Best Arduino starter kits for beginners.

1. Official Arduino Starter Kit

The official Arduino starter kit tops the list. The kit comes with a range of components to start working with Arduino boards. It also includes a 170-page book that details 15 electronic projects that you can develop using the components available in the starter kit. Besides English, this book is available in many other languages including French, German, Chinese, Korean, Spanish, and Italian. This book includes codes and step-by-step tutorials to make electronic projects with the components provided. The official Arduino Start Kit comes with the following components:
  • Arduino Projects Book
  • USB cable
  • Breadboard 400 Pins
  • Arduino UNO R3
  • 9V battery snap
  • Easy-to-assemble wooden base
  • Solid core jumper wires (70)
  • Phototransistors (6)
  • Pushbuttons (10)
  • Stranded jumper wire (1)
  • 10KO Potentiometers (6)
  • Tilt sensor
  • Piezo capsule
  • Temperature sensor TMP36
  • Small DC motor (6/9V)
  • Easy-to-assemble wooden base
  • MOSFET Transistors IRF520 (2)
  • LEDs (1 x Bright White, 1 x RGB, 8 x Red, 8 x Green, 8 x Yellow and 3 x Blue)
  • Small servo motor
  • H-bridge motor driver L293D
  • Capacitors (5 x 100nF, 3 x 100µF, 5 x 100pF)
  • Transparent gels (red, green, blue)
  • Diodes 1N4007 (5)
  • 40 pin male header strip
  • Optocouplers 4N35 (2)
  • Resistors (20 x 220O, 5 x 560O, 5 x 1KO, 5 x 4.7O, 10 x 10KO, 5 x 1MO, 5 x 10MO)
All these components are packaged in a single box. Using these components you can make the following 15 projects. The book includes step-by-step tutorials to make these projects.
  • Color Mixing Lamp
  • Spaceship Interface Design
  • Touchy-Feel Lamp
  • Digital Hourglass
  • Hacking Buttons
  • Motorized Pinwheel
  • Mood Cue
  • Keyboard Instrument
  • Crystal Ball
  • Zoetrope
  • Light Theremin
  • Love-O-Meter
  • Knock Lock
  • Tweak the Arduino Logo
All components included in the package are high quality and ensure the remarkable performance of the kit. This kit contains 2KB RAM for storing the information. You’ll get a lot of high-quality components the reason this kit is more expensive than other kits available on the list. Moreover, this kit doesn’t include the software, which you need to install from the Arduino official website. So, if you want basic components in the kit and money is no problem for you, this gorgeous kit resonates with your needs and requirements.

2. Kuman for Arduino Project Complete Starter Kit

Kuman Arduino starter kit is another valuable beast on the list. You’ll get the eBook along with this starter kit that comes with 44 components from which you can make 23 electronic projects. In the eBook, everything is detailed in step-by-step tutorials to learn and make electronic projects from the available components. The Kuman Arduino Starter Kit includes the following contents:
  • Kuman UNO R3 Development Board
  • Mini breadboard
  • ULN2003 stepper motor driver board
  • LEDs (5 x Red, 5 x Green, 5 x Yellow, 1 x three-color)
  • Vibration Sensor (2)
  • Photoresistor (3)
  • Adjustable potentiometer
  • LM35 temperature sensor
  • Infrared receiver
  • Keycap (4)
  • Flame sensor
  • Active buzzer (tone generator)
  • Key switch (4)
  • Passive buzzer (piezo buzzer)
  • Jumper cap
  • Remote Control
  • Large breadboard
  • Breadboard module
  • Component box
  • 16 x 2 Screen LCD
  • DuPont line 10pin
  • Breadboard line (30)
  • 8*8 dot matrix
  • HC-SR04 module
  • 4 digit 8 segment tube
  • IC 74HC595
  • Battery Holder
  • 1 digit 8 segment tube
  • 40pin pin header
  • Resistors (5 x 220O, 5 x 330O, 5 x 1KO, 5 x 10KO)
  • Battery 9V
  • Thermistor module
  • Touch sensor
  • CD with tutorial
  • Prototype extension board
  • USB cable
  • Plastic box
  • 5V stepper motor
The best part is almost all basic electronic components are included in this kit for beginners to get familiar with the Arduino boards and make projects with the given components. No advanced level components are added to the list, every person with little to no electronic and programming knowledge can use these components. The material used for these contents is top-notch and the price is less than the official Arduino starter kit. All components are packed in the plastic box to help you stay organized and use them based on your needs and requirements.

3. Elegoo Mega 2560 Project Ultimate Starter Kit

Elegoo Mega 2560 is one of the best starter kits available in the market. This Elegoo kit comes with more than 200 pieces of components that anyone can use to make the electronic project. The sensors and modules are added to the kit including water level sensor, RFID reader, ultrasonic sensor, motion sensor, and accelerometer/gyroscope module. While basic components include a potentiometer, resistors, and LEDs. Moreover, it includes a book with 35 lessons for anyone to get started with the kit. The Arduino Mega 2560 projects are detailed in an easy-to-follow guide and the kit contains code and images of assembled circuits, helping you better understand the nature of the components included. The Arduino Mega kit includes the following components:
  • LEDs (5 x Yellow, 5 x Red, 5 x Green, 5 x Blue, 1 x RGB)
  • MEGA2560 Controller Board
  • Thermistor
  • Ceramic Capacitor(22pf & 104pf) (10)
  • Stepper motor
  • Diode Rectifier (1N4007) (5)
  • Servo motor
  • Joystick module
  • Ultrasonic sensor
  • Photoresistor (2)
  • IR receiver
  • Remote
  • RFID module
  • DHT11 Humidity and Temperature Module
You may find difficulty in getting familiar with this kit at the start, but once you get used to it, you’ll start loving it eventually. This starter kit includes an Arduino clone developed by Elegoo. Which works almost similar to the official Arduino board. Elegoo pays special heed to ensure the quality of the product and some wires and components are pre-soldered, saving your time to make the electronic project.

4. SunFounder Project Super Starter Kit

This is another kit to help you get familiar with the Arduino boards. You’ll get more than 200 components in the kit from which you can make around 25 amazing projects. This is cheap, this is high quality, best for beginners. Moreover, you’ll get the DVD stuffed with step-by-step tutorials to make different Arduino projects with the available components. It comes with a UNO R3 controller board and you can extend the functionality of this board by incorporating it with other Arduino boards including, Arduino Mega 328, Arduino Mega 2560, and Arduino Nano. The SunFounder Super Starter Kit includes the following components:
  • Project Box
  • 40 Pin Header
  • Shift Resister 74HC595N (2)
  • LEDs (1 x RGB, 16 x Red, 2 x White, 2 x Green, 2 x Yellow)
  • 555 Timer IC
  • H-Bridge Motor Driver L293D
  • Accelerometer ADXL335
  • Optocoupler 4N35 (2)
  • LCD1602 Character Display
  • Dot Matrix Display 8×8
  • Rotary Encoder
  • Push-Button (5)
  • Resistors (8 x 220O, 4 x 1KO, 4 x 10KO, 1 x 1MO, 1 x 5.1MO)
  • Switch
  • Potentiometer 50KO
  • Booklet
  • USB Cable
  • DC Motor
  • Jumper Wire Male to Male (65)
  • PNP Transistor S8550 (2)
  • Fan
  • Dupont Wire Female to Male (20)
  • Passive Buzzer
  • 7-Segment Character Display (2)
  • Diode (4)
  • Breadboard
  • NPN Transistor S8050 (2)
  • Capacitors (4 x 100nF, 4 x 10nF)
All basic components are included in the kit to help beginners make a range of electronic projects with an Arduino board. The components are packed in a plastic box with different sections, helping you arrange the components, and making it easy for you to find the required component for the project. The components are manufactured with high-quality material, ensuring the high performance of these components during the execution of electronic projects. SunFounder MEGA2560 board is an Arduino clone though, it is fully compatible with the Arduino software.

5. Elegoo UNO Project Super Starter Kit

This is another quality product introduced by Elegoo. It is good for beginners to get familiar with the Arduino board and go from basic to advanced level. The kit includes a CD that comes with 22 lessons to use the kit with the available components. The best part? It is cheaper than the Arduino official starter kit and contains almost the same features required for beginners to learn and make awesome Uno R3 projects from the components included. This kit features Elegoo Uno R3. The following are the components added to this Elegoo Uno kit:
  • 16x2LCD Module ( with pin header)
  • Elegoo UNO R3 (Compatible with Arduino Uno)
  • Breadboard Power Supply Module
  • Breadboard
  • Breadboard Expansion Board
  • Joystick Module
  • ULN2003 Stepper Motor Driver Board
  • IR Receiver
  • Servo Motor (SG90)
  • Stepper Motor
  • DHT11 Temperature and Humidity Module
  • Ultrasonic Sensor
  • 9V Battery
  • Buzzer (Active and Passive)
  • 65 Jumper Wire
  • USB Cable
  • 5V Relay
  • Potentiometer
  • Remote
  • Tilt Switch
  • 4 digit 7-segment Display
  • Button (5)
  • 1 digit 7-segment Display
  • LEDs (5x Yellow, 5x Blue, 5x Green, 5x Red, 1x RGB)
  • Photoresistor (2)
  • P2N2222 NPN Transistor (2)
  • Thermistor
  • Female-to-male DuPont Wire (10)
  • IC 74HC595 Shift Register
  • Diode 1N4007 (2)
  • Resistor (120)
These components are neatly packaged in a box. What makes this kit special? The affordable price of this Uno R3 Starter kit helps it stand out from the rest of the kits available in the market.

6. Vilros Arduino Uno 3 Ultimate Starter Kit

This Vilros Arduino Starter Kit is stuffed with all basic components to make electronic projects with the Arduino boards. This kit comes with a Genuine Arduino Uno Rev3 Board from which you can develop a range of Arduino projects. It contains more than 190 parts and components that you can use for electronic projects. Developed with high-quality material, this kit includes a 72-page instruction guide that details the instructions to make Arduino projects with the given components. This Vilros Arduino Starter Kit comes with the following components:
  • 1N4148 Diodes (2)
  • Arduino & Breadboard Holder
  • Bread Board
  • Shift Register 74HC595
  • Arduino Uno R3
  • NPN Transistors P2N2222A (2)
  • Temperature Sensor TMP36
  • Small Servo
  • 5V Relay
  • USB Cable
  • Jumper Wires (65)
  • 10K Trimpot
  • Piezo Buzzer
  • DC Motor with wires
  • Big 12mm Buttons (2)
  • Resistors (45 x 330O and 45 x 10KO)
  • Photocell
  • LEDs (1x RGB, 10 x Red, 10 x Yellow)
This Arduino kit is better for beginners who want to get a hold of different components with the Arduino boards.

7. Smraza Ultimate Starter Kit

Next comes in the list is Smraza Ultimate Starter Kit. It comes with a PDF file that contains step-by-step tutorials for more than 15 projects - source code for all those projects is also included in the PDF file. This kit includes 150 basic components that you can use with the Arduino to make electronic projects. Everything is neatly packed in a plastic container, helping you stay organized and use the components based on your needs and requirements. Again, this kit is best for beginners as it contains all the basic components that are compatible with the Arduino boards. The Smraza Ultimate Starter Kit includes the following contents:
  • UNO R3 Controller Board
  • Breadboard Expansion Board
  • Thermistor
  • LCD 1602 Module (with pin header)
  • Potentiometer (2)
  • Servo Motor
  • 830 tie-points Breadboard
  • Ultrasonic Distance Sensor
  • Stepper Motor
  • LEDs (1X RGB, 5X Green, 5X Red, 5X Blue, 5X Yellow)
  • ULN2003 Stepper Motor Driver Board
  • Photoresistor (2)
  • 4 Digit 7-Segment Display
  • Power Supply Module
  • Active Buzzer
  • Diode Rectifier 1N4007 (2)
  • Passive Buzzer
  • 2N2222 Transistors (2)
  • Tilt Switch
  • 7-Segment Display
  • IR Receiver Module
  • IC 74HC595
  • DHT-11(Temperature and Humidity Sensor)
  • Joystick Module
  • 9V Battery Adapter
  • 9V Battery with DC
  • Resistors (10X 2K, 10X 5.1K, 10X 10K, 10X 10R, 10X 330R)
  • Male to Female Jumper Wires
  • USB Cable
  • 65xJumper Wire
  • Water Level Sensor
  • Small Button (5)
  • IR remote control
  • 40 Pin Shape Header
  • 40 Pin Header
  • Resistors (10X 220R, 10X 1M, 10X 100R, 10X 100K, 10X 1K)
Not only you can make some basic Arduino projects with this kit, but you can also expand this kit with the sensors and make some advanced Arduino projects. The best part? Some of the components are pre-soldered, saving your time to make electronic projects, helping you stay focused on the programming and other parts of the projects. That’s all for today. Hope you find this article helpful. If you have any questions, you can approach me in the section below, I’d love to help you the best way I can. Feel free to share your valuable feedback and suggestions around the content we share so we keep coming back with quality content customized to your exact needs and requirements. Thank you for reading the article.

Introduction to Arduino MKR GSM 1400

Hello Guys! I welcome you on board. Happy to see you around. In this post today, I’ll walk you through the Introduction to Arduino MKR GSM 1400. The Arduino MKR GSM 1400 is a microcontroller board that is based on the SAMD21 microcontroller. This device connects with a cellular network for developing communication. This GSM board is a one-stop solution for developing your sensor network or you can use it as a device sending a text message about the occurring of certain events remotely. A module from u-blox, the SARA-U201 (which is a power chipset that activates using multiple cellular range bands) is responsible for GSM / 3G connectivity inside the device. I recommend you read this post till the end as I’ll detail the complete Introduction to Arduino MKR GSM 1400 covering pinout, pin description, features, programming, and applications. Let’s get started.

Introduction to Arduino MKR GSM 1400

  • The Arduino MKR GSM 1400 is a microcontroller board that is based on the SAMD21 Cortex®-M0+ 32bit low power ARM microcontroller.
  • This device is mainly introduced for laying out the communication with cellular networks.
  • Connecting Arduino with the GSM network is as easy as the program used for LED blinking. With this device, you can send or receive calls or messages and approach the different types of servers for exchanging data.
  • The module comes with 8 digital I/O pins while the number of analog pins are 7 and the pins used as PWM pins are 13.
  • The board supports UART serial communication protocol. Other communication protocols include SPI and I2C communication protocol.
  • The USB port is incorporated in the device which is used for sending the number of instructions from the computer using Arduino IDE software.
  • The internal flash memory is 256KB and the SRAM is 32KB. There is no EEPROM present inside the device. The Arduino program (sketch) is stored in the flash memory while SRAM is responsible for producing and manipulating variables when it runs.
  • The clock frequency is 32.768 kHz (RTC), 48 MHz… which is responsible for the synchronization of all internal functions.

Arduino MKR GSM 1400 Pinout

The following figure represents the pinout diagram of Arduino MKR GSM 1400.

Arduino MKR GSM 1400 Pin Description

Hope you’ve got a brief overview of this GSM device. In this section, we’ll detail the pin description of each pin available on the device. Let’s get started.

Analog Pins

There are 7 analog pins available on the board. These pins can receive any number of value in opposed to digital pins that receive only two values HIGH and LOW.

Digital Pins

There are 8 digital pins incorporated on the board which you can use as an input or output based on the requirement. These pins get two values HIGH or LOW. When the pins receive 5V they are in a HIGH state and when these pins receive 0V, they are in a LOW state.

PWM Pins

There are 13 PWM pins on the board. These pins produce analog results through digital means.

SPI Pins

The board supports SPI (serial peripheral interface) communication protocol that ensures the communication between controllers and other peripheral devices like shift registers or sensors. It contains two pins… MISO (master input slave output) and MOSI (master output slave input) are used for SPI communication.

UART

The board comes with a UART communication protocol that guarantees serial communication and comes with two pins Rx and Tx. The Rx is a receiving pin that receives the serial data and Tx is the transmission pin that is used to transmit the serial data.

Arduino MKR GSM 1400 Features

The following are the main features of Arduino MKR GSM 1400.
  • Microcontroller = SAMD21
  • Secure Element = ATECC508
  • Radio module = u-blox SARA-U201
  • Supported Battery = Li-Po Single Cell, 3.7V, 2500mAh Minimum
  • Digital I/O Pins = 8
  • Analog Pins = 7
  • PWM Pins = 13
  • Flash Memory = 256KB
  • SRAM = 32KB
  • EEPROM = no
  • Circuit Operating Voltage = 3.3V
  • Power Supply (USB/VIN) = 5V
  • External Interrupts = 10
  • DC Current per I/O Pin = 7 mA
  • SPI = 1
  • UART = 1
  • I2C = 1
  • SIM Card = MicroSIM (not included with the board)
  • Working region = Global
  • Carrier frequency = GSM 850 MHz, E-GSM 1900 MHz, DCS 1800 MHz, PCS 1900 MHz
  • Clock Speed = 32.768 kHz (RTC), 48 MHz
  • Full-Speed USB Device and embedded Host = 1
  • LED_BUILTIN = 6
  • Size = 25x67mm
  • Weight = 32gr.

Programming

  • This GSM board is programmed by Arduino IDE software which is specifically introduced by Arduino.cc to program the Arduino boards.
  • The software comes with an LED blinking program which you can use to test the board if it’s operating properly.
  • Connect your board with the computer using a USB cable and start playing with it. You can send the number of instructions to the board from the computer using Arduino IDE software.
  • The board comes with a built-in Bootloader that is used to burn the program inside the microcontroller board. You don’t require an external burner to burn the program in the controller.

Arduino MKR GSM 1400 Applications

This device is mainly used in GSM cellular projects. The following are the main applications of Arduino MKR GSM 1400.
  • Used in tracking projects
  • Used in home automation
  • Employed in GSM home alarm
  • Employed in fire forest monitoring and detection
  • Used to send messages to control LED color
  • Used in 2-factor authentication for ATM project
That’s was all about the Introduction to Arduino MKR GSM 1400. If you’ve any questions, you can pop your comment in the section below. I’d love to help you the best way I can. You’re most welcome to share your valuable suggestions and feedback around the content we share so we keep coming back with quality content customized to your exact needs and requirements. Thank you for reading the article.

Introduction to Arduino UNO REV3

Hi Friends! Hope you’re well today. Happy to see you around. In this post, I’ll detail the Introduction to Arduino UNO REV3. Arduino Uno REV 3 is an Arduino board based on the microcontroller ATmega328P. It carries 14 digital I/O pins out of which 6 can be used as PWM outputs. Moreover, 6 analog input pins are available on the board and the clock frequency is 16MHz. Arduino UNO is one of the most used boards from the Arduino family. The robust and clean design helps you shape your ideas into reality. Know that Arduino UNO REV3 is an advanced version of Arduino UNO. The new version includes four solder pads JP2 attached with the pins PB4 to PB7 of the USB ATmega. Uno stands for one in Italian and this name was picked for the release of Arduino Software (IDE) 1.0. The version 1.0 of Arduino Software (IDE) and Uno board both are considered as the reference versions of Arduino, which evolved with time with new features. The UNO board is the first USB board from the Arduino family. Arduino is an open-source platform which means you can get a hold of Arduino boards and software and edit and modify them as per your requirements. Arduino IDE software is free to use for anyone, moreover, as you join this platform you can get help from the Arduino community. I suggest you read this post all the way through as I’ll detail the complete Introduction to Arduino UNO REV3 covering pinout, features, pin description, and applications. Let’s get started.

Introduction to Arduino UNO REV3

  • Arduino Uno REV 3 is an Arduino board based on the microcontroller ATmega328P.
  • It comes with 14 digital I/O pins out of which 6 can be used as PWM outputs.
  • There are 6 analog input pins and the board’s clock frequency is 16MHz which is used for the synchronization of internal functions.
  • Moreover, this board includes a power jack, USB connection, ICSP header, and reset button.
  • In fact, it contains almost everything required to support the built-in controller. Simply plug this device with the computer using a USB cable or power it up with an AC-to-DC adopter or battery and start playing with it.
  • The operating voltage is 5V while the input voltage ranges from 6 to 20 and the recommended input voltage ranges from 7 to 12V.
  • Only 5 V is required to power up the board, which we can obtain using the USB port or external adopter, however, it can support an external power source up to 12 V which can be regulated and limit to 5 V or 3.3 V depending on the requirement of the project.
  • Internal pull-up resistors are installed in the board that keeps the current under a certain limit. Know that too much increase in the current can make these resistors useless and can ultimately damage the entire project.
  • The flash memory is 32KB while the EEPROM and SRAM are 1KB and 2KB respectively. The flash memory is the location where the Arduino program (sketch) is stored.
  • While the SRAM is the memory used to produce and manipulates variables when it runs. The EEPROM is a non-volatile memory that keeps the code stored even when board power is removed.
  • A reset pin is included in the board that resets the whole board when it is pressed and takes the running program to the initial stage. This pin comes in handy when the board hangs up in the middle of the running program, pressing this pin will clear everything up in the program and again runs the program from the beginning.
  • This board carries a built-in regulation feature that keeps the voltage under control when the board is attached to the external device.

Arduino UNO REV3 Pinout

The following figure shows the pinout diagram of Arduino UNO REV3.

Arduino UNO REV3 Pin Description

Hope you’ve got a brief look into the Arduino UNO REV3. In this section, we’ll cover the pin description of each pin incorporated on the board.

Digital Pins

There are 14 digital pins incorporated on the board. You can use these pins as an input or output based on your requirement. These pins receive two values HIGH or LOW. When these pins receive 5V they are in the HIGH state and when they receive 0V they remain in a LOW state.

Analog Pins

There are 6 analog pins available on the board. These pins can receive any value compared to digital pins that only receive two values i.e HIGH or LOW

PWM Pins

Out of 14 digital I/O pins incorporated on the board, 6 are used as PWM pins. These pins generate an analog signal with digital means when these pins are activated.

SPI Pins

The board comes with an SPI communication protocol that is mainly used to maintain communication between the microcontroller and other peripheral devices like shift resistors and sensors. Two pins: MOSI (Master Output Slave Input) and MISO (Master Input Slave Output) are used for SPI communication between devices. These pins are employed to send or receive data by the controller.

I2C Pins

This is a two-wire communication protocol that comes with two pins called SDL and SCL. The SDL pin is a serial data pin that carries the data while SCL is a serial clock pin that is used for the synchronization of all data transfer over the I2C bus.

UART Pins

This board also supports UART serial communication protocol. It contains two pins Tx and Rx. The Tx is a transmission pin used to transmit the serial data while Rx is a receiving pin that is used to receive the serial data.

LED

There are four LEDs on the board. One is a built-in LED connected to pin 13 other is a power LED. And two are Rx and Tx LEDs which operate when serial data is transferred or received to the board.

Vin, 5V, GND, RESET

Vin……. It is the input voltage supplied to the Arduino Board. It is different from than 5 V we get through a USB port. Moreover, if a voltage is supplied through the power jack, it can be accessed through this pin. 5V……… This board contains voltage regulation ability. This board is activated using three ways i.e. USB, Vin pin of the board, or DC power jack. USB supports voltage around 5V while Vin and Power Jack support a voltage ranges between 7V to 20V. Know that, if a voltage is supplied through 5V or 3.3V pins, they will bypass the voltage regulation which ultimately damages the board if the voltage exceeds the certain limit. GND….. This is a ground pin. More than one ground pins are available on the board which can be used as per requirement. Reset… This pin resets the program running on the board. Instead of a physical reset on the board, IDE can reset the board through programming.

Arduino UNO REV3 Features

Microcontroller = ATmega328P Operating Voltage = 5V Digital I/O Pins = 14 PWM Digital I/O Pins = 6 Analog Input Pins = 6 Input Voltage (limit) = 6-20V Input Voltage (recommended) = 7-12V Flash memory = 32KB SRAM = 2KB EEPROM = 1KB Oscillator = 16MHz Size = 53x68mm Weight = 25g

Programming

  • This board carries all specifications needed to run the controller. You can directly connect this board with the computer using a USB cable and send a lot of instructions to the board using Arduino IDE software. The programming language C or C++ is used to program the controller.
  • It is important to note that Arduino comes with a Bootloader that is mainly used to burn the Arduino program which means you don’t require an external burner to burn the program inside the controller.
  • The Arduino. IDE software is compatible with many operating systems including Windows, MAC or Linux Systems, however, Windows is preferred to run this software.

Difference between Arduino UNO and Arduino UNO REV3

  • The Arduino Uno incorporates the ATMEGA8U2 USB microcontroller on board. While R3 board comes with an upgraded version of the USB controller ATMEGA16U2 on board.
  • The Arduino Uno features an LED and resistor connected in series on pin 13. The R3 board buffers this LED/resistor using a unity gain operational amplifier. This is the separate op-amp that was not used in Arduino Uno.
  • The Arduino UNO R3 board includes a diode across the USB ATmega reset pin pull-up resistor.
  • The R3 board includes four solder pads (JP2) connecting to pins PB4 to PB7 of the USB ATMEGA. These solder pads are not present in Arduino Uno.

Arduino Uno REV 3 Applications

Arduino Uno is used in a wide range of applications. Following are some main applications of the board.
  • Security and Defense System
  • Embedded System
  • Industrial Automation
  • Digital Electronics and Robotics
  • Weighing Machines
  • Parking Lot Counter
  • Traffic Light Count Down Timer
  • Home Automation
  • Emergency Light for Railways
  • Medical Instrument
Don’t confuse the microcontroller with the Arduino board. Every Arduino board is a microcontroller but not every microcontroller is an Arduino board. Both devices are used for different purposes, however, the Arduino board is easy to learn that even a person with no technical skills can get hands-on experience with this device. That’s all for today. Hope you find this article helpful. If you have any questions, you can approach me in the section below. I’d love to help you the best way I can. Feel free to share your valuable suggestions and feedback around the content we share, so we keep producing quality content as per your needs and requirements. Thank you for reading the article.

Introduction to Arduino Uno WiFi Rev 2

Hello Everyone! Hope you’re well today. Happy to see you around. In this post today, I’ll walk you through the Introduction to Arduino Uno WiFi Rev 2. Arduino Uno WiFi Rev 2 is a microcontroller board based on ATmega4809 and carries an ECC608 crypto chip to ensure a secure and safe WiFi connection. The board contains 14 digital I/O pins, 5 PWM pins, 6 analog pins, one SPI protocol, one I2C, and one UART communication protocol. I suggest you read this entire post till the end as I’ll detail the complete Introduction to Arduino Uno WiFi Rev2 covering pinout, pin description, features, programming, and applications. Let’s jump right in.

Introduction to Arduino Uno WiFi Rev 2

  • The Arduino Uno WiFi Rev 2 is a microcontroller board that is mainly based on the ATmega4809 microcontroller.
  • Contains a temperature sensor and a 6 axis accelerometer/gyroscope for motion sensing. Generally employed to develop fall sensors, step counters, door opening alarms.
  • A brand new ECC608 crypto chip accelerator is included on the board to ensure a secure WiFi connection.
  • The safe and secure WiFi connection makes it an ideal pick for several industries including consumer electronics, automotive, agriculture, logging data, and small home automation projects.
  • The oscillator speed is 16MHz which is required for the synchronization of all internal functions.
  • There are total 14 digital I/O incorporated on the board out of which 5 are used as PWM pins and 6 analog pins are available on the board.
 
  • The flash memory is 48KB that is mainly employed to store the sketch (Arduino program is called a sketch) while the EEPROM is 256bytes and SRAM is 6KB.
  • The EEPROM is a non-volatile memory which means it stays stored in the board even if power is removed from the board. While SRAM is used to manipulate and generate variables when it is activated.
  • The DC current for the 3.3V pin is 50 mA and the DC current per I/O pin is 20mA. And the recommended input voltage ranges from 7V to 12V.
  • The operating voltage of this board is 5V. Moreover, this board also incorporates Secure Element = ATECC608A and Radio module = u-blox NINA-W102
  • This board is an advanced version of Arduino Uno. But the processor architecture of this Rev 2 board is different than the Arduino Uno since it incorporates a different chip. The program you write for Arduino Uno will not work with Arduino Uno WiFi Rev 2.
  • Other features include a power jack, USB connection, a reset button, and an ICSP header. ICSP header is used to develop communication with other devices while pressing a reset button will reset the board and start the program from the initial stage.

Arduino Uno WiFi Rev 2 Pinout

The following figure shows the pinout diagram of Arduino Uno WiFi Rev 2.  

Arduino Uno WiFi Rev 2 Pin Description

This was all about the brief introduction to Arduino Uno WiFi Rev 2. In this section, we’ll detail the pin description of each pin incorporated on the board. Let’s get started.

Digital Pins

14 digital pins are installed on the board which you can use as an input or output according to the requirement. These pins get only two values i.e. HIGH or LOW. When they receive 0V they are in a LOW state and when they receive 5V they are in the HIGH state.

Analog Pins

6 analog pins are available on the board. These pins can receive any number of values in comparison to digital pins that only get two values HIGH or LOW.

PWM Pins

Out of 14 digital pins, 5 are used as PWM pins. These pins generate analog results with digital means. These pins are mainly used to control the speed of the motor.

SPI Pins

This board features the SPI protocol. Which serial peripheral interface communication protocol. It is used to develop communication between the controller and other peripheral devices like shift registers and sensors. It contains two Pins i.e. MISO (Master Input Slave Output) and MOSI (Master Output Slave Input) are mainly incorporated for SPI communication between devices. These pins are used to send or receive data by the controller.

I2C

I2C is a two-wire communication protocol. It contains two pins SCL and SDL. The SCL is a serial clock line used to synchronize all data transfer over the I2C bus while SDL is a serial data line used to carry the data.

UART Pins

The UART is a serial communication protocol. It contains two pins Rx and Tx. The Rx is the receiving pin used to receive serial data while Tx is a transmission pin used to transmit the serial data.

Arduino Uno WiFi Rev 2 Features

The following are the main features of Arduino Uno WiFi Rev 2.
  • Microcontroller = ATmega4809
  • Input Voltage (recommended) = 7 - 12V
  • Operating Voltage = 5V
  • DC Current for 3.3V Pin = 50 mA
  • DC Current per I/O Pin = 20mA
  • Digital I/O Pins = 14
  • Analog Input Pins = 6
  • PWM Pins = 5
  • Flash Memory = 48KB
  • EEPROM = 256bytes
  • SRAM = 6KB
  • UART = 1
  • SPI = 1
  • I2C = 1
  • Oscillator = 16MHz
  • Secure Element = ATECC608A
  • Radio module = u-blox NINA-W102
  • Inertial Measurement Unit = LSM6DS3TR
  • Size = 53x68mm
  • Weight = 25g

Programming

  • The board contains a USB port. Simply connect the board with the computer through a USB cable and start playing with it. The Arduino IDE (integrated development environment) software is mainly used to program all Arduino boards.
  • Moreover, this board carries an internal Bootloader that is employed to burn the program inside the controller. This means you don’t need an external burner to burn and program the microcontroller board.
  • While you open up this IDE software, you will be presented with LED basic program through which you can check if your board is working fine.

Arduino Uno WiFi Rev 2 Applications

  • Used in fall sensors, step counters, door opening alarms.
  • Due to the presence of WiFi connection ability, it is mainly employed for IoT applications.
  • Used in embedded systems and control systems
  • Used in educational projects
That’s all for today. Hope you’ve got a clear idea about Introduction to Arduino Uno WiFi Rev 2. If you have any query, you can pop your comment in the section below, I’d love to help you the best way I can. You’re most welcome to share your valuable suggestions and feedback around the content we share so we keep producing such content customized to your exact needs and requirements. Thank you for reading the article.
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