top of page

Making a calculator using Arduino and 4*4 Keypad

Updated: Mar 19

We use calculators more often in our daily life to perform many kinds of calculations for various purposes. In this blog, we will learn to make a calculator by interfacing a 4x4 keypad that takes input from the user and performs the arithmetic operations like addition, subtraction, multiplication, division and the result of the operation (i.e., output) will be displayed on the LCD screen.


Hardware Requirements:


1. 4x4 keypad:


4x4 keypad
4x4 keypad

A 4x4 matrix keypad is used as an input device that takes inputs from the users. It consists of 16 pins in total with four rows and four columns. On pressing a key, a connection will be established between the corresponding row and column between which the switch is placed.


2. Arduino UNO:


Arduino UNO
Arduino UNO

The Arduino is a programmable #microcontroller, it's an open-source electronics proto-type platform. It interacts with the user by receiving input with the aid of sensors and provides the output employing LED, buzzer, etc.,


In order to know more about the Arduino UNO, refer to this article.

3. 16x2 LCD:


16x2 LCD
16x2 LCD

LCD- Liquid Crystal Display is an electronic module that uses liquid crystal to produce a visible image. It is the basic module that is generally used in DIY and circuits. The display segments are affordable and simply programmable.


4. Jumper Wires:


Jumper wires
Jumper wires

Jumper wires are used to establish connections between different components in the circuit.


Circuit Connection and its Working:


What goes where??

Circuit Connection involves the following steps:

  • Column pins C4-C1 of the keypad are connected to 6-9 PWM pins of the Arduino respectively.

  • Row pins R1-R4 of the keypad are connected to 10-13 PWM pins of the Arduino respectively.

  • The Ground pin of the LCD is connected to the GND pin of the Arduino.

  • Vcc of the LCD is connected to the 5V of the Arduino.

  • SDA is connected to analog pin 4 of the Arduino.

  • SCL is connected to analog pin 5 of the Arduino.

Code


Video by - Aishwarya Balajee and edited by Neha Patil



See also:



760 views2 comments

Related Posts

See All

2 Comments


LearnElectronics India's explanation is spot-on. Great work!

Like

Anushka Gupta
Anushka Gupta
Jul 20, 2023

Absolutely fantastic! I stumbled upon this blog by Learn Electronics India while searching for Arduino projects, and I must say, it exceeded my expectations. The calculator project with the 4x4 keypad is both practical and fun. I particularly appreciated the troubleshooting tips and suggestions for further customization. This blog is a goldmine for electronics enthusiasts and hobbyists. Thank you for sharing your expertise with us.

Like
bottom of page