Arduino Based Scientific Calculator
Arduino Based Scientific Calculator
Volume 3 Issue 5, August 2019 Available Online: www.ijtsrd.com e-ISSN: 2456 – 6470
Copyright © 2019 by author(s) and KEYWORDS: Arduino Mega, LCD, Keypad, Proteus, C Programming
International Journal of Trend in Scientific
Research and Development Journal. This I. INTRODUCTION
is an Open Access article distributed Scientific calculators all use the same order for carrying out mathematical
under the terms of operations. This order is not necessarily the same as just reading a calculation
the Creative from left to right. The rules for carrying out mathematical calculations specify
Commons Attribution the priority and so the order in which a calculation should be done – scientific
License (CC BY 4.0) calculators follow the same order. This order is sometimes abbreviated by
(http://creativecommons.org/licenses/by terms such as BODMAS and BIDMAS to help students remember the order of
/4.0) doing calculations.
Brackets (all calculations within bracket are done first) control and arithmetic algorithm is performed using Arduino
Operations (eg. squaring, square rooting, sin, cosine) Software. A high level block diagram of the hardware
Division and Multiplication implementation is shown Figure1.
Addition and Subtraction
Being aware of this order is necessary in order to use a
scientific calculator properly. This order should always be Power Supply Arduino Mega 2560 16x2 LCD
used in all mathematical calculations whether using a
calculator or not. The calculator is an extension of a
mathematician and it has opened up new possibilities within
mathematics. It is a machine though, and it is only capable of
doing what it is programmed to do. Accordingly, this work
aims to develop the internal programmed computational
code in the form of a computer program that a scientific
calculator could use to compute functions such as square 4x5 Keypad
root, sine function and cosine functions. The idea of this
project is to develop the basic addition, subtraction, Figure1. Block Diagram of the Hardware Implementation
multiplication, division and integer splicing functions. Then
using these basic functions, the program will then compute
I2C LCD display
other more complicated functions Arduino software found 5V
on a typical scientific calculator such as the sine and VCC
SDA SCL GND
logarithmic functions. the C programming language is chose
to work. Computing multiplication and division takes SDA
significantly longer time than computing addition and
SCL
subtraction, and therefore should be avoided whenever
possible. Thus throughout the program there are instances Arduino Mega 2560
where addition and subtraction is used to eliminate the need
for multiplication. Another issue is that the program is
constantly rounding numbers and thus losing trailing digits.
II. Hardware Implementation
The calculator takes input from a user in real-time via a
Figure2. The connection of LCD and Arduino Mega
keypad and displays output on LCD display module. The
@ IJTSRD | Unique Paper ID – IJTSRD26395 | Volume – 3 | Issue – 5 | July - August 2019 Page 514
International Journal of Trend in Scientific Research and Development (IJTSRD) @ www.ijtsrd.com eISSN: 2456-6470
III. Overall Circuit Operation
Figure3 shows the overall circuit diagram of the scientific calculator. The system includes Arduino Mega 2560, 4x5 keypad,
16x2 LCD display and other peripheral circuit components. The Arduino Mega is used as arithmetic logic unit and all calculation
function perform. And then the result displays on LCD. Each part of the circuit and their connection to Arduino are described in
below.
Define I/O
Read First
Button
Read
Operation
Button
Read Second
Button
Read Equal
Button
Yes
Addition? Add two number
No Display Result
Yes
Subtract two
Subtraction?
number
Display Result
No
C A
@ IJTSRD | Unique Paper ID – IJTSRD26395 | Volume – 3 | Issue – 5 | July - August 2019 Page 515
International Journal of Trend in Scientific Research and Development (IJTSRD) @ www.ijtsrd.com eISSN: 2456-6470
C A
Yes
Multiplication? Multiply two number
No Display Result
Yes
Division? Divide two number
Display Result
No
Yes
Square? Square the number
No Display Result
Yes
Square Root the
Square Root?
number
Display Result
No
C B
C B
Yes
Take Sine function of the
Sine?
number
No
Display Result
Yes
Take Cosine function of the
Cosine?
number
No
Display Result
Clear LCD
Yes
C Read again?
No
End
@ IJTSRD | Unique Paper ID – IJTSRD26395 | Volume – 3 | Issue – 5 | July - August 2019 Page 516
International Journal of Trend in Scientific Research and Development (IJTSRD) @ www.ijtsrd.com eISSN: 2456-6470
V. Results
All of first, the calculator circuit is designed and the calculation program is implemented. After that the calculator circuit is
simulated using Proteus software. The schematic diagram of the main components of the calculator including the Arduino
circuit is drawn in the Proteus software and then run the simulator program. A screenshot of the Proteus schematic capture
and interactive simulation test is shown in Figure7and Figure8. After testing the calculator function with the Proteus Software
the small model of the system is configured as shown in Figure9 and Figure10. Basic mathematical functions and some
scientific functions can calculate in this constructed calculator. In this system, basic mathematical functions and scientific
functions can be calculated. These functions are as follows:
1. Addition
2. Subtraction
3. Multiplication
4. Division
5. Square
6. Square root
7. Sine
8. Cosine
@ IJTSRD | Unique Paper ID – IJTSRD26395 | Volume – 3 | Issue – 5 | July - August 2019 Page 517
International Journal of Trend in Scientific Research and Development (IJTSRD) @ www.ijtsrd.com eISSN: 2456-6470
@ IJTSRD | Unique Paper ID – IJTSRD26395 | Volume – 3 | Issue – 5 | July - August 2019 Page 518