Simple Arduino Calculator

Hello geeks, I hope you all are doing well and looking forward to making something new yet interesting. So, today we have come up with our new project which is a calculator using Arduino.

We all use calculators in our daily life, whether you are working in an office or counting money at the bank, you are buying your daily grocery or doing shopping online, you will find calculators in different forms everywhere. In fact, the computer was initially considered a giant calculator. So if it is that common, why do we not make our own calculator?

Before going into the details of the project, it is good to know some history of that, let’s know some facts about the calculator. So the first known device for calculation is Abacus. And the first digital calculator was made by Texas Instruments in 1967 before that all calculators were mostly mechanical and they did not need any electronic circuits. The first all-transistor calculator was made by IBM and it is claimed that the calculator performed all the four basic operations such as addition, subtraction, multiplication, and division.

Where To Buy?
No.ComponentsDistributorLink To Buy
1Keypad 4x4AmazonBuy Now
2LCD 16x2AmazonBuy Now
3Arduino Mega 2560AmazonBuy Now

Software to Install :

In this, we will be going to use the Proteus simulation tool and we will make our whole project using this software only. But no need to worry while using the actual components because if our project works perfectly with simulation, it will definitely work with actual hardware implementation. And the best part of the simulation is, here we will not damage any components by making any inappropriate connections.

If you don’t have an idea about Proteus, Proteus is a software for the simulation of electronic circuits and here we can use different types of microcontrollers and run our applications on them.

So for this project, we need to install this software. This software has a big database for all electronics components but still, it lacks some, therefore we have to install some libraries for modules which we are going to use in this project.

Project overview :

In this project, we will take input from the user using a keypad and perform the operation using Arduino UNO and display the result on an LCD display.

  • Arduino UNO - It is used for performing calculation-related operations, other user-related operations like interfacing with keypad module and LCD module.
  • 16x4 LCD module- It is used to display user-related messages such as input digits and selected arithmetical operations and calculated results.
  • 4x4 Keypad- It is used for user input. From this module, the user can enter the numerical values and arithmetic operations.

Our project will work the same as a normal digital calculator such that the user will enter two numerical values and select arithmetic operations which she/he wants to perform on the given values. Once the user clicks on the equal button, thereafter Arduino UNO will calculate the output and display the result on the LCD module.

Components required :

  1. Arduino UNO
  2. 16x2 LCD module
  3. 4x4 Keypad module

Components details:

  1. Arduino UNO

  • Arduino UNO is an open-source development board that we have used in this project.
  • It works on the ATMega328P microcontroller developed by Atmel.
  • It has an 8-bit RISC based processing core and up to 32 KB of flash memory
  • It has 14 digital input/output pins from D0 - D13 with a resolution of 8 bits, these pins can be used for taking any digital input or can be used as output pins for controlling peripherals.
  • In the 14 digital pins, there are 6 PWM pins.
  • It is suggested that you do not use the D0 and D1 pins of Arduino UNO for digital read or write purposes because they have an extra functionality of UART communication.
  • Arduino UNO has 6 analog input/output pins from A0-A5, which can be used to read analog values.
  • Analog pins have 10 bits of ADC (Analog to Digital convertor) resolution ranging values from 0 - 1023.
  • Arduino UNO has one hardware UART peripheral (D0, D1), one I2C peripheral, and one SPI peripheral.
  • We can use the power supply from 7 to 12 volts to power the Arduino UNO, but it is suggested to use a voltage supply of less than or equal to 9 volts but not below 5 volts.
  • We will use the Arduino IDE for writing and uploading the code on Arduino UNO. It is an open-source software developed by Arduino.
Note-: Whenever uploading the code on the Arduino UNO, disconnect any wire which is connected to Rx(D0) and Tx(D1) pins, otherwise it will give an error while uploading the code.
  1. LCD Module

  • LCD stands for Liquid Crystal Display, and this display is made using liquid crystal technology.
  • For more knowledge of how LCD works, prefer this link Working of LCD display.
  • In this project, we have a 16x2 LCD display which means we can display a max of 32 ASCII characters on this at a time.
  • The LCD module has 16 pins but we will not use all the pins in this project.
  • The LCD module can be used in two different modes, the first is 4-bit mode and the second is 8-bit mode.
  • We will use the 4-bit mode in this project, therefore, we have to connect only 4 data pins of the LCD module.
  • The major difference between 8-bit mode and 4-bit mode is, an ASCII character is 8 bit long so when we use 8-bit mode, LCD will process the data in single instruction but in 4- bit mode, microcontroller will send 2 chunks of 4 bits and the LCD will process that in two instructions.
  • To read more about the difference between 8-bit mode and 4-bit mode refer to this link Different modes of the LCD module
  • There are two registers in the LCD module: The Data register and the Command register.
  • When the RS(Register Select) pin is set to logic high, the data register mode is selected, and when it is set to logic low, the command register mode is selected.
  • The RS pin will be set to logic high to display the data on the LCD.
  • The operating power supply will be 5 volts for the LCD module.
  1. 4x4 Keypad

  • It is a membrane-based push keypad.
  • We have used a 4x4 keyboard which means it has 4 rows and 4 columns.
  • It has 0-9 numbers and basic arithmetic operations like addition, subtraction, multiplication, and division.
  • It has four pins for each row and 4 pins for each column.
  • The switch between a column and a row trace is closed, when a button is pressed, which completes the circuit and allows current to pass between a column pin and a row pin.

Circuit diagram and working:

Now, let’s start designing our circuit diagram for the calculator.

  • Make sure we have the correct and updated version of the Proteus software.
  • And make sure we have all the required libraries for the modules which we will be using in this project.
  • Now click on the new project (Ctrl+N) to start a new project of the Arduino calculator.
  • Import all the required components in the workspace.

Now we have all the required components in the workplace as follows.

Let's start connecting them.

  • First, we will connect the LCD module with the Arduino UNO module.
  • As we are using the LCD module in the 4-bit mode, therefore, we will have 4 pins for data, 1 pin for enable pin, and 1 pin for register status pin.
  • For data pins, connect the D4, D5, D6, and D7 pins of the LCD module to the D2, D3, D4, and D5 pins of Arduino UNO respectively. And connect the RS pin with D0 and Enable with D1 pin.
  • To use the LCD module in write mode, the R/W pin must be connected to the ground.
  • Now connect the keypad with the Arduino UNO board. As it is a 4x4 keypad, it will use 8 pins of the Arduino UNO board.
  • For row lines, we will use D13, D12, D11, and D10 pins and for column lines, we will use D9, D8, D7, D6 pins respectively.

That is all for connection. Make sure all the connections are correct, especially for keypad’s row and column connections otherwise we will get the wrong values from the keypad input.

And while working on the actual components, power the backlight of the LCD module and set the appropriate contrast, else nothing will be visible even if that has been displayed.

Arduino code for calculator:

Downloading and including libraries

  • Before going to write application code, we need libraries for the 16x2 LCD module and 4x4 keypad module.
  • We can download the library for the LCD module using this link LCD module library.
  • And use this link Keypad module library for keypad module.
  • Most of the Arduino related libraries are available on the Arduino official website.
  • We can add libraries in the Arduino using zip file or the manage libraries option.
  • If you have downloaded the libraries from the link then we have to click the option of “Add Zip Library” otherwise click on the manage libraries option and search for the required library.
  • After adding all the required libraries, include them in our application code.

Code declaration

  • We will declare the pins in the code as per we have connected them in the circuit diagram.
  • So first create the object for the LCD module and enter the pins we have used for LCD module connections.
  • While entering the pins in the LCD module object parameters, maintain the sequence as follows:

In the above-mentioned image, the first argument for RS pin, second for Enable pin, and rest four for data pins.

  • Now declare the variables for the Keypad module. We will use a 2D char array for storing keypad values, 2 arrays for storing pins used for rows and columns. And declare a ‘mykeypad’ name object for keypad class.
  • After that, declare some general variables which we will use to store the values like user input, output of calculation and operation.
  • After declaring and initialising all the variables and objects, we will start writing in the “void setup()” function.

Void setup function

  • This is one of the most important functions of Arduino programming.
  • As per the structure of Arduino programming, we can not remove this function from our code.
  • It will execute only once when the controller starts the execution.
  • Here, we will declare the modes of pins which we are going to use and setup functions related to the LCD module.
  • Display the welcome message on boot up of our calculator.
  • Here, we will begin the LCD module and set the cursor at 0,0 position and print the welcome message “The Engineering Projects Presents Arduino Calculator”.
  • As this message is written in the setup function, it will run every time once when the controller reboots and after 5 second delay, the LCD display will be cleared.

Void loop function

  • This is the second most important function of Arduino coding.
  • As per the structure of Arduino code, it must be in the code otherwise it will raise errors.
  • We will write our main application code here which we want to run in a continuous loop.
  • First, we will get the pressed key from the user, using the “myKeypad.getKey()” function and store that value in the variable named ‘key’.
  • And if the ‘key’ variable is one of the numbers, we will store that in the first number variable “num1”. And display that on the LCD display.
  • Now there can be two conditions, first if the user wants to perform the operation on a single digit number, in that case enter the operation which the user wants to perform. Then ‘key’ will be equal to ‘+’, ‘-’, ‘/’, ‘*’.

And required operation will be stored in the ‘op’ variable and a flag will be set for taking the second number.

  • Now the loop runs and control reaches to where ‘key’ is equal to number but this time it will go in the else condition of ‘presentValue’ variable because this variable is set ‘true’ from the operation condition.
  • And in this condition, the value will be stored in the ’num2’ variable. And here we will set the flag ‘final’.
  • Now the user will click the equal button to get the result. And the control reaches that condition and performs the operation on the values entered by the user and the same is stored in the ‘op’ variable.
  • Hence, the answer will be displayed on the LCD display.
  • After that, to clear the display, click the ‘C’ button. It will clear the LCD display and reset all the variables to their initial value.
  • Above mentioned condition is the first condition but in the second condition, when the user will enter more than one digits, then we shift the LCD cursor as per the length of the number entered.
  • To handle that situation, we will get the length of the entered digits and shift the LCD display cursor accordingly.

That is all the code, we need to run an Arduino Calculator.

Results/Working

Now, we have completed the coding and circuit part, it is time to run the simulation in the Proteus.

  • The first step to start the simulation, to add the hex file of our application code in the Proteus simulation.
  • To add the hex file, click on the Arduino UNO module and a new window will pop up then click on the Program Files option. Afterwards, browse to the folder of application code.
  • Now it is ready to start the simulation, click on the ‘Play’ button.
  • When simulation starts, the LCD display will show the welcome message.
  • Let’s suppose, we want to add two numbers 7 and 5. So click the same on the keypad.
  • After entering the values, click on the “=” button, it will display the result.
  • This is the same way we can operate different calculations using this calculator.
  • After that, click on this button which will clear the LCD display.

I hope we have covered everything related to Arduino calculator i.e. Simulation, Code, Working etc. but still if you find anything confusing, ask in the comments.

Thanks for reading this project out. All the best for your projects!

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.

Arduino Keypad Interfacing

Hello everyone! I hope you all will be absolutely fine and having fun. Today, we are going to work on Arduino Keypad Interfacing. First of all, I would like to tell you a bit about the keypad. After getting the basic idea about the keypad, we will start our discussion about Arduino Keypad Interfacing.  You should also have a look at Interfacing of Keypad with PIC Microcontroller.

In this tutorial, I am going to use a 4×4 keypad. It has sixteen buttons having four alphabetic characters. Let's have a look at the Arduino Keypad Interfacing:

Where To Buy?
No.ComponentsDistributorLink To Buy
1Jumper WiresAmazonBuy Now
2Keypad 4x4AmazonBuy Now
3Arduino UnoAmazonBuy Now

What is Keypad?

  • The keypad consists of multiple buttons, arranged in the form of a matrix(rows & columns) and is used in embedded projects.
  • They are cost-efficient and are easily available from online electronic stores.
  • Keypads are normally available in a 3×3, 4×3 and 4×4 format.
  • Keypad has several applications in real life based projects e.g. mobile phones, calculators, laptops, personal computers, television remote, toy remote, microwave oven, photocopy machine, bank’s ATM machine, tablets and a lot more.
  • A simple 4x4 Keypad is shown in the figure given below:
 

Keypad Pinout

  • I am using a 4×4 keypad in this tutorial, it has total of eight (8) pins.
  • All of these pins are provided in the table shown in the figure below:
  • From the above table, we can see that keypad’s first four pins are associated with its four rows.
  • The last four pins are assigned to the four columns of the keypad.
  • 4×4 Keypad’s pins functions are listed in the table provided in the figure given below.

Components Required for Arduino Keypad Interfacing

  • Components required for this project are:
    • Arduino UNO.
    • 4x4 Keypad.
    • Jumper Wires(Male to Female).

Keypad & Arduino Connections

  • The connections between the keypad and Arduino are provided in the figure given below:

Circuit Diagram of Keypad Arduino Interfacing

  • I have made a circuit diagram for keypad interfacing with Arduino.
  • A complete labeled circuit diagram is given in the figure shown below:
  • You can make a similar diagram and can easily test & verify your results on the serial monitor.

Arduino Code

  • You just need to copy this code into your Arduino software.
  • After successfully uploading the code to your Arduino board you will be able to verify the results.
#include <Keypad.h>

const byte ROWS = 4; //four rows
const byte COLS = 4; //four columns
//define the cymbols on the buttons of the keypads
char hexaKeys[ROWS][COLS] = {
  {'1','2','3','A'},
  {'4','5','6','B'},
  {'7','8','9','C'},
  {'*','0','#','D'}
};
byte rowPins[ROWS] = {9, 8, 7, 6}; //connect to the row pinouts of the keypad
byte colPins[COLS] = {5, 4, 3, 2}; //connect to the column pinouts of the keypad

//initialize an instance of class NewKeypad
Keypad customKeypad = Keypad( makeKeymap(hexaKeys), rowPins, colPins, ROWS, COLS); 

void setup(){
  Serial.begin(9600);
}
  
void loop(){
  char customKey = customKeypad.getKey();
  
  if (customKey){
    Serial.println(customKey);
  }
}
  • First of all, I have defined the number of rows and columns of the keypad.
  • Then I have declared the complete keypad characters in terms of rows and columns.
  • After that, I have defined the row and column pin of the keypad attached to the Arduino pins.
  • Then I have simply read the data sent from the keypad and displayed it on the serial monitor.
  • You can download a completely labeled wiring diagram and Arduino source code here by clicking on the below button:
Wiring Diagram & Arduino Code

In the tutorial Keypad Interfacing with Arduino, I have explained the basics of the keypad as well as the keypad interfacing with Arduino UNO. I have tried my level best to cover up all the necessary information. If you found something missing, please let me know then. I will update my tutorial correspondingly as soon as possible. I hope you have enjoyed the complete tutorial and I am hoping for your positive response. If you have any problem you can freely ask as in comments anytime. I will share different topics in my upcoming tutorials. Take care and bye till the next tutorial :)

Arduino Projects for Beginners

Hello everyone! I hope you all will be absolutely fine and having fun. Today, I am going to elaborate you, how to make Arduino Projects for beginners. Before gong into the detail of this tutorial first of all I would like to explain you a bit about Arduino. Arduino is an open source micro controller. A lot of help is available online so its user friendly hardware. Most of the students prefer to do work on this device. Arduino is a low cost high performance device. Due to its cost effectiveness and open source feature it is commonly available in the market these days. An amazing thing about Arduino is that students can take help online with a lot of examples regarding any of the task. There are thousands of Arduino projects are available online from beginner level to the major real life projects. Students can make their own projects without having a lot of programming experience. Arduino kits for the beginners are also available in the market now a days. These kit usually consist of an Arduino board, jumper wires, motors, LED's, sensors, relays etc. Arduino has a very wide of real life applications including automation, robotics, remote control, LED's, environmental sensing, Internet of Things (IoT), display, monitoring etc. Further detail about this tutorial will be given later.

Arduino Projects for Beginners

In this section of the tutorial Arduino Projects for beginners, I will elaborate you how to make basic and very simple projects using Arduino which will lead you to the better and better understanding of Arduino environment later. With the help of such a projects you will be much confident and will be able to make large projects too. So here I am going to share some of the basic and beginners level Arduino projects from my blog.
Arduino Basic Projects
In this section I will provide Proteus ISIS libraries for the different Arduino boards e.g. Arduino Nano, Arduino UNO, Arduino Mega 2560 etc and other different projects too. Here is the list of those projects.
  1. Getting Started with Arduino Software
  2. Arduino Library for Proteus
  3. Arduino UNO Library for Proteus
  4. Arduino Genuino Library for Proteus
  5. Arduino Lilypad Library for Proteus
  6. Arduino Mega 2560 Library for Proteus
  7. Arduino Nano Library for Proteus
  8. Arduino Pro Mini Library for Proteus
  9. Arduino UNO PCB Design for Proteus
  10. Arduino Library for Seven Segment Display
  11. How to get .hex File from Arduino
  12. How to use Arduino Software Serial
  13. How to use Arduino Serial Flush
  14. How to use Arduino Serial Read
  15. Ultrasonic Sensor Library for Proteus
  • These are the very basic Arduino Projects, a student must go through all of these projects for the better understanding of the other projects.
  • Now, I am going to share all of the mini projects designed by our team using Arduino board.

1. A Simple Arduino LED Example in Proteus

In this tutorial I have shared an LED control example using Arduino UNO in Proteus ISIS. I have designed the circuit to control a single LED using Arduino in Proteus. First I have testes and verified the control of an LED using Arduino. After its successful testing I have designed another circuit in Proteus to control a bundle of LED using the Same Arduino board. You can also check the blinking of an on board LED attached to the pin 13 of Arduino board. I have provided the complete Proteus ISIS design and Arduino source code for your easiness.
  • You can download the entire package here by clicking on the button below.

Download Simulation

  • Download .rar file, extract it and enjoy the simulation.

2. Circuit Designing of LCD with Arduino in Proteus

In this tutorial I have shared the design of a circuit for LCD interfacing with Arduino UNO in Proteus ISIS. I have used LCD here basically for debugging purpose in order to check whether the Arduino source code is in working condition or not. I have designed the Proteus simulation first and then I wrote source code in Arduino software. At the end after uploading .hex file in Arduino I have verified the code as show in the figure.
  • You can download the entire package here by clicking on the button below.

Download Simulation

  • Click on the button above and go through the detailed discussion.

3. Interfacing of Keypad with Arduino in Proteus ISIS

In this article I have elaborated the circuit designing of keypad with Arduino UNO. I have used 4*3 keypad. Keypads are most common in a lot of real life applications such as calculators, laptops, ATM machined etc. The functionality of keypad is based on matrix systems. I have interfaced Arduino UNO, LCD and keypad in such a way that the text is displayed on LCD with respect to the corresponding buttons pressed from the keypad.
  • You can download the entire package here by clicking on the button below.

Download Simulation

  • Download the file, extract it and enjoy the simulation.

4. Scrolling Text on LED Matrix 8*8 using Arduino in Proteus ISIS

This part of this tutorial will explain the design for scrolling text on LED matrix 8*8 using Arduino in Proteus ISIS. I have used an LED matrix. It is basically used to display long messages that we want to write on it. I have designed the complete circuit simulation in Proteus ISIS. Then I have written the Arduino source code. After uploading the code I have verified the results as well. They were absolutely perfect. Our team has done a lot of hard work to design this project. So, I have imposed a very lost on it that a student can easily buy this project even with his pocket money.
  • You can buy this project here by clicking on the button below.

Buy Simulation & Arduino Source Code

5. Ultrasonic Sensor Simulation in Proteus

This article presents the detailed discussion about the circuit designing for interfacing of SONAR with Arduino UNO. I have used the library for ultrasonic sensor whose link is given above. This sensor is very to interface using this library. I have shared three type of examples regarding ultrasonic sensor interfacing with Arduino in Proteus ISIS. These examples include ultrasonic sensor interfacing using buttons, as a proximity switch and as a switch. I have provided both Proteus simulation as well as Arduino source code.
  • You can download the entire package here by clicking on the button below.

Download Simulation

  • Download the file, extract it and enjoy the simulation.

6. Interfacing of Temperature Sensor 18B20 with Arduino

  The detailed discussion about circuit designing and interfacing of temperature sensor with Arduino UNO is given in this section of the tutorial Arduino projects for beginners. I have used non-water proof temperature sensor. I have used an LCD as well to print the values obtained from the temperature sensor. We can get the values of temperature in Celsius using 18B20. There is a library for Arduino while interfacing 18B20 with it. I have shared that library too.
  • You can download the entire package containing both simulation and Arduino library for 18B20 here by clicking on the button below.

Download Library & Simulation

  • Download the file, extract it and enjoy the simulation.

7. Interfacing of Temperature Sensor LM35 with Arduino in Proteus ISIS

This section of the tutorial Arduino projects for beginners, will provide you the discussion about the circuit designing of L35 interfacing with Arduino in Proteus. LM35 is a low cost sensor as compared to the other temperature sesnsors e.g. 18B20. I have designed the circuit in Proteus ISIS first and then I have written the code in Arduino software. After that I have tested the written code and verified the results. There were absolutely accurate. I have provided both simulation and code for free.
  • You can download the entire package here by clicking on the button below.

Download Simulation & Code

  • Download the file, extract it and enjoy the simulation.

8. Interfacing PIR Sensor with Arduino

The detailed discussion about the interfacing of PIR sensor with Arduino is given in this section of the tutorial Arduino projects for beginners. PIR sensor is designed for motion detection purposes. PIR sensor is a passive device and does not generate its own voltages and energy. I have provided the complete circuit diagram of PIR interfacing with Arduino as well as the source code in Arduino software. You can also read the detailed discussion here by clicking on the button below.

Download Simulation

  • Download source code and circuit diagram and enjoy the simulation.

9. Interfacing Flame Sensor with Arduino

In this section of the tutorial Arduino projects for beginners, I have given the detailed discussion about interfacing flame sensor with Arduino UNO. Flame sensor is designed basically fire detection purposes or you can say for temperature monitoring purposes. You have to set a threshold value and above that value an LED on the top of the sensor will be turn on as an indication. I have designed its Proteus ISIS simulation first. Then I have written its source code in Arduino software. I have uploaded the code in Arduino in Proteus and observed the results, they were quite accurate. You have to change the state of logic state from 0 to 1. As the state becomes the sensor will start working and a corresponding test will be displayed on LCD. I have provided the complete simulation and source code for this project.
  • You can download the entire package here by clicking on the button below.

Download Simulation & Arduino Source Code

  • Download source code and circuit diagram and enjoy the simulation.

10. Interfacing NRF24L01 Sensor with Arduino

This section of the tutorial Arduino projects for beginners, will give you the detailed discussio nabout the interfacing of NRF24L01 sensor with Arduino UNO. NRF24L01 is basically used for wireless communication between two different nodes.It operates on a frequency equal to WiFi frequency i.e. 2.4GHz. This sensor has a capability to send and receive data at the same time. I have provided Arduino library for NRF24L01, complete circuit diagram and Arduino source code for this project for free. You can easily design your own circuit with the help of this article.
  • You can download the entire simulation and source code here by clicking on the button below.

Download Simulation & Arduino Source Code

  • Download source code and circuit diagram and enjoy the simulation.

11. Interfacing RFID RC522 with Arduino

In this section I will elaborate you the method for interfacing RFID RC522 with Arduino. I have used a breadboard and jumper wires to make a connection between RFID RC522 and Arduino UNO. RFID RC522 is used in the projects where there is a need of wireless communication between laptop/PC and the micro controller. I have provide the pins configuration of Arduino as well as RFID RC522 sensor. I have also provided the library for RFID, a complete circuit diagram of in terfacing this module with Arduino as well as the source code to operate this module.
  • You can download the library, circuit diagram and source code here by clicking on the button below.

Download Simulation & Arduino Source Code

  • Download source code and circuit diagram and enjoy the simulation.

12. Control Servo Motor with Arduino in Proteus

This section of the tutorial Arduino Projects for Beginners, will provide explanation about control of a servo motor with Arduino in Proteus ISIS. Servo motor is commonly used in the projects where there is a need of high precision like CNC machines, robotics are such fields where high precised results are required. So, servo motors are the best option in such cases. I have designed a complete circuit for interfacing of a stepper motor with Arduino UNO in Proteus ISIS. I have provided the complete Arduino source code as well. After uploading the source code in Arduino you will be able to control the servo motor in Proteus ISIS.
  • You can download the complete simulation and source code here by clicking on the button below.

Download Simulation & Arduino Source Code

  • Download source code and circuit diagram and enjoy the simulation.

13. Home Automation Project using XBee and Arduino

In this tutorial I have explained all of the steps about making a home automation project using XBee and Arduino UNO. Now a says, since every thing is going under automation. So, I thought to design a pretty simple automation projects named as home automation project. Home automation project has the features e.g. you can control the entire appliances of the home from your PC or Laptop sitting anywhere in the world. This features required internet services. First of all I have designed the complete circuit as shown in the figure as well. I have designed the circuit to control the home using remote. I have written Arduino source code and after uploading the code in Arduino I have tested the projects and it was operating well. Our team has designed this project with a lot of hard work so we have imposed a very small amount of cost on it. Even a student can but this project with his/her pocket money.
  • You buy the complete simulation as well the Arduino source code here by clicking on the button below.

Buy Simulation & Arduino Code

14. GSM Based Home Security System using Arduino

In this section of the tutorial Arduino projects for beginners, I have explained all of the necessary steps to design a GSM based home security system using Arduino. Some of people are very conscious and they want to secure there houses at any cost. So basically this type of project is pretty suitable for them. I have designed a complete Proteus ISIS simulation for home security system using Arduino and GSM. Then I have written a complete Arduino Source code and after uploading it on the Arduino board in Proteus I have tested the results which were quite efficient and precise. This project took a lot of hard work and time. So, we have imposed a small amount of cost on it as well.
  • You can buy this project easily here by clicking on the button below, its not costly at all.

Buy Simulation & Arduino Code

This tutorial contains a detailed discussion of Arduino Projects for Beginners. I have a lot of basic Arduino projects. Some of them were free of cost and some projects are assigned with a small amount cost. I have tried to share different easy and moderate level Arduino projects. If you have any problem you can freely ask us. Me and my team is 24/7 available here to entertain you and to help you out in some good manner. I will share other informative and helpful tutorials in my upcoming articles. Till then, Taker Care :)

Arduino Tutorial for Beginners

Hello friends, I hope you all are fine and having fun with your lives. Today, I am going to share a complete Arduino Tutorial for Beginners because I was having a lot of requests about it. Reader were asking the same question that they are new to Arduino and how should they start so if you are beginner to Arduino and you don't have any idea How to learn it then you should read the below tutorials. I have posted all the basic Arduino Tutorial for Beginners already so in today's tutorial I am just gonna arrange them and must ask you to read them one by one from top to bottom and at then end you will really be able to design any kind of project on Arduino. So, let's get started with Arduino Tutorial for Beginners:

Arduino Tutorial for Beginners

Before going into the practical Arduino Programming, you must first read some theoretical knowledge about Arduino which will really help you out in your Arduino Projects. So these are the basic Arduino tutorial which I will post here step by step: What is Arduino ? First of all, you should read this tutorial in which I have given the basic introduction of Arduino. This tutorial is essential one, if you are new to Arduino. Arduino Vs Raspberry Pi Next thing you should read is Arduino Vs Raspberry Pi,  its not that important but its always good to have a look at alternatives. Installation of Arduino Driver in Windows Now, I suppose that you know the basics of Arduino and have got your Arduino UNO in your hand and are ready to install Arduino Drivers in your Windows. Arduino Library for Proteus Next thing you need to read is How to use Arduino Library for Proteus. Using this library you can easily simulate your Arduino boards in Proteus software. Getting Started with Arduino Software Now you have the basic idea of Arduino board and you know How to use it in Proteus, the next thing you need to do is to have some understanding about Arduino software.

Basic Arduino Commands

Now, that you have understood the basics of Arduino and its programming so now let's have a look at some Basic Arduino Commands and I would suggest you to test these commands in Proteus on your own so that you do mistakes and get some knowledge from them. Anyways, let's continue with these Basic Arduino Commands: Getting Started with Arduino Programming After having a look at the Arduino software, next thing you need to do is to read about Getting Started with Arduino Programming. Arduino Data Types Then we have a tutorial at Arduino Data Types in which we have explained in detail all the Data Types of Arduino. How to use pinMode in Arduino How to use pinMode in Arduino is the next tutorial which you must read so that you have an idea about how to make pins input or output. How to use DigitalRead in Arduino How to use DigitalRead in Arduino is the next tutorial which you must read so that you have an idea about how to use the digital Pins of Arduino. How to use DigitalWrite in Arduino How to use DigitalWrite in Arduino is the next tutorial which you must read so that you have an idea about how to use the digital Pins of Arduino. How to use AnalogRead in Arduino How to use AnalogRead in Arduino is the next tutorial and I have explained here how to read the status of analog Pins. How to use AnalogWrite in Arduino Analog Write is used to update the status of analog Pins as well as PWM Pins. Here we will discuss this command and in next tutorial we will have a look at PWM Pins. How to use Arduino PWM Pins How to use DigitalRead in Arduino is the next tutorial which you must read so that you have an idea about how to use the digital Pins of Arduino. A Simple Arduino LED Example First of all, you should have a look at A Simple Arduino LED Example in which I have designed a simple example in Proteus and blinked the LED at Pin # 13 of Arduino. How to write Arduino code Next article you should have a look at is How to write Arduino code, in this tutorial I have explained how to write arduino code efficiently. At the end, I would suggest you to have a look at this list of Arduino Projects in which I have given all the Arduino Projects which are posted on our blog, so once you get trained in Arduino then you can try those projects and can get pro in Arduino.  
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