Introduction of the Project
Chemistry is a field of science that studies the properties, composition, and reactions of matter. A periodic table, on the other hand, is a fundamental tool used by chemists to organize the elements based on their atomic properties. The periodic table has been a key reference for chemists for over a century and has enabled them to understand the underlying principles of chemical behavior. So in this project tutorial, we are going to create a Chemistry test based on periodic table with Arduino.
To make this Arduino project, we will have a set of periodic table-related questions planned to be fed into the Arduino microcontroller, and those questions will pop up in front of the user one by one. Once the user answers the question, there will be a result shown on the LCD screen as True or False. And finally, based on the answered question, there will be a final result displayed on the screen.
Supplies
To build this Arduino project, we will use pushbuttons and an LCD screen to display a time-based test. In order to create a Chemistry test based on periodic table, we will require the following components:
Components
- Arduino Uno R3
- 2 PushButtons
- LCD 16×2
- 1 Small Breadboard
- 3 Resistors
- Connecting Wires
Circuit Diagram
Steps To Create A Chemistry Test Based On Periodic Table With Arduino
Step 1: Gather the Arduino UNO, push buttons, breadboard, and other required components on the Digital board.
Step 2: Then we plug Pushbuttons on the Breadboard.
PushButton:
Step 3: 1st terminal of each Pushbutton is connected to the 5V pin of the Arduino.
Step 4: Then, connect the 2nd terminal of each Pushbutton to the GND pin of the Arduino.
Step 5: The 3rd pin of the push button is connected to the 10 & 11 number pin of the Arduino, respectively.
LCD:
Step 6: Connect the Power and the LED anode terminal of the LCD to the 5V pin of the Arduino.
Step 7: Connect the Ground, Contrast, and Read/Write and LED cathode terminals of LCD to the GND pin of the Arduino, as shown in the circuit.
Step 8: Connect the Register Select, Enable, and DB4 to DB7 pins of LCD to the 2 to 7 number pins of the Arduino, respectively, as shown in the figure.
Source Code
#include <LiquidCrystal.h> LiquidCrystal lcd(2, 3, 4, 5, 6, 7); int a = 10, b = 11; int A; int score = 0; void setup() { Serial.begin(9600); lcd.begin(16,2); pinMode(a, INPUT); pinMode(b, INPUT); } void loop() { lcd.clear(); lcd.setCursor(0, 0); lcd.print("Choose the "); lcd.setCursor(0, 1); lcd.print("correct answer "); delay(2000); lcd.clear(); lcd.setCursor(0, 0); lcd.print(" Carbon is a"); lcd.setCursor(0, 1); lcd.print("NonMetal | Metal"); delay(5000); A = digitalRead(a); Serial.print(A); if(A == 1) { score = score + 5; lcd.clear(); lcd.setCursor(0, 0); lcd.print("TRUE"); delay(2000); } lcd.clear(); lcd.setCursor(0, 0); lcd.print("Valency of He is"); lcd.setCursor(0, 1); lcd.print("a)0 b)2"); delay(5000); A = digitalRead(a); Serial.print(A); if(A == HIGH) { score = score + 5; lcd.clear(); lcd.setCursor(0, 0); lcd.print("TRUE"); delay(2000); } lcd.clear(); lcd.setCursor(0, 0); lcd.print("Z(Nitrogen) = ?"); lcd.setCursor(0, 1); lcd.print("a)6 b)7"); delay(5000); A = digitalRead(b); Serial.print(A); if(A == HIGH) { score = score + 5; } else { lcd.clear(); lcd.setCursor(0, 0); lcd.print("FALSE"); delay(2000); } lcd.clear(); lcd.setCursor(0, 0); lcd.print("Symbol(Lithium)=?"); lcd.setCursor(0, 1); lcd.print("a)L b)Li"); delay(5000); A = digitalRead(b); Serial.print(A); if(A == HIGH) { score = score + 5; } else { lcd.clear(); lcd.setCursor(0, 0); lcd.print("FALSE"); delay(2000); } lcd.clear(); lcd.setCursor(0, 0); lcd.print("Lead is a"); lcd.setCursor(0, 1); lcd.print("Metal | NonMetal"); delay(5000); A = digitalRead(a); Serial.print(A); if(A == HIGH) { score = score + 5; lcd.clear(); lcd.setCursor(0, 0); lcd.print("TRUE"); delay(2000); } lcd.clear(); lcd.setCursor(0, 0); lcd.print("Silicon is a"); lcd.setCursor(0, 1); lcd.print("Metalloid Metal"); delay(5000); A = digitalRead(a); Serial.print(A); if(A == HIGH) { score = score + 5; lcd.clear(); lcd.setCursor(0, 0); lcd.print("TRUE"); delay(2000); } lcd.clear(); lcd.setCursor(0, 0); lcd.print("Cr = Chromium"); lcd.setCursor(0, 1); lcd.print("a)True b)False"); delay(5000); A = digitalRead(a); Serial.print(A); if(A == HIGH) { score = score + 5; lcd.clear(); lcd.setCursor(0, 0); lcd.print("TRUE"); delay(2000); } lcd.clear(); lcd.setCursor(0, 0); lcd.print("Final Score = "); lcd.setCursor(14, 0); lcd.print(score); delay(5000); }
Explanation of the Code
1. “LiquidCrystal” library is included in the header file for LCD.
2. After that, we initialized arrays and variables that will be required in the function.
3. With the setup function, we have declared the LCD as having 2 rows & 16 columns. Also, we have configured the pin mode for input purposes and began the serial connection with 9600 bits per second.
4. In the loop function, we display the options, along with the question, and give 5 seconds of time to the candidate to give the answer to that question using the push button. If the answer is right, the candidate will get 5 points, and at last, the final score will be displayed.
5. The following functions have been used to manage the LCD.
- lcd.clear(): We use this function will help to clear the screen of the LCD.
- lcd.print(): We use this function to print the text in the LCD,
- lcd.setCursor(): We use this function helps to set the cursor in the LCD.
- Delay function takes time in milliseconds, with the help of which the candidate will be given 5 seconds of time to answer each question.
Output
Once you start the simulation, you will be able to see your final score at the end of the test on LCD.
Recommendation
In recent years, there has been growing interest in the use of technology to enhance the study of chemistry. One notable example of this is the use of Arduino, an open-source electronics platform, to create chemistry test based on the periodic table.
Arduino-based chemistry tests allow students and researchers to conduct chemical analyses quickly and efficiently. With Arduino, students can design and build their own chemistry sensors that detect various chemical properties and react accordingly. For instance, an Arduino-based pH sensor can measure the acidity or basicity of a solution, while a gas sensor can detect the presence of specific gases.
This innovative approach to chemistry education has several benefits, including increased student engagement and understanding, as well as improved accuracy and reproducibility of results. Furthermore, by using open-source platforms like Arduino, students, and researchers can collaborate and share their findings with others in the scientific community.
Overall, the combination of the periodic table and Arduino technology offers a promising avenue for advancing the study of chemistry and promoting scientific literacy.

Meerali’s expertise lies in building Arduino projects from scratch. She has a vast knowledge of the various sensors, actuators, and other electronic components that can be used with Arduino boards. Meerali is also skilled in programming languages like C++, Python, and Java, which are commonly used to program Arduino boards.
I very delighted to find this internet site on bing, just what I was searching for as well saved to fav
I’m often to blogging and i really appreciate your content. The article has actually peaks my interest. I’m going to bookmark your web site and maintain checking for brand spanking new information.
I just like the helpful information you provide in your articles
naturally like your web site however you need to take a look at the spelling on several of your posts. A number of them are rife with spelling problems and I find it very bothersome to tell the truth on the other hand I will surely come again again.