ArduinoCalc — 5Feats Calculator w/ LCD I2C

Ahmad Fawwaz Zuhdi
3 min readMar 21, 2018

--

— SYSTEM DESCRIPTION —

On this fine day, we are doing another project on using Arduino Uno R3 as a micro-controller. This project has the objective of creating a calculator with five features that are capable of doing mathematical calculation of addition, substraction, multiplication, division and modulo operation. We give this project a name, “ArduinoCalc”.

For the sake of pin usage efficiency we decided to use I2C to cut down the usage of LCD 16-pins to I2C 4-pins, this made the use of breadboard not needed.

— COMPONENTS —

Here are the components that are used in this project:

Figure 1. LCD 16x2, Arduino Uno R3, LCM 1602 I2C
Figure 2. Membrane Keypad 4x4, Jumper (8*M-M, 4*M-F), USB Blaster

— SCHEMATIC —

Figure 3. ArduinoCalc Schematic

The schematic for this project is created with Fritzing.

— DOCUMENTATION —

Figure 4. shows the testing of ArduinoCalc for its capabilities.

Figure 4. ArduinoCalc System

Check out the demonstration video :3

— SOURCE CODE —

The source code can be obtained from ArduinoCalc on Github.

Figure 5. Source Code of ArduinoCalc

— USED LIBRARIES —

  1. Keypad Library by Mark Stanley and Alexander Brevig
  2. hd44780 LCD Library by duinoWitchery

— PROBLEMS AND SOLUTIONS —

Some problems we encountered in doing this project are as such:

  1. Problem: LCD I2C Address not detected caused by reversed SDA SCL pins
    Solution: Correction of SDA SCL-pins pinning and Address Configuration using I2C Scanner.
  2. Problem: LCD not giving output caused by high backlight brightness
    Solution: Setting working voltage to 5V and setting the potentiometer
  3. Problem: LCD not showing output as expected (Char instead of String)
    Solution: Using hd44780 LCD Library. After trying to use several other LCD libraries such as: New-LiquidCrystal, LiquidCrystal-I2C, and LCD_I2C

— REFERENCES —

  1. Arduino Calculator using 4x4 Keypad by circuitdigest.com
  2. Simple Calculator by Rezha Kusuma Astri
  3. Display by I2C LCD1602 by sunfounder.com
  4. New-LiquidCrystal by Francisco Malpartida
  5. LCD I2C Analog I/O Display by Crolus

--

--