Monday, April 14, 2025

How to Use a Membrane Keypad 1x4 with Arduino | Simple Serial Monitor Project

If you’re looking for a beginner-friendly, flexible way to add multiple user inputs to your Arduino projects, the Membrane Keypad 1x4 is a great option. In this tutorial, we’ll learn how to connect a 1x4 membrane keypad to an Arduino Uno and display button presses in the Serial Monitor using basic wiring and a simple Arduino sketch — no extra libraries needed!

Membrane keypad 1x4 with Arduino

๐Ÿ“Œ What is a Membrane Keypad 1x4?

A Membrane Keypad 1x4 is a compact, ultra-slim keypad featuring four individual keys in a single horizontal row. It works by closing a circuit when a key is pressed, making contact between conductive layers inside the membrane. This type of keypad is lightweight, reliable, and commonly used in home appliances, control panels, and DIY electronics.

๐Ÿ“ Membrane Keypad 1x4 Specifications

Here’s a quick overview of the module’s specifications:
Membrane keypad 1x4 specifications

Components Required

To get started, you will need the following components:
Components required for this tutorial

✅ Arduino UNO board
✅ Membrane Keypad 1x4
✅ Jumper Wires
✅ USB cable for Arduino

๐Ÿ› ️ Circuit Wiring

Here’s how to wire the components correctly:
Connection membrane keypad 1x4

The connection between membrane keypad 1x4 and Arduino

Wiring diagram

✅ Keypad Pin 1 → Arduino Pin GND
✅ Keypad Pin 2 → Arduino Pin 3
✅ Keypad Pin 3 → Arduino Pin 4
✅ Keypad Pin 4 → Arduino Pin 5
✅ Keypad Pin 5 → Arduino Pin 6

Programming the Arduino

Here’s a simple sketch to detect button presses and display them on the Serial Monitor or you can download the code HERE.
const int rowPins[4] = {2, 3, 4, 5}; //Digital Input
char keyMap[4] = {'1', '2', '3', '4'}; //Keypad Number
                                       //connect Pin1 keypad to GND
void setup() {
    Serial.begin(9600);
    for (int i = 0; i < 4; i++) {
        pinMode(rowPins[i], INPUT_PULLUP);
    }
}

void loop() {
    for (int i = 0; i < 4; i++) {
        if (digitalRead(rowPins[i]) == LOW) {
            Serial.print("Key Pressed: ");
            Serial.println(keyMap[i]);
            delay(300);
        }
    }
}
Open Arduino IDE and copy-paste the code

๐Ÿงช Testing the GSM Module

After uploading the code to your Arduino, open the Serial Monitor in the Arduino IDE and press each button on the 1x4 keypad.
You should see outputs like this when each button is pressed.

๐Ÿ“Œ Conclusion

That’s it — a simple, practical way to connect a Membrane Keypad 1x4 to an Arduino Uno and read inputs via the Serial Monitor. This setup is ideal for beginner projects like password entry systems, basic menu navigation, or digital counters.

๐ŸŽฅ Watch the Full Video Tutorial


๐Ÿ”” If you found this guide helpful, share it with fellow makers! For more tutorials, subscribe to our YouTube channel and follow us on social media. ๐Ÿš€

#arduino  #keypad  #1x4keypad #membrane #diyprojects

Wednesday, April 9, 2025

How to Test SIM900A GSM Module with Arduino | Step-by-Step Tutorial

GSM modules are essential for adding wireless communication capabilities to your Arduino projects. One of the most popular modules is the SIM900A, which allows your microcontroller to send/receive SMS, make calls, and access mobile networks. In this blog, we’ll walk you through how to interface the SIM900A GSM module with an Arduino, covering its features, wiring, coding, and live testing via Serial Monitor.

SIM900A GSM module with Arduino

๐Ÿ“ฑ What is the SIM900A GSM Module?

The SIM900A is a GSM/GPRS module designed to operate on 2G networks. It supports voice, SMS, and data transfer via GPRS. This module can be used in a variety of real-world applications like remote monitoring, IoT solutions, SMS alerts, and home automation.

It communicates with the Arduino using serial communication (TX/RX) and responds to AT commands for controlling network functions.

๐Ÿ“‹ SIM900A GSM Module Specifications

Here’s a quick overview of the module’s specifications:
SIM900A GSM module specifications

Components Required

To get started, you will need the following components:
Components required for this tutorial

✅ Arduino UNO board
✅ SIM900A GSM Module
✅ Jumper Wires
✅ External Power Supply (5V, 1A)
✅ USB cable for Arduino

๐Ÿ”Œ Wiring the SIM900A GSM Module with Arduino

Here’s how to wire the components correctly:
Connection SIM900A GSM module

The connection between the SIM900A GSM module and Arduino

Wiring diagram

✅ SIM900A TXD → Arduino Pin 10
✅ SIM900A RXD → Arduino Pin 11
✅ GND → GND (Arduino & Power Supply)
✅ VCC5 → External 5V Power Supply (1A recommended)
✅ Antenna – Connect to SMA port on the module

Note: Use a common ground between Arduino and the external power source for reliable communication.

Programming the Arduino

Below is the code used to test the SIM900A module by sending AT commands and reading the response via Serial Monitor, or you can download the code HERE.
#include <SoftwareSerial.h>

SoftwareSerial sim900(3, 4); // RX, TX

void setup() {
    Serial.begin(9600);
    sim900.begin(9600);
    Serial.println("Initializing SIM900A...");
    delay(1000);

    sim900.println("AT");           // Check module response
    delay(1000);
    readResponse();

    sim900.println("AT+CPIN?");     // Check SIM status
    delay(1000);
    readResponse();

    sim900.println("AT+CSQ");       // Check signal quality
    delay(1000);
    readResponse();

    sim900.println("AT+GMR");       // Get firmware version
    delay(1000);
    readResponse();
}

void loop() {
    if (sim900.available()) {
        Serial.write(sim900.read());
    }
}

void readResponse() {
    while (sim900.available()) {
        Serial.write(sim900.read());
    }
}
Open Arduino IDE and copy-paste the code

๐Ÿงช Testing the GSM Module

After uploading the code to your Arduino, open the Serial Monitor in the Arduino IDE and type AT commands.
Type AT commands and press Enter

Response from SIM900A module

✅ Useful AT Commands
  • AT – Check communication
  • AT+CPIN? – Check if SIM is ready (READY = OK)
  • AT+CSQ – Signal strength
  • AT+COPS? – Shows network operator
  • AT+GSN – Displays the IMEI number
  • AT+IPR – Set fixed baud rate

๐Ÿงฏ Common Troubleshooting

  • ❌ No SIM detected? → Check SIM card orientation and try another card.
  • ❌ No response? → Ensure external power supply is 5V/1A or more.
  • ๐Ÿ” Gibberish on Serial Monitor? → Double-check baud rate settings.
  • ๐Ÿ“ก Poor signal? → Use a proper antenna and check the signal area.

๐Ÿงพ Conclusion

The SIM900A GSM module is an easy way to connect your Arduino to a mobile network. With just a few wires and some basic code, you can send AT commands to check SIM status, signal strength, and more.

๐ŸŽฅ Watch the Full Video Tutorial


๐Ÿ”” If you found this guide helpful, share it with fellow makers! For more tutorials, subscribe to our YouTube channel and follow us on social media. ๐Ÿš€

#arduino  #SIM900A  #GSM  #arduinoprojects  #network